@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.
- package/LICENSE +373 -0
- package/README.md +172 -0
- package/docs/account_relationship_definitions.md +194 -0
- package/docs/accounts.md +380 -0
- package/docs/actions.md +274 -0
- package/docs/activity_logs.md +144 -0
- package/docs/advanced_activity_logs.md +101 -0
- package/docs/agent_platform.md +2525 -0
- package/docs/ai-observability.md +514 -0
- package/docs/alerts.md +444 -0
- package/docs/annotations.md +200 -0
- package/docs/batch_exports.md +2118 -0
- package/docs/business_knowledge.md +468 -0
- package/docs/code-invites.md +72 -0
- package/docs/cohorts.md +412 -0
- package/docs/comments.md +321 -0
- package/docs/conversations.md +695 -0
- package/docs/custom_property_definitions.md +442 -0
- package/docs/custom_property_sources.md +194 -0
- package/docs/customer_analytics.md +442 -0
- package/docs/customer_journeys.md +380 -0
- package/docs/customer_profile_configs.md +380 -0
- package/docs/dashboard_templates.md +258 -0
- package/docs/dashboards.md +1896 -0
- package/docs/data_color_themes.md +380 -0
- package/docs/data_modeling_jobs.md +264 -0
- package/docs/data_warehouse.md +928 -0
- package/docs/dataset_items.md +382 -0
- package/docs/datasets.md +382 -0
- package/docs/desktop_file_system.md +753 -0
- package/docs/desktop_file_system_shortcut.md +244 -0
- package/docs/docs.md +72 -0
- package/docs/early_access_feature.md +194 -0
- package/docs/elements.md +510 -0
- package/docs/endpoints.md +1030 -0
- package/docs/engineering_analytics.md +712 -0
- package/docs/environments.md +881 -0
- package/docs/error_tracking.md +5108 -0
- package/docs/evaluation_runs.md +78 -0
- package/docs/evaluations.md +446 -0
- package/docs/event_definitions.md +425 -0
- package/docs/event_filter.md +280 -0
- package/docs/event_schemas.md +163 -0
- package/docs/events.md +208 -0
- package/docs/experiment_holdouts.md +194 -0
- package/docs/experiment_saved_metrics.md +194 -0
- package/docs/experiments.md +1088 -0
- package/docs/exports.md +256 -0
- package/docs/external_data_schemas.md +752 -0
- package/docs/external_data_sources.md +2296 -0
- package/docs/feature_flags.md +808 -0
- package/docs/field_notes.md +206 -0
- package/docs/file_system.md +880 -0
- package/docs/file_system_shortcut.md +444 -0
- package/docs/flag_value.md +46 -0
- package/docs/groups.md +514 -0
- package/docs/groups_types.md +349 -0
- package/docs/health_issues.md +386 -0
- package/docs/heatmap_screenshots.md +72 -0
- package/docs/heatmaps.md +136 -0
- package/docs/hog_flows.md +1576 -0
- package/docs/hog_function_templates.md +101 -0
- package/docs/hog_functions.md +974 -0
- package/docs/ingestion_warnings_v2.md +40 -0
- package/docs/insight_variables.md +380 -0
- package/docs/insights.md +1722 -0
- package/docs/integrations.md +1954 -0
- package/docs/js-snippet.md +104 -0
- package/docs/live_debugger_breakpoints.md +264 -0
- package/docs/llm_analytics.md +3373 -0
- package/docs/llm_prompts.md +442 -0
- package/docs/llm_skills.md +952 -0
- package/docs/logs.md +2446 -0
- package/docs/managed_viewsets.md +140 -0
- package/docs/marketing_analytics.md +518 -0
- package/docs/max.md +772 -0
- package/docs/max_tools.md +70 -0
- package/docs/mcp_analytics.md +712 -0
- package/docs/mcp_server_installations.md +970 -0
- package/docs/mcp_servers.md +78 -0
- package/docs/mcp_tools.md +82 -0
- package/docs/messaging_templates.md +444 -0
- package/docs/metrics.md +462 -0
- package/docs/notebooks.md +838 -0
- package/docs/object_media_previews.md +228 -0
- package/docs/organizations.md +2958 -0
- package/docs/persons.md +1514 -0
- package/docs/platform_features.md +700 -0
- package/docs/plugin_configs.md +70 -0
- package/docs/product_enablement.md +39 -0
- package/docs/product_tours.md +357 -0
- package/docs/project_secret_api_keys.md +444 -0
- package/docs/property_access_controls.md +200 -0
- package/docs/property_definitions.md +244 -0
- package/docs/query.md +560 -0
- package/docs/quota_limits.md +40 -0
- package/docs/reminders.md +194 -0
- package/docs/replay.md +1020 -0
- package/docs/reverse_proxy.md +200 -0
- package/docs/sandbox-custom-images.md +209 -0
- package/docs/sandbox-environments.md +168 -0
- package/docs/saved.md +392 -0
- package/docs/saved_query_column_annotations.md +224 -0
- package/docs/scheduled_changes.md +200 -0
- package/docs/schema_property_groups.md +194 -0
- package/docs/sdk_health.md +40 -0
- package/docs/session_group_summaries.md +200 -0
- package/docs/session_recordings.md +260 -0
- package/docs/session_summaries.md +200 -0
- package/docs/sessions.md +132 -0
- package/docs/signals.md +1428 -0
- package/docs/single_session_summaries.md +72 -0
- package/docs/streamlit_apps.md +456 -0
- package/docs/subscriptions.md +634 -0
- package/docs/surveys.md +731 -0
- package/docs/taggers.md +446 -0
- package/docs/task-automations.md +200 -0
- package/docs/task-runs.md +654 -0
- package/docs/task_channels.md +136 -0
- package/docs/task_mentions.md +40 -0
- package/docs/tasks.md +776 -0
- package/docs/tracing.md +1186 -0
- package/docs/uploaded_media.md +44 -0
- package/docs/user_home_settings.md +72 -0
- package/docs/user_interview_topics.md +1288 -0
- package/docs/user_interviews.md +444 -0
- package/docs/users.md +1267 -0
- package/docs/vision.md +2022 -0
- package/docs/visual_review.md +816 -0
- package/docs/warehouse_column_annotations.md +224 -0
- package/docs/warehouse_column_statistics.md +80 -0
- package/docs/warehouse_dag.md +40 -0
- package/docs/warehouse_model_paths.md +70 -0
- package/docs/warehouse_saved_queries.md +1056 -0
- package/docs/warehouse_saved_query_folders.md +318 -0
- package/docs/warehouse_tables.md +584 -0
- package/docs/warehouse_view_link.md +456 -0
- package/docs/warehouse_view_links.md +456 -0
- package/docs/web_analytics.md +136 -0
- package/docs/web_analytics_achievements.md +200 -0
- package/docs/web_experiments.md +194 -0
- package/docs/web_vitals.md +74 -0
- package/docs/wizard.md +170 -0
- package/index.ts +22 -0
- package/metadata.ts +41419 -0
- package/openapi.json +297382 -0
- package/overlay.yaml +23 -0
- package/package.json +34 -0
- package/provenance.json +24 -0
- package/research.json +80 -0
- package/types/index.ts +17547 -0
package/docs/query.md
ADDED
|
@@ -0,0 +1,560 @@
|
|
|
1
|
+
# Query
|
|
2
|
+
|
|
3
|
+
## Operations
|
|
4
|
+
|
|
5
|
+
### `posthog.environmentsQueryCreate`
|
|
6
|
+
|
|
7
|
+
- **HTTP**: `POST /api/environments/{environment_id}/query/`
|
|
8
|
+
- **What it does**: DRF ViewSet mixin that gates coalesced responses behind permission checks.
|
|
9
|
+
|
|
10
|
+
The QueryCoalescingMiddleware attaches cached response data to
|
|
11
|
+
request.META["_coalesced_response"] for followers. This mixin runs DRF's
|
|
12
|
+
initial() (auth + permissions + throttling) before returning the
|
|
13
|
+
cached response, ensuring the request is authorized.
|
|
14
|
+
- **OpenAPI operationId**: `environments_query_create`
|
|
15
|
+
- **Path params**: None
|
|
16
|
+
- **Query params**: None
|
|
17
|
+
- **Response codes**: `200`
|
|
18
|
+
- **Transport options**: None
|
|
19
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
20
|
+
|
|
21
|
+
**Inputs**
|
|
22
|
+
|
|
23
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
24
|
+
- Client transport options: None
|
|
25
|
+
|
|
26
|
+
**Outputs**
|
|
27
|
+
|
|
28
|
+
- Client return type: `{ [key: string]: unknown }`
|
|
29
|
+
- OpenAPI response codes: `200`
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import posthog from "@utdk/posthog";
|
|
33
|
+
|
|
34
|
+
type EnvironmentsQueryCreateInput = Parameters<typeof posthog.environmentsQueryCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
35
|
+
type EnvironmentsQueryCreateOutput = Awaited<ReturnType<typeof posthog.environmentsQueryCreate>>;
|
|
36
|
+
|
|
37
|
+
const result: EnvironmentsQueryCreateOutput = await posthog.environmentsQueryCreate();
|
|
38
|
+
|
|
39
|
+
// Result shape (from schema): { [key: string]: unknown }
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### `posthog.environmentsQueryDestroy`
|
|
43
|
+
|
|
44
|
+
- **HTTP**: `DELETE /api/environments/{environment_id}/query/{id}/`
|
|
45
|
+
- **What it does**: (Experimental)
|
|
46
|
+
- **OpenAPI operationId**: `environments_query_destroy`
|
|
47
|
+
- **Path params**: `id`
|
|
48
|
+
- **Query params**: None
|
|
49
|
+
- **Response codes**: `204`
|
|
50
|
+
- **Transport options**: None
|
|
51
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
52
|
+
|
|
53
|
+
**Inputs**
|
|
54
|
+
|
|
55
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
56
|
+
- Client transport options: None
|
|
57
|
+
|
|
58
|
+
**Outputs**
|
|
59
|
+
|
|
60
|
+
- Client return type: `unknown`
|
|
61
|
+
- OpenAPI response codes: `204`
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
import posthog from "@utdk/posthog";
|
|
65
|
+
|
|
66
|
+
type EnvironmentsQueryDestroyInput = Parameters<typeof posthog.environmentsQueryDestroy> extends [infer T, ...unknown[]] ? T : undefined;
|
|
67
|
+
type EnvironmentsQueryDestroyOutput = Awaited<ReturnType<typeof posthog.environmentsQueryDestroy>>;
|
|
68
|
+
|
|
69
|
+
const result: EnvironmentsQueryDestroyOutput = await posthog.environmentsQueryDestroy();
|
|
70
|
+
|
|
71
|
+
// Result shape (from schema): unknown
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### `posthog.environmentsQueryRetrieve`
|
|
75
|
+
|
|
76
|
+
- **HTTP**: `GET /api/environments/{environment_id}/query/{id}/`
|
|
77
|
+
- **What it does**: (Experimental)
|
|
78
|
+
- **OpenAPI operationId**: `environments_query_retrieve`
|
|
79
|
+
- **Path params**: `id`
|
|
80
|
+
- **Query params**: None
|
|
81
|
+
- **Response codes**: `200`
|
|
82
|
+
- **Transport options**: None
|
|
83
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
84
|
+
|
|
85
|
+
**Inputs**
|
|
86
|
+
|
|
87
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
88
|
+
- Client transport options: None
|
|
89
|
+
|
|
90
|
+
**Outputs**
|
|
91
|
+
|
|
92
|
+
- Client return type: `{ query_status: { complete?: boolean | null; dashboard_id?: number | null; end_time?: string | null; error?: boolean | null; error_code?: string | null; error_message?: string | null; expiration_time?: string | null; id...`
|
|
93
|
+
- OpenAPI response codes: `200`
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
import posthog from "@utdk/posthog";
|
|
97
|
+
|
|
98
|
+
type EnvironmentsQueryRetrieveInput = Parameters<typeof posthog.environmentsQueryRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
99
|
+
type EnvironmentsQueryRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsQueryRetrieve>>;
|
|
100
|
+
|
|
101
|
+
const result: EnvironmentsQueryRetrieveOutput = await posthog.environmentsQueryRetrieve();
|
|
102
|
+
|
|
103
|
+
// Result shape (from schema): { query_status: { complete?: boolean | null; dashboard_id?: number | null; end_time?: string | null; error?: boolean | null; error_code?: string | null; error_message?: string | null; expiration_time?: string | null; id...
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### `posthog.environmentsQueryLogRetrieve`
|
|
107
|
+
|
|
108
|
+
- **HTTP**: `GET /api/environments/{environment_id}/query/{id}/log/`
|
|
109
|
+
- **What it does**: Get query log details from query_log_archive table for a specific query_id, the query must have been issued in last 24 hours.
|
|
110
|
+
- **OpenAPI operationId**: `environments_query_log_retrieve`
|
|
111
|
+
- **Path params**: `id`
|
|
112
|
+
- **Query params**: None
|
|
113
|
+
- **Response codes**: `200`
|
|
114
|
+
- **Transport options**: None
|
|
115
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
116
|
+
|
|
117
|
+
**Inputs**
|
|
118
|
+
|
|
119
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
120
|
+
- Client transport options: None
|
|
121
|
+
|
|
122
|
+
**Outputs**
|
|
123
|
+
|
|
124
|
+
- Client return type: `{ [key: string]: unknown }`
|
|
125
|
+
- OpenAPI response codes: `200`
|
|
126
|
+
|
|
127
|
+
```ts
|
|
128
|
+
import posthog from "@utdk/posthog";
|
|
129
|
+
|
|
130
|
+
type EnvironmentsQueryLogRetrieveInput = Parameters<typeof posthog.environmentsQueryLogRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
131
|
+
type EnvironmentsQueryLogRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsQueryLogRetrieve>>;
|
|
132
|
+
|
|
133
|
+
const result: EnvironmentsQueryLogRetrieveOutput = await posthog.environmentsQueryLogRetrieve();
|
|
134
|
+
|
|
135
|
+
// Result shape (from schema): { [key: string]: unknown }
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### `posthog.environmentsQueryCreateWithKind`
|
|
139
|
+
|
|
140
|
+
- **HTTP**: `POST /api/environments/{environment_id}/query/{query_kind}/`
|
|
141
|
+
- **What it does**: DRF ViewSet mixin that gates coalesced responses behind permission checks.
|
|
142
|
+
|
|
143
|
+
The QueryCoalescingMiddleware attaches cached response data to
|
|
144
|
+
request.META["_coalesced_response"] for followers. This mixin runs DRF's
|
|
145
|
+
initial() (auth + permissions + throttling) before returning the
|
|
146
|
+
cached response, ensuring the request is authorized.
|
|
147
|
+
- **OpenAPI operationId**: `environments_query_create_with_kind`
|
|
148
|
+
- **Path params**: `query_kind`
|
|
149
|
+
- **Query params**: None
|
|
150
|
+
- **Response codes**: `200`
|
|
151
|
+
- **Transport options**: None
|
|
152
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
153
|
+
|
|
154
|
+
**Inputs**
|
|
155
|
+
|
|
156
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
157
|
+
- Client transport options: None
|
|
158
|
+
|
|
159
|
+
**Outputs**
|
|
160
|
+
|
|
161
|
+
- Client return type: `unknown`
|
|
162
|
+
- OpenAPI response codes: `200`
|
|
163
|
+
|
|
164
|
+
```ts
|
|
165
|
+
import posthog from "@utdk/posthog";
|
|
166
|
+
|
|
167
|
+
type EnvironmentsQueryCreateWithKindInput = Parameters<typeof posthog.environmentsQueryCreateWithKind> extends [infer T, ...unknown[]] ? T : undefined;
|
|
168
|
+
type EnvironmentsQueryCreateWithKindOutput = Awaited<ReturnType<typeof posthog.environmentsQueryCreateWithKind>>;
|
|
169
|
+
|
|
170
|
+
const result: EnvironmentsQueryCreateWithKindOutput = await posthog.environmentsQueryCreateWithKind();
|
|
171
|
+
|
|
172
|
+
// Result shape (from schema): unknown
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### `posthog.environmentsQueryCheckAuthForAsyncCreate`
|
|
176
|
+
|
|
177
|
+
- **HTTP**: `POST /api/environments/{environment_id}/query/check_auth_for_async/`
|
|
178
|
+
- **What it does**: DRF ViewSet mixin that gates coalesced responses behind permission checks.
|
|
179
|
+
|
|
180
|
+
The QueryCoalescingMiddleware attaches cached response data to
|
|
181
|
+
request.META["_coalesced_response"] for followers. This mixin runs DRF's
|
|
182
|
+
initial() (auth + permissions + throttling) before returning the
|
|
183
|
+
cached response, ensuring the request is authorized.
|
|
184
|
+
- **OpenAPI operationId**: `environments_query_check_auth_for_async_create`
|
|
185
|
+
- **Path params**: None
|
|
186
|
+
- **Query params**: None
|
|
187
|
+
- **Response codes**: `200`
|
|
188
|
+
- **Transport options**: None
|
|
189
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
190
|
+
|
|
191
|
+
**Inputs**
|
|
192
|
+
|
|
193
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
194
|
+
- Client transport options: None
|
|
195
|
+
|
|
196
|
+
**Outputs**
|
|
197
|
+
|
|
198
|
+
- Client return type: `{ [key: string]: unknown }`
|
|
199
|
+
- OpenAPI response codes: `200`
|
|
200
|
+
|
|
201
|
+
```ts
|
|
202
|
+
import posthog from "@utdk/posthog";
|
|
203
|
+
|
|
204
|
+
type EnvironmentsQueryCheckAuthForAsyncCreateInput = Parameters<typeof posthog.environmentsQueryCheckAuthForAsyncCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
205
|
+
type EnvironmentsQueryCheckAuthForAsyncCreateOutput = Awaited<ReturnType<typeof posthog.environmentsQueryCheckAuthForAsyncCreate>>;
|
|
206
|
+
|
|
207
|
+
const result: EnvironmentsQueryCheckAuthForAsyncCreateOutput = await posthog.environmentsQueryCheckAuthForAsyncCreate();
|
|
208
|
+
|
|
209
|
+
// Result shape (from schema): { [key: string]: unknown }
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### `posthog.environmentsQueryDraftSqlRetrieve`
|
|
213
|
+
|
|
214
|
+
- **HTTP**: `GET /api/environments/{environment_id}/query/draft_sql/`
|
|
215
|
+
- **What it does**: DRF ViewSet mixin that gates coalesced responses behind permission checks.
|
|
216
|
+
|
|
217
|
+
The QueryCoalescingMiddleware attaches cached response data to
|
|
218
|
+
request.META["_coalesced_response"] for followers. This mixin runs DRF's
|
|
219
|
+
initial() (auth + permissions + throttling) before returning the
|
|
220
|
+
cached response, ensuring the request is authorized.
|
|
221
|
+
- **OpenAPI operationId**: `environments_query_draft_sql_retrieve`
|
|
222
|
+
- **Path params**: None
|
|
223
|
+
- **Query params**: None
|
|
224
|
+
- **Response codes**: `200`
|
|
225
|
+
- **Transport options**: None
|
|
226
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
227
|
+
|
|
228
|
+
**Inputs**
|
|
229
|
+
|
|
230
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
231
|
+
- Client transport options: None
|
|
232
|
+
|
|
233
|
+
**Outputs**
|
|
234
|
+
|
|
235
|
+
- Client return type: `{ [key: string]: unknown }`
|
|
236
|
+
- OpenAPI response codes: `200`
|
|
237
|
+
|
|
238
|
+
```ts
|
|
239
|
+
import posthog from "@utdk/posthog";
|
|
240
|
+
|
|
241
|
+
type EnvironmentsQueryDraftSqlRetrieveInput = Parameters<typeof posthog.environmentsQueryDraftSqlRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
242
|
+
type EnvironmentsQueryDraftSqlRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsQueryDraftSqlRetrieve>>;
|
|
243
|
+
|
|
244
|
+
const result: EnvironmentsQueryDraftSqlRetrieveOutput = await posthog.environmentsQueryDraftSqlRetrieve();
|
|
245
|
+
|
|
246
|
+
// Result shape (from schema): { [key: string]: unknown }
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### `posthog.environmentsQueryUpgradeCreate`
|
|
250
|
+
|
|
251
|
+
- **HTTP**: `POST /api/environments/{environment_id}/query/upgrade/`
|
|
252
|
+
- **What it does**: Upgrades a query without executing it. Returns a query with all nodes migrated to the latest version.
|
|
253
|
+
- **OpenAPI operationId**: `environments_query_upgrade_create`
|
|
254
|
+
- **Path params**: None
|
|
255
|
+
- **Query params**: None
|
|
256
|
+
- **Response codes**: `200`
|
|
257
|
+
- **Transport options**: None
|
|
258
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
259
|
+
|
|
260
|
+
**Inputs**
|
|
261
|
+
|
|
262
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
263
|
+
- Client transport options: None
|
|
264
|
+
|
|
265
|
+
**Outputs**
|
|
266
|
+
|
|
267
|
+
- Client return type: `{ query: { custom_name?: string | null; event?: string | null; fixedProperties?: ({ key: string; label?: string | null; operator?: "exact" | "is_not" | "icontains" | "not_icontains" | "regex" | "not_regex" | "gt" | "gte...`
|
|
268
|
+
- OpenAPI response codes: `200`
|
|
269
|
+
|
|
270
|
+
```ts
|
|
271
|
+
import posthog from "@utdk/posthog";
|
|
272
|
+
|
|
273
|
+
type EnvironmentsQueryUpgradeCreateInput = Parameters<typeof posthog.environmentsQueryUpgradeCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
274
|
+
type EnvironmentsQueryUpgradeCreateOutput = Awaited<ReturnType<typeof posthog.environmentsQueryUpgradeCreate>>;
|
|
275
|
+
|
|
276
|
+
const result: EnvironmentsQueryUpgradeCreateOutput = await posthog.environmentsQueryUpgradeCreate();
|
|
277
|
+
|
|
278
|
+
// Result shape (from schema): { query: { custom_name?: string | null; event?: string | null; fixedProperties?: ({ key: string; label?: string | null; operator?: "exact" | "is_not" | "icontains" | "not_icontains" | "regex" | "not_regex" | "gt" | "gte...
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### `posthog.queryCreate`
|
|
282
|
+
|
|
283
|
+
- **HTTP**: `POST /api/projects/{project_id}/query/`
|
|
284
|
+
- **What it does**: DRF ViewSet mixin that gates coalesced responses behind permission checks.
|
|
285
|
+
|
|
286
|
+
The QueryCoalescingMiddleware attaches cached response data to
|
|
287
|
+
request.META["_coalesced_response"] for followers. This mixin runs DRF's
|
|
288
|
+
initial() (auth + permissions + throttling) before returning the
|
|
289
|
+
cached response, ensuring the request is authorized.
|
|
290
|
+
- **OpenAPI operationId**: `query_create`
|
|
291
|
+
- **Path params**: None
|
|
292
|
+
- **Query params**: None
|
|
293
|
+
- **Response codes**: `200`
|
|
294
|
+
- **Transport options**: None
|
|
295
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
296
|
+
|
|
297
|
+
**Inputs**
|
|
298
|
+
|
|
299
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
300
|
+
- Client transport options: None
|
|
301
|
+
|
|
302
|
+
**Outputs**
|
|
303
|
+
|
|
304
|
+
- Client return type: `{ [key: string]: unknown }`
|
|
305
|
+
- OpenAPI response codes: `200`
|
|
306
|
+
|
|
307
|
+
```ts
|
|
308
|
+
import posthog from "@utdk/posthog";
|
|
309
|
+
|
|
310
|
+
type QueryCreateInput = Parameters<typeof posthog.queryCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
311
|
+
type QueryCreateOutput = Awaited<ReturnType<typeof posthog.queryCreate>>;
|
|
312
|
+
|
|
313
|
+
const result: QueryCreateOutput = await posthog.queryCreate();
|
|
314
|
+
|
|
315
|
+
// Result shape (from schema): { [key: string]: unknown }
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
### `posthog.queryDestroy`
|
|
319
|
+
|
|
320
|
+
- **HTTP**: `DELETE /api/projects/{project_id}/query/{id}/`
|
|
321
|
+
- **What it does**: (Experimental)
|
|
322
|
+
- **OpenAPI operationId**: `query_destroy`
|
|
323
|
+
- **Path params**: `id`
|
|
324
|
+
- **Query params**: None
|
|
325
|
+
- **Response codes**: `204`
|
|
326
|
+
- **Transport options**: None
|
|
327
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
328
|
+
|
|
329
|
+
**Inputs**
|
|
330
|
+
|
|
331
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
332
|
+
- Client transport options: None
|
|
333
|
+
|
|
334
|
+
**Outputs**
|
|
335
|
+
|
|
336
|
+
- Client return type: `unknown`
|
|
337
|
+
- OpenAPI response codes: `204`
|
|
338
|
+
|
|
339
|
+
```ts
|
|
340
|
+
import posthog from "@utdk/posthog";
|
|
341
|
+
|
|
342
|
+
type QueryDestroyInput = Parameters<typeof posthog.queryDestroy> extends [infer T, ...unknown[]] ? T : undefined;
|
|
343
|
+
type QueryDestroyOutput = Awaited<ReturnType<typeof posthog.queryDestroy>>;
|
|
344
|
+
|
|
345
|
+
const result: QueryDestroyOutput = await posthog.queryDestroy();
|
|
346
|
+
|
|
347
|
+
// Result shape (from schema): unknown
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### `posthog.queryRetrieve`
|
|
351
|
+
|
|
352
|
+
- **HTTP**: `GET /api/projects/{project_id}/query/{id}/`
|
|
353
|
+
- **What it does**: (Experimental)
|
|
354
|
+
- **OpenAPI operationId**: `query_retrieve`
|
|
355
|
+
- **Path params**: `id`
|
|
356
|
+
- **Query params**: None
|
|
357
|
+
- **Response codes**: `200`
|
|
358
|
+
- **Transport options**: None
|
|
359
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
360
|
+
|
|
361
|
+
**Inputs**
|
|
362
|
+
|
|
363
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
364
|
+
- Client transport options: None
|
|
365
|
+
|
|
366
|
+
**Outputs**
|
|
367
|
+
|
|
368
|
+
- Client return type: `{ query_status: { complete?: boolean | null; dashboard_id?: number | null; end_time?: string | null; error?: boolean | null; error_code?: string | null; error_message?: string | null; expiration_time?: string | null; id...`
|
|
369
|
+
- OpenAPI response codes: `200`
|
|
370
|
+
|
|
371
|
+
```ts
|
|
372
|
+
import posthog from "@utdk/posthog";
|
|
373
|
+
|
|
374
|
+
type QueryRetrieveInput = Parameters<typeof posthog.queryRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
375
|
+
type QueryRetrieveOutput = Awaited<ReturnType<typeof posthog.queryRetrieve>>;
|
|
376
|
+
|
|
377
|
+
const result: QueryRetrieveOutput = await posthog.queryRetrieve();
|
|
378
|
+
|
|
379
|
+
// Result shape (from schema): { query_status: { complete?: boolean | null; dashboard_id?: number | null; end_time?: string | null; error?: boolean | null; error_code?: string | null; error_message?: string | null; expiration_time?: string | null; id...
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
### `posthog.queryLogRetrieve`
|
|
383
|
+
|
|
384
|
+
- **HTTP**: `GET /api/projects/{project_id}/query/{id}/log/`
|
|
385
|
+
- **What it does**: Get query log details from query_log_archive table for a specific query_id, the query must have been issued in last 24 hours.
|
|
386
|
+
- **OpenAPI operationId**: `query_log_retrieve`
|
|
387
|
+
- **Path params**: `id`
|
|
388
|
+
- **Query params**: None
|
|
389
|
+
- **Response codes**: `200`
|
|
390
|
+
- **Transport options**: None
|
|
391
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
392
|
+
|
|
393
|
+
**Inputs**
|
|
394
|
+
|
|
395
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
396
|
+
- Client transport options: None
|
|
397
|
+
|
|
398
|
+
**Outputs**
|
|
399
|
+
|
|
400
|
+
- Client return type: `{ [key: string]: unknown }`
|
|
401
|
+
- OpenAPI response codes: `200`
|
|
402
|
+
|
|
403
|
+
```ts
|
|
404
|
+
import posthog from "@utdk/posthog";
|
|
405
|
+
|
|
406
|
+
type QueryLogRetrieveInput = Parameters<typeof posthog.queryLogRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
407
|
+
type QueryLogRetrieveOutput = Awaited<ReturnType<typeof posthog.queryLogRetrieve>>;
|
|
408
|
+
|
|
409
|
+
const result: QueryLogRetrieveOutput = await posthog.queryLogRetrieve();
|
|
410
|
+
|
|
411
|
+
// Result shape (from schema): { [key: string]: unknown }
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
### `posthog.queryCreateWithKind`
|
|
415
|
+
|
|
416
|
+
- **HTTP**: `POST /api/projects/{project_id}/query/{query_kind}/`
|
|
417
|
+
- **What it does**: DRF ViewSet mixin that gates coalesced responses behind permission checks.
|
|
418
|
+
|
|
419
|
+
The QueryCoalescingMiddleware attaches cached response data to
|
|
420
|
+
request.META["_coalesced_response"] for followers. This mixin runs DRF's
|
|
421
|
+
initial() (auth + permissions + throttling) before returning the
|
|
422
|
+
cached response, ensuring the request is authorized.
|
|
423
|
+
- **OpenAPI operationId**: `query_create_with_kind`
|
|
424
|
+
- **Path params**: `query_kind`
|
|
425
|
+
- **Query params**: None
|
|
426
|
+
- **Response codes**: `200`
|
|
427
|
+
- **Transport options**: None
|
|
428
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
429
|
+
|
|
430
|
+
**Inputs**
|
|
431
|
+
|
|
432
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
433
|
+
- Client transport options: None
|
|
434
|
+
|
|
435
|
+
**Outputs**
|
|
436
|
+
|
|
437
|
+
- Client return type: `unknown`
|
|
438
|
+
- OpenAPI response codes: `200`
|
|
439
|
+
|
|
440
|
+
```ts
|
|
441
|
+
import posthog from "@utdk/posthog";
|
|
442
|
+
|
|
443
|
+
type QueryCreateWithKindInput = Parameters<typeof posthog.queryCreateWithKind> extends [infer T, ...unknown[]] ? T : undefined;
|
|
444
|
+
type QueryCreateWithKindOutput = Awaited<ReturnType<typeof posthog.queryCreateWithKind>>;
|
|
445
|
+
|
|
446
|
+
const result: QueryCreateWithKindOutput = await posthog.queryCreateWithKind();
|
|
447
|
+
|
|
448
|
+
// Result shape (from schema): unknown
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
### `posthog.queryCheckAuthForAsyncCreate`
|
|
452
|
+
|
|
453
|
+
- **HTTP**: `POST /api/projects/{project_id}/query/check_auth_for_async/`
|
|
454
|
+
- **What it does**: DRF ViewSet mixin that gates coalesced responses behind permission checks.
|
|
455
|
+
|
|
456
|
+
The QueryCoalescingMiddleware attaches cached response data to
|
|
457
|
+
request.META["_coalesced_response"] for followers. This mixin runs DRF's
|
|
458
|
+
initial() (auth + permissions + throttling) before returning the
|
|
459
|
+
cached response, ensuring the request is authorized.
|
|
460
|
+
- **OpenAPI operationId**: `query_check_auth_for_async_create`
|
|
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: `{ [key: string]: unknown }`
|
|
475
|
+
- OpenAPI response codes: `200`
|
|
476
|
+
|
|
477
|
+
```ts
|
|
478
|
+
import posthog from "@utdk/posthog";
|
|
479
|
+
|
|
480
|
+
type QueryCheckAuthForAsyncCreateInput = Parameters<typeof posthog.queryCheckAuthForAsyncCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
481
|
+
type QueryCheckAuthForAsyncCreateOutput = Awaited<ReturnType<typeof posthog.queryCheckAuthForAsyncCreate>>;
|
|
482
|
+
|
|
483
|
+
const result: QueryCheckAuthForAsyncCreateOutput = await posthog.queryCheckAuthForAsyncCreate();
|
|
484
|
+
|
|
485
|
+
// Result shape (from schema): { [key: string]: unknown }
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
### `posthog.queryDraftSqlRetrieve`
|
|
489
|
+
|
|
490
|
+
- **HTTP**: `GET /api/projects/{project_id}/query/draft_sql/`
|
|
491
|
+
- **What it does**: DRF ViewSet mixin that gates coalesced responses behind permission checks.
|
|
492
|
+
|
|
493
|
+
The QueryCoalescingMiddleware attaches cached response data to
|
|
494
|
+
request.META["_coalesced_response"] for followers. This mixin runs DRF's
|
|
495
|
+
initial() (auth + permissions + throttling) before returning the
|
|
496
|
+
cached response, ensuring the request is authorized.
|
|
497
|
+
- **OpenAPI operationId**: `query_draft_sql_retrieve`
|
|
498
|
+
- **Path params**: None
|
|
499
|
+
- **Query params**: None
|
|
500
|
+
- **Response codes**: `200`
|
|
501
|
+
- **Transport options**: None
|
|
502
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
503
|
+
|
|
504
|
+
**Inputs**
|
|
505
|
+
|
|
506
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
507
|
+
- Client transport options: None
|
|
508
|
+
|
|
509
|
+
**Outputs**
|
|
510
|
+
|
|
511
|
+
- Client return type: `{ [key: string]: unknown }`
|
|
512
|
+
- OpenAPI response codes: `200`
|
|
513
|
+
|
|
514
|
+
```ts
|
|
515
|
+
import posthog from "@utdk/posthog";
|
|
516
|
+
|
|
517
|
+
type QueryDraftSqlRetrieveInput = Parameters<typeof posthog.queryDraftSqlRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
518
|
+
type QueryDraftSqlRetrieveOutput = Awaited<ReturnType<typeof posthog.queryDraftSqlRetrieve>>;
|
|
519
|
+
|
|
520
|
+
const result: QueryDraftSqlRetrieveOutput = await posthog.queryDraftSqlRetrieve();
|
|
521
|
+
|
|
522
|
+
// Result shape (from schema): { [key: string]: unknown }
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
### `posthog.queryUpgradeCreate`
|
|
526
|
+
|
|
527
|
+
- **HTTP**: `POST /api/projects/{project_id}/query/upgrade/`
|
|
528
|
+
- **What it does**: Upgrades a query without executing it. Returns a query with all nodes migrated to the latest version.
|
|
529
|
+
- **OpenAPI operationId**: `query_upgrade_create`
|
|
530
|
+
- **Path params**: None
|
|
531
|
+
- **Query params**: None
|
|
532
|
+
- **Response codes**: `200`
|
|
533
|
+
- **Transport options**: None
|
|
534
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
535
|
+
|
|
536
|
+
**Inputs**
|
|
537
|
+
|
|
538
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
539
|
+
- Client transport options: None
|
|
540
|
+
|
|
541
|
+
**Outputs**
|
|
542
|
+
|
|
543
|
+
- Client return type: `{ query: { custom_name?: string | null; event?: string | null; fixedProperties?: ({ key: string; label?: string | null; operator?: "exact" | "is_not" | "icontains" | "not_icontains" | "regex" | "not_regex" | "gt" | "gte...`
|
|
544
|
+
- OpenAPI response codes: `200`
|
|
545
|
+
|
|
546
|
+
```ts
|
|
547
|
+
import posthog from "@utdk/posthog";
|
|
548
|
+
|
|
549
|
+
type QueryUpgradeCreateInput = Parameters<typeof posthog.queryUpgradeCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
550
|
+
type QueryUpgradeCreateOutput = Awaited<ReturnType<typeof posthog.queryUpgradeCreate>>;
|
|
551
|
+
|
|
552
|
+
const result: QueryUpgradeCreateOutput = await posthog.queryUpgradeCreate();
|
|
553
|
+
|
|
554
|
+
// Result shape (from schema): { query: { custom_name?: string | null; event?: string | null; fixedProperties?: ({ key: string; label?: string | null; operator?: "exact" | "is_not" | "icontains" | "not_icontains" | "regex" | "not_regex" | "gt" | "gte...
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
<!-- prompt-hash:
|
|
559
|
+
8c3694991a4c289225f05a4e8f1e098cc74d085a088d7dffd82f00d93797b7f8
|
|
560
|
+
-->
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Quota Limits
|
|
2
|
+
|
|
3
|
+
## Operations
|
|
4
|
+
|
|
5
|
+
### `posthog.quotaLimitsList`
|
|
6
|
+
|
|
7
|
+
- **HTTP**: `GET /api/projects/{project_id}/quota_limits/`
|
|
8
|
+
- **What it does**: Get a team's quota-limit state
|
|
9
|
+
- **OpenAPI operationId**: `quota_limits_list`
|
|
10
|
+
- **Path params**: None
|
|
11
|
+
- **Query params**: None
|
|
12
|
+
- **Response codes**: `200`
|
|
13
|
+
- **Transport options**: None
|
|
14
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
15
|
+
|
|
16
|
+
**Inputs**
|
|
17
|
+
|
|
18
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
19
|
+
- Client transport options: None
|
|
20
|
+
|
|
21
|
+
**Outputs**
|
|
22
|
+
|
|
23
|
+
- Client return type: `({ limited: { [key: string]: { limited: boolean } | undefined } })[]`
|
|
24
|
+
- OpenAPI response codes: `200`
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import posthog from "@utdk/posthog";
|
|
28
|
+
|
|
29
|
+
type QuotaLimitsListInput = Parameters<typeof posthog.quotaLimitsList> extends [infer T, ...unknown[]] ? T : undefined;
|
|
30
|
+
type QuotaLimitsListOutput = Awaited<ReturnType<typeof posthog.quotaLimitsList>>;
|
|
31
|
+
|
|
32
|
+
const result: QuotaLimitsListOutput = await posthog.quotaLimitsList();
|
|
33
|
+
|
|
34
|
+
// Result shape (from schema): ({ limited: { [key: string]: { limited: boolean } | undefined } })[]
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
<!-- prompt-hash:
|
|
39
|
+
8c3694991a4c289225f05a4e8f1e098cc74d085a088d7dffd82f00d93797b7f8
|
|
40
|
+
-->
|