@utdk/posthog 1.0.0-20260712.5-dev.e2949a6

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 (151) hide show
  1. package/LICENSE +373 -0
  2. package/README.md +172 -0
  3. package/docs/account_relationship_definitions.md +194 -0
  4. package/docs/accounts.md +380 -0
  5. package/docs/actions.md +274 -0
  6. package/docs/activity_logs.md +144 -0
  7. package/docs/advanced_activity_logs.md +101 -0
  8. package/docs/agent_platform.md +2525 -0
  9. package/docs/ai-observability.md +514 -0
  10. package/docs/alerts.md +444 -0
  11. package/docs/annotations.md +200 -0
  12. package/docs/batch_exports.md +2118 -0
  13. package/docs/business_knowledge.md +468 -0
  14. package/docs/code-invites.md +72 -0
  15. package/docs/cohorts.md +412 -0
  16. package/docs/comments.md +321 -0
  17. package/docs/conversations.md +695 -0
  18. package/docs/custom_property_definitions.md +442 -0
  19. package/docs/custom_property_sources.md +194 -0
  20. package/docs/customer_analytics.md +442 -0
  21. package/docs/customer_journeys.md +380 -0
  22. package/docs/customer_profile_configs.md +380 -0
  23. package/docs/dashboard_templates.md +258 -0
  24. package/docs/dashboards.md +1896 -0
  25. package/docs/data_color_themes.md +380 -0
  26. package/docs/data_modeling_jobs.md +264 -0
  27. package/docs/data_warehouse.md +928 -0
  28. package/docs/dataset_items.md +382 -0
  29. package/docs/datasets.md +382 -0
  30. package/docs/desktop_file_system.md +753 -0
  31. package/docs/desktop_file_system_shortcut.md +244 -0
  32. package/docs/docs.md +72 -0
  33. package/docs/early_access_feature.md +194 -0
  34. package/docs/elements.md +510 -0
  35. package/docs/endpoints.md +1030 -0
  36. package/docs/engineering_analytics.md +712 -0
  37. package/docs/environments.md +881 -0
  38. package/docs/error_tracking.md +5108 -0
  39. package/docs/evaluation_runs.md +78 -0
  40. package/docs/evaluations.md +446 -0
  41. package/docs/event_definitions.md +425 -0
  42. package/docs/event_filter.md +280 -0
  43. package/docs/event_schemas.md +163 -0
  44. package/docs/events.md +208 -0
  45. package/docs/experiment_holdouts.md +194 -0
  46. package/docs/experiment_saved_metrics.md +194 -0
  47. package/docs/experiments.md +1088 -0
  48. package/docs/exports.md +256 -0
  49. package/docs/external_data_schemas.md +752 -0
  50. package/docs/external_data_sources.md +2296 -0
  51. package/docs/feature_flags.md +808 -0
  52. package/docs/field_notes.md +206 -0
  53. package/docs/file_system.md +880 -0
  54. package/docs/file_system_shortcut.md +444 -0
  55. package/docs/flag_value.md +46 -0
  56. package/docs/groups.md +514 -0
  57. package/docs/groups_types.md +349 -0
  58. package/docs/health_issues.md +386 -0
  59. package/docs/heatmap_screenshots.md +72 -0
  60. package/docs/heatmaps.md +136 -0
  61. package/docs/hog_flows.md +1576 -0
  62. package/docs/hog_function_templates.md +101 -0
  63. package/docs/hog_functions.md +974 -0
  64. package/docs/ingestion_warnings_v2.md +40 -0
  65. package/docs/insight_variables.md +380 -0
  66. package/docs/insights.md +1722 -0
  67. package/docs/integrations.md +1954 -0
  68. package/docs/js-snippet.md +104 -0
  69. package/docs/live_debugger_breakpoints.md +264 -0
  70. package/docs/llm_analytics.md +3373 -0
  71. package/docs/llm_prompts.md +442 -0
  72. package/docs/llm_skills.md +952 -0
  73. package/docs/logs.md +2446 -0
  74. package/docs/managed_viewsets.md +140 -0
  75. package/docs/marketing_analytics.md +518 -0
  76. package/docs/max.md +772 -0
  77. package/docs/max_tools.md +70 -0
  78. package/docs/mcp_analytics.md +712 -0
  79. package/docs/mcp_server_installations.md +970 -0
  80. package/docs/mcp_servers.md +78 -0
  81. package/docs/mcp_tools.md +82 -0
  82. package/docs/messaging_templates.md +444 -0
  83. package/docs/metrics.md +462 -0
  84. package/docs/notebooks.md +838 -0
  85. package/docs/object_media_previews.md +228 -0
  86. package/docs/organizations.md +2958 -0
  87. package/docs/persons.md +1514 -0
  88. package/docs/platform_features.md +700 -0
  89. package/docs/plugin_configs.md +70 -0
  90. package/docs/product_enablement.md +39 -0
  91. package/docs/product_tours.md +357 -0
  92. package/docs/project_secret_api_keys.md +444 -0
  93. package/docs/property_access_controls.md +200 -0
  94. package/docs/property_definitions.md +244 -0
  95. package/docs/query.md +560 -0
  96. package/docs/quota_limits.md +40 -0
  97. package/docs/reminders.md +194 -0
  98. package/docs/replay.md +1020 -0
  99. package/docs/reverse_proxy.md +200 -0
  100. package/docs/sandbox-custom-images.md +209 -0
  101. package/docs/sandbox-environments.md +168 -0
  102. package/docs/saved.md +392 -0
  103. package/docs/saved_query_column_annotations.md +224 -0
  104. package/docs/scheduled_changes.md +200 -0
  105. package/docs/schema_property_groups.md +194 -0
  106. package/docs/sdk_health.md +40 -0
  107. package/docs/session_group_summaries.md +200 -0
  108. package/docs/session_recordings.md +260 -0
  109. package/docs/session_summaries.md +200 -0
  110. package/docs/sessions.md +132 -0
  111. package/docs/signals.md +1428 -0
  112. package/docs/single_session_summaries.md +72 -0
  113. package/docs/streamlit_apps.md +456 -0
  114. package/docs/subscriptions.md +634 -0
  115. package/docs/surveys.md +731 -0
  116. package/docs/taggers.md +446 -0
  117. package/docs/task-automations.md +200 -0
  118. package/docs/task-runs.md +654 -0
  119. package/docs/task_channels.md +136 -0
  120. package/docs/task_mentions.md +40 -0
  121. package/docs/tasks.md +776 -0
  122. package/docs/tracing.md +1186 -0
  123. package/docs/uploaded_media.md +44 -0
  124. package/docs/user_home_settings.md +72 -0
  125. package/docs/user_interview_topics.md +1288 -0
  126. package/docs/user_interviews.md +444 -0
  127. package/docs/users.md +1267 -0
  128. package/docs/vision.md +2022 -0
  129. package/docs/visual_review.md +816 -0
  130. package/docs/warehouse_column_annotations.md +224 -0
  131. package/docs/warehouse_column_statistics.md +80 -0
  132. package/docs/warehouse_dag.md +40 -0
  133. package/docs/warehouse_model_paths.md +70 -0
  134. package/docs/warehouse_saved_queries.md +1056 -0
  135. package/docs/warehouse_saved_query_folders.md +318 -0
  136. package/docs/warehouse_tables.md +584 -0
  137. package/docs/warehouse_view_link.md +456 -0
  138. package/docs/warehouse_view_links.md +456 -0
  139. package/docs/web_analytics.md +136 -0
  140. package/docs/web_analytics_achievements.md +200 -0
  141. package/docs/web_experiments.md +194 -0
  142. package/docs/web_vitals.md +74 -0
  143. package/docs/wizard.md +170 -0
  144. package/index.ts +22 -0
  145. package/metadata.ts +41419 -0
  146. package/openapi.json +297382 -0
  147. package/overlay.yaml +23 -0
  148. package/package.json +34 -0
  149. package/provenance.json +24 -0
  150. package/research.json +80 -0
  151. package/types/index.ts +17547 -0
