@keystrokehq/posthog 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/_official/index.d.mts +1 -1
  2. package/dist/_official/index.mjs +1 -1
  3. package/dist/_runtime/index.d.mts +1 -2
  4. package/dist/_runtime/index.mjs +1 -1
  5. package/dist/actions.d.mts +13 -13
  6. package/dist/actions.mjs +6 -6
  7. package/dist/annotations.d.mts +6 -6
  8. package/dist/annotations.mjs +6 -6
  9. package/dist/capture.d.mts +8 -8
  10. package/dist/capture.mjs +8 -8
  11. package/dist/client.d.mts +1 -2
  12. package/dist/client.mjs +1 -1
  13. package/dist/cohorts.d.mts +9 -9
  14. package/dist/cohorts.mjs +9 -9
  15. package/dist/connection.d.mts +1 -1
  16. package/dist/connection.mjs +1 -1
  17. package/dist/dashboards.d.mts +17 -17
  18. package/dist/dashboards.mjs +17 -17
  19. package/dist/decide.d.mts +3 -3
  20. package/dist/decide.mjs +3 -3
  21. package/dist/events-management.d.mts +11 -11
  22. package/dist/events-management.mjs +11 -11
  23. package/dist/factory-C3ssyfSy.mjs +7 -0
  24. package/dist/feature-flags.d.mts +16 -16
  25. package/dist/feature-flags.mjs +16 -16
  26. package/dist/http-BYcjqxPi.mjs +84 -0
  27. package/dist/insights.d.mts +17 -17
  28. package/dist/insights.mjs +17 -17
  29. package/dist/{integration-Td6D39_E.d.mts → integration-BN7xcpga.d.mts} +15 -5
  30. package/dist/integration-D0HdrI0T.mjs +120 -0
  31. package/dist/organizations.d.mts +12 -12
  32. package/dist/organizations.mjs +12 -12
  33. package/dist/persons.d.mts +16 -16
  34. package/dist/persons.mjs +16 -16
  35. package/dist/projects.d.mts +14 -14
  36. package/dist/projects.mjs +14 -14
  37. package/dist/schemas.d.mts +3 -3
  38. package/dist/session-recordings.d.mts +15 -15
  39. package/dist/session-recordings.mjs +15 -15
  40. package/dist/surveys.d.mts +16 -16
  41. package/dist/surveys.mjs +10 -10
  42. package/dist/triggers.d.mts +5 -3
  43. package/dist/triggers.mjs +52 -3
  44. package/dist/webhook-management.d.mts +10 -10
  45. package/dist/webhook-management.mjs +7 -7
  46. package/package.json +4 -4
  47. package/dist/factory-DYDvHOGb.mjs +0 -8
  48. package/dist/integration-Doy2Dwli.mjs +0 -30
@@ -1,6 +1,6 @@
1
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
1
2
  import { z } from "zod";
2
3
  import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
3
- import * as _keystrokehq_core0 from "@keystrokehq/core";
4
4
 
5
5
  //#region src/feature-flags.d.ts
