terse-types 0.0.64 → 0.0.66

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.
@@ -66,6 +66,7 @@ export declare const ApiRoutes: {
66
66
  POSTHOG: {
67
67
  INTEGRATIONS: string;
68
68
  PROJECTS: string;
69
+ EVENTS: string;
69
70
  };
70
71
  LAUNCHDARKLY: {
71
72
  INTEGRATIONS: string;
@@ -65,7 +65,8 @@
65
65
  },
66
66
  "POSTHOG": {
67
67
  "INTEGRATIONS": "/posthog/integrations",
68
- "PROJECTS": "/posthog/projects"
68
+ "PROJECTS": "/posthog/projects",
69
+ "EVENTS": "/posthog/events"
69
70
  },
70
71
  "LAUNCHDARKLY": {
71
72
  "INTEGRATIONS": "/launchdarkly/integrations",
@@ -541,24 +541,37 @@ const TOOL_DISPLAY_CONFIG = {
541
541
  return total !== undefined ? `Loaded ${total} visit update${total !== 1 ? "s" : ""}` : "Visit details loaded";
542
542
  }
543
543
  },
544
+ listPosthogEventNames: {
545
+ preparing: "Listing event types",
546
+ executing: params => {
547
+ const distinctId = params?.distinctId;
548
+ if (distinctId)
549
+ return `Listing event types for ${truncate(distinctId, 30)}`;
550
+ return "Listing event types";
551
+ },
552
+ complete: (params, result) => {
553
+ const parsed = safeParseResult(result);
554
+ const totalEventTypes = parsed?.totalEventTypes;
555
+ if (totalEventTypes !== undefined)
556
+ return `Found ${totalEventTypes} event type${totalEventTypes !== 1 ? "s" : ""}`;
557
+ return "Event types listed";
558
+ }
559
+ },
544
560
  searchPosthogEvents: {
545
561
  preparing: "Looking through events",
546
562
  executing: params => {
547
563
  const eventName = params?.eventName;
548
- const userEmail = params?.userEmail;
564
+ const distinctId = params?.distinctId;
549
565
  if (eventName)
550
566
  return `Looking for "${truncate(eventName)}" events`;
551
- if (userEmail)
552
- return `Looking for events from ${truncate(userEmail, 30)}`;
567
+ if (distinctId)
568
+ return `Looking for events from ${truncate(distinctId, 30)}`;
553
569
  return "Looking through events";
554
570
  },
555
571
  complete: (params, result) => {
556
572
  const parsed = safeParseResult(result);
557
- const totalEventTypes = parsed?.totalEventTypes;
558
573
  const totalEvents = parsed?.totalEvents;
559
574
  const eventName = params?.eventName;
560
- if (totalEventTypes !== undefined)
561
- return `Found ${totalEventTypes} event type${totalEventTypes !== 1 ? "s" : ""}`;
562
575
  if (totalEvents !== undefined && eventName)
563
576
  return `Found ${totalEvents} "${truncate(eventName, 25)}" event${totalEvents !== 1 ? "s" : ""}`;
564
577
  if (totalEvents !== undefined)
package/dist/Tools.d.ts CHANGED
@@ -1606,10 +1606,14 @@ export declare const posthogPropertyFilterOperatorSchema: z.ZodEnum<{
1606
1606
  gte: "gte";
1607
1607
  lte: "lte";
1608
1608
  }>;
1609
+ export declare const posthogPropertyFilterTypeSchema: z.ZodEnum<{
1610
+ event: "event";
1611
+ person: "person";
1612
+ }>;
1609
1613
  export declare const posthogPropertyFilterSchema: z.ZodObject<{
1610
1614
  key: z.ZodString;
1611
1615
  value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
1612
- operator: z.ZodDefault<z.ZodEnum<{
1616
+ operator: z.ZodOptional<z.ZodEnum<{
1613
1617
  exact: "exact";
1614
1618
  is_not: "is_not";
1615
1619
  icontains: "icontains";
@@ -1619,18 +1623,48 @@ export declare const posthogPropertyFilterSchema: z.ZodObject<{
1619
1623
  gte: "gte";
1620
1624
  lte: "lte";
1621
1625
  }>>;
1626
+ type: z.ZodOptional<z.ZodEnum<{
1627
+ event: "event";
1628
+ person: "person";
1629
+ }>>;
1630
+ }, z.core.$strip>;
1631
+ export type PosthogPropertyFilter = z.infer<typeof posthogPropertyFilterSchema>;
1632
+ export declare const listPosthogEventNamesInputSchema: z.ZodObject<{
1633
+ integrationId: z.ZodString;
1634
+ projectId: z.ZodString;
1635
+ customEventsOnly: z.ZodOptional<z.ZodBoolean>;
1636
+ distinctId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1637
+ propertyFilters: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
1638
+ key: z.ZodString;
1639
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
1640
+ operator: z.ZodOptional<z.ZodEnum<{
1641
+ exact: "exact";
1642
+ is_not: "is_not";
1643
+ icontains: "icontains";
1644
+ not_icontains: "not_icontains";
1645
+ gt: "gt";
1646
+ lt: "lt";
1647
+ gte: "gte";
1648
+ lte: "lte";
1649
+ }>>;
1650
+ type: z.ZodOptional<z.ZodEnum<{
1651
+ event: "event";
1652
+ person: "person";
1653
+ }>>;
1654
+ }, z.core.$strip>>, z.ZodNull]>>;
1655
+ dateFrom: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1656
+ dateTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1622
1657
  }, z.core.$strip>;
1623
1658
  export declare const searchPosthogEventsInputSchema: z.ZodObject<{
1624
1659
  integrationId: z.ZodString;
1625
1660
  projectId: z.ZodString;
1626
- countByEventNameOnly: z.ZodDefault<z.ZodBoolean>;
1627
- customEventsOnly: z.ZodDefault<z.ZodBoolean>;
1628
- userEmail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1629
1661
  eventName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1662
+ customEventsOnly: z.ZodOptional<z.ZodBoolean>;
1663
+ distinctId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1630
1664
  propertyFilters: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
1631
1665
  key: z.ZodString;
1632
1666
  value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
1633
- operator: z.ZodDefault<z.ZodEnum<{
1667
+ operator: z.ZodOptional<z.ZodEnum<{
1634
1668
  exact: "exact";
1635
1669
  is_not: "is_not";
1636
1670
  icontains: "icontains";
@@ -1640,12 +1674,15 @@ export declare const searchPosthogEventsInputSchema: z.ZodObject<{
1640
1674
  gte: "gte";
1641
1675
  lte: "lte";
1642
1676
  }>>;
1677
+ type: z.ZodOptional<z.ZodEnum<{
1678
+ event: "event";
1679
+ person: "person";
1680
+ }>>;
1643
1681
  }, z.core.$strip>>, z.ZodNull]>>;
1644
- limit: z.ZodDefault<z.ZodNumber>;
1645
- offset: z.ZodDefault<z.ZodNumber>;
1646
- last7Days: z.ZodDefault<z.ZodBoolean>;
1647
- dateFrom: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
1648
- dateTo: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
1682
+ limit: z.ZodOptional<z.ZodNumber>;
1683
+ cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1684
+ dateFrom: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1685
+ dateTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1649
1686
  }, z.core.$strip>;
1650
1687
  export declare const linearCreateTicketTool: {
1651
1688
  name: "linear_create_ticket";
@@ -3641,96 +3678,17 @@ export declare const getPosthogSessionEventsTool: {
3641
3678
  message: z.ZodString;
3642
3679
  }, z.core.$strip>;
3643
3680
  };
3644
- export declare const searchPosthogEventsCountSummarySchema: z.ZodObject<{
3645
- actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
3646
- action: z.ZodString;
3647
- integration: z.ZodEnum<typeof import("./Integrations.js").IntegrationType>;
3648
- target: z.ZodString;
3649
- details: z.ZodString;
3650
- url: z.ZodOptional<z.ZodString>;
3651
- step_id: z.ZodOptional<z.ZodString>;
3652
- type: z.ZodEnum<{
3653
- error: "error";
3654
- approve: "approve";
3655
- create: "create";
3656
- update: "update";
3657
- delete: "delete";
3658
- read: "read";
3659
- }>;
3660
- isReadOnly: z.ZodOptional<z.ZodBoolean>;
3661
- output_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
3662
- output_item_id: z.ZodString;
3663
- output_item_type: z.ZodEnum<typeof import("./Configs.js").ConfigType>;
3664
- }, z.core.$strip>>>;
3665
- }, z.core.$strip>>>;
3666
- success: z.ZodLiteral<true>;
3667
- countByEventNameOnly: z.ZodLiteral<true>;
3668
- customEventsOnly: z.ZodBoolean;
3669
- eventCounts: z.ZodArray<z.ZodObject<{
3670
- eventName: z.ZodString;
3671
- count: z.ZodNumber;
3672
- }, z.core.$strip>>;
3673
- totalEventTypes: z.ZodNumber;
3674
- eventsLink: z.ZodString;
3675
- message: z.ZodString;
3676
- }, z.core.$strip>;
3677
- export declare const searchPosthogEventsEventListSchema: z.ZodObject<{
3678
- actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
3679
- action: z.ZodString;
3680
- integration: z.ZodEnum<typeof import("./Integrations.js").IntegrationType>;
3681
- target: z.ZodString;
3682
- details: z.ZodString;
3683
- url: z.ZodOptional<z.ZodString>;
3684
- step_id: z.ZodOptional<z.ZodString>;
3685
- type: z.ZodEnum<{
3686
- error: "error";
3687
- approve: "approve";
3688
- create: "create";
3689
- update: "update";
3690
- delete: "delete";
3691
- read: "read";
3692
- }>;
3693
- isReadOnly: z.ZodOptional<z.ZodBoolean>;
3694
- output_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
3695
- output_item_id: z.ZodString;
3696
- output_item_type: z.ZodEnum<typeof import("./Configs.js").ConfigType>;
3697
- }, z.core.$strip>>>;
3698
- }, z.core.$strip>>>;
3699
- success: z.ZodLiteral<true>;
3700
- userEmail: z.ZodNullable<z.ZodString>;
3701
- eventName: z.ZodNullable<z.ZodString>;
3702
- projectId: z.ZodString;
3703
- totalEvents: z.ZodNumber;
3704
- events: z.ZodArray<z.ZodObject<{
3705
- id: z.ZodString;
3706
- event: z.ZodString;
3707
- timestamp: z.ZodOptional<z.ZodString>;
3708
- distinctId: z.ZodOptional<z.ZodString>;
3709
- url: z.ZodOptional<z.ZodString>;
3710
- }, z.core.$strip>>;
3711
- eventsLink: z.ZodString;
3712
- pagination: z.ZodObject<{
3713
- limit: z.ZodNumber;
3714
- offset: z.ZodNumber;
3715
- hasMore: z.ZodBoolean;
3716
- nextOffset: z.ZodNullable<z.ZodNumber>;
3717
- showing: z.ZodString;
3718
- }, z.core.$strip>;
3719
- message: z.ZodString;
3720
- }, z.core.$strip>;
3721
- export declare const searchPosthogEventsTool: {
3722
- name: "searchPosthogEvents";
3681
+ export declare const listPosthogEventNamesTool: {
3682
+ name: "listPosthogEventNames";
3723
3683
  inputSchema: z.ZodObject<{
3724
3684
  integrationId: z.ZodString;
3725
3685
  projectId: z.ZodString;
3726
- countByEventNameOnly: z.ZodDefault<z.ZodBoolean>;
3727
- customEventsOnly: z.ZodDefault<z.ZodBoolean>;
3728
- userEmail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3729
- eventName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3686
+ customEventsOnly: z.ZodOptional<z.ZodBoolean>;
3687
+ distinctId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3730
3688
  propertyFilters: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
3731
3689
  key: z.ZodString;
3732
3690
  value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
3733
- operator: z.ZodDefault<z.ZodEnum<{
3691
+ operator: z.ZodOptional<z.ZodEnum<{
3734
3692
  exact: "exact";
3735
3693
  is_not: "is_not";
3736
3694
  icontains: "icontains";
@@ -3740,14 +3698,15 @@ export declare const searchPosthogEventsTool: {
3740
3698
  gte: "gte";
3741
3699
  lte: "lte";
3742
3700
  }>>;
3701
+ type: z.ZodOptional<z.ZodEnum<{
3702
+ event: "event";
3703
+ person: "person";
3704
+ }>>;
3743
3705
  }, z.core.$strip>>, z.ZodNull]>>;
3744
- limit: z.ZodDefault<z.ZodNumber>;
3745
- offset: z.ZodDefault<z.ZodNumber>;
3746
- last7Days: z.ZodDefault<z.ZodBoolean>;
3747
- dateFrom: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
3748
- dateTo: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
3706
+ dateFrom: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3707
+ dateTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3749
3708
  }, z.core.$strip>;
3750
- outputSchema: z.ZodUnion<readonly [z.ZodObject<{
3709
+ outputSchema: z.ZodObject<{
3751
3710
  actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
3752
3711
  action: z.ZodString;
3753
3712
  integration: z.ZodEnum<typeof import("./Integrations.js").IntegrationType>;
@@ -3770,16 +3729,46 @@ export declare const searchPosthogEventsTool: {
3770
3729
  }, z.core.$strip>>>;
3771
3730
  }, z.core.$strip>>>;
3772
3731
  success: z.ZodLiteral<true>;
3773
- countByEventNameOnly: z.ZodLiteral<true>;
3774
- customEventsOnly: z.ZodBoolean;
3775
3732
  eventCounts: z.ZodArray<z.ZodObject<{
3776
3733
  eventName: z.ZodString;
3777
3734
  count: z.ZodNumber;
3778
3735
  }, z.core.$strip>>;
3779
3736
  totalEventTypes: z.ZodNumber;
3780
3737
  eventsLink: z.ZodString;
3781
- message: z.ZodString;
3782
- }, z.core.$strip>, z.ZodObject<{
3738
+ }, z.core.$strip>;
3739
+ };
3740
+ export declare const searchPosthogEventsTool: {
3741
+ name: "searchPosthogEvents";
3742
+ inputSchema: z.ZodObject<{
3743
+ integrationId: z.ZodString;
3744
+ projectId: z.ZodString;
3745
+ eventName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3746
+ customEventsOnly: z.ZodOptional<z.ZodBoolean>;
3747
+ distinctId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3748
+ propertyFilters: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
3749
+ key: z.ZodString;
3750
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
3751
+ operator: z.ZodOptional<z.ZodEnum<{
3752
+ exact: "exact";
3753
+ is_not: "is_not";
3754
+ icontains: "icontains";
3755
+ not_icontains: "not_icontains";
3756
+ gt: "gt";
3757
+ lt: "lt";
3758
+ gte: "gte";
3759
+ lte: "lte";
3760
+ }>>;
3761
+ type: z.ZodOptional<z.ZodEnum<{
3762
+ event: "event";
3763
+ person: "person";
3764
+ }>>;
3765
+ }, z.core.$strip>>, z.ZodNull]>>;
3766
+ limit: z.ZodOptional<z.ZodNumber>;
3767
+ cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3768
+ dateFrom: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3769
+ dateTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3770
+ }, z.core.$strip>;
3771
+ outputSchema: z.ZodObject<{
3783
3772
  actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
3784
3773
  action: z.ZodString;
3785
3774
  integration: z.ZodEnum<typeof import("./Integrations.js").IntegrationType>;
@@ -3802,10 +3791,6 @@ export declare const searchPosthogEventsTool: {
3802
3791
  }, z.core.$strip>>>;
3803
3792
  }, z.core.$strip>>>;
3804
3793
  success: z.ZodLiteral<true>;
3805
- userEmail: z.ZodNullable<z.ZodString>;
3806
- eventName: z.ZodNullable<z.ZodString>;
3807
- projectId: z.ZodString;
3808
- totalEvents: z.ZodNumber;
3809
3794
  events: z.ZodArray<z.ZodObject<{
3810
3795
  id: z.ZodString;
3811
3796
  event: z.ZodString;
@@ -3813,16 +3798,11 @@ export declare const searchPosthogEventsTool: {
3813
3798
  distinctId: z.ZodOptional<z.ZodString>;
3814
3799
  url: z.ZodOptional<z.ZodString>;
3815
3800
  }, z.core.$strip>>;
3801
+ totalEvents: z.ZodNumber;
3802
+ hasMore: z.ZodBoolean;
3803
+ nextCursor: z.ZodNullable<z.ZodString>;
3816
3804
  eventsLink: z.ZodString;
3817
- pagination: z.ZodObject<{
3818
- limit: z.ZodNumber;
3819
- offset: z.ZodNumber;
3820
- hasMore: z.ZodBoolean;
3821
- nextOffset: z.ZodNullable<z.ZodNumber>;
3822
- showing: z.ZodString;
3823
- }, z.core.$strip>;
3824
- message: z.ZodString;
3825
- }, z.core.$strip>]>;
3805
+ }, z.core.$strip>;
3826
3806
  };