@@ -0,0 +1,974 @@
1
+ # Hog Functions
2
+
3
+ ## Operations
4
+
5
+ ### `posthog.environmentsHogFunctionsList`
6
+
7
+ - **HTTP**: `GET /api/environments/{environment_id}/hog_functions/`
8
+ - **OpenAPI operationId**: `environments_hog_functions_list`
9
+ - **Path params**: None
10
+ - **Query params**: `created_at`, `created_by`, `enabled`, `id`, `limit`, `offset`, `type`, `updated_at`
11
+ - **Response codes**: `200`
12
+ - **Transport options**: None
13
+ - **TypeScript**: [Client interface](../types.ts)
14
+
15
+ **Inputs**
16
+
17
+ - Client input type: `{ [key: string]: unknown }`
18
+ - Client transport options: None
19
+
20
+ **Outputs**
21
+
22
+ - Client return type: `{ count: number; next?: string | null; previous?: string | null; results: ({ id: string; type: string | null; name: string | null; description: string; created_at: string; created_by: { id: number; uuid: string; distinc...`
23
+ - OpenAPI response codes: `200`
24
+
25
+ ```ts
26
+ import posthog from "@utdk/posthog";
27
+
28
+ type EnvironmentsHogFunctionsListInput = Parameters<typeof posthog.environmentsHogFunctionsList> extends [infer T, ...unknown[]] ? T : undefined;
29
+ type EnvironmentsHogFunctionsListOutput = Awaited<ReturnType<typeof posthog.environmentsHogFunctionsList>>;
30
+
31
+ const result: EnvironmentsHogFunctionsListOutput = await posthog.environmentsHogFunctionsList();
32
+
33
+ // Result shape (from schema): { count: number; next?: string | null; previous?: string | null; results: ({ id: string; type: string | null; name: string | null; description: string; created_at: string; created_by: { id: number; uuid: string; distinc...
34
+ ```
35
+
36
+ ### `posthog.environmentsHogFunctionsCreate`
37
+
38
+ - **HTTP**: `POST /api/environments/{environment_id}/hog_functions/`
39
+ - **OpenAPI operationId**: `environments_hog_functions_create`
40
+ - **Path params**: None
41
+ - **Query params**: None
42
+ - **Response codes**: `201`
43
+ - **Transport options**: None
44
+ - **TypeScript**: [Client interface](../types.ts)
45
+
46
+ **Inputs**
47
+
48
+ - Client input type: `{ [key: string]: unknown }`
49
+ - Client transport options: None
50
+
51
+ **Outputs**
52
+
53
+ - Client return type: `{ id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description?: string; create...`
54
+ - OpenAPI response codes: `201`
55
+
56
+ ```ts
57
+ import posthog from "@utdk/posthog";
58
+
59
+ type EnvironmentsHogFunctionsCreateInput = Parameters<typeof posthog.environmentsHogFunctionsCreate> extends [infer T, ...unknown[]] ? T : undefined;
60
+ type EnvironmentsHogFunctionsCreateOutput = Awaited<ReturnType<typeof posthog.environmentsHogFunctionsCreate>>;
61
+
62
+ const result: EnvironmentsHogFunctionsCreateOutput = await posthog.environmentsHogFunctionsCreate();
63
+
64
+ // Result shape (from schema): { id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description?: string; create...
65
+ ```
66
+
67
+ ### `posthog.environmentsHogFunctionsDestroy`
68
+
69
+ - **HTTP**: `DELETE /api/environments/{environment_id}/hog_functions/{id}/`
70
+ - **What it does**: Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
71
+ - **OpenAPI operationId**: `environments_hog_functions_destroy`
72
+ - **Path params**: `id`
73
+ - **Query params**: None
74
+ - **Response codes**: `405`
75
+ - **Transport options**: None
76
+ - **TypeScript**: [Client interface](../types.ts)
77
+
78
+ **Inputs**
79
+
80
+ - Client input type: `{ [key: string]: unknown }`
81
+ - Client transport options: None
82
+
83
+ **Outputs**
84
+
85
+ - Client return type: `unknown`
86
+ - OpenAPI response codes: `405`
87
+
88
+ ```ts
89
+ import posthog from "@utdk/posthog";
90
+
91
+ type EnvironmentsHogFunctionsDestroyInput = Parameters<typeof posthog.environmentsHogFunctionsDestroy> extends [infer T, ...unknown[]] ? T : undefined;
92
+ type EnvironmentsHogFunctionsDestroyOutput = Awaited<ReturnType<typeof posthog.environmentsHogFunctionsDestroy>>;
93
+
94
+ const result: EnvironmentsHogFunctionsDestroyOutput = await posthog.environmentsHogFunctionsDestroy();
95
+
96
+ // Result shape (from schema): unknown
97
+ ```
98
+
99
+ ### `posthog.environmentsHogFunctionsRetrieve`
100
+
101
+ - **HTTP**: `GET /api/environments/{environment_id}/hog_functions/{id}/`
102
+ - **OpenAPI operationId**: `environments_hog_functions_retrieve`
103
+ - **Path params**: `id`
104
+ - **Query params**: None
105
+ - **Response codes**: `200`
106
+ - **Transport options**: None
107
+ - **TypeScript**: [Client interface](../types.ts)
108
+
109
+ **Inputs**
110
+
111
+ - Client input type: `{ [key: string]: unknown }`
112
+ - Client transport options: None
113
+
114
+ **Outputs**
115
+
116
+ - Client return type: `{ id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description?: string; create...`
117
+ - OpenAPI response codes: `200`
118
+
119
+ ```ts
120
+ import posthog from "@utdk/posthog";
121
+
122
+ type EnvironmentsHogFunctionsRetrieveInput = Parameters<typeof posthog.environmentsHogFunctionsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
123
+ type EnvironmentsHogFunctionsRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsHogFunctionsRetrieve>>;
124
+
125
+ const result: EnvironmentsHogFunctionsRetrieveOutput = await posthog.environmentsHogFunctionsRetrieve();
126
+
127
+ // Result shape (from schema): { id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description?: string; create...
128
+ ```
129
+
130
+ ### `posthog.environmentsHogFunctionsPartialUpdate`
131
+
132
+ - **HTTP**: `PATCH /api/environments/{environment_id}/hog_functions/{id}/`
133
+ - **OpenAPI operationId**: `environments_hog_functions_partial_update`
134
+ - **Path params**: `id`
135
+ - **Query params**: None
136
+ - **Response codes**: `200`
137
+ - **Transport options**: None
138
+ - **TypeScript**: [Client interface](../types.ts)
139
+
140
+ **Inputs**
141
+
142
+ - Client input type: `{ [key: string]: unknown }`
143
+ - Client transport options: None
144
+
145
+ **Outputs**
146
+
147
+ - Client return type: `{ id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description?: string; create...`
148
+ - OpenAPI response codes: `200`
149
+
150
+ ```ts
151
+ import posthog from "@utdk/posthog";
152
+
153
+ type EnvironmentsHogFunctionsPartialUpdateInput = Parameters<typeof posthog.environmentsHogFunctionsPartialUpdate> extends [infer T, ...unknown[]] ? T : undefined;
154
+ type EnvironmentsHogFunctionsPartialUpdateOutput = Awaited<ReturnType<typeof posthog.environmentsHogFunctionsPartialUpdate>>;
155
+
156
+ const result: EnvironmentsHogFunctionsPartialUpdateOutput = await posthog.environmentsHogFunctionsPartialUpdate();
157
+
158
+ // Result shape (from schema): { id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description?: string; create...
159
+ ```
160
+
161
+ ### `posthog.environmentsHogFunctionsUpdate`
162
+
163
+ - **HTTP**: `PUT /api/environments/{environment_id}/hog_functions/{id}/`
164
+ - **OpenAPI operationId**: `environments_hog_functions_update`
165
+ - **Path params**: `id`
166
+ - **Query params**: None
167
+ - **Response codes**: `200`
168
+ - **Transport options**: None
169
+ - **TypeScript**: [Client interface](../types.ts)
170
+
171
+ **Inputs**
172
+
173
+ - Client input type: `{ [key: string]: unknown }`
174
+ - Client transport options: None
175
+
176
+ **Outputs**
177
+
178
+ - Client return type: `{ id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description?: string; create...`
179
+ - OpenAPI response codes: `200`
180
+
181
+ ```ts
182
+ import posthog from "@utdk/posthog";
183
+
184
+ type EnvironmentsHogFunctionsUpdateInput = Parameters<typeof posthog.environmentsHogFunctionsUpdate> extends [infer T, ...unknown[]] ? T : undefined;
185
+ type EnvironmentsHogFunctionsUpdateOutput = Awaited<ReturnType<typeof posthog.environmentsHogFunctionsUpdate>>;
186
+
187
+ const result: EnvironmentsHogFunctionsUpdateOutput = await posthog.environmentsHogFunctionsUpdate();
188
+
189
+ // Result shape (from schema): { id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description?: string; create...
190
+ ```
191
+
192
+ ### `posthog.environmentsHogFunctionsEnableBackfillsCreate`
193
+
194
+ - **HTTP**: `POST /api/environments/{environment_id}/hog_functions/{id}/enable_backfills/`
195
+ - **OpenAPI operationId**: `environments_hog_functions_enable_backfills_create`
196
+ - **Path params**: `id`
197
+ - **Query params**: None
198
+ - **Response codes**: `200`
199
+ - **Transport options**: None
200
+ - **TypeScript**: [Client interface](../types.ts)
201
+
202
+ **Inputs**
203
+
204
+ - Client input type: `{ [key: string]: unknown }`
205
+ - Client transport options: None
206
+
207
+ **Outputs**
208
+
209
+ - Client return type: `unknown`
210
+ - OpenAPI response codes: `200`
211
+
212
+ ```ts
213
+ import posthog from "@utdk/posthog";
214
+
215
+ type EnvironmentsHogFunctionsEnableBackfillsCreateInput = Parameters<typeof posthog.environmentsHogFunctionsEnableBackfillsCreate> extends [infer T, ...unknown[]] ? T : undefined;
216
+ type EnvironmentsHogFunctionsEnableBackfillsCreateOutput = Awaited<ReturnType<typeof posthog.environmentsHogFunctionsEnableBackfillsCreate>>;
217
+
218
+ const result: EnvironmentsHogFunctionsEnableBackfillsCreateOutput = await posthog.environmentsHogFunctionsEnableBackfillsCreate();
219
+
220
+ // Result shape (from schema): unknown
221
+ ```
222
+
223
+ ### `posthog.environmentsHogFunctionsInvocationsCreate`
224
+
225
+ - **HTTP**: `POST /api/environments/{environment_id}/hog_functions/{id}/invocations/`
226
+ - **OpenAPI operationId**: `environments_hog_functions_invocations_create`
227
+ - **Path params**: `id`
228
+ - **Query params**: None
229
+ - **Response codes**: `200`
230
+ - **Transport options**: None
231
+ - **TypeScript**: [Client interface](../types.ts)
232
+
233
+ **Inputs**
234
+
235
+ - Client input type: `{ [key: string]: unknown }`
236
+ - Client transport options: None
237
+
238
+ **Outputs**
239
+
240
+ - Client return type: `{ configuration: { id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description...`
241
+ - OpenAPI response codes: `200`
242
+
243
+ ```ts
244
+ import posthog from "@utdk/posthog";
245
+
246
+ type EnvironmentsHogFunctionsInvocationsCreateInput = Parameters<typeof posthog.environmentsHogFunctionsInvocationsCreate> extends [infer T, ...unknown[]] ? T : undefined;
247
+ type EnvironmentsHogFunctionsInvocationsCreateOutput = Awaited<ReturnType<typeof posthog.environmentsHogFunctionsInvocationsCreate>>;
248
+
249
+ const result: EnvironmentsHogFunctionsInvocationsCreateOutput = await posthog.environmentsHogFunctionsInvocationsCreate();
250
+
251
+ // Result shape (from schema): { configuration: { id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description...
252
+ ```
253
+
254
+ ### `posthog.environmentsHogFunctionsLogsRetrieve`
255
+
256
+ - **HTTP**: `GET /api/environments/{environment_id}/hog_functions/{id}/logs/`
257
+ - **OpenAPI operationId**: `environments_hog_functions_logs_retrieve`
258
+ - **Path params**: `id`
259
+ - **Query params**: `after`, `before`, `instance_id`, `level`, `limit`, `search`
260
+ - **Response codes**: `200`
261
+ - **Transport options**: None
262
+ - **TypeScript**: [Client interface](../types.ts)
263
+
264
+ **Inputs**
265
+
266
+ - Client input type: `{ [key: string]: unknown }`
267
+ - Client transport options: None
268
+
269
+ **Outputs**
270
+
271
+ - Client return type: `unknown`
272
+ - OpenAPI response codes: `200`
273
+
274
+ ```ts
275
+ import posthog from "@utdk/posthog";
276
+
277
+ type EnvironmentsHogFunctionsLogsRetrieveInput = Parameters<typeof posthog.environmentsHogFunctionsLogsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
278
+ type EnvironmentsHogFunctionsLogsRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsHogFunctionsLogsRetrieve>>;
279
+
280
+ const result: EnvironmentsHogFunctionsLogsRetrieveOutput = await posthog.environmentsHogFunctionsLogsRetrieve();
281
+
282
+ // Result shape (from schema): unknown
283
+ ```
284
+
285
+ ### `posthog.environmentsHogFunctionsMetricsRetrieve`
286
+
287
+ - **HTTP**: `GET /api/environments/{environment_id}/hog_functions/{id}/metrics/`
288
+ - **OpenAPI operationId**: `environments_hog_functions_metrics_retrieve`
289
+ - **Path params**: `id`
290
+ - **Query params**: `after`, `before`, `breakdown_by`, `instance_id`, `interval`, `kind`, `name`
291
+ - **Response codes**: `200`
292
+ - **Transport options**: None
293
+ - **TypeScript**: [Client interface](../types.ts)
294
+
295
+ **Inputs**
296
+
297
+ - Client input type: `{ [key: string]: unknown }`
298
+ - Client transport options: None
299
+
300
+ **Outputs**
301
+
302
+ - Client return type: `{ labels: (string)[]; series: ({ name: string; values: (number)[] })[] }`
303
+ - OpenAPI response codes: `200`
304
+
305
+ ```ts
306
+ import posthog from "@utdk/posthog";
307
+
308
+ type EnvironmentsHogFunctionsMetricsRetrieveInput = Parameters<typeof posthog.environmentsHogFunctionsMetricsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
309
+ type EnvironmentsHogFunctionsMetricsRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsHogFunctionsMetricsRetrieve>>;
310
+
311
+ const result: EnvironmentsHogFunctionsMetricsRetrieveOutput = await posthog.environmentsHogFunctionsMetricsRetrieve();
312
+
313
+ // Result shape (from schema): { labels: (string)[]; series: ({ name: string; values: (number)[] })[] }
314
+ ```
315
+
316
+ ### `posthog.environmentsHogFunctionsMetricsTotalsRetrieve`
317
+
318
+ - **HTTP**: `GET /api/environments/{environment_id}/hog_functions/{id}/metrics/totals/`
319
+ - **OpenAPI operationId**: `environments_hog_functions_metrics_totals_retrieve`
320
+ - **Path params**: `id`
321
+ - **Query params**: `after`, `before`, `breakdown_by`, `instance_id`, `interval`, `kind`, `name`
322
+ - **Response codes**: `200`
323
+ - **Transport options**: None
324
+ - **TypeScript**: [Client interface](../types.ts)
325
+
326
+ **Inputs**
327
+
328
+ - Client input type: `{ [key: string]: unknown }`
329
+ - Client transport options: None
330
+
331
+ **Outputs**
332
+
333
+ - Client return type: `{ totals: { [key: string]: number | undefined } }`
334
+ - OpenAPI response codes: `200`
335
+
336
+ ```ts
337
+ import posthog from "@utdk/posthog";
338
+
339
+ type EnvironmentsHogFunctionsMetricsTotalsRetrieveInput = Parameters<typeof posthog.environmentsHogFunctionsMetricsTotalsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
340
+ type EnvironmentsHogFunctionsMetricsTotalsRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsHogFunctionsMetricsTotalsRetrieve>>;
341
+
342
+ const result: EnvironmentsHogFunctionsMetricsTotalsRetrieveOutput = await posthog.environmentsHogFunctionsMetricsTotalsRetrieve();
343
+
344
+ // Result shape (from schema): { totals: { [key: string]: number | undefined } }
345
+ ```
346
+
347
+ ### `posthog.environmentsHogFunctionsRerunCreate`
348
+
349
+ - **HTTP**: `POST /api/environments/{environment_id}/hog_functions/{id}/rerun/`
350
+ - **What it does**: Rerun past invocations of this hog function from their stored payloads.
351
+
352
+ The CDP worker reads matching rows from the `hog_invocation_results`
353
+ ClickHouse table, rehydrates the invocation from the stored
354
+ `invocation_globals`, and re-enqueues onto cyclotron. Each rerun
355
+ run reuses the original `invocation_id` with `is_retry=1` set on the
356
+ new lifecycle row so the UI can surface that it was a rerun.
357
+
358
+ For source-webhook functions the worker strips `request.headers` from
359
+ the rehydrated globals before re-enqueuing (see the rerun paginator):
360
+ those headers carry the inbound sender's credentials, and replaying
361
+ them through a reconfigured function would let a write-access user
362
+ exfiltrate stored secrets.
363
+
364
+ Because rerun replays historical event/person/group data, it requires
365
+ `person:read` and `group:read` on top of `hog_function:write`.
366
+ - **OpenAPI operationId**: `environments_hog_functions_rerun_create`
367
+ - **Path params**: `id`
368
+ - **Query params**: None
369
+ - **Response codes**: `200`, `400`
370
+ - **Transport options**: None
371
+ - **TypeScript**: [Client interface](../types.ts)
372
+
373
+ **Inputs**
374
+
375
+ - Client input type: `{ [key: string]: unknown }`
376
+ - Client transport options: None
377
+
378
+ **Outputs**
379
+
380
+ - Client return type: `{ rerun_job_id: string; queued_count: number; skipped_count: number }`
381
+ - OpenAPI response codes: `200`, `400`
382
+
383
+ ```ts
384
+ import posthog from "@utdk/posthog";
385
+
386
+ type EnvironmentsHogFunctionsRerunCreateInput = Parameters<typeof posthog.environmentsHogFunctionsRerunCreate> extends [infer T, ...unknown[]] ? T : undefined;
387
+ type EnvironmentsHogFunctionsRerunCreateOutput = Awaited<ReturnType<typeof posthog.environmentsHogFunctionsRerunCreate>>;
388
+
389
+ const result: EnvironmentsHogFunctionsRerunCreateOutput = await posthog.environmentsHogFunctionsRerunCreate();
390
+
391
+ // Result shape (from schema): { rerun_job_id: string; queued_count: number; skipped_count: number }
392
+ ```
393
+
394
+ ### `posthog.environmentsHogFunctionsIconRetrieve`
395
+
396
+ - **HTTP**: `GET /api/environments/{environment_id}/hog_functions/icon/`
397
+ - **OpenAPI operationId**: `environments_hog_functions_icon_retrieve`
398
+ - **Path params**: None
399
+ - **Query params**: None
400
+ - **Response codes**: `200`
401
+ - **Transport options**: None
402
+ - **TypeScript**: [Client interface](../types.ts)
403
+
404
+ **Inputs**
405
+
406
+ - Client input type: `{ [key: string]: unknown }`
407
+ - Client transport options: None
408
+
409
+ **Outputs**
410
+
411
+ - Client return type: `unknown`
412
+ - OpenAPI response codes: `200`
413
+
414
+ ```ts
415
+ import posthog from "@utdk/posthog";
416
+
417
+ type EnvironmentsHogFunctionsIconRetrieveInput = Parameters<typeof posthog.environmentsHogFunctionsIconRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
418
+ type EnvironmentsHogFunctionsIconRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsHogFunctionsIconRetrieve>>;
419
+
420
+ const result: EnvironmentsHogFunctionsIconRetrieveOutput = await posthog.environmentsHogFunctionsIconRetrieve();
421
+
422
+ // Result shape (from schema): unknown
423
+ ```
424
+
425
+ ### `posthog.environmentsHogFunctionsIconsRetrieve`
426
+
427
+ - **HTTP**: `GET /api/environments/{environment_id}/hog_functions/icons/`
428
+ - **OpenAPI operationId**: `environments_hog_functions_icons_retrieve`
429
+ - **Path params**: None
430
+ - **Query params**: None
431
+ - **Response codes**: `200`
432
+ - **Transport options**: None
433
+ - **TypeScript**: [Client interface](../types.ts)
434
+
435
+ **Inputs**
436
+
437
+ - Client input type: `{ [key: string]: unknown }`
438
+ - Client transport options: None
439
+
440
+ **Outputs**
441
+
442
+ - Client return type: `unknown`
443
+ - OpenAPI response codes: `200`
444
+
445
+ ```ts
446
+ import posthog from "@utdk/posthog";
447
+
448
+ type EnvironmentsHogFunctionsIconsRetrieveInput = Parameters<typeof posthog.environmentsHogFunctionsIconsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
449
+ type EnvironmentsHogFunctionsIconsRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsHogFunctionsIconsRetrieve>>;
450
+
451
+ const result: EnvironmentsHogFunctionsIconsRetrieveOutput = await posthog.environmentsHogFunctionsIconsRetrieve();
452
+
453
+ // Result shape (from schema): unknown
454
+ ```
455
+
456
+ ### `posthog.environmentsHogFunctionsRearrangePartialUpdate`
457
+
458
+ - **HTTP**: `PATCH /api/environments/{environment_id}/hog_functions/rearrange/`
459
+ - **What it does**: Update the execution order of multiple HogFunctions.
460
+ - **OpenAPI operationId**: `environments_hog_functions_rearrange_partial_update`
461
+ - **Path params**: None
462
+ - **Query params**: None
463
+ - **Response codes**: `200`
464
+ - **Transport options**: None
465
+ - **TypeScript**: [Client interface](../types.ts)
466
+
467
+ **Inputs**
468
+
469
+ - Client input type: `{ [key: string]: unknown }`
470
+ - Client transport options: None
471
+
472
+ **Outputs**
473
+
474
+ - Client return type: `({ id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description?: string; creat...`
475
+ - OpenAPI response codes: `200`
476
+
477
+ ```ts
478
+ import posthog from "@utdk/posthog";
479
+
480
+ type EnvironmentsHogFunctionsRearrangePartialUpdateInput = Parameters<typeof posthog.environmentsHogFunctionsRearrangePartialUpdate> extends [infer T, ...unknown[]] ? T : undefined;
481
+ type EnvironmentsHogFunctionsRearrangePartialUpdateOutput = Awaited<ReturnType<typeof posthog.environmentsHogFunctionsRearrangePartialUpdate>>;
482
+
483
+ const result: EnvironmentsHogFunctionsRearrangePartialUpdateOutput = await posthog.environmentsHogFunctionsRearrangePartialUpdate();
484
+
485
+ // Result shape (from schema): ({ id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description?: string; creat...
486
+ ```
487
+
488
+ ### `posthog.hogFunctionsList`
489
+
490
+ - **HTTP**: `GET /api/projects/{project_id}/hog_functions/`
491
+ - **OpenAPI operationId**: `hog_functions_list`
492
+ - **Path params**: None
493
+ - **Query params**: `created_at`, `created_by`, `enabled`, `id`, `limit`, `offset`, `type`, `updated_at`
494
+ - **Response codes**: `200`
495
+ - **Transport options**: None
496
+ - **TypeScript**: [Client interface](../types.ts)
497
+
498
+ **Inputs**
499
+
500
+ - Client input type: `{ [key: string]: unknown }`
501
+ - Client transport options: None
502
+
503
+ **Outputs**
504
+
505
+ - Client return type: `{ count: number; next?: string | null; previous?: string | null; results: ({ id: string; type: string | null; name: string | null; description: string; created_at: string; created_by: { id: number; uuid: string; distinc...`
506
+ - OpenAPI response codes: `200`
507
+
508
+ ```ts
509
+ import posthog from "@utdk/posthog";
510
+
511
+ type HogFunctionsListInput = Parameters<typeof posthog.hogFunctionsList> extends [infer T, ...unknown[]] ? T : undefined;
512
+ type HogFunctionsListOutput = Awaited<ReturnType<typeof posthog.hogFunctionsList>>;
513
+
514
+ const result: HogFunctionsListOutput = await posthog.hogFunctionsList();
515
+
516
+ // Result shape (from schema): { count: number; next?: string | null; previous?: string | null; results: ({ id: string; type: string | null; name: string | null; description: string; created_at: string; created_by: { id: number; uuid: string; distinc...
517
+ ```
518
+
519
+ ### `posthog.hogFunctionsCreate`
520
+
521
+ - **HTTP**: `POST /api/projects/{project_id}/hog_functions/`
522
+ - **OpenAPI operationId**: `hog_functions_create`
523
+ - **Path params**: None
524
+ - **Query params**: None
525
+ - **Response codes**: `201`
526
+ - **Transport options**: None
527
+ - **TypeScript**: [Client interface](../types.ts)
528
+
529
+ **Inputs**
530
+
531
+ - Client input type: `{ [key: string]: unknown }`
532
+ - Client transport options: None
533
+
534
+ **Outputs**
535
+
536
+ - Client return type: `{ id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description?: string; create...`
537
+ - OpenAPI response codes: `201`
538
+
539
+ ```ts
540
+ import posthog from "@utdk/posthog";
541
+
542
+ type HogFunctionsCreateInput = Parameters<typeof posthog.hogFunctionsCreate> extends [infer T, ...unknown[]] ? T : undefined;
543
+ type HogFunctionsCreateOutput = Awaited<ReturnType<typeof posthog.hogFunctionsCreate>>;
544
+
545
+ const result: HogFunctionsCreateOutput = await posthog.hogFunctionsCreate();
546
+
547
+ // Result shape (from schema): { id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description?: string; create...
548
+ ```
549
+
550
+ ### `posthog.hogFunctionsDestroy`
551
+
552
+ - **HTTP**: `DELETE /api/projects/{project_id}/hog_functions/{id}/`
553
+ - **What it does**: Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
554
+ - **OpenAPI operationId**: `hog_functions_destroy`
555
+ - **Path params**: `id`
556
+ - **Query params**: None
557
+ - **Response codes**: `405`
558
+ - **Transport options**: None
559
+ - **TypeScript**: [Client interface](../types.ts)
560
+
561
+ **Inputs**
562
+
563
+ - Client input type: `{ [key: string]: unknown }`
564
+ - Client transport options: None
565
+
566
+ **Outputs**
567
+
568
+ - Client return type: `unknown`
569
+ - OpenAPI response codes: `405`
570
+
571
+ ```ts
572
+ import posthog from "@utdk/posthog";
573
+
574
+ type HogFunctionsDestroyInput = Parameters<typeof posthog.hogFunctionsDestroy> extends [infer T, ...unknown[]] ? T : undefined;
575
+ type HogFunctionsDestroyOutput = Awaited<ReturnType<typeof posthog.hogFunctionsDestroy>>;
576
+
577
+ const result: HogFunctionsDestroyOutput = await posthog.hogFunctionsDestroy();
578
+
579
+ // Result shape (from schema): unknown
580
+ ```
581
+
582
+ ### `posthog.hogFunctionsRetrieve`
583
+
584
+ - **HTTP**: `GET /api/projects/{project_id}/hog_functions/{id}/`
585
+ - **OpenAPI operationId**: `hog_functions_retrieve`
586
+ - **Path params**: `id`
587
+ - **Query params**: None
588
+ - **Response codes**: `200`
589
+ - **Transport options**: None
590
+ - **TypeScript**: [Client interface](../types.ts)
591
+
592
+ **Inputs**
593
+
594
+ - Client input type: `{ [key: string]: unknown }`
595
+ - Client transport options: None
596
+
597
+ **Outputs**
598
+
599
+ - Client return type: `{ id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description?: string; create...`
600
+ - OpenAPI response codes: `200`
601
+
602
+ ```ts
603
+ import posthog from "@utdk/posthog";
604
+
605
+ type HogFunctionsRetrieveInput = Parameters<typeof posthog.hogFunctionsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
606
+ type HogFunctionsRetrieveOutput = Awaited<ReturnType<typeof posthog.hogFunctionsRetrieve>>;
607
+
608
+ const result: HogFunctionsRetrieveOutput = await posthog.hogFunctionsRetrieve();
609
+
610
+ // Result shape (from schema): { id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description?: string; create...
611
+ ```
612
+
613
+ ### `posthog.hogFunctionsPartialUpdate`
614
+
615
+ - **HTTP**: `PATCH /api/projects/{project_id}/hog_functions/{id}/`
616
+ - **OpenAPI operationId**: `hog_functions_partial_update`
617
+ - **Path params**: `id`
618
+ - **Query params**: None
619
+ - **Response codes**: `200`
620
+ - **Transport options**: None
621
+ - **TypeScript**: [Client interface](../types.ts)
622
+
623
+ **Inputs**
624
+
625
+ - Client input type: `{ [key: string]: unknown }`
626
+ - Client transport options: None
627
+
628
+ **Outputs**
629
+
630
+ - Client return type: `{ id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description?: string; create...`
631
+ - OpenAPI response codes: `200`
632
+
633
+ ```ts
634
+ import posthog from "@utdk/posthog";
635
+
636
+ type HogFunctionsPartialUpdateInput = Parameters<typeof posthog.hogFunctionsPartialUpdate> extends [infer T, ...unknown[]] ? T : undefined;
637
+ type HogFunctionsPartialUpdateOutput = Awaited<ReturnType<typeof posthog.hogFunctionsPartialUpdate>>;
638
+
639
+ const result: HogFunctionsPartialUpdateOutput = await posthog.hogFunctionsPartialUpdate();
640
+
641
+ // Result shape (from schema): { id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description?: string; create...
642
+ ```
643
+
644
+ ### `posthog.hogFunctionsUpdate`
645
+
646
+ - **HTTP**: `PUT /api/projects/{project_id}/hog_functions/{id}/`
647
+ - **OpenAPI operationId**: `hog_functions_update`
648
+ - **Path params**: `id`
649
+ - **Query params**: None
650
+ - **Response codes**: `200`
651
+ - **Transport options**: None
652
+ - **TypeScript**: [Client interface](../types.ts)
653
+
654
+ **Inputs**
655
+
656
+ - Client input type: `{ [key: string]: unknown }`
657
+ - Client transport options: None
658
+
659
+ **Outputs**
660
+
661
+ - Client return type: `{ id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description?: string; create...`
662
+ - OpenAPI response codes: `200`
663
+
664
+ ```ts
665
+ import posthog from "@utdk/posthog";
666
+
667
+ type HogFunctionsUpdateInput = Parameters<typeof posthog.hogFunctionsUpdate> extends [infer T, ...unknown[]] ? T : undefined;
668
+ type HogFunctionsUpdateOutput = Awaited<ReturnType<typeof posthog.hogFunctionsUpdate>>;
669
+
670
+ const result: HogFunctionsUpdateOutput = await posthog.hogFunctionsUpdate();
671
+
672
+ // Result shape (from schema): { id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description?: string; create...
673
+ ```
674
+
675
+ ### `posthog.hogFunctionsEnableBackfillsCreate`
676
+
677
+ - **HTTP**: `POST /api/projects/{project_id}/hog_functions/{id}/enable_backfills/`
678
+ - **OpenAPI operationId**: `hog_functions_enable_backfills_create`
679
+ - **Path params**: `id`
680
+ - **Query params**: None
681
+ - **Response codes**: `200`
682
+ - **Transport options**: None
683
+ - **TypeScript**: [Client interface](../types.ts)
684
+
685
+ **Inputs**
686
+
687
+ - Client input type: `{ [key: string]: unknown }`
688
+ - Client transport options: None
689
+
690
+ **Outputs**
691
+
692
+ - Client return type: `unknown`
693
+ - OpenAPI response codes: `200`
694
+
695
+ ```ts
696
+ import posthog from "@utdk/posthog";
697
+
698
+ type HogFunctionsEnableBackfillsCreateInput = Parameters<typeof posthog.hogFunctionsEnableBackfillsCreate> extends [infer T, ...unknown[]] ? T : undefined;
699
+ type HogFunctionsEnableBackfillsCreateOutput = Awaited<ReturnType<typeof posthog.hogFunctionsEnableBackfillsCreate>>;
700
+
701
+ const result: HogFunctionsEnableBackfillsCreateOutput = await posthog.hogFunctionsEnableBackfillsCreate();
702
+
703
+ // Result shape (from schema): unknown
704
+ ```
705
+
706
+ ### `posthog.hogFunctionsInvocationsCreate`
707
+
708
+ - **HTTP**: `POST /api/projects/{project_id}/hog_functions/{id}/invocations/`
709
+ - **OpenAPI operationId**: `hog_functions_invocations_create`
710
+ - **Path params**: `id`
711
+ - **Query params**: None
712
+ - **Response codes**: `200`
713
+ - **Transport options**: None
714
+ - **TypeScript**: [Client interface](../types.ts)
715
+
716
+ **Inputs**
717
+
718
+ - Client input type: `{ [key: string]: unknown }`
719
+ - Client transport options: None
720
+
721
+ **Outputs**
722
+
723
+ - Client return type: `{ configuration: { id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description...`
724
+ - OpenAPI response codes: `200`
725
+
726
+ ```ts
727
+ import posthog from "@utdk/posthog";
728
+
729
+ type HogFunctionsInvocationsCreateInput = Parameters<typeof posthog.hogFunctionsInvocationsCreate> extends [infer T, ...unknown[]] ? T : undefined;
730
+ type HogFunctionsInvocationsCreateOutput = Awaited<ReturnType<typeof posthog.hogFunctionsInvocationsCreate>>;
731
+
732
+ const result: HogFunctionsInvocationsCreateOutput = await posthog.hogFunctionsInvocationsCreate();
733
+
734
+ // Result shape (from schema): { configuration: { id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description...
735
+ ```
736
+
737
+ ### `posthog.hogFunctionsLogsRetrieve`
738
+
739
+ - **HTTP**: `GET /api/projects/{project_id}/hog_functions/{id}/logs/`
740
+ - **OpenAPI operationId**: `hog_functions_logs_retrieve`
741
+ - **Path params**: `id`
742
+ - **Query params**: `after`, `before`, `instance_id`, `level`, `limit`, `search`
743
+ - **Response codes**: `200`
744
+ - **Transport options**: None
745
+ - **TypeScript**: [Client interface](../types.ts)
746
+
747
+ **Inputs**
748
+
749
+ - Client input type: `{ [key: string]: unknown }`
750
+ - Client transport options: None
751
+
752
+ **Outputs**
753
+
754
+ - Client return type: `unknown`
755
+ - OpenAPI response codes: `200`
756
+
757
+ ```ts
758
+ import posthog from "@utdk/posthog";
759
+
760
+ type HogFunctionsLogsRetrieveInput = Parameters<typeof posthog.hogFunctionsLogsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
761
+ type HogFunctionsLogsRetrieveOutput = Awaited<ReturnType<typeof posthog.hogFunctionsLogsRetrieve>>;
762
+
763
+ const result: HogFunctionsLogsRetrieveOutput = await posthog.hogFunctionsLogsRetrieve();
764
+
765
+ // Result shape (from schema): unknown
766
+ ```
767
+
768
+ ### `posthog.hogFunctionsMetricsRetrieve`
769
+
770
+ - **HTTP**: `GET /api/projects/{project_id}/hog_functions/{id}/metrics/`
771
+ - **OpenAPI operationId**: `hog_functions_metrics_retrieve`
772
+ - **Path params**: `id`
773
+ - **Query params**: `after`, `before`, `breakdown_by`, `instance_id`, `interval`, `kind`, `name`
774
+ - **Response codes**: `200`
775
+ - **Transport options**: None
776
+ - **TypeScript**: [Client interface](../types.ts)
777
+
778
+ **Inputs**
779
+
780
+ - Client input type: `{ [key: string]: unknown }`
781
+ - Client transport options: None
782
+
783
+ **Outputs**
784
+
785
+ - Client return type: `{ labels: (string)[]; series: ({ name: string; values: (number)[] })[] }`
786
+ - OpenAPI response codes: `200`
787
+
788
+ ```ts
789
+ import posthog from "@utdk/posthog";
790
+
791
+ type HogFunctionsMetricsRetrieveInput = Parameters<typeof posthog.hogFunctionsMetricsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
792
+ type HogFunctionsMetricsRetrieveOutput = Awaited<ReturnType<typeof posthog.hogFunctionsMetricsRetrieve>>;
793
+
794
+ const result: HogFunctionsMetricsRetrieveOutput = await posthog.hogFunctionsMetricsRetrieve();
795
+
796
+ // Result shape (from schema): { labels: (string)[]; series: ({ name: string; values: (number)[] })[] }
797
+ ```
798
+
799
+ ### `posthog.hogFunctionsMetricsTotalsRetrieve`
800
+
801
+ - **HTTP**: `GET /api/projects/{project_id}/hog_functions/{id}/metrics/totals/`
802
+ - **OpenAPI operationId**: `hog_functions_metrics_totals_retrieve`
803
+ - **Path params**: `id`
804
+ - **Query params**: `after`, `before`, `breakdown_by`, `instance_id`, `interval`, `kind`, `name`
805
+ - **Response codes**: `200`
806
+ - **Transport options**: None
807
+ - **TypeScript**: [Client interface](../types.ts)
808
+
809
+ **Inputs**
810
+
811
+ - Client input type: `{ [key: string]: unknown }`
812
+ - Client transport options: None
813
+
814
+ **Outputs**
815
+
816
+ - Client return type: `{ totals: { [key: string]: number | undefined } }`
817
+ - OpenAPI response codes: `200`
818
+
819
+ ```ts
820
+ import posthog from "@utdk/posthog";
821
+
822
+ type HogFunctionsMetricsTotalsRetrieveInput = Parameters<typeof posthog.hogFunctionsMetricsTotalsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
823
+ type HogFunctionsMetricsTotalsRetrieveOutput = Awaited<ReturnType<typeof posthog.hogFunctionsMetricsTotalsRetrieve>>;
824
+
825
+ const result: HogFunctionsMetricsTotalsRetrieveOutput = await posthog.hogFunctionsMetricsTotalsRetrieve();
826
+
827
+ // Result shape (from schema): { totals: { [key: string]: number | undefined } }
828
+ ```
829
+
830
+ ### `posthog.hogFunctionsRerunCreate`
831
+
832
+ - **HTTP**: `POST /api/projects/{project_id}/hog_functions/{id}/rerun/`
833
+ - **What it does**: Rerun past invocations of this hog function from their stored payloads.
834
+
835
+ The CDP worker reads matching rows from the `hog_invocation_results`
836
+ ClickHouse table, rehydrates the invocation from the stored
837
+ `invocation_globals`, and re-enqueues onto cyclotron. Each rerun
838
+ run reuses the original `invocation_id` with `is_retry=1` set on the
839
+ new lifecycle row so the UI can surface that it was a rerun.
840
+
841
+ For source-webhook functions the worker strips `request.headers` from
842
+ the rehydrated globals before re-enqueuing (see the rerun paginator):
843
+ those headers carry the inbound sender's credentials, and replaying
844
+ them through a reconfigured function would let a write-access user
845
+ exfiltrate stored secrets.
846
+
847
+ Because rerun replays historical event/person/group data, it requires
848
+ `person:read` and `group:read` on top of `hog_function:write`.
849
+ - **OpenAPI operationId**: `hog_functions_rerun_create`
850
+ - **Path params**: `id`
851
+ - **Query params**: None
852
+ - **Response codes**: `200`, `400`
853
+ - **Transport options**: None
854
+ - **TypeScript**: [Client interface](../types.ts)
855
+
856
+ **Inputs**
857
+
858
+ - Client input type: `{ [key: string]: unknown }`
859
+ - Client transport options: None
860
+
861
+ **Outputs**
862
+
863
+ - Client return type: `{ rerun_job_id: string; queued_count: number; skipped_count: number }`
864
+ - OpenAPI response codes: `200`, `400`
865
+
866
+ ```ts
867
+ import posthog from "@utdk/posthog";
868
+
869
+ type HogFunctionsRerunCreateInput = Parameters<typeof posthog.hogFunctionsRerunCreate> extends [infer T, ...unknown[]] ? T : undefined;
870
+ type HogFunctionsRerunCreateOutput = Awaited<ReturnType<typeof posthog.hogFunctionsRerunCreate>>;
871
+
872
+ const result: HogFunctionsRerunCreateOutput = await posthog.hogFunctionsRerunCreate();
873
+
874
+ // Result shape (from schema): { rerun_job_id: string; queued_count: number; skipped_count: number }
875
+ ```
876
+
877
+ ### `posthog.hogFunctionsIconRetrieve`
878
+
879
+ - **HTTP**: `GET /api/projects/{project_id}/hog_functions/icon/`
880
+ - **OpenAPI operationId**: `hog_functions_icon_retrieve`
881
+ - **Path params**: None
882
+ - **Query params**: None
883
+ - **Response codes**: `200`
884
+ - **Transport options**: None
885
+ - **TypeScript**: [Client interface](../types.ts)
886
+
887
+ **Inputs**
888
+
889
+ - Client input type: `{ [key: string]: unknown }`
890
+ - Client transport options: None
891
+
892
+ **Outputs**
893
+
894
+ - Client return type: `unknown`
895
+ - OpenAPI response codes: `200`
896
+
897
+ ```ts
898
+ import posthog from "@utdk/posthog";
899
+
900
+ type HogFunctionsIconRetrieveInput = Parameters<typeof posthog.hogFunctionsIconRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
901
+ type HogFunctionsIconRetrieveOutput = Awaited<ReturnType<typeof posthog.hogFunctionsIconRetrieve>>;
902
+
903
+ const result: HogFunctionsIconRetrieveOutput = await posthog.hogFunctionsIconRetrieve();
904
+
905
+ // Result shape (from schema): unknown
906
+ ```
907
+
908
+ ### `posthog.hogFunctionsIconsRetrieve`
909
+
910
+ - **HTTP**: `GET /api/projects/{project_id}/hog_functions/icons/`
911
+ - **OpenAPI operationId**: `hog_functions_icons_retrieve`
912
+ - **Path params**: None
913
+ - **Query params**: None
914
+ - **Response codes**: `200`
915
+ - **Transport options**: None
916
+ - **TypeScript**: [Client interface](../types.ts)
917
+
918
+ **Inputs**
919
+
920
+ - Client input type: `{ [key: string]: unknown }`
921
+ - Client transport options: None
922
+
923
+ **Outputs**
924
+
925
+ - Client return type: `unknown`
926
+ - OpenAPI response codes: `200`
927
+
928
+ ```ts
929
+ import posthog from "@utdk/posthog";
930
+
931
+ type HogFunctionsIconsRetrieveInput = Parameters<typeof posthog.hogFunctionsIconsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
932
+ type HogFunctionsIconsRetrieveOutput = Awaited<ReturnType<typeof posthog.hogFunctionsIconsRetrieve>>;
933
+
934
+ const result: HogFunctionsIconsRetrieveOutput = await posthog.hogFunctionsIconsRetrieve();
935
+
936
+ // Result shape (from schema): unknown
937
+ ```
938
+
939
+ ### `posthog.hogFunctionsRearrangePartialUpdate`
940
+
941
+ - **HTTP**: `PATCH /api/projects/{project_id}/hog_functions/rearrange/`
942
+ - **What it does**: Update the execution order of multiple HogFunctions.
943
+ - **OpenAPI operationId**: `hog_functions_rearrange_partial_update`
944
+ - **Path params**: None
945
+ - **Query params**: None
946
+ - **Response codes**: `200`
947
+ - **Transport options**: None
948
+ - **TypeScript**: [Client interface](../types.ts)
949
+
950
+ **Inputs**
951
+
952
+ - Client input type: `{ [key: string]: unknown }`
953
+ - Client transport options: None
954
+
955
+ **Outputs**
956
+
957
+ - Client return type: `({ id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description?: string; creat...`
958
+ - OpenAPI response codes: `200`
959
+
960
+ ```ts
961
+ import posthog from "@utdk/posthog";
962
+
963
+ type HogFunctionsRearrangePartialUpdateInput = Parameters<typeof posthog.hogFunctionsRearrangePartialUpdate> extends [infer T, ...unknown[]] ? T : undefined;
964
+ type HogFunctionsRearrangePartialUpdateOutput = Awaited<ReturnType<typeof posthog.hogFunctionsRearrangePartialUpdate>>;
965
+
966
+ const result: HogFunctionsRearrangePartialUpdateOutput = await posthog.hogFunctionsRearrangePartialUpdate();
967
+
968
+ // Result shape (from schema): ({ id: string; type?: "destination" | "site_destination" | "internal_destination" | "source_webhook" | "warehouse_source_webhook" | "site_app" | "transformation" | null; name?: string | null; description?: string; creat...
969
+ ```
970
+
971
+
972
+ <!-- prompt-hash:
973
+ 8c3694991a4c289225f05a4e8f1e098cc74d085a088d7dffd82f00d93797b7f8
974
+ -->