6
6
  declare const listFeatureFlags: _keystrokehq_core0.Operation<z.ZodObject<{
@@ -32,7 +32,7 @@ declare const listFeatureFlags: _keystrokehq_core0.Operation<z.ZodObject<{
32
32
  rollout_percentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
33
33
  version: z.ZodOptional<z.ZodNumber>;
34
34
  }, z.core.$strip>>;
35
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
35
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
36
36
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
37
37
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
38
38
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -64,7 +64,7 @@ declare const getFeatureFlag: _keystrokehq_core0.Operation<z.ZodObject<{
64
64
  ensure_experience_continuity: z.ZodOptional<z.ZodBoolean>;
65
65
  rollout_percentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
66
66
  version: z.ZodOptional<z.ZodNumber>;
67
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
67
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
68
68
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
69
69
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
70
70
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -107,7 +107,7 @@ declare const createFeatureFlag: _keystrokehq_core0.Operation<z.ZodObject<{
107
107
  ensure_experience_continuity: z.ZodOptional<z.ZodBoolean>;
108
108
  rollout_percentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
109
109
  version: z.ZodOptional<z.ZodNumber>;
110
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
110
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
111
111
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
112
112
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
113
113
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -151,7 +151,7 @@ declare const updateFeatureFlag: _keystrokehq_core0.Operation<z.ZodObject<{
151
151
  ensure_experience_continuity: z.ZodOptional<z.ZodBoolean>;
152
152
  rollout_percentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
153
153
  version: z.ZodOptional<z.ZodNumber>;
154
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
154
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
155
155
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
156
156
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
157
157
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -183,7 +183,7 @@ declare const deleteFeatureFlag: _keystrokehq_core0.Operation<z.ZodObject<{
183
183
  ensure_experience_continuity: z.ZodOptional<z.ZodBoolean>;
184
184
  rollout_percentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
185
185
  version: z.ZodOptional<z.ZodNumber>;
186
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
186
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
187
187
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
188
188
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
189
189
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -215,7 +215,7 @@ declare const enableFeatureFlag: _keystrokehq_core0.Operation<z.ZodObject<{
215
215
  ensure_experience_continuity: z.ZodOptional<z.ZodBoolean>;
216
216
  rollout_percentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
217
217
  version: z.ZodOptional<z.ZodNumber>;
218
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
218
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
219
219
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
220
220
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
221
221
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -247,7 +247,7 @@ declare const disableFeatureFlag: _keystrokehq_core0.Operation<z.ZodObject<{
247
247
  ensure_experience_continuity: z.ZodOptional<z.ZodBoolean>;
248
248
  rollout_percentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
249
249
  version: z.ZodOptional<z.ZodNumber>;
250
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
250
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
251
251
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
252
252
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
253
253
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -266,7 +266,7 @@ declare const getFeatureFlagActivity: _keystrokehq_core0.Operation<z.ZodObject<{
266
266
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
267
267
  }, z.core.$strip>, z.ZodObject<{
268
268
  results: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
269
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
269
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
270
270
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
271
271
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
272
272
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -281,7 +281,7 @@ declare const getFeatureFlagActivity: _keystrokehq_core0.Operation<z.ZodObject<{
281
281
  }, z.core.$strip>>[] | undefined>], undefined>;
282
282
  declare const getMyFeatureFlags: _keystrokehq_core0.Operation<z.ZodObject<{
283
283
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
284
- }, z.core.$strip>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
284
+ }, z.core.$strip>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
285
285
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
286
286
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
287
287
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -307,7 +307,7 @@ declare const getFeatureFlagRoleAccess: _keystrokehq_core0.Operation<z.ZodObject
307
307
  role: z.ZodOptional<z.ZodNumber>;
308
308
  added_at: z.ZodOptional<z.ZodString>;
309
309
  }, z.core.$strip>>;
310
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
310
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
311
311
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
312
312
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
313
313
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -329,7 +329,7 @@ declare const createFeatureFlagRoleAccess: _keystrokehq_core0.Operation<z.ZodObj
329
329
  feature_flag: z.ZodOptional<z.ZodNumber>;
330
330
  role: z.ZodOptional<z.ZodNumber>;
331
331
  added_at: z.ZodOptional<z.ZodString>;
332
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
332
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
333
333
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
334
334
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
335
335
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -348,7 +348,7 @@ declare const deleteFeatureFlagRoleAccess: _keystrokehq_core0.Operation<z.ZodObj
348
348
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
349
349
  }, z.core.$strip>, z.ZodObject<{
350
350
  success: z.ZodBoolean;
351
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
351
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
352
352
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
353
353
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
354
354
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -366,7 +366,7 @@ declare const getFeatureFlagDashboards: _keystrokehq_core0.Operation<z.ZodObject
366
366
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
367
367
  }, z.core.$strip>, z.ZodObject<{
368
368
  results: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
369
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
369
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
370
370
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
371
371
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
372
372
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -383,7 +383,7 @@ declare const getFeatureFlagRemoteConfig: _keystrokehq_core0.Operation<z.ZodObje
383
383
  distinctId: z.ZodString;
384
384
  id: z.ZodNumber;
385
385
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
386
- }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
386
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
387
387
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
388
388
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
389
389
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -399,7 +399,7 @@ declare const getFeatureFlagRemoteConfig: _keystrokehq_core0.Operation<z.ZodObje
399
399
  declare const getFeatureFlagStatus: _keystrokehq_core0.Operation<z.ZodObject<{
400
400
  id: z.ZodNumber;
401
401
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
402
- }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
402
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
403
403
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
404
404
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
405
405
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -1,6 +1,6 @@
1
1
  import { createPosthogManagementClient } from "./client.mjs";
2
2
  import { featureFlagFiltersSchema, featureFlagRoleAccessSchema, featureFlagSchema, paginatedResponseSchema, projectIdInputShape } from "./schemas.mjs";
3
- import { t as posthogOperation } from "./factory-DYDvHOGb.mjs";
3
+ import { t as posthogOperation } from "./factory-C3ssyfSy.mjs";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region src/feature-flags.ts
@@ -37,7 +37,7 @@ const listInput = z.object({
37
37
  });
38
38
  const listOutput = paginatedResponseSchema(featureFlagSchema);
39
39
  const listFeatureFlags = posthogOperation({
40
- id: "posthog_feature_flags_list",
40
+ id: "posthog.feature-flags-list",
41
41
  name: "PostHog List Feature Flags",
42
42
  description: "List feature flags for a project",
43
43
  input: listInput,
@@ -60,7 +60,7 @@ const listFeatureFlags = posthogOperation({
60
60
  }
61
61
  });
62
62
  const getFeatureFlag = posthogOperation({
63
- id: "posthog_feature_flags_get",
63
+ id: "posthog.feature-flags-get",
64
64
  name: "PostHog Get Feature Flag",
65
65
  description: "Retrieve a feature flag by numeric id",
66
66
  input: z.object(idInput),
@@ -75,7 +75,7 @@ const getFeatureFlag = posthogOperation({
75
75
  }
76
76
  });
77
77
  const createFeatureFlag = posthogOperation({
78
- id: "posthog_feature_flags_create",
78
+ id: "posthog.feature-flags-create",
79
79
  name: "PostHog Create Feature Flag",
80
80
  description: "Create a new feature flag",
81
81
  input: z.object({
@@ -96,7 +96,7 @@ const createFeatureFlag = posthogOperation({
96
96
  }
97
97
  });
98
98
  const updateFeatureFlag = posthogOperation({
99
- id: "posthog_feature_flags_update",
99
+ id: "posthog.feature-flags-update",
100
100
  name: "PostHog Update Feature Flag",
101
101
  description: "Partially update a feature flag",
102
102
  input: z.object({
@@ -124,7 +124,7 @@ const updateFeatureFlag = posthogOperation({
124
124
  }
125
125
  });
126
126
  const deleteFeatureFlag = posthogOperation({
127
- id: "posthog_feature_flags_delete",
127
+ id: "posthog.feature-flags-delete",
128
128
  name: "PostHog Delete Feature Flag",
129
129
  description: "Soft-delete a feature flag",
130
130
  input: z.object(idInput),
@@ -141,7 +141,7 @@ const deleteFeatureFlag = posthogOperation({
141
141
  }
142
142
  });
143
143
  const enableFeatureFlag = posthogOperation({
144
- id: "posthog_feature_flags_enable",
144
+ id: "posthog.feature-flags-enable",
145
145
  name: "PostHog Enable Feature Flag",
146
146
  description: "Activate a feature flag",
147
147
  input: z.object(idInput),
@@ -158,7 +158,7 @@ const enableFeatureFlag = posthogOperation({
158
158
  }
159
159
  });
160
160
  const disableFeatureFlag = posthogOperation({
161
- id: "posthog_feature_flags_disable",
161
+ id: "posthog.feature-flags-disable",
162
162
  name: "PostHog Disable Feature Flag",
163
163
  description: "Deactivate a feature flag",
164
164
  input: z.object(idInput),
@@ -175,7 +175,7 @@ const disableFeatureFlag = posthogOperation({
175
175
  }
176
176
  });
177
177
  const getFeatureFlagActivity = posthogOperation({
178
- id: "posthog_feature_flags_activity",
178
+ id: "posthog.feature-flags-activity",
179
179
  name: "PostHog Feature Flag Activity",
180
180
  description: "Fetch activity log for a feature flag",
181
181
  input: z.object({
@@ -194,7 +194,7 @@ const getFeatureFlagActivity = posthogOperation({
194
194
  }
195
195
  });
196
196
  const getMyFeatureFlags = posthogOperation({
197
- id: "posthog_feature_flags_my_flags",
197
+ id: "posthog.feature-flags-my-flags",
198
198
  name: "PostHog My Feature Flags",
199
199
  description: "Fetch the feature flags evaluated for the calling user",
200
200
  input: z.object(projectIdInputShape),
@@ -209,7 +209,7 @@ const getMyFeatureFlags = posthogOperation({
209
209
  }
210
210
  });
211
211
  const getFeatureFlagRoleAccess = posthogOperation({
212
- id: "posthog_feature_flags_role_access_list",
212
+ id: "posthog.feature-flags-role-access-list",
213
213
  name: "PostHog List Feature Flag Role Access",
214
214
  description: "List role access rules for a feature flag",
215
215
  input: z.object(idInput),
@@ -224,7 +224,7 @@ const getFeatureFlagRoleAccess = posthogOperation({
224
224
  }
225
225
  });
226
226
  const createFeatureFlagRoleAccess = posthogOperation({
227
- id: "posthog_feature_flags_role_access_create",
227
+ id: "posthog.feature-flags-role-access-create",
228
228
  name: "PostHog Create Feature Flag Role Access",
229
229
  description: "Grant a role access to a feature flag",
230
230
  input: z.object({
@@ -244,7 +244,7 @@ const createFeatureFlagRoleAccess = posthogOperation({
244
244
  }
245
245
  });
246
246
  const deleteFeatureFlagRoleAccess = posthogOperation({
247
- id: "posthog_feature_flags_role_access_delete",
247
+ id: "posthog.feature-flags-role-access-delete",
248
248
  name: "PostHog Delete Feature Flag Role Access",
249
249
  description: "Revoke a role access rule for a feature flag",
250
250
  input: z.object({
@@ -264,7 +264,7 @@ const deleteFeatureFlagRoleAccess = posthogOperation({
264
264
  }
265
265
  });
266
266
  const getFeatureFlagDashboards = posthogOperation({
267
- id: "posthog_feature_flags_dashboards",
267
+ id: "posthog.feature-flags-dashboards",
268
268
  name: "PostHog Feature Flag Dashboards",
269
269
  description: "Fetch dashboards linked to a feature flag",
270
270
  input: z.object(idInput),
@@ -279,7 +279,7 @@ const getFeatureFlagDashboards = posthogOperation({
279
279
  }
280
280
  });
281
281
  const getFeatureFlagRemoteConfig = posthogOperation({
282
- id: "posthog_feature_flags_remote_config",
282
+ id: "posthog.feature-flags-remote-config",
283
283
  name: "PostHog Feature Flag Remote Config",
284
284
  description: "Fetch the remote-config payload for a feature flag",
285
285
  input: z.object({
@@ -298,7 +298,7 @@ const getFeatureFlagRemoteConfig = posthogOperation({
298
298
  }
299
299
  });
300
300
  const getFeatureFlagStatus = posthogOperation({
301
- id: "posthog_feature_flags_status",
301
+ id: "posthog.feature-flags-status",
302
302
  name: "PostHog Feature Flag Status",
303
303
  description: "Fetch computed status summary for a feature flag",
304
304
  input: z.object(idInput),
@@ -0,0 +1,84 @@
1
+ //#region ../../packages/integration-authoring/dist/http.mjs
2
+ /**
3
+ * Typed error thrown by `createJsonRestClient` for non-2xx responses.
4
+ *
5
+ * Includes the full HTTP status, status text, response headers, raw body
6
+ * string, and request URL/method so callers can make structured decisions
7
+ * (retry on 5xx, map 401/403 to `CredentialRevokedError`, read
8
+ * `Retry-After`, etc.) instead of parsing error messages.
9
+ */
10
+ var JsonRestError = class extends Error {
11
+ name = "JsonRestError";
12
+ status;
13
+ statusText;
14
+ body;
15
+ headers;
16
+ url;
17
+ method;
18
+ constructor(init) {
19
+ super(`${init.errorPrefix}: ${init.status} ${init.statusText}${init.body ? ` — ${init.body}` : ""}`);
20
+ this.status = init.status;
21
+ this.statusText = init.statusText;
22
+ this.body = init.body;
23
+ this.headers = init.headers;
24
+ this.url = init.url;
25
+ this.method = init.method;
26
+ }
27
+ /** True for 401 and 403 responses (auth / permission failures). */
28
+ static isAuthError(error) {
29
+ return isJsonRestError(error) && (error.status === 401 || error.status === 403);
30
+ }
31
+ };
32
+ /**
33
+ * Structural type guard for `JsonRestError`. Tolerates cross-realm errors by
34
+ * checking the `name` property instead of relying on `instanceof`.
35
+ */
36
+ function isJsonRestError(error) {
37
+ if (!error || typeof error !== "object") return false;
38
+ const candidate = error;
39
+ return candidate.name === "JsonRestError" && typeof candidate.status === "number" && typeof candidate.body === "string";
40
+ }
41
+ function buildQueryString(query) {
42
+ if (!query) return "";
43
+ const params = new URLSearchParams();
44
+ for (const [key, value] of Object.entries(query)) if (value !== void 0 && value !== null) params.set(key, String(value));
45
+ const qs = params.toString();
46
+ return qs ? `?${qs}` : "";
47
+ }
48
+ function createJsonRestClient(config) {
49
+ const fetchImpl = config.fetchImpl ?? fetch;
50
+ const request = async (options) => {
51
+ const { method, path, body, query, headers: requestHeaders } = options;
52
+ const url = `${config.baseUrl}${path}${buildQueryString(query)}`;
53
+ const headers = {
54
+ Accept: "application/json",
55
+ ...config.defaultHeaders,
56
+ ...config.authHeaders(),
57
+ ...requestHeaders
58
+ };
59
+ if (body !== void 0) headers["Content-Type"] ??= "application/json";
60
+ const response = await fetchImpl(url, {
61
+ method,
62
+ headers,
63
+ body: body !== void 0 ? JSON.stringify(body) : void 0
64
+ });
65
+ if (!response.ok) {
66
+ const errorBody = await response.text().catch(() => "");
67
+ throw new JsonRestError({
68
+ errorPrefix: config.errorPrefix,
69
+ status: response.status,
70
+ statusText: response.statusText,
71
+ body: errorBody,
72
+ headers: response.headers,
73
+ url,
74
+ method
75
+ });
76
+ }
77
+ if (response.status === 204) return;
78
+ return await response.json();
79
+ };
80
+ return { request };
81
+ }
82
+
83
+ //#endregion
84
+ export { isJsonRestError as n, createJsonRestClient as t };
@@ -1,6 +1,6 @@
1
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
1
2
  import { z } from "zod";
2
3
  import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
3
- import * as _keystrokehq_core0 from "@keystrokehq/core";
4
4
 
5
5
  //#region src/insights.d.ts
6
6
  declare const listInsights: _keystrokehq_core0.Operation<z.ZodObject<{
@@ -33,7 +33,7 @@ declare const listInsights: _keystrokehq_core0.Operation<z.ZodObject<{
33
33
  dashboards: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
34
34
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
35
35
  }, z.core.$strip>>;
36
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
36
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
37
37
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
38
38
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
39
39
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -65,7 +65,7 @@ declare const getInsight: _keystrokehq_core0.Operation<z.ZodObject<{
65
65
  deleted: z.ZodOptional<z.ZodBoolean>;
66
66
  dashboards: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
67
67
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
68
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
68
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
69
69
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
70
70
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
71
71
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -105,7 +105,7 @@ declare const createInsight: _keystrokehq_core0.Operation<z.ZodObject<{
105
105
  deleted: z.ZodOptional<z.ZodBoolean>;
106
106
  dashboards: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
107
107
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
108
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
108
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
109
109
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
110
110
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
111
111
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -146,7 +146,7 @@ declare const updateInsight: _keystrokehq_core0.Operation<z.ZodObject<{
146
146
  deleted: z.ZodOptional<z.ZodBoolean>;
147
147
  dashboards: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
148
148
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
149
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
149
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
150
150
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
151
151
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
152
152
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -178,7 +178,7 @@ declare const deleteInsight: _keystrokehq_core0.Operation<z.ZodObject<{
178
178
  deleted: z.ZodOptional<z.ZodBoolean>;
179
179
  dashboards: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
180
180
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
181
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
181
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
182
182
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
183
183
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
184
184
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -197,7 +197,7 @@ declare const getInsightActivity: _keystrokehq_core0.Operation<z.ZodObject<{
197
197
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
198
198
  }, z.core.$strip>, z.ZodObject<{
199
199
  results: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
200
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
200
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
201
201
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
202
202
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
203
203
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -215,7 +215,7 @@ declare const getInsightsActivityFeed: _keystrokehq_core0.Operation<z.ZodObject<
215
215
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
216
216
  }, z.core.$strip>, z.ZodObject<{
217
217
  results: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
218
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
218
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
219
219
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
220
220
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
221
221
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -235,7 +235,7 @@ declare const getInsightSharing: _keystrokehq_core0.Operation<z.ZodObject<{
235
235
  enabled: z.ZodOptional<z.ZodBoolean>;
236
236
  access_token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
237
237
  created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
238
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
238
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
239
239
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
240
240
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
241
241
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -256,7 +256,7 @@ declare const updateInsightSharing: _keystrokehq_core0.Operation<z.ZodObject<{
256
256
  enabled: z.ZodOptional<z.ZodBoolean>;
257
257
  access_token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
258
258
  created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
259
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
259
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
260
260
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
261
261
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
262
262
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -293,7 +293,7 @@ declare const getMyInsights: _keystrokehq_core0.Operation<z.ZodObject<{
293
293
  dashboards: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
294
294
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
295
295
  }, z.core.$strip>>;
296
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
296
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
297
297
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
298
298
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
299
299
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -311,7 +311,7 @@ declare const markInsightViewed: _keystrokehq_core0.Operation<z.ZodObject<{
311
311
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
312
312
  }, z.core.$strip>, z.ZodObject<{
313
313
  success: z.ZodBoolean;
314
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
314
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
315
315
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
316
316
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
317
317
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -328,7 +328,7 @@ declare const executeInsightQuery: _keystrokehq_core0.Operation<z.ZodObject<{
328
328
  query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
329
329
  refresh: z.ZodOptional<z.ZodBoolean>;
330
330
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
331
- }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
331
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
332
332
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
333
333
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
334
334
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -344,7 +344,7 @@ declare const executeInsightQuery: _keystrokehq_core0.Operation<z.ZodObject<{
344
344
  declare const getInsightRetention: _keystrokehq_core0.Operation<z.ZodObject<{
345
345
  query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
346
346
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
347
- }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
347
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
348
348
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
349
349
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
350
350
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -360,7 +360,7 @@ declare const getInsightRetention: _keystrokehq_core0.Operation<z.ZodObject<{
360
360
  declare const getInsightFunnel: _keystrokehq_core0.Operation<z.ZodObject<{
361
361
  query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
362
362
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
363
- }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
363
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
364
364
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
365
365
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
366
366
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -376,7 +376,7 @@ declare const getInsightFunnel: _keystrokehq_core0.Operation<z.ZodObject<{
376
376
  declare const getInsightPath: _keystrokehq_core0.Operation<z.ZodObject<{
377
377
  query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
378
378
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
379
- }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
379
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
380
380
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
381
381
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
382
382
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
@@ -392,7 +392,7 @@ declare const getInsightPath: _keystrokehq_core0.Operation<z.ZodObject<{
392
392
  declare const getInsightTrend: _keystrokehq_core0.Operation<z.ZodObject<{
393
393
  query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
394
394
  projectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
395
- }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:posthog", z.ZodObject<{
395
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"posthog", z.ZodObject<{
396
396
  POSTHOG_PERSONAL_API_KEY: z.ZodString;
397
397
  POSTHOG_PROJECT_API_KEY: z.ZodOptional<z.ZodString>;
398
398
  POSTHOG_HOST: z.ZodDefault<z.ZodURL>;
package/dist/insights.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createPosthogManagementClient } from "./client.mjs";
2
2
  import { insightSchema, paginatedResponseSchema, projectIdInputShape, sharingConfigurationSchema } from "./schemas.mjs";
3
- import { t as posthogOperation } from "./factory-DYDvHOGb.mjs";
3
+ import { t as posthogOperation } from "./factory-C3ssyfSy.mjs";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region src/insights.ts
@@ -27,7 +27,7 @@ const writeShape = {
27
27
  deleted: z.boolean().optional()
28
28
  };
29
29
  const listInsights = posthogOperation({
30
- id: "posthog_insights_list",
30
+ id: "posthog.insights-list",
31
31
  name: "PostHog List Insights",
32
32
  description: "List insights in a project",
33
33
  input: z.object({
@@ -60,7 +60,7 @@ const listInsights = posthogOperation({
60
60
  }
61
61
  });
62
62
  const getInsight = posthogOperation({
63
- id: "posthog_insights_get",
63
+ id: "posthog.insights-get",
64
64
  name: "PostHog Get Insight",
65
65
  description: "Retrieve a single insight by id",
66
66
  input: z.object(idInput),
@@ -75,7 +75,7 @@ const getInsight = posthogOperation({
75
75
  }
76
76
  });
77
77
  const createInsight = posthogOperation({
78
- id: "posthog_insights_create",
78
+ id: "posthog.insights-create",
79
79
  name: "PostHog Create Insight",
80
80
  description: "Create a new insight",
81
81
  input: z.object({
@@ -96,7 +96,7 @@ const createInsight = posthogOperation({
96
96
  }
97
97
  });
98
98
  const updateInsight = posthogOperation({
99
- id: "posthog_insights_update",
99
+ id: "posthog.insights-update",
100
100
  name: "PostHog Update Insight",
101
101
  description: "Partial update to an insight",
102
102
  input: z.object({
@@ -117,7 +117,7 @@ const updateInsight = posthogOperation({
117
117
  }
118
118
  });
119
119
  const deleteInsight = posthogOperation({
120
- id: "posthog_insights_delete",
120
+ id: "posthog.insights-delete",
121
121
  name: "PostHog Delete Insight",
122
122
  description: "Soft-delete an insight",
123
123
  input: z.object(idInput),
@@ -134,7 +134,7 @@ const deleteInsight = posthogOperation({
134
134
  }
135
135
  });
136
136
  const getInsightActivity = posthogOperation({
137
- id: "posthog_insights_activity",
137
+ id: "posthog.insights-activity",
138
138
  name: "PostHog Insight Activity",
139
139
  description: "Fetch activity log for an insight",
140
140
  input: z.object({
@@ -153,7 +153,7 @@ const getInsightActivity = posthogOperation({
153
153
  }
154
154
  });
155
155
  const getInsightsActivityFeed = posthogOperation({
156
- id: "posthog_insights_activity_feed",
156
+ id: "posthog.insights-activity-feed",
157
157
  name: "PostHog Insights Activity Feed",
158
158
  description: "Fetch the project-wide insights activity feed",
159
159
  input: z.object({
@@ -172,7 +172,7 @@ const getInsightsActivityFeed = posthogOperation({
172
172
  }
173
173
  });
174
174
  const getInsightSharing = posthogOperation({
175
- id: "posthog_insights_sharing_get",
175
+ id: "posthog.insights-sharing-get",
176
176
  name: "PostHog Get Insight Sharing",
177
177
  description: "Fetch sharing configuration for an insight",
178
178
  input: z.object(idInput),
@@ -187,7 +187,7 @@ const getInsightSharing = posthogOperation({
187
187
  }
188
188
  });
189
189
  const updateInsightSharing = posthogOperation({
190
- id: "posthog_insights_sharing_update",
190
+ id: "posthog.insights-sharing-update",
191
191
  name: "PostHog Update Insight Sharing",
192
192
  description: "Enable or disable sharing for an insight",
193
193
  input: z.object({
@@ -207,7 +207,7 @@ const updateInsightSharing = posthogOperation({
207
207
  }
208
208
  });
209
209
  const getMyInsights = posthogOperation({
210
- id: "posthog_insights_my_insights",
210
+ id: "posthog.insights-my-insights",
211
211
  name: "PostHog My Insights",
212
212
  description: "Fetch insights owned by the calling user",
213
213
  input: z.object({
@@ -226,7 +226,7 @@ const getMyInsights = posthogOperation({
226
226
  }
227
227
  });
228
228
  const markInsightViewed = posthogOperation({
229
- id: "posthog_insights_viewed",
229
+ id: "posthog.insights-viewed",
230
230
  name: "PostHog Mark Insight Viewed",
231
231
  description: "Record that the calling user viewed an insight",
232
232
  input: z.object(idInput),
@@ -243,7 +243,7 @@ const markInsightViewed = posthogOperation({
243
243
  }
244
244
  });
245
245
  const executeInsightQuery = posthogOperation({
246
- id: "posthog_insights_trend",
246
+ id: "posthog.insights-trend",
247
247
  name: "PostHog Execute Insight Query",
248
248
  description: "Execute an ad-hoc trend/funnel/retention/etc. query",
249
249
  input: z.object({
@@ -266,7 +266,7 @@ const executeInsightQuery = posthogOperation({
266
266
  }
267
267
  });
268
268
  const getInsightRetention = posthogOperation({
269
- id: "posthog_insights_retention",
269
+ id: "posthog.insights-retention",
270
270
  name: "PostHog Insight Retention",
271
271
  description: "Fetch retention report for an insight/query combination",
272
272
  input: z.object({
@@ -285,7 +285,7 @@ const getInsightRetention = posthogOperation({
285
285
  }
286
286
  });
287
287
  const getInsightFunnel = posthogOperation({
288
- id: "posthog_insights_funnel",
288
+ id: "posthog.insights-funnel",
289
289
  name: "PostHog Insight Funnel",
290
290
  description: "Execute a funnel query",
291
291
  input: z.object({
@@ -304,7 +304,7 @@ const getInsightFunnel = posthogOperation({
304
304
  }
305
305
  });
306
306
  const getInsightPath = posthogOperation({
307
- id: "posthog_insights_path",
307
+ id: "posthog.insights-path",
308
308
  name: "PostHog Insight Path",
309
309
  description: "Execute a user-path query",
310
310
  input: z.object({
@@ -323,7 +323,7 @@ const getInsightPath = posthogOperation({
323
323
  }
324
324
  });
325
325
  const getInsightTrend = posthogOperation({
326
- id: "posthog_insights_trend_chart",
326
+ id: "posthog.insights-trend-chart",
327
327
  name: "PostHog Insight Trend",
328
328
  description: "Execute a trend query",
329
329
  input: z.object({