3827
3807
  export declare const datadogLogEntrySchema: z.ZodObject<{
3828
3808
  id: z.ZodString;
@@ -7471,19 +7451,17 @@ export declare const ToolDefinitions: {
7471
7451
  message: z.ZodString;
7472
7452
  }, z.core.$strip>;
7473
7453
  };
7474
- readonly searchPosthogEvents: {
7475
- name: "searchPosthogEvents";
7454
+ readonly listPosthogEventNames: {
7455
+ name: "listPosthogEventNames";
7476
7456
  inputSchema: z.ZodObject<{
7477
7457
  integrationId: z.ZodString;
7478
7458
  projectId: z.ZodString;
7479
- countByEventNameOnly: z.ZodDefault<z.ZodBoolean>;
7480
- customEventsOnly: z.ZodDefault<z.ZodBoolean>;
7481
- userEmail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7482
- eventName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7459
+ customEventsOnly: z.ZodOptional<z.ZodBoolean>;
7460
+ distinctId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7483
7461
  propertyFilters: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
7484
7462
  key: z.ZodString;
7485
7463
  value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
7486
- operator: z.ZodDefault<z.ZodEnum<{
7464
+ operator: z.ZodOptional<z.ZodEnum<{
7487
7465
  exact: "exact";
7488
7466
  is_not: "is_not";
7489
7467
  icontains: "icontains";
@@ -7493,14 +7471,15 @@ export declare const ToolDefinitions: {
7493
7471
  gte: "gte";
7494
7472
  lte: "lte";
7495
7473
  }>>;
7474
+ type: z.ZodOptional<z.ZodEnum<{
7475
+ event: "event";
7476
+ person: "person";
7477
+ }>>;
7496
7478
  }, z.core.$strip>>, z.ZodNull]>>;
7497
- limit: z.ZodDefault<z.ZodNumber>;
7498
- offset: z.ZodDefault<z.ZodNumber>;
7499
- last7Days: z.ZodDefault<z.ZodBoolean>;
7500
- dateFrom: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
7501
- dateTo: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
7479
+ dateFrom: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7480
+ dateTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7502
7481
  }, z.core.$strip>;
7503
- outputSchema: z.ZodUnion<readonly [z.ZodObject<{
7482
+ outputSchema: z.ZodObject<{
7504
7483
  actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
7505
7484
  action: z.ZodString;
7506
7485
  integration: z.ZodEnum<typeof import("./Integrations.js").IntegrationType>;
@@ -7523,16 +7502,46 @@ export declare const ToolDefinitions: {
7523
7502
  }, z.core.$strip>>>;
7524
7503
  }, z.core.$strip>>>;
7525
7504
  success: z.ZodLiteral<true>;
7526
- countByEventNameOnly: z.ZodLiteral<true>;
7527
- customEventsOnly: z.ZodBoolean;
7528
7505
  eventCounts: z.ZodArray<z.ZodObject<{
7529
7506
  eventName: z.ZodString;
7530
7507
  count: z.ZodNumber;
7531
7508
  }, z.core.$strip>>;
7532
7509
  totalEventTypes: z.ZodNumber;
7533
7510
  eventsLink: z.ZodString;
7534
- message: z.ZodString;
7535
- }, z.core.$strip>, z.ZodObject<{
7511
+ }, z.core.$strip>;
7512
+ };
7513
+ readonly searchPosthogEvents: {
7514
+ name: "searchPosthogEvents";
7515
+ inputSchema: z.ZodObject<{
7516
+ integrationId: z.ZodString;
7517
+ projectId: z.ZodString;
7518
+ eventName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7519
+ customEventsOnly: z.ZodOptional<z.ZodBoolean>;
7520
+ distinctId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7521
+ propertyFilters: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
7522
+ key: z.ZodString;
7523
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
7524
+ operator: z.ZodOptional<z.ZodEnum<{
7525
+ exact: "exact";
7526
+ is_not: "is_not";
7527
+ icontains: "icontains";
7528
+ not_icontains: "not_icontains";
7529
+ gt: "gt";
7530
+ lt: "lt";
7531
+ gte: "gte";
7532
+ lte: "lte";
7533
+ }>>;
7534
+ type: z.ZodOptional<z.ZodEnum<{
7535
+ event: "event";
7536
+ person: "person";
7537
+ }>>;
7538
+ }, z.core.$strip>>, z.ZodNull]>>;
7539
+ limit: z.ZodOptional<z.ZodNumber>;
7540
+ cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7541
+ dateFrom: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7542
+ dateTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7543
+ }, z.core.$strip>;
7544
+ outputSchema: z.ZodObject<{
7536
7545
  actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
7537
7546
  action: z.ZodString;
7538
7547
  integration: z.ZodEnum<typeof import("./Integrations.js").IntegrationType>;
@@ -7555,10 +7564,6 @@ export declare const ToolDefinitions: {
7555
7564
  }, z.core.$strip>>>;
7556
7565
  }, z.core.$strip>>>;
7557
7566
  success: z.ZodLiteral<true>;
7558
- userEmail: z.ZodNullable<z.ZodString>;
7559
- eventName: z.ZodNullable<z.ZodString>;
7560
- projectId: z.ZodString;
7561
- totalEvents: z.ZodNumber;
7562
7567
  events: z.ZodArray<z.ZodObject<{
7563
7568
  id: z.ZodString;
7564
7569
  event: z.ZodString;
@@ -7566,16 +7571,11 @@ export declare const ToolDefinitions: {
7566
7571
  distinctId: z.ZodOptional<z.ZodString>;
7567
7572
  url: z.ZodOptional<z.ZodString>;
7568
7573
  }, z.core.$strip>>;
7574
+ totalEvents: z.ZodNumber;
7575
+ hasMore: z.ZodBoolean;
7576
+ nextCursor: z.ZodNullable<z.ZodString>;
7569
7577
  eventsLink: z.ZodString;
7570
- pagination: z.ZodObject<{
7571
- limit: z.ZodNumber;
7572
- offset: z.ZodNumber;
7573
- hasMore: z.ZodBoolean;
7574
- nextOffset: z.ZodNullable<z.ZodNumber>;
7575
- showing: z.ZodString;
7576
- }, z.core.$strip>;
7577
- message: z.ZodString;
7578
- }, z.core.$strip>]>;
7578
+ }, z.core.$strip>;
7579
7579
  };
7580
7580
  readonly attio_list_objects: {
7581
7581
  name: "attio_list_objects";
package/dist/Tools.js CHANGED
@@ -909,37 +909,50 @@ export const getPosthogSessionEventsInputSchema = z.object({
909
909
  });
910
910
  export const posthogPropertyFilterValueSchema = z.union([z.string(), z.number(), z.boolean()]);
911
911
  export const posthogPropertyFilterOperatorSchema = z.enum(["exact", "is_not", "icontains", "not_icontains", "gt", "lt", "gte", "lte"]);
912
+ export const posthogPropertyFilterTypeSchema = z.enum(["event", "person"]);
912
913
  export const posthogPropertyFilterSchema = z.object({
913
- key: z.string().describe("Property key to filter on"),
914
+ key: z.string().describe('Property key to filter on (e.g. "$current_url", "plan", "email").'),
914
915
  value: posthogPropertyFilterValueSchema.describe("Property value to match"),
915
- operator: posthogPropertyFilterOperatorSchema.default("exact").describe("Comparison operator")
916
+ operator: posthogPropertyFilterOperatorSchema.optional().describe('Comparison operator (default: "exact")'),
917
+ type: posthogPropertyFilterTypeSchema
918
+ .optional()
919
+ .describe('"event" (default) matches a property on the event itself; "person" matches a property on the person who sent it (e.g. {key: "email", value: "user@example.com", type: "person"}).')
920
+ });
921
+ const posthogDistinctIdSchema = z
922
+ .string()
923
+ .nullable()
924
+ .optional()
925
+ .describe("Optional: only include events sent by this user, matched against the event's distinct ID (the ID your app passes to posthog.identify(), often your internal user ID).");
926
+ const posthogPropertyFiltersSchema = z
927
+ .union([z.array(posthogPropertyFilterSchema), z.null()])
928
+ .optional()
929
+ .describe('Optional: property filters. To filter by a user\'s email use {key: "email", value: "user@example.com", type: "person"}.');
930
+ const posthogDateFromSchema = z
931
+ .string()
932
+ .nullable()
933
+ .optional()
934
+ .describe('Optional: start of the time range. UTC "YYYY-MM-DD HH:mm:ss" or "YYYY-MM-DD", or relative like "-30m", "-24h", "-7d", "-2w". If omitted, no lower bound.');
935
+ const posthogDateToSchema = z.string().nullable().optional().describe("Optional: end of the time range, same formats as dateFrom. Defaults to now.");
936
+ export const listPosthogEventNamesInputSchema = z.object({
937
+ integrationId: z.string().describe("The integration ID of the PostHog skill to use."),
938
+ projectId: z.string().describe("The PostHog project ID."),
939
+ customEventsOnly: z.boolean().optional().describe("If true (default), exclude PostHog built-in events (names starting with $, e.g. $pageview) and list only the project's custom-tracked events."),
940
+ distinctId: posthogDistinctIdSchema,
941
+ propertyFilters: posthogPropertyFiltersSchema,
942
+ dateFrom: posthogDateFromSchema,
943
+ dateTo: posthogDateToSchema
916
944
  });
917
945
  export const searchPosthogEventsInputSchema = z.object({
918
946
  integrationId: z.string().describe("The integration ID of the PostHog skill to use."),
919
947
  projectId: z.string().describe("The PostHog project ID."),
920
- countByEventNameOnly: z.boolean().default(true).describe("If true (default), returns only event names and their counts. If false, returns full event list (larger response)."),
921
- customEventsOnly: z
922
- .boolean()
923
- .default(true)
924
- .describe("If true (default), only include custom events (exclude PostHog built-in events whose names start with $, e.g. $pageview, $autocapture). If false, include all events. Use true to get counts for events the project actually tracks (works for any user's project)."),
925
- userEmail: z.string().nullable().optional().describe('Optional: User email to filter events by (e.g., "user@example.com").'),
926
- eventName: z.string().nullable().optional().describe('Optional: Specific event name to filter by (e.g., "$pageview", "button_clicked", "form_submitted").'),
927
- propertyFilters: z
928
- .union([z.array(posthogPropertyFilterSchema), z.null()])
929
- .optional()
930
- .describe("Optional: Array of property filters to apply. Each filter has a key, value, and operator."),
931
- limit: z.number().int().default(50).describe("Maximum number of events to return when countByEventNameOnly is false (default: 50, max: 100). Ignored when countByEventNameOnly is true."),
932
- offset: z.number().int().default(0).describe("Offset for pagination when countByEventNameOnly is false (default: 0). Ignored when countByEventNameOnly is true."),
933
- last7Days: z
934
- .boolean()
935
- .default(false)
936
- .describe("If true and dateFrom is not provided, filters events from the last 7 days only (default: false). If false, no date restriction is applied unless dateFrom is explicitly provided."),
937
- dateFrom: z
938
- .union([z.string(), z.null()])
939
- .describe('Start date for filtering. MUST be formatted as "YYYY-MM-DD HH:mm:ss" in UTC (e.g. "2026-02-06 14:00:00"). Do NOT use ISO format with T/Z (e.g. 2026-02-07T22:52:34Z) and do NOT use relative strings like "-7d". If not provided and last7Days is true, defaults to 7 days ago. If not provided and last7Days is false, no date restriction is applied.'),
940
- dateTo: z
941
- .union([z.string(), z.null()])
942
- .describe('End date for filtering. MUST be formatted as "YYYY-MM-DD HH:mm:ss" in UTC (e.g. "2026-02-07 14:00:00"). Do NOT use ISO format with T/Z and do NOT use relative strings like "now". If not provided, defaults to now.')
948
+ eventName: z.string().nullable().optional().describe('Optional: specific event name to filter by (e.g., "$pageview", "button_clicked"). Use listPosthogEventNames to discover available names.'),
949
+ customEventsOnly: z.boolean().optional().describe("If true (default), exclude PostHog built-in events (names starting with $). Ignored when eventName is provided."),
950
+ distinctId: posthogDistinctIdSchema,
951
+ propertyFilters: posthogPropertyFiltersSchema,
952
+ limit: z.number().int().optional().describe("Maximum number of events to return (default: 50, max: 100)."),
953
+ cursor: z.string().nullable().optional().describe("Pagination cursor: pass nextCursor from the previous response to fetch the next (older) page."),
954
+ dateFrom: posthogDateFromSchema,
955
+ dateTo: posthogDateToSchema
943
956
  });
944
957
  export const linearCreateTicketTool = defineTool({
945
958
  name: "linear_create_ticket",
@@ -1247,28 +1260,25 @@ export const getPosthogSessionEventsTool = defineTool({
1247
1260
  message: z.string()
1248
1261
  })
1249
1262
  });
1250
- export const searchPosthogEventsCountSummarySchema = toolOutputSuccessSchema.extend({
1251
- countByEventNameOnly: z.literal(true),
1252
- customEventsOnly: z.boolean(),
1253
- eventCounts: z.array(posthogEventCountSchema),
1254
- totalEventTypes: z.number().int(),
1255
- eventsLink: z.string(),
1256
- message: z.string()
1257
- });
1258
- export const searchPosthogEventsEventListSchema = toolOutputSuccessSchema.extend({
1259
- userEmail: z.string().nullable(),
1260
- eventName: z.string().nullable(),
1261
- projectId: z.string(),
1262
- totalEvents: z.number().int(),
1263
- events: z.array(posthogEventSummarySchema),
1264
- eventsLink: z.string(),
1265
- pagination: posthogOffsetPaginationSchema,
1266
- message: z.string()
1263
+ export const listPosthogEventNamesTool = defineTool({
1264
+ name: "listPosthogEventNames",
1265
+ inputSchema: listPosthogEventNamesInputSchema,
1266
+ outputSchema: toolOutputSuccessSchema.extend({
1267
+ eventCounts: z.array(posthogEventCountSchema),
1268
+ totalEventTypes: z.number().int(),
1269
+ eventsLink: z.string()
1270
+ })
1267
1271
  });
1268
1272
  export const searchPosthogEventsTool = defineTool({
1269
1273
  name: "searchPosthogEvents",
1270
1274
  inputSchema: searchPosthogEventsInputSchema,
1271
- outputSchema: z.union([searchPosthogEventsCountSummarySchema, searchPosthogEventsEventListSchema])
1275
+ outputSchema: toolOutputSuccessSchema.extend({
1276
+ events: z.array(posthogEventSummarySchema),
1277
+ totalEvents: z.number().int(),
1278
+ hasMore: z.boolean(),
1279
+ nextCursor: z.string().nullable(),
1280
+ eventsLink: z.string()
1281
+ })
1272
1282
  });
1273
1283
  // Datadog schemas
1274
1284
  export const datadogLogEntrySchema = z.object({
@@ -1917,6 +1927,7 @@ export const ToolDefinitions = {
1917
1927
  [searchPosthogSessionsTool.name]: searchPosthogSessionsTool,
1918
1928
  [searchPosthogLogsTool.name]: searchPosthogLogsTool,
1919
1929
  [getPosthogSessionEventsTool.name]: getPosthogSessionEventsTool,
1930
+ [listPosthogEventNamesTool.name]: listPosthogEventNamesTool,
1920
1931
  [searchPosthogEventsTool.name]: searchPosthogEventsTool,
1921
1932
  [attioListObjectsTool.name]: attioListObjectsTool,
1922
1933
  [attioQueryRecordsTool.name]: attioQueryRecordsTool,
@@ -1,20 +1,18 @@
1
- import type { z } from "zod";
2
- /**
3
- * Maps every SDK trigger payload type name to how a readable TypeScript
4
- * projection of it can be generated (`terse generate` inlines these into
5
- * terse.generated.ts). Keep entries in sync when adding or widening triggers.
6
- */
1
+ import type * as z from "zod";
7
2
  export declare const triggerPayloadProjections: Readonly<Record<string, TriggerPayloadProjection>>;
8
- interface TriggerPayloadSchemaProjection {
9
- readonly kind: "schema";
10
- readonly schema: z.core.$ZodType;
11
- readonly typeParams?: string;
12
- readonly fieldTypes?: Readonly<Record<string, string>>;
13
- readonly importTypes?: readonly string[];
14
- }
15
- interface TriggerPayloadUnionProjection {
16
- readonly kind: "union";
17
- readonly members: readonly string[];
18
- }
3
+ export declare function isProjectedTriggerName(name: string): boolean;
4
+ export type TriggerPayloadSchemaProjection = {
5
+ kind: "schema";
6
+ schema: z.ZodType;
7
+ /** Printed verbatim after the payload interface name, e.g. "<TBody = unknown>". */
8
+ typeParams?: string;
9
+ /** Dot-path within the payload -> TypeScript type expression printed instead of the schema field. */
10
+ fieldOverrides?: Record<string, string>;
11
+ /** Extra terse-sdk type imports the overrides reference. */
12
+ sdkImports?: string[];
13
+ };
14
+ export type TriggerPayloadUnionProjection = {
15
+ kind: "union";
16
+ members: string[];
17
+ };
19
18
  export type TriggerPayloadProjection = TriggerPayloadSchemaProjection | TriggerPayloadUnionProjection;
20
- export {};
@@ -1,75 +1,61 @@
1
- import { GithubIssueCommentCreatedTriggerSchema, GithubPRClosedTriggerSchema, GithubPRMergedTriggerSchema, GithubPROpenedTriggerSchema, GithubPRSynchronizedTriggerSchema, GithubPushTriggerSchema, cronTriggerSchema, gmailTriggerSchema, heyReachCampaignCompletedTriggerSchema, heyReachConnectionRequestAcceptedTriggerSchema, heyReachConnectionRequestSentTriggerSchema, heyReachFollowSentTriggerSchema, heyReachInmailReplyReceivedTriggerSchema, heyReachInmailSentTriggerSchema, heyReachLeadTagUpdatedTriggerSchema, heyReachLikedPostTriggerSchema, heyReachMessageReplyReceivedTriggerSchema, heyReachMessageSentTriggerSchema, heyReachViewedProfileTriggerSchema, linearCommentCreatedTriggerSchema, linearIssueCreatedTriggerSchema, linearIssueUpdatedTriggerSchema, slackAppMentionTriggerSchema, slackMessageTriggerSchema, slackReactionAddedTriggerSchema, webMonitorTriggerSchema, webhookTriggerSchema, workOSInvitationAcceptedTriggerSchema, workOSInvitationCreatedTriggerSchema, workOSInvitationResentTriggerSchema, workOSInvitationRevokedTriggerSchema, workOSOrganizationMembershipCreatedTriggerSchema, workOSOrganizationMembershipDeletedTriggerSchema, workOSOrganizationMembershipUpdatedTriggerSchema, workOSOrganizationTriggerSchema, workOSUserCreatedTriggerSchema, workOSUserDeletedTriggerSchema, workOSUserUpdatedTriggerSchema } from "./Triggers.js";
1
+ import { GithubIssueCommentCreatedTriggerSchema, GithubPRClosedTriggerSchema, GithubPRMergedTriggerSchema, GithubPROpenedTriggerSchema, GithubPRSynchronizedTriggerSchema, GithubPushTriggerSchema, attioCallRecordingCreatedTriggerSchema, attioCommentCreatedTriggerSchema, attioCommentDeletedTriggerSchema, attioCommentResolvedTriggerSchema, attioCommentUnresolvedTriggerSchema, attioListAttributeCreatedTriggerSchema, attioListAttributeUpdatedTriggerSchema, attioListCreatedTriggerSchema, attioListDeletedTriggerSchema, attioListEntryCreatedTriggerSchema, attioListEntryDeletedTriggerSchema, attioListEntryUpdatedTriggerSchema, attioListUpdatedTriggerSchema, attioNoteContentUpdatedTriggerSchema, attioNoteCreatedTriggerSchema, attioNoteDeletedTriggerSchema, attioNoteUpdatedTriggerSchema, attioObjectAttributeCreatedTriggerSchema, attioObjectAttributeUpdatedTriggerSchema, attioRecordCreatedTriggerSchema, attioRecordDeletedTriggerSchema, attioRecordMergedTriggerSchema, attioRecordUpdatedTriggerSchema, attioTaskCreatedTriggerSchema, attioTaskDeletedTriggerSchema, attioTaskUpdatedTriggerSchema, attioWorkspaceMemberCreatedTriggerSchema, cronTriggerSchema, gmailTriggerSchema, heyReachCampaignCompletedTriggerSchema, heyReachConnectionRequestAcceptedTriggerSchema, heyReachConnectionRequestSentTriggerSchema, heyReachFollowSentTriggerSchema, heyReachInmailReplyReceivedTriggerSchema, heyReachInmailSentTriggerSchema, heyReachLeadTagUpdatedTriggerSchema, heyReachLikedPostTriggerSchema, heyReachMessageReplyReceivedTriggerSchema, heyReachMessageSentTriggerSchema, heyReachViewedProfileTriggerSchema, linearCommentCreatedTriggerSchema, linearIssueCreatedTriggerSchema, linearIssueUpdatedTriggerSchema, slackAppMentionTriggerSchema, slackMessageTriggerSchema, slackReactionAddedTriggerSchema, webMonitorTriggerSchema, webhookTriggerSchema, workOSInvitationAcceptedTriggerSchema, workOSInvitationCreatedTriggerSchema, workOSInvitationResentTriggerSchema, workOSInvitationRevokedTriggerSchema, workOSOrganizationMembershipCreatedTriggerSchema, workOSOrganizationMembershipDeletedTriggerSchema, workOSOrganizationMembershipUpdatedTriggerSchema, workOSOrganizationTriggerSchema, workOSUserCreatedTriggerSchema, workOSUserDeletedTriggerSchema, workOSUserUpdatedTriggerSchema } from "./Triggers.js";
2
+ // The hand-written SlackMessageTrigger et al. widen these schema fields (z.array(z.unknown()))
3
+ // to the structured Slack types, so projections must print the widened form.
2
4
  const slackWidenedFields = {
3
- fieldTypes: { blocks: "SlackBlocks | null", attachments: "SlackAttachments | null", files: "SlackFiles | null" },
4
- importTypes: ["SlackBlocks", "SlackAttachments", "SlackFiles"]
5
+ blocks: "SlackBlocks | null",
6
+ attachments: "SlackAttachments | null",
7
+ files: "SlackFiles | null"
5
8
  };
6
- // TS enums are nominal: projecting integrationType as its string literal would not satisfy `extends Trigger`,
7
- // so schema projections print the enum member expression instead.
8
- function integrationTypeEnumKey(schema) {
9
- if (!(schema instanceof z.ZodObject))
10
- return undefined;
11
- const integrationType = schema.shape.integrationType;
12
- if (!(integrationType instanceof z.ZodLiteral))
13
- return undefined;
14
- const entry = Object.entries(IntegrationType).find(([, value]) => value === integrationType.value);
15
- return entry?.[0];
16
- }
17
- function schemaProjection(schema, extras = {}) {
18
- const enumKey = integrationTypeEnumKey(schema);
19
- return {
20
- kind: "schema",
21
- schema,
22
- typeParams: extras.typeParams,
23
- fieldTypes: { ...(enumKey ? { integrationType: `IntegrationType.${enumKey}` } : {}), ...extras.fieldTypes },
24
- importTypes: [...(enumKey ? ["IntegrationType"] : []), ...(extras.importTypes ?? [])]
25
- };
26
- }
27
- /**
28
- * Maps every SDK trigger payload type name to how a readable TypeScript
29
- * projection of it can be generated (`terse generate` inlines these into
30
- * terse.generated.ts). Keep entries in sync when adding or widening triggers.
31
- */
9
+ const slackSdkImports = ["SlackAttachments", "SlackBlocks", "SlackFiles"];
10
+ const attioRecordProjection = (schema) => ({
11
+ kind: "schema",
12
+ schema,
13
+ typeParams: "<TValues = Record<string, unknown>>",
14
+ // The registered attio event transform flattens record.values before handlers run,
15
+ // matching the SDK-level generic, not the raw wire shape.
16
+ fieldOverrides: { "record.values": "TValues" }
17
+ });
32
18
  export const triggerPayloadProjections = {
33
- SlackMessageTrigger: schemaProjection(slackMessageTriggerSchema, slackWidenedFields),
34
- SlackAppMentionTrigger: schemaProjection(slackAppMentionTriggerSchema, slackWidenedFields),
35
- SlackReactionAddedTrigger: schemaProjection(slackReactionAddedTriggerSchema, slackWidenedFields),
19
+ SlackMessageTrigger: { kind: "schema", schema: slackMessageTriggerSchema, fieldOverrides: slackWidenedFields, sdkImports: slackSdkImports },
20
+ SlackAppMentionTrigger: { kind: "schema", schema: slackAppMentionTriggerSchema, fieldOverrides: slackWidenedFields, sdkImports: slackSdkImports },
21
+ SlackReactionAddedTrigger: { kind: "schema", schema: slackReactionAddedTriggerSchema, fieldOverrides: slackWidenedFields, sdkImports: slackSdkImports },
36
22
  SlackTrigger: { kind: "union", members: ["SlackMessageTrigger", "SlackAppMentionTrigger", "SlackReactionAddedTrigger"] },
37
- GithubPushTrigger: schemaProjection(GithubPushTriggerSchema),
38
- GithubPROpenedTrigger: schemaProjection(GithubPROpenedTriggerSchema),
39
- GithubPRSynchronizedTrigger: schemaProjection(GithubPRSynchronizedTriggerSchema),
40
- GithubPRClosedTrigger: schemaProjection(GithubPRClosedTriggerSchema),
41
- GithubPRMergedTrigger: schemaProjection(GithubPRMergedTriggerSchema),
42
- GithubIssueCommentCreatedTrigger: schemaProjection(GithubIssueCommentCreatedTriggerSchema),
23
+ GithubPushTrigger: { kind: "schema", schema: GithubPushTriggerSchema },
24
+ GithubPROpenedTrigger: { kind: "schema", schema: GithubPROpenedTriggerSchema },
25
+ GithubPRSynchronizedTrigger: { kind: "schema", schema: GithubPRSynchronizedTriggerSchema },
26
+ GithubPRClosedTrigger: { kind: "schema", schema: GithubPRClosedTriggerSchema },
27
+ GithubPRMergedTrigger: { kind: "schema", schema: GithubPRMergedTriggerSchema },
28
+ GithubIssueCommentCreatedTrigger: { kind: "schema", schema: GithubIssueCommentCreatedTriggerSchema },
43
29
  GithubPRTrigger: { kind: "union", members: ["GithubPROpenedTrigger", "GithubPRSynchronizedTrigger", "GithubPRClosedTrigger", "GithubPRMergedTrigger"] },
44
30
  GithubTrigger: {
45
31
  kind: "union",
46
32
  members: ["GithubPushTrigger", "GithubPROpenedTrigger", "GithubPRSynchronizedTrigger", "GithubPRClosedTrigger", "GithubPRMergedTrigger", "GithubIssueCommentCreatedTrigger"]
47
33
  },
48
- GmailTrigger: schemaProjection(gmailTriggerSchema),
49
- LinearIssueCreatedTrigger: schemaProjection(linearIssueCreatedTriggerSchema),
50
- LinearIssueUpdatedTrigger: schemaProjection(linearIssueUpdatedTriggerSchema),
51
- LinearCommentCreatedTrigger: schemaProjection(linearCommentCreatedTriggerSchema),
34
+ GmailTrigger: { kind: "schema", schema: gmailTriggerSchema },
35
+ LinearIssueCreatedTrigger: { kind: "schema", schema: linearIssueCreatedTriggerSchema },
36
+ LinearIssueUpdatedTrigger: { kind: "schema", schema: linearIssueUpdatedTriggerSchema },
37
+ LinearCommentCreatedTrigger: { kind: "schema", schema: linearCommentCreatedTriggerSchema },
52
38
  LinearTrigger: { kind: "union", members: ["LinearIssueCreatedTrigger", "LinearIssueUpdatedTrigger", "LinearCommentCreatedTrigger"] },
53
- WorkOSUserCreatedTrigger: schemaProjection(workOSUserCreatedTriggerSchema),
54
- WorkOSUserUpdatedTrigger: schemaProjection(workOSUserUpdatedTriggerSchema),
55
- WorkOSUserDeletedTrigger: schemaProjection(workOSUserDeletedTriggerSchema),
39
+ WorkOSUserCreatedTrigger: { kind: "schema", schema: workOSUserCreatedTriggerSchema },
40
+ WorkOSUserUpdatedTrigger: { kind: "schema", schema: workOSUserUpdatedTriggerSchema },
41
+ WorkOSUserDeletedTrigger: { kind: "schema", schema: workOSUserDeletedTriggerSchema },
56
42
  WorkOSUserTrigger: { kind: "union", members: ["WorkOSUserCreatedTrigger", "WorkOSUserUpdatedTrigger", "WorkOSUserDeletedTrigger"] },
57
- WorkOSOrganizationMembershipCreatedTrigger: schemaProjection(workOSOrganizationMembershipCreatedTriggerSchema),
58
- WorkOSOrganizationMembershipUpdatedTrigger: schemaProjection(workOSOrganizationMembershipUpdatedTriggerSchema),
59
- WorkOSOrganizationMembershipDeletedTrigger: schemaProjection(workOSOrganizationMembershipDeletedTriggerSchema),
43
+ WorkOSOrganizationMembershipCreatedTrigger: { kind: "schema", schema: workOSOrganizationMembershipCreatedTriggerSchema },
44
+ WorkOSOrganizationMembershipUpdatedTrigger: { kind: "schema", schema: workOSOrganizationMembershipUpdatedTriggerSchema },
45
+ WorkOSOrganizationMembershipDeletedTrigger: { kind: "schema", schema: workOSOrganizationMembershipDeletedTriggerSchema },
60
46
  WorkOSMembershipTrigger: {
61
47
  kind: "union",
62
48
  members: ["WorkOSOrganizationMembershipCreatedTrigger", "WorkOSOrganizationMembershipUpdatedTrigger", "WorkOSOrganizationMembershipDeletedTrigger"]
63
49
  },
64
- WorkOSInvitationCreatedTrigger: schemaProjection(workOSInvitationCreatedTriggerSchema),
65
- WorkOSInvitationAcceptedTrigger: schemaProjection(workOSInvitationAcceptedTriggerSchema),
66
- WorkOSInvitationResentTrigger: schemaProjection(workOSInvitationResentTriggerSchema),
67
- WorkOSInvitationRevokedTrigger: schemaProjection(workOSInvitationRevokedTriggerSchema),
50
+ WorkOSInvitationCreatedTrigger: { kind: "schema", schema: workOSInvitationCreatedTriggerSchema },
51
+ WorkOSInvitationAcceptedTrigger: { kind: "schema", schema: workOSInvitationAcceptedTriggerSchema },
52
+ WorkOSInvitationResentTrigger: { kind: "schema", schema: workOSInvitationResentTriggerSchema },
53
+ WorkOSInvitationRevokedTrigger: { kind: "schema", schema: workOSInvitationRevokedTriggerSchema },
68
54
  WorkOSInvitationTrigger: {
69
55
  kind: "union",
70
56
  members: ["WorkOSInvitationCreatedTrigger", "WorkOSInvitationAcceptedTrigger", "WorkOSInvitationResentTrigger", "WorkOSInvitationRevokedTrigger"]
71
57
  },
72
- WorkOSOrganizationTrigger: schemaProjection(workOSOrganizationTriggerSchema),
58
+ WorkOSOrganizationTrigger: { kind: "schema", schema: workOSOrganizationTriggerSchema },
73
59
  WorkOSTrigger: {
74
60
  kind: "union",
75
61
  members: [
@@ -86,17 +72,17 @@ export const triggerPayloadProjections = {
86
72
  "WorkOSOrganizationTrigger"
87
73
  ]
88
74
  },
89
- HeyReachConnectionRequestSentTrigger: schemaProjection(heyReachConnectionRequestSentTriggerSchema),
90
- HeyReachConnectionRequestAcceptedTrigger: schemaProjection(heyReachConnectionRequestAcceptedTriggerSchema),
91
- HeyReachMessageSentTrigger: schemaProjection(heyReachMessageSentTriggerSchema),
92
- HeyReachMessageReplyReceivedTrigger: schemaProjection(heyReachMessageReplyReceivedTriggerSchema),
93
- HeyReachInmailSentTrigger: schemaProjection(heyReachInmailSentTriggerSchema),
94
- HeyReachInmailReplyReceivedTrigger: schemaProjection(heyReachInmailReplyReceivedTriggerSchema),
95
- HeyReachFollowSentTrigger: schemaProjection(heyReachFollowSentTriggerSchema),
96
- HeyReachLikedPostTrigger: schemaProjection(heyReachLikedPostTriggerSchema),
97
- HeyReachViewedProfileTrigger: schemaProjection(heyReachViewedProfileTriggerSchema),
98
- HeyReachCampaignCompletedTrigger: schemaProjection(heyReachCampaignCompletedTriggerSchema),
99
- HeyReachLeadTagUpdatedTrigger: schemaProjection(heyReachLeadTagUpdatedTriggerSchema),
75
+ HeyReachConnectionRequestSentTrigger: { kind: "schema", schema: heyReachConnectionRequestSentTriggerSchema },
76
+ HeyReachConnectionRequestAcceptedTrigger: { kind: "schema", schema: heyReachConnectionRequestAcceptedTriggerSchema },
77
+ HeyReachMessageSentTrigger: { kind: "schema", schema: heyReachMessageSentTriggerSchema },
78
+ HeyReachMessageReplyReceivedTrigger: { kind: "schema", schema: heyReachMessageReplyReceivedTriggerSchema },
79
+ HeyReachInmailSentTrigger: { kind: "schema", schema: heyReachInmailSentTriggerSchema },
80
+ HeyReachInmailReplyReceivedTrigger: { kind: "schema", schema: heyReachInmailReplyReceivedTriggerSchema },
81
+ HeyReachFollowSentTrigger: { kind: "schema", schema: heyReachFollowSentTriggerSchema },
82
+ HeyReachLikedPostTrigger: { kind: "schema", schema: heyReachLikedPostTriggerSchema },
83
+ HeyReachViewedProfileTrigger: { kind: "schema", schema: heyReachViewedProfileTriggerSchema },
84
+ HeyReachCampaignCompletedTrigger: { kind: "schema", schema: heyReachCampaignCompletedTriggerSchema },
85
+ HeyReachLeadTagUpdatedTrigger: { kind: "schema", schema: heyReachLeadTagUpdatedTriggerSchema },
100
86
  HeyReachTrigger: {
101
87
  kind: "union",
102
88
  members: [
@@ -113,7 +99,69 @@ export const triggerPayloadProjections = {
113
99
  "HeyReachLeadTagUpdatedTrigger"
114
100
  ]
115
101
  },
116
- CronTrigger: schemaProjection(cronTriggerSchema),
117
- WebhookTrigger: schemaProjection(webhookTriggerSchema, { typeParams: "<TBody = unknown>", fieldTypes: { body: "TBody" } }),
118
- WebMonitorTrigger: schemaProjection(webMonitorTriggerSchema, { typeParams: "<TPayload = string>", fieldTypes: { payload: "TPayload" } })
102
+ AttioCallRecordingCreatedTrigger: { kind: "schema", schema: attioCallRecordingCreatedTriggerSchema },
103
+ AttioCommentCreatedTrigger: { kind: "schema", schema: attioCommentCreatedTriggerSchema },
104
+ AttioCommentResolvedTrigger: { kind: "schema", schema: attioCommentResolvedTriggerSchema },
105
+ AttioCommentUnresolvedTrigger: { kind: "schema", schema: attioCommentUnresolvedTriggerSchema },
106
+ AttioCommentDeletedTrigger: { kind: "schema", schema: attioCommentDeletedTriggerSchema },
107
+ AttioListCreatedTrigger: { kind: "schema", schema: attioListCreatedTriggerSchema },
108
+ AttioListUpdatedTrigger: { kind: "schema", schema: attioListUpdatedTriggerSchema },
109
+ AttioListDeletedTrigger: { kind: "schema", schema: attioListDeletedTriggerSchema },
110
+ AttioListAttributeCreatedTrigger: { kind: "schema", schema: attioListAttributeCreatedTriggerSchema },
111
+ AttioListAttributeUpdatedTrigger: { kind: "schema", schema: attioListAttributeUpdatedTriggerSchema },
112
+ AttioListEntryCreatedTrigger: { kind: "schema", schema: attioListEntryCreatedTriggerSchema },
113
+ AttioListEntryUpdatedTrigger: { kind: "schema", schema: attioListEntryUpdatedTriggerSchema },
114
+ AttioListEntryDeletedTrigger: { kind: "schema", schema: attioListEntryDeletedTriggerSchema },
115
+ AttioObjectAttributeCreatedTrigger: { kind: "schema", schema: attioObjectAttributeCreatedTriggerSchema },
116
+ AttioObjectAttributeUpdatedTrigger: { kind: "schema", schema: attioObjectAttributeUpdatedTriggerSchema },
117
+ AttioNoteCreatedTrigger: { kind: "schema", schema: attioNoteCreatedTriggerSchema },
118
+ AttioNoteContentUpdatedTrigger: { kind: "schema", schema: attioNoteContentUpdatedTriggerSchema },
119
+ AttioNoteUpdatedTrigger: { kind: "schema", schema: attioNoteUpdatedTriggerSchema },
120
+ AttioNoteDeletedTrigger: { kind: "schema", schema: attioNoteDeletedTriggerSchema },
121
+ AttioRecordCreatedTrigger: attioRecordProjection(attioRecordCreatedTriggerSchema),
122
+ AttioRecordMergedTrigger: attioRecordProjection(attioRecordMergedTriggerSchema),
123
+ AttioRecordUpdatedTrigger: attioRecordProjection(attioRecordUpdatedTriggerSchema),
124
+ AttioRecordDeletedTrigger: { kind: "schema", schema: attioRecordDeletedTriggerSchema },
125
+ AttioTaskCreatedTrigger: { kind: "schema", schema: attioTaskCreatedTriggerSchema },
126
+ AttioTaskUpdatedTrigger: { kind: "schema", schema: attioTaskUpdatedTriggerSchema },
127
+ AttioTaskDeletedTrigger: { kind: "schema", schema: attioTaskDeletedTriggerSchema },
128
+ AttioWorkspaceMemberCreatedTrigger: { kind: "schema", schema: attioWorkspaceMemberCreatedTriggerSchema },
129
+ AttioTrigger: {
130
+ kind: "union",
131
+ members: [
132
+ "AttioCallRecordingCreatedTrigger",
133
+ "AttioCommentCreatedTrigger",
134
+ "AttioCommentResolvedTrigger",
135
+ "AttioCommentUnresolvedTrigger",
136
+ "AttioCommentDeletedTrigger",
137
+ "AttioListCreatedTrigger",
138
+ "AttioListUpdatedTrigger",
139
+ "AttioListDeletedTrigger",
140
+ "AttioListAttributeCreatedTrigger",
141
+ "AttioListAttributeUpdatedTrigger",
142
+ "AttioListEntryCreatedTrigger",
143
+ "AttioListEntryUpdatedTrigger",
144
+ "AttioListEntryDeletedTrigger",
145
+ "AttioObjectAttributeCreatedTrigger",
146
+ "AttioObjectAttributeUpdatedTrigger",
147
+ "AttioNoteCreatedTrigger",
148
+ "AttioNoteContentUpdatedTrigger",
149
+ "AttioNoteUpdatedTrigger",
150
+ "AttioNoteDeletedTrigger",
151
+ "AttioRecordCreatedTrigger",
152
+ "AttioRecordMergedTrigger",
153
+ "AttioRecordUpdatedTrigger",
154
+ "AttioRecordDeletedTrigger",
155
+ "AttioTaskCreatedTrigger",
156
+ "AttioTaskUpdatedTrigger",
157
+ "AttioTaskDeletedTrigger",
158
+ "AttioWorkspaceMemberCreatedTrigger"
159
+ ]
160
+ },
161
+ CronTrigger: { kind: "schema", schema: cronTriggerSchema },
162
+ WebhookTrigger: { kind: "schema", schema: webhookTriggerSchema, typeParams: "<TBody = unknown>", fieldOverrides: { body: "TBody" } },
163
+ WebMonitorTrigger: { kind: "schema", schema: webMonitorTriggerSchema, typeParams: "<TPayload = unknown>", fieldOverrides: { payload: "TPayload" } }
119
164
  };
165
+ export function isProjectedTriggerName(name) {
166
+ return name in triggerPayloadProjections;
167
+ }
package/dist/types.d.ts CHANGED
@@ -129,6 +129,23 @@ export declare const posthogProjectsResponseSchema: z.ZodObject<{
129
129
  }, z.core.$strip>>;
130
130
  }, z.core.$strip>;
131
131
  export type PosthogProjectsResponse = z.infer<typeof posthogProjectsResponseSchema>;
132
+ export declare const posthogProjectEventsQuerySchema: z.ZodObject<{
133
+ integrationId: z.ZodString;
134
+ projectId: z.ZodString;
135
+ }, z.core.$strip>;
136
+ export type PosthogProjectEventsQuery = z.infer<typeof posthogProjectEventsQuerySchema>;
137
+ export declare const posthogProjectEventSchema: z.ZodObject<{
138
+ name: z.ZodString;
139
+ count: z.ZodNumber;
140
+ }, z.core.$strip>;
141
+ export type PosthogProjectEvent = z.infer<typeof posthogProjectEventSchema>;
142
+ export declare const posthogProjectEventsResponseSchema: z.ZodObject<{
143
+ events: z.ZodArray<z.ZodObject<{
144
+ name: z.ZodString;
145
+ count: z.ZodNumber;
146
+ }, z.core.$strip>>;
147
+ }, z.core.$strip>;
148
+ export type PosthogProjectEventsResponse = z.infer<typeof posthogProjectEventsResponseSchema>;
132
149
  export declare const launchDarklyProjectSchema: z.ZodObject<{
133
150
  key: z.ZodString;
134
151
  name: z.ZodString;
package/dist/types.js CHANGED
@@ -67,6 +67,17 @@ export const posthogProjectSchema = z.object({
67
67
  export const posthogProjectsResponseSchema = z.object({
68
68
  projects: z.array(posthogProjectSchema)
69
69
  });
70
+ export const posthogProjectEventsQuerySchema = z.object({
71
+ integrationId: z.string(),
72
+ projectId: z.string()
73
+ });
74
+ export const posthogProjectEventSchema = z.object({
75
+ name: z.string(),
76
+ count: z.number()
77
+ });
78
+ export const posthogProjectEventsResponseSchema = z.object({
79
+ events: z.array(posthogProjectEventSchema)
80
+ });
70
81
  export const launchDarklyProjectSchema = z.object({
71
82
  key: z.string(),
72
83
  name: z.string()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "terse-types",
3
- "version": "0.0.64",
3
+ "version": "0.0.66",
4
4
  "type": "module",
5
5
  "description": "Shared Terse TypeScript types, enums, constants, and helpers.",
6
6
  "main": "./dist/index.js",