@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
|
@@ -0,0 +1,1056 @@
|
|
|
1
|
+
# Warehouse Saved Queries
|
|
2
|
+
|
|
3
|
+
## Operations
|
|
4
|
+
|
|
5
|
+
### `posthog.environmentsWarehouseSavedQueriesList`
|
|
6
|
+
|
|
7
|
+
- **HTTP**: `GET /api/environments/{environment_id}/warehouse_saved_queries/`
|
|
8
|
+
- **What it does**: Create, Read, Update and Delete Warehouse Tables.
|
|
9
|
+
- **OpenAPI operationId**: `environments_warehouse_saved_queries_list`
|
|
10
|
+
- **Path params**: None
|
|
11
|
+
- **Query params**: `page`, `search`
|
|
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: `{ count: number; next?: string | null; previous?: string | null; results: ({ id: string; deleted: boolean | null; name: string; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; l...`
|
|
24
|
+
- OpenAPI response codes: `200`
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import posthog from "@utdk/posthog";
|
|
28
|
+
|
|
29
|
+
type EnvironmentsWarehouseSavedQueriesListInput = Parameters<typeof posthog.environmentsWarehouseSavedQueriesList> extends [infer T, ...unknown[]] ? T : undefined;
|
|
30
|
+
type EnvironmentsWarehouseSavedQueriesListOutput = Awaited<ReturnType<typeof posthog.environmentsWarehouseSavedQueriesList>>;
|
|
31
|
+
|
|
32
|
+
const result: EnvironmentsWarehouseSavedQueriesListOutput = await posthog.environmentsWarehouseSavedQueriesList();
|
|
33
|
+
|
|
34
|
+
// Result shape (from schema): { count: number; next?: string | null; previous?: string | null; results: ({ id: string; deleted: boolean | null; name: string; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; l...
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### `posthog.environmentsWarehouseSavedQueriesCreate`
|
|
38
|
+
|
|
39
|
+
- **HTTP**: `POST /api/environments/{environment_id}/warehouse_saved_queries/`
|
|
40
|
+
- **What it does**: Create, Read, Update and Delete Warehouse Tables.
|
|
41
|
+
- **OpenAPI operationId**: `environments_warehouse_saved_queries_create`
|
|
42
|
+
- **Path params**: None
|
|
43
|
+
- **Query params**: None
|
|
44
|
+
- **Response codes**: `201`
|
|
45
|
+
- **Transport options**: None
|
|
46
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
47
|
+
|
|
48
|
+
**Inputs**
|
|
49
|
+
|
|
50
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
51
|
+
- Client transport options: None
|
|
52
|
+
|
|
53
|
+
**Outputs**
|
|
54
|
+
|
|
55
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
56
|
+
- OpenAPI response codes: `201`
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
import posthog from "@utdk/posthog";
|
|
60
|
+
|
|
61
|
+
type EnvironmentsWarehouseSavedQueriesCreateInput = Parameters<typeof posthog.environmentsWarehouseSavedQueriesCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
62
|
+
type EnvironmentsWarehouseSavedQueriesCreateOutput = Awaited<ReturnType<typeof posthog.environmentsWarehouseSavedQueriesCreate>>;
|
|
63
|
+
|
|
64
|
+
const result: EnvironmentsWarehouseSavedQueriesCreateOutput = await posthog.environmentsWarehouseSavedQueriesCreate();
|
|
65
|
+
|
|
66
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### `posthog.environmentsWarehouseSavedQueriesDestroy`
|
|
70
|
+
|
|
71
|
+
- **HTTP**: `DELETE /api/environments/{environment_id}/warehouse_saved_queries/{id}/`
|
|
72
|
+
- **What it does**: Create, Read, Update and Delete Warehouse Tables.
|
|
73
|
+
- **OpenAPI operationId**: `environments_warehouse_saved_queries_destroy`
|
|
74
|
+
- **Path params**: `id`
|
|
75
|
+
- **Query params**: None
|
|
76
|
+
- **Response codes**: `204`
|
|
77
|
+
- **Transport options**: None
|
|
78
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
79
|
+
|
|
80
|
+
**Inputs**
|
|
81
|
+
|
|
82
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
83
|
+
- Client transport options: None
|
|
84
|
+
|
|
85
|
+
**Outputs**
|
|
86
|
+
|
|
87
|
+
- Client return type: `unknown`
|
|
88
|
+
- OpenAPI response codes: `204`
|
|
89
|
+
|
|
90
|
+
```ts
|
|
91
|
+
import posthog from "@utdk/posthog";
|
|
92
|
+
|
|
93
|
+
type EnvironmentsWarehouseSavedQueriesDestroyInput = Parameters<typeof posthog.environmentsWarehouseSavedQueriesDestroy> extends [infer T, ...unknown[]] ? T : undefined;
|
|
94
|
+
type EnvironmentsWarehouseSavedQueriesDestroyOutput = Awaited<ReturnType<typeof posthog.environmentsWarehouseSavedQueriesDestroy>>;
|
|
95
|
+
|
|
96
|
+
const result: EnvironmentsWarehouseSavedQueriesDestroyOutput = await posthog.environmentsWarehouseSavedQueriesDestroy();
|
|
97
|
+
|
|
98
|
+
// Result shape (from schema): unknown
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### `posthog.environmentsWarehouseSavedQueriesRetrieve`
|
|
102
|
+
|
|
103
|
+
- **HTTP**: `GET /api/environments/{environment_id}/warehouse_saved_queries/{id}/`
|
|
104
|
+
- **What it does**: Create, Read, Update and Delete Warehouse Tables.
|
|
105
|
+
- **OpenAPI operationId**: `environments_warehouse_saved_queries_retrieve`
|
|
106
|
+
- **Path params**: `id`
|
|
107
|
+
- **Query params**: None
|
|
108
|
+
- **Response codes**: `200`
|
|
109
|
+
- **Transport options**: None
|
|
110
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
111
|
+
|
|
112
|
+
**Inputs**
|
|
113
|
+
|
|
114
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
115
|
+
- Client transport options: None
|
|
116
|
+
|
|
117
|
+
**Outputs**
|
|
118
|
+
|
|
119
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
120
|
+
- OpenAPI response codes: `200`
|
|
121
|
+
|
|
122
|
+
```ts
|
|
123
|
+
import posthog from "@utdk/posthog";
|
|
124
|
+
|
|
125
|
+
type EnvironmentsWarehouseSavedQueriesRetrieveInput = Parameters<typeof posthog.environmentsWarehouseSavedQueriesRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
126
|
+
type EnvironmentsWarehouseSavedQueriesRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsWarehouseSavedQueriesRetrieve>>;
|
|
127
|
+
|
|
128
|
+
const result: EnvironmentsWarehouseSavedQueriesRetrieveOutput = await posthog.environmentsWarehouseSavedQueriesRetrieve();
|
|
129
|
+
|
|
130
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### `posthog.environmentsWarehouseSavedQueriesPartialUpdate`
|
|
134
|
+
|
|
135
|
+
- **HTTP**: `PATCH /api/environments/{environment_id}/warehouse_saved_queries/{id}/`
|
|
136
|
+
- **What it does**: Create, Read, Update and Delete Warehouse Tables.
|
|
137
|
+
- **OpenAPI operationId**: `environments_warehouse_saved_queries_partial_update`
|
|
138
|
+
- **Path params**: `id`
|
|
139
|
+
- **Query params**: None
|
|
140
|
+
- **Response codes**: `200`
|
|
141
|
+
- **Transport options**: None
|
|
142
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
143
|
+
|
|
144
|
+
**Inputs**
|
|
145
|
+
|
|
146
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
147
|
+
- Client transport options: None
|
|
148
|
+
|
|
149
|
+
**Outputs**
|
|
150
|
+
|
|
151
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
152
|
+
- OpenAPI response codes: `200`
|
|
153
|
+
|
|
154
|
+
```ts
|
|
155
|
+
import posthog from "@utdk/posthog";
|
|
156
|
+
|
|
157
|
+
type EnvironmentsWarehouseSavedQueriesPartialUpdateInput = Parameters<typeof posthog.environmentsWarehouseSavedQueriesPartialUpdate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
158
|
+
type EnvironmentsWarehouseSavedQueriesPartialUpdateOutput = Awaited<ReturnType<typeof posthog.environmentsWarehouseSavedQueriesPartialUpdate>>;
|
|
159
|
+
|
|
160
|
+
const result: EnvironmentsWarehouseSavedQueriesPartialUpdateOutput = await posthog.environmentsWarehouseSavedQueriesPartialUpdate();
|
|
161
|
+
|
|
162
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### `posthog.environmentsWarehouseSavedQueriesUpdate`
|
|
166
|
+
|
|
167
|
+
- **HTTP**: `PUT /api/environments/{environment_id}/warehouse_saved_queries/{id}/`
|
|
168
|
+
- **What it does**: Create, Read, Update and Delete Warehouse Tables.
|
|
169
|
+
- **OpenAPI operationId**: `environments_warehouse_saved_queries_update`
|
|
170
|
+
- **Path params**: `id`
|
|
171
|
+
- **Query params**: None
|
|
172
|
+
- **Response codes**: `200`
|
|
173
|
+
- **Transport options**: None
|
|
174
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
175
|
+
|
|
176
|
+
**Inputs**
|
|
177
|
+
|
|
178
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
179
|
+
- Client transport options: None
|
|
180
|
+
|
|
181
|
+
**Outputs**
|
|
182
|
+
|
|
183
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
184
|
+
- OpenAPI response codes: `200`
|
|
185
|
+
|
|
186
|
+
```ts
|
|
187
|
+
import posthog from "@utdk/posthog";
|
|
188
|
+
|
|
189
|
+
type EnvironmentsWarehouseSavedQueriesUpdateInput = Parameters<typeof posthog.environmentsWarehouseSavedQueriesUpdate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
190
|
+
type EnvironmentsWarehouseSavedQueriesUpdateOutput = Awaited<ReturnType<typeof posthog.environmentsWarehouseSavedQueriesUpdate>>;
|
|
191
|
+
|
|
192
|
+
const result: EnvironmentsWarehouseSavedQueriesUpdateOutput = await posthog.environmentsWarehouseSavedQueriesUpdate();
|
|
193
|
+
|
|
194
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### `posthog.environmentsWarehouseSavedQueriesActivityRetrieve`
|
|
198
|
+
|
|
199
|
+
- **HTTP**: `GET /api/environments/{environment_id}/warehouse_saved_queries/{id}/activity/`
|
|
200
|
+
- **What it does**: Create, Read, Update and Delete Warehouse Tables.
|
|
201
|
+
- **OpenAPI operationId**: `environments_warehouse_saved_queries_activity_retrieve`
|
|
202
|
+
- **Path params**: `id`
|
|
203
|
+
- **Query params**: None
|
|
204
|
+
- **Response codes**: `200`
|
|
205
|
+
- **Transport options**: None
|
|
206
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
207
|
+
|
|
208
|
+
**Inputs**
|
|
209
|
+
|
|
210
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
211
|
+
- Client transport options: None
|
|
212
|
+
|
|
213
|
+
**Outputs**
|
|
214
|
+
|
|
215
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
216
|
+
- OpenAPI response codes: `200`
|
|
217
|
+
|
|
218
|
+
```ts
|
|
219
|
+
import posthog from "@utdk/posthog";
|
|
220
|
+
|
|
221
|
+
type EnvironmentsWarehouseSavedQueriesActivityRetrieveInput = Parameters<typeof posthog.environmentsWarehouseSavedQueriesActivityRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
222
|
+
type EnvironmentsWarehouseSavedQueriesActivityRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsWarehouseSavedQueriesActivityRetrieve>>;
|
|
223
|
+
|
|
224
|
+
const result: EnvironmentsWarehouseSavedQueriesActivityRetrieveOutput = await posthog.environmentsWarehouseSavedQueriesActivityRetrieve();
|
|
225
|
+
|
|
226
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### `posthog.environmentsWarehouseSavedQueriesAncestorsCreate`
|
|
230
|
+
|
|
231
|
+
- **HTTP**: `POST /api/environments/{environment_id}/warehouse_saved_queries/{id}/ancestors/`
|
|
232
|
+
- **What it does**: Return the ancestors of this saved query.
|
|
233
|
+
|
|
234
|
+
By default, we return the immediate parents. The `level` parameter can be used to
|
|
235
|
+
look further back into the ancestor tree. If `level` overshoots (i.e. points to only
|
|
236
|
+
ancestors beyond the root), we return an empty list.
|
|
237
|
+
- **OpenAPI operationId**: `environments_warehouse_saved_queries_ancestors_create`
|
|
238
|
+
- **Path params**: `id`
|
|
239
|
+
- **Query params**: None
|
|
240
|
+
- **Response codes**: `200`
|
|
241
|
+
- **Transport options**: None
|
|
242
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
243
|
+
|
|
244
|
+
**Inputs**
|
|
245
|
+
|
|
246
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
247
|
+
- Client transport options: None
|
|
248
|
+
|
|
249
|
+
**Outputs**
|
|
250
|
+
|
|
251
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
252
|
+
- OpenAPI response codes: `200`
|
|
253
|
+
|
|
254
|
+
```ts
|
|
255
|
+
import posthog from "@utdk/posthog";
|
|
256
|
+
|
|
257
|
+
type EnvironmentsWarehouseSavedQueriesAncestorsCreateInput = Parameters<typeof posthog.environmentsWarehouseSavedQueriesAncestorsCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
258
|
+
type EnvironmentsWarehouseSavedQueriesAncestorsCreateOutput = Awaited<ReturnType<typeof posthog.environmentsWarehouseSavedQueriesAncestorsCreate>>;
|
|
259
|
+
|
|
260
|
+
const result: EnvironmentsWarehouseSavedQueriesAncestorsCreateOutput = await posthog.environmentsWarehouseSavedQueriesAncestorsCreate();
|
|
261
|
+
|
|
262
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### `posthog.environmentsWarehouseSavedQueriesCancelCreate`
|
|
266
|
+
|
|
267
|
+
- **HTTP**: `POST /api/environments/{environment_id}/warehouse_saved_queries/{id}/cancel/`
|
|
268
|
+
- **What it does**: Cancel a running saved query workflow.
|
|
269
|
+
- **OpenAPI operationId**: `environments_warehouse_saved_queries_cancel_create`
|
|
270
|
+
- **Path params**: `id`
|
|
271
|
+
- **Query params**: None
|
|
272
|
+
- **Response codes**: `200`
|
|
273
|
+
- **Transport options**: None
|
|
274
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
275
|
+
|
|
276
|
+
**Inputs**
|
|
277
|
+
|
|
278
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
279
|
+
- Client transport options: None
|
|
280
|
+
|
|
281
|
+
**Outputs**
|
|
282
|
+
|
|
283
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
284
|
+
- OpenAPI response codes: `200`
|
|
285
|
+
|
|
286
|
+
```ts
|
|
287
|
+
import posthog from "@utdk/posthog";
|
|
288
|
+
|
|
289
|
+
type EnvironmentsWarehouseSavedQueriesCancelCreateInput = Parameters<typeof posthog.environmentsWarehouseSavedQueriesCancelCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
290
|
+
type EnvironmentsWarehouseSavedQueriesCancelCreateOutput = Awaited<ReturnType<typeof posthog.environmentsWarehouseSavedQueriesCancelCreate>>;
|
|
291
|
+
|
|
292
|
+
const result: EnvironmentsWarehouseSavedQueriesCancelCreateOutput = await posthog.environmentsWarehouseSavedQueriesCancelCreate();
|
|
293
|
+
|
|
294
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### `posthog.environmentsWarehouseSavedQueriesDependenciesRetrieve`
|
|
298
|
+
|
|
299
|
+
- **HTTP**: `GET /api/environments/{environment_id}/warehouse_saved_queries/{id}/dependencies/`
|
|
300
|
+
- **What it does**: Return the count of immediate upstream and downstream dependencies for this saved query.
|
|
301
|
+
- **OpenAPI operationId**: `environments_warehouse_saved_queries_dependencies_retrieve`
|
|
302
|
+
- **Path params**: `id`
|
|
303
|
+
- **Query params**: None
|
|
304
|
+
- **Response codes**: `200`
|
|
305
|
+
- **Transport options**: None
|
|
306
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
307
|
+
|
|
308
|
+
**Inputs**
|
|
309
|
+
|
|
310
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
311
|
+
- Client transport options: None
|
|
312
|
+
|
|
313
|
+
**Outputs**
|
|
314
|
+
|
|
315
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
316
|
+
- OpenAPI response codes: `200`
|
|
317
|
+
|
|
318
|
+
```ts
|
|
319
|
+
import posthog from "@utdk/posthog";
|
|
320
|
+
|
|
321
|
+
type EnvironmentsWarehouseSavedQueriesDependenciesRetrieveInput = Parameters<typeof posthog.environmentsWarehouseSavedQueriesDependenciesRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
322
|
+
type EnvironmentsWarehouseSavedQueriesDependenciesRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsWarehouseSavedQueriesDependenciesRetrieve>>;
|
|
323
|
+
|
|
324
|
+
const result: EnvironmentsWarehouseSavedQueriesDependenciesRetrieveOutput = await posthog.environmentsWarehouseSavedQueriesDependenciesRetrieve();
|
|
325
|
+
|
|
326
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
### `posthog.environmentsWarehouseSavedQueriesDescendantsCreate`
|
|
330
|
+
|
|
331
|
+
- **HTTP**: `POST /api/environments/{environment_id}/warehouse_saved_queries/{id}/descendants/`
|
|
332
|
+
- **What it does**: Return the descendants of this saved query.
|
|
333
|
+
|
|
334
|
+
By default, we return the immediate children. The `level` parameter can be used to
|
|
335
|
+
look further ahead into the descendants tree. If `level` overshoots (i.e. points to only
|
|
336
|
+
descendants further than a leaf), we return an empty list.
|
|
337
|
+
- **OpenAPI operationId**: `environments_warehouse_saved_queries_descendants_create`
|
|
338
|
+
- **Path params**: `id`
|
|
339
|
+
- **Query params**: None
|
|
340
|
+
- **Response codes**: `200`
|
|
341
|
+
- **Transport options**: None
|
|
342
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
343
|
+
|
|
344
|
+
**Inputs**
|
|
345
|
+
|
|
346
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
347
|
+
- Client transport options: None
|
|
348
|
+
|
|
349
|
+
**Outputs**
|
|
350
|
+
|
|
351
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
352
|
+
- OpenAPI response codes: `200`
|
|
353
|
+
|
|
354
|
+
```ts
|
|
355
|
+
import posthog from "@utdk/posthog";
|
|
356
|
+
|
|
357
|
+
type EnvironmentsWarehouseSavedQueriesDescendantsCreateInput = Parameters<typeof posthog.environmentsWarehouseSavedQueriesDescendantsCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
358
|
+
type EnvironmentsWarehouseSavedQueriesDescendantsCreateOutput = Awaited<ReturnType<typeof posthog.environmentsWarehouseSavedQueriesDescendantsCreate>>;
|
|
359
|
+
|
|
360
|
+
const result: EnvironmentsWarehouseSavedQueriesDescendantsCreateOutput = await posthog.environmentsWarehouseSavedQueriesDescendantsCreate();
|
|
361
|
+
|
|
362
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
### `posthog.environmentsWarehouseSavedQueriesMaterializeCreate`
|
|
366
|
+
|
|
367
|
+
- **HTTP**: `POST /api/environments/{environment_id}/warehouse_saved_queries/{id}/materialize/`
|
|
368
|
+
- **What it does**: Enable materialization for this saved query with a 24-hour sync frequency.
|
|
369
|
+
- **OpenAPI operationId**: `environments_warehouse_saved_queries_materialize_create`
|
|
370
|
+
- **Path params**: `id`
|
|
371
|
+
- **Query params**: None
|
|
372
|
+
- **Response codes**: `200`
|
|
373
|
+
- **Transport options**: None
|
|
374
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
375
|
+
|
|
376
|
+
**Inputs**
|
|
377
|
+
|
|
378
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
379
|
+
- Client transport options: None
|
|
380
|
+
|
|
381
|
+
**Outputs**
|
|
382
|
+
|
|
383
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
384
|
+
- OpenAPI response codes: `200`
|
|
385
|
+
|
|
386
|
+
```ts
|
|
387
|
+
import posthog from "@utdk/posthog";
|
|
388
|
+
|
|
389
|
+
type EnvironmentsWarehouseSavedQueriesMaterializeCreateInput = Parameters<typeof posthog.environmentsWarehouseSavedQueriesMaterializeCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
390
|
+
type EnvironmentsWarehouseSavedQueriesMaterializeCreateOutput = Awaited<ReturnType<typeof posthog.environmentsWarehouseSavedQueriesMaterializeCreate>>;
|
|
391
|
+
|
|
392
|
+
const result: EnvironmentsWarehouseSavedQueriesMaterializeCreateOutput = await posthog.environmentsWarehouseSavedQueriesMaterializeCreate();
|
|
393
|
+
|
|
394
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
### `posthog.environmentsWarehouseSavedQueriesRevertMaterializationCreate`
|
|
398
|
+
|
|
399
|
+
- **HTTP**: `POST /api/environments/{environment_id}/warehouse_saved_queries/{id}/revert_materialization/`
|
|
400
|
+
- **What it does**: Undo materialization, revert back to the original view.
|
|
401
|
+
(i.e. delete the materialized table and the schedule)
|
|
402
|
+
- **OpenAPI operationId**: `environments_warehouse_saved_queries_revert_materialization_create`
|
|
403
|
+
- **Path params**: `id`
|
|
404
|
+
- **Query params**: None
|
|
405
|
+
- **Response codes**: `200`
|
|
406
|
+
- **Transport options**: None
|
|
407
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
408
|
+
|
|
409
|
+
**Inputs**
|
|
410
|
+
|
|
411
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
412
|
+
- Client transport options: None
|
|
413
|
+
|
|
414
|
+
**Outputs**
|
|
415
|
+
|
|
416
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
417
|
+
- OpenAPI response codes: `200`
|
|
418
|
+
|
|
419
|
+
```ts
|
|
420
|
+
import posthog from "@utdk/posthog";
|
|
421
|
+
|
|
422
|
+
type EnvironmentsWarehouseSavedQueriesRevertMaterializationCreateInput = Parameters<typeof posthog.environmentsWarehouseSavedQueriesRevertMaterializationCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
423
|
+
type EnvironmentsWarehouseSavedQueriesRevertMaterializationCreateOutput = Awaited<ReturnType<typeof posthog.environmentsWarehouseSavedQueriesRevertMaterializationCreate>>;
|
|
424
|
+
|
|
425
|
+
const result: EnvironmentsWarehouseSavedQueriesRevertMaterializationCreateOutput = await posthog.environmentsWarehouseSavedQueriesRevertMaterializationCreate();
|
|
426
|
+
|
|
427
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
### `posthog.environmentsWarehouseSavedQueriesRunHistoryRetrieve`
|
|
431
|
+
|
|
432
|
+
- **HTTP**: `GET /api/environments/{environment_id}/warehouse_saved_queries/{id}/run_history/`
|
|
433
|
+
- **What it does**: Return the recent run history (up to 5 most recent) for this materialized view.
|
|
434
|
+
- **OpenAPI operationId**: `environments_warehouse_saved_queries_run_history_retrieve`
|
|
435
|
+
- **Path params**: `id`
|
|
436
|
+
- **Query params**: None
|
|
437
|
+
- **Response codes**: `200`
|
|
438
|
+
- **Transport options**: None
|
|
439
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
440
|
+
|
|
441
|
+
**Inputs**
|
|
442
|
+
|
|
443
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
444
|
+
- Client transport options: None
|
|
445
|
+
|
|
446
|
+
**Outputs**
|
|
447
|
+
|
|
448
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
449
|
+
- OpenAPI response codes: `200`
|
|
450
|
+
|
|
451
|
+
```ts
|
|
452
|
+
import posthog from "@utdk/posthog";
|
|
453
|
+
|
|
454
|
+
type EnvironmentsWarehouseSavedQueriesRunHistoryRetrieveInput = Parameters<typeof posthog.environmentsWarehouseSavedQueriesRunHistoryRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
455
|
+
type EnvironmentsWarehouseSavedQueriesRunHistoryRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsWarehouseSavedQueriesRunHistoryRetrieve>>;
|
|
456
|
+
|
|
457
|
+
const result: EnvironmentsWarehouseSavedQueriesRunHistoryRetrieveOutput = await posthog.environmentsWarehouseSavedQueriesRunHistoryRetrieve();
|
|
458
|
+
|
|
459
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
### `posthog.environmentsWarehouseSavedQueriesRunCreate`
|
|
463
|
+
|
|
464
|
+
- **HTTP**: `POST /api/environments/{environment_id}/warehouse_saved_queries/{id}/run/`
|
|
465
|
+
- **What it does**: Run this saved query.
|
|
466
|
+
- **OpenAPI operationId**: `environments_warehouse_saved_queries_run_create`
|
|
467
|
+
- **Path params**: `id`
|
|
468
|
+
- **Query params**: None
|
|
469
|
+
- **Response codes**: `200`
|
|
470
|
+
- **Transport options**: None
|
|
471
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
472
|
+
|
|
473
|
+
**Inputs**
|
|
474
|
+
|
|
475
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
476
|
+
- Client transport options: None
|
|
477
|
+
|
|
478
|
+
**Outputs**
|
|
479
|
+
|
|
480
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
481
|
+
- OpenAPI response codes: `200`
|
|
482
|
+
|
|
483
|
+
```ts
|
|
484
|
+
import posthog from "@utdk/posthog";
|
|
485
|
+
|
|
486
|
+
type EnvironmentsWarehouseSavedQueriesRunCreateInput = Parameters<typeof posthog.environmentsWarehouseSavedQueriesRunCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
487
|
+
type EnvironmentsWarehouseSavedQueriesRunCreateOutput = Awaited<ReturnType<typeof posthog.environmentsWarehouseSavedQueriesRunCreate>>;
|
|
488
|
+
|
|
489
|
+
const result: EnvironmentsWarehouseSavedQueriesRunCreateOutput = await posthog.environmentsWarehouseSavedQueriesRunCreate();
|
|
490
|
+
|
|
491
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
### `posthog.environmentsWarehouseSavedQueriesResumeSchedulesCreate`
|
|
495
|
+
|
|
496
|
+
- **HTTP**: `POST /api/environments/{environment_id}/warehouse_saved_queries/resume_schedules/`
|
|
497
|
+
- **What it does**: Resume paused materialization schedules for multiple matviews.
|
|
498
|
+
|
|
499
|
+
Accepts a list of view IDs in the request body: {"view_ids": ["id1", "id2", ...]}
|
|
500
|
+
This endpoint is idempotent - calling it on already running or non-existent schedules is safe.
|
|
501
|
+
- **OpenAPI operationId**: `environments_warehouse_saved_queries_resume_schedules_create`
|
|
502
|
+
- **Path params**: None
|
|
503
|
+
- **Query params**: None
|
|
504
|
+
- **Response codes**: `200`
|
|
505
|
+
- **Transport options**: None
|
|
506
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
507
|
+
|
|
508
|
+
**Inputs**
|
|
509
|
+
|
|
510
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
511
|
+
- Client transport options: None
|
|
512
|
+
|
|
513
|
+
**Outputs**
|
|
514
|
+
|
|
515
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
516
|
+
- OpenAPI response codes: `200`
|
|
517
|
+
|
|
518
|
+
```ts
|
|
519
|
+
import posthog from "@utdk/posthog";
|
|
520
|
+
|
|
521
|
+
type EnvironmentsWarehouseSavedQueriesResumeSchedulesCreateInput = Parameters<typeof posthog.environmentsWarehouseSavedQueriesResumeSchedulesCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
522
|
+
type EnvironmentsWarehouseSavedQueriesResumeSchedulesCreateOutput = Awaited<ReturnType<typeof posthog.environmentsWarehouseSavedQueriesResumeSchedulesCreate>>;
|
|
523
|
+
|
|
524
|
+
const result: EnvironmentsWarehouseSavedQueriesResumeSchedulesCreateOutput = await posthog.environmentsWarehouseSavedQueriesResumeSchedulesCreate();
|
|
525
|
+
|
|
526
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
### `posthog.warehouseSavedQueriesList`
|
|
530
|
+
|
|
531
|
+
- **HTTP**: `GET /api/projects/{project_id}/warehouse_saved_queries/`
|
|
532
|
+
- **What it does**: Create, Read, Update and Delete Warehouse Tables.
|
|
533
|
+
- **OpenAPI operationId**: `warehouse_saved_queries_list`
|
|
534
|
+
- **Path params**: None
|
|
535
|
+
- **Query params**: `page`, `search`
|
|
536
|
+
- **Response codes**: `200`
|
|
537
|
+
- **Transport options**: None
|
|
538
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
539
|
+
|
|
540
|
+
**Inputs**
|
|
541
|
+
|
|
542
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
543
|
+
- Client transport options: None
|
|
544
|
+
|
|
545
|
+
**Outputs**
|
|
546
|
+
|
|
547
|
+
- Client return type: `{ count: number; next?: string | null; previous?: string | null; results: ({ id: string; deleted: boolean | null; name: string; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; l...`
|
|
548
|
+
- OpenAPI response codes: `200`
|
|
549
|
+
|
|
550
|
+
```ts
|
|
551
|
+
import posthog from "@utdk/posthog";
|
|
552
|
+
|
|
553
|
+
type WarehouseSavedQueriesListInput = Parameters<typeof posthog.warehouseSavedQueriesList> extends [infer T, ...unknown[]] ? T : undefined;
|
|
554
|
+
type WarehouseSavedQueriesListOutput = Awaited<ReturnType<typeof posthog.warehouseSavedQueriesList>>;
|
|
555
|
+
|
|
556
|
+
const result: WarehouseSavedQueriesListOutput = await posthog.warehouseSavedQueriesList();
|
|
557
|
+
|
|
558
|
+
// Result shape (from schema): { count: number; next?: string | null; previous?: string | null; results: ({ id: string; deleted: boolean | null; name: string; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; l...
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
### `posthog.warehouseSavedQueriesCreate`
|
|
562
|
+
|
|
563
|
+
- **HTTP**: `POST /api/projects/{project_id}/warehouse_saved_queries/`
|
|
564
|
+
- **What it does**: Create, Read, Update and Delete Warehouse Tables.
|
|
565
|
+
- **OpenAPI operationId**: `warehouse_saved_queries_create`
|
|
566
|
+
- **Path params**: None
|
|
567
|
+
- **Query params**: None
|
|
568
|
+
- **Response codes**: `201`
|
|
569
|
+
- **Transport options**: None
|
|
570
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
571
|
+
|
|
572
|
+
**Inputs**
|
|
573
|
+
|
|
574
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
575
|
+
- Client transport options: None
|
|
576
|
+
|
|
577
|
+
**Outputs**
|
|
578
|
+
|
|
579
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
580
|
+
- OpenAPI response codes: `201`
|
|
581
|
+
|
|
582
|
+
```ts
|
|
583
|
+
import posthog from "@utdk/posthog";
|
|
584
|
+
|
|
585
|
+
type WarehouseSavedQueriesCreateInput = Parameters<typeof posthog.warehouseSavedQueriesCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
586
|
+
type WarehouseSavedQueriesCreateOutput = Awaited<ReturnType<typeof posthog.warehouseSavedQueriesCreate>>;
|
|
587
|
+
|
|
588
|
+
const result: WarehouseSavedQueriesCreateOutput = await posthog.warehouseSavedQueriesCreate();
|
|
589
|
+
|
|
590
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
591
|
+
```
|
|
592
|
+
|
|
593
|
+
### `posthog.warehouseSavedQueriesDestroy`
|
|
594
|
+
|
|
595
|
+
- **HTTP**: `DELETE /api/projects/{project_id}/warehouse_saved_queries/{id}/`
|
|
596
|
+
- **What it does**: Create, Read, Update and Delete Warehouse Tables.
|
|
597
|
+
- **OpenAPI operationId**: `warehouse_saved_queries_destroy`
|
|
598
|
+
- **Path params**: `id`
|
|
599
|
+
- **Query params**: None
|
|
600
|
+
- **Response codes**: `204`
|
|
601
|
+
- **Transport options**: None
|
|
602
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
603
|
+
|
|
604
|
+
**Inputs**
|
|
605
|
+
|
|
606
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
607
|
+
- Client transport options: None
|
|
608
|
+
|
|
609
|
+
**Outputs**
|
|
610
|
+
|
|
611
|
+
- Client return type: `unknown`
|
|
612
|
+
- OpenAPI response codes: `204`
|
|
613
|
+
|
|
614
|
+
```ts
|
|
615
|
+
import posthog from "@utdk/posthog";
|
|
616
|
+
|
|
617
|
+
type WarehouseSavedQueriesDestroyInput = Parameters<typeof posthog.warehouseSavedQueriesDestroy> extends [infer T, ...unknown[]] ? T : undefined;
|
|
618
|
+
type WarehouseSavedQueriesDestroyOutput = Awaited<ReturnType<typeof posthog.warehouseSavedQueriesDestroy>>;
|
|
619
|
+
|
|
620
|
+
const result: WarehouseSavedQueriesDestroyOutput = await posthog.warehouseSavedQueriesDestroy();
|
|
621
|
+
|
|
622
|
+
// Result shape (from schema): unknown
|
|
623
|
+
```
|
|
624
|
+
|
|
625
|
+
### `posthog.warehouseSavedQueriesRetrieve`
|
|
626
|
+
|
|
627
|
+
- **HTTP**: `GET /api/projects/{project_id}/warehouse_saved_queries/{id}/`
|
|
628
|
+
- **What it does**: Create, Read, Update and Delete Warehouse Tables.
|
|
629
|
+
- **OpenAPI operationId**: `warehouse_saved_queries_retrieve`
|
|
630
|
+
- **Path params**: `id`
|
|
631
|
+
- **Query params**: None
|
|
632
|
+
- **Response codes**: `200`
|
|
633
|
+
- **Transport options**: None
|
|
634
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
635
|
+
|
|
636
|
+
**Inputs**
|
|
637
|
+
|
|
638
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
639
|
+
- Client transport options: None
|
|
640
|
+
|
|
641
|
+
**Outputs**
|
|
642
|
+
|
|
643
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
644
|
+
- OpenAPI response codes: `200`
|
|
645
|
+
|
|
646
|
+
```ts
|
|
647
|
+
import posthog from "@utdk/posthog";
|
|
648
|
+
|
|
649
|
+
type WarehouseSavedQueriesRetrieveInput = Parameters<typeof posthog.warehouseSavedQueriesRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
650
|
+
type WarehouseSavedQueriesRetrieveOutput = Awaited<ReturnType<typeof posthog.warehouseSavedQueriesRetrieve>>;
|
|
651
|
+
|
|
652
|
+
const result: WarehouseSavedQueriesRetrieveOutput = await posthog.warehouseSavedQueriesRetrieve();
|
|
653
|
+
|
|
654
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
655
|
+
```
|
|
656
|
+
|
|
657
|
+
### `posthog.warehouseSavedQueriesPartialUpdate`
|
|
658
|
+
|
|
659
|
+
- **HTTP**: `PATCH /api/projects/{project_id}/warehouse_saved_queries/{id}/`
|
|
660
|
+
- **What it does**: Create, Read, Update and Delete Warehouse Tables.
|
|
661
|
+
- **OpenAPI operationId**: `warehouse_saved_queries_partial_update`
|
|
662
|
+
- **Path params**: `id`
|
|
663
|
+
- **Query params**: None
|
|
664
|
+
- **Response codes**: `200`
|
|
665
|
+
- **Transport options**: None
|
|
666
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
667
|
+
|
|
668
|
+
**Inputs**
|
|
669
|
+
|
|
670
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
671
|
+
- Client transport options: None
|
|
672
|
+
|
|
673
|
+
**Outputs**
|
|
674
|
+
|
|
675
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
676
|
+
- OpenAPI response codes: `200`
|
|
677
|
+
|
|
678
|
+
```ts
|
|
679
|
+
import posthog from "@utdk/posthog";
|
|
680
|
+
|
|
681
|
+
type WarehouseSavedQueriesPartialUpdateInput = Parameters<typeof posthog.warehouseSavedQueriesPartialUpdate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
682
|
+
type WarehouseSavedQueriesPartialUpdateOutput = Awaited<ReturnType<typeof posthog.warehouseSavedQueriesPartialUpdate>>;
|
|
683
|
+
|
|
684
|
+
const result: WarehouseSavedQueriesPartialUpdateOutput = await posthog.warehouseSavedQueriesPartialUpdate();
|
|
685
|
+
|
|
686
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
687
|
+
```
|
|
688
|
+
|
|
689
|
+
### `posthog.warehouseSavedQueriesUpdate`
|
|
690
|
+
|
|
691
|
+
- **HTTP**: `PUT /api/projects/{project_id}/warehouse_saved_queries/{id}/`
|
|
692
|
+
- **What it does**: Create, Read, Update and Delete Warehouse Tables.
|
|
693
|
+
- **OpenAPI operationId**: `warehouse_saved_queries_update`
|
|
694
|
+
- **Path params**: `id`
|
|
695
|
+
- **Query params**: None
|
|
696
|
+
- **Response codes**: `200`
|
|
697
|
+
- **Transport options**: None
|
|
698
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
699
|
+
|
|
700
|
+
**Inputs**
|
|
701
|
+
|
|
702
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
703
|
+
- Client transport options: None
|
|
704
|
+
|
|
705
|
+
**Outputs**
|
|
706
|
+
|
|
707
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
708
|
+
- OpenAPI response codes: `200`
|
|
709
|
+
|
|
710
|
+
```ts
|
|
711
|
+
import posthog from "@utdk/posthog";
|
|
712
|
+
|
|
713
|
+
type WarehouseSavedQueriesUpdateInput = Parameters<typeof posthog.warehouseSavedQueriesUpdate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
714
|
+
type WarehouseSavedQueriesUpdateOutput = Awaited<ReturnType<typeof posthog.warehouseSavedQueriesUpdate>>;
|
|
715
|
+
|
|
716
|
+
const result: WarehouseSavedQueriesUpdateOutput = await posthog.warehouseSavedQueriesUpdate();
|
|
717
|
+
|
|
718
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
719
|
+
```
|
|
720
|
+
|
|
721
|
+
### `posthog.warehouseSavedQueriesActivityRetrieve`
|
|
722
|
+
|
|
723
|
+
- **HTTP**: `GET /api/projects/{project_id}/warehouse_saved_queries/{id}/activity/`
|
|
724
|
+
- **What it does**: Create, Read, Update and Delete Warehouse Tables.
|
|
725
|
+
- **OpenAPI operationId**: `warehouse_saved_queries_activity_retrieve`
|
|
726
|
+
- **Path params**: `id`
|
|
727
|
+
- **Query params**: None
|
|
728
|
+
- **Response codes**: `200`
|
|
729
|
+
- **Transport options**: None
|
|
730
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
731
|
+
|
|
732
|
+
**Inputs**
|
|
733
|
+
|
|
734
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
735
|
+
- Client transport options: None
|
|
736
|
+
|
|
737
|
+
**Outputs**
|
|
738
|
+
|
|
739
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
740
|
+
- OpenAPI response codes: `200`
|
|
741
|
+
|
|
742
|
+
```ts
|
|
743
|
+
import posthog from "@utdk/posthog";
|
|
744
|
+
|
|
745
|
+
type WarehouseSavedQueriesActivityRetrieveInput = Parameters<typeof posthog.warehouseSavedQueriesActivityRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
746
|
+
type WarehouseSavedQueriesActivityRetrieveOutput = Awaited<ReturnType<typeof posthog.warehouseSavedQueriesActivityRetrieve>>;
|
|
747
|
+
|
|
748
|
+
const result: WarehouseSavedQueriesActivityRetrieveOutput = await posthog.warehouseSavedQueriesActivityRetrieve();
|
|
749
|
+
|
|
750
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
751
|
+
```
|
|
752
|
+
|
|
753
|
+
### `posthog.warehouseSavedQueriesAncestorsCreate`
|
|
754
|
+
|
|
755
|
+
- **HTTP**: `POST /api/projects/{project_id}/warehouse_saved_queries/{id}/ancestors/`
|
|
756
|
+
- **What it does**: Return the ancestors of this saved query.
|
|
757
|
+
|
|
758
|
+
By default, we return the immediate parents. The `level` parameter can be used to
|
|
759
|
+
look further back into the ancestor tree. If `level` overshoots (i.e. points to only
|
|
760
|
+
ancestors beyond the root), we return an empty list.
|
|
761
|
+
- **OpenAPI operationId**: `warehouse_saved_queries_ancestors_create`
|
|
762
|
+
- **Path params**: `id`
|
|
763
|
+
- **Query params**: None
|
|
764
|
+
- **Response codes**: `200`
|
|
765
|
+
- **Transport options**: None
|
|
766
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
767
|
+
|
|
768
|
+
**Inputs**
|
|
769
|
+
|
|
770
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
771
|
+
- Client transport options: None
|
|
772
|
+
|
|
773
|
+
**Outputs**
|
|
774
|
+
|
|
775
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
776
|
+
- OpenAPI response codes: `200`
|
|
777
|
+
|
|
778
|
+
```ts
|
|
779
|
+
import posthog from "@utdk/posthog";
|
|
780
|
+
|
|
781
|
+
type WarehouseSavedQueriesAncestorsCreateInput = Parameters<typeof posthog.warehouseSavedQueriesAncestorsCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
782
|
+
type WarehouseSavedQueriesAncestorsCreateOutput = Awaited<ReturnType<typeof posthog.warehouseSavedQueriesAncestorsCreate>>;
|
|
783
|
+
|
|
784
|
+
const result: WarehouseSavedQueriesAncestorsCreateOutput = await posthog.warehouseSavedQueriesAncestorsCreate();
|
|
785
|
+
|
|
786
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
787
|
+
```
|
|
788
|
+
|
|
789
|
+
### `posthog.warehouseSavedQueriesCancelCreate`
|
|
790
|
+
|
|
791
|
+
- **HTTP**: `POST /api/projects/{project_id}/warehouse_saved_queries/{id}/cancel/`
|
|
792
|
+
- **What it does**: Cancel a running saved query workflow.
|
|
793
|
+
- **OpenAPI operationId**: `warehouse_saved_queries_cancel_create`
|
|
794
|
+
- **Path params**: `id`
|
|
795
|
+
- **Query params**: None
|
|
796
|
+
- **Response codes**: `200`
|
|
797
|
+
- **Transport options**: None
|
|
798
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
799
|
+
|
|
800
|
+
**Inputs**
|
|
801
|
+
|
|
802
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
803
|
+
- Client transport options: None
|
|
804
|
+
|
|
805
|
+
**Outputs**
|
|
806
|
+
|
|
807
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
808
|
+
- OpenAPI response codes: `200`
|
|
809
|
+
|
|
810
|
+
```ts
|
|
811
|
+
import posthog from "@utdk/posthog";
|
|
812
|
+
|
|
813
|
+
type WarehouseSavedQueriesCancelCreateInput = Parameters<typeof posthog.warehouseSavedQueriesCancelCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
814
|
+
type WarehouseSavedQueriesCancelCreateOutput = Awaited<ReturnType<typeof posthog.warehouseSavedQueriesCancelCreate>>;
|
|
815
|
+
|
|
816
|
+
const result: WarehouseSavedQueriesCancelCreateOutput = await posthog.warehouseSavedQueriesCancelCreate();
|
|
817
|
+
|
|
818
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
819
|
+
```
|
|
820
|
+
|
|
821
|
+
### `posthog.warehouseSavedQueriesDependenciesRetrieve`
|
|
822
|
+
|
|
823
|
+
- **HTTP**: `GET /api/projects/{project_id}/warehouse_saved_queries/{id}/dependencies/`
|
|
824
|
+
- **What it does**: Return the count of immediate upstream and downstream dependencies for this saved query.
|
|
825
|
+
- **OpenAPI operationId**: `warehouse_saved_queries_dependencies_retrieve`
|
|
826
|
+
- **Path params**: `id`
|
|
827
|
+
- **Query params**: None
|
|
828
|
+
- **Response codes**: `200`
|
|
829
|
+
- **Transport options**: None
|
|
830
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
831
|
+
|
|
832
|
+
**Inputs**
|
|
833
|
+
|
|
834
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
835
|
+
- Client transport options: None
|
|
836
|
+
|
|
837
|
+
**Outputs**
|
|
838
|
+
|
|
839
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
840
|
+
- OpenAPI response codes: `200`
|
|
841
|
+
|
|
842
|
+
```ts
|
|
843
|
+
import posthog from "@utdk/posthog";
|
|
844
|
+
|
|
845
|
+
type WarehouseSavedQueriesDependenciesRetrieveInput = Parameters<typeof posthog.warehouseSavedQueriesDependenciesRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
846
|
+
type WarehouseSavedQueriesDependenciesRetrieveOutput = Awaited<ReturnType<typeof posthog.warehouseSavedQueriesDependenciesRetrieve>>;
|
|
847
|
+
|
|
848
|
+
const result: WarehouseSavedQueriesDependenciesRetrieveOutput = await posthog.warehouseSavedQueriesDependenciesRetrieve();
|
|
849
|
+
|
|
850
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
851
|
+
```
|
|
852
|
+
|
|
853
|
+
### `posthog.warehouseSavedQueriesDescendantsCreate`
|
|
854
|
+
|
|
855
|
+
- **HTTP**: `POST /api/projects/{project_id}/warehouse_saved_queries/{id}/descendants/`
|
|
856
|
+
- **What it does**: Return the descendants of this saved query.
|
|
857
|
+
|
|
858
|
+
By default, we return the immediate children. The `level` parameter can be used to
|
|
859
|
+
look further ahead into the descendants tree. If `level` overshoots (i.e. points to only
|
|
860
|
+
descendants further than a leaf), we return an empty list.
|
|
861
|
+
- **OpenAPI operationId**: `warehouse_saved_queries_descendants_create`
|
|
862
|
+
- **Path params**: `id`
|
|
863
|
+
- **Query params**: None
|
|
864
|
+
- **Response codes**: `200`
|
|
865
|
+
- **Transport options**: None
|
|
866
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
867
|
+
|
|
868
|
+
**Inputs**
|
|
869
|
+
|
|
870
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
871
|
+
- Client transport options: None
|
|
872
|
+
|
|
873
|
+
**Outputs**
|
|
874
|
+
|
|
875
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
876
|
+
- OpenAPI response codes: `200`
|
|
877
|
+
|
|
878
|
+
```ts
|
|
879
|
+
import posthog from "@utdk/posthog";
|
|
880
|
+
|
|
881
|
+
type WarehouseSavedQueriesDescendantsCreateInput = Parameters<typeof posthog.warehouseSavedQueriesDescendantsCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
882
|
+
type WarehouseSavedQueriesDescendantsCreateOutput = Awaited<ReturnType<typeof posthog.warehouseSavedQueriesDescendantsCreate>>;
|
|
883
|
+
|
|
884
|
+
const result: WarehouseSavedQueriesDescendantsCreateOutput = await posthog.warehouseSavedQueriesDescendantsCreate();
|
|
885
|
+
|
|
886
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
887
|
+
```
|
|
888
|
+
|
|
889
|
+
### `posthog.warehouseSavedQueriesMaterializeCreate`
|
|
890
|
+
|
|
891
|
+
- **HTTP**: `POST /api/projects/{project_id}/warehouse_saved_queries/{id}/materialize/`
|
|
892
|
+
- **What it does**: Enable materialization for this saved query with a 24-hour sync frequency.
|
|
893
|
+
- **OpenAPI operationId**: `warehouse_saved_queries_materialize_create`
|
|
894
|
+
- **Path params**: `id`
|
|
895
|
+
- **Query params**: None
|
|
896
|
+
- **Response codes**: `200`
|
|
897
|
+
- **Transport options**: None
|
|
898
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
899
|
+
|
|
900
|
+
**Inputs**
|
|
901
|
+
|
|
902
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
903
|
+
- Client transport options: None
|
|
904
|
+
|
|
905
|
+
**Outputs**
|
|
906
|
+
|
|
907
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
908
|
+
- OpenAPI response codes: `200`
|
|
909
|
+
|
|
910
|
+
```ts
|
|
911
|
+
import posthog from "@utdk/posthog";
|
|
912
|
+
|
|
913
|
+
type WarehouseSavedQueriesMaterializeCreateInput = Parameters<typeof posthog.warehouseSavedQueriesMaterializeCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
914
|
+
type WarehouseSavedQueriesMaterializeCreateOutput = Awaited<ReturnType<typeof posthog.warehouseSavedQueriesMaterializeCreate>>;
|
|
915
|
+
|
|
916
|
+
const result: WarehouseSavedQueriesMaterializeCreateOutput = await posthog.warehouseSavedQueriesMaterializeCreate();
|
|
917
|
+
|
|
918
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
919
|
+
```
|
|
920
|
+
|
|
921
|
+
### `posthog.warehouseSavedQueriesRevertMaterializationCreate`
|
|
922
|
+
|
|
923
|
+
- **HTTP**: `POST /api/projects/{project_id}/warehouse_saved_queries/{id}/revert_materialization/`
|
|
924
|
+
- **What it does**: Undo materialization, revert back to the original view.
|
|
925
|
+
(i.e. delete the materialized table and the schedule)
|
|
926
|
+
- **OpenAPI operationId**: `warehouse_saved_queries_revert_materialization_create`
|
|
927
|
+
- **Path params**: `id`
|
|
928
|
+
- **Query params**: None
|
|
929
|
+
- **Response codes**: `200`
|
|
930
|
+
- **Transport options**: None
|
|
931
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
932
|
+
|
|
933
|
+
**Inputs**
|
|
934
|
+
|
|
935
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
936
|
+
- Client transport options: None
|
|
937
|
+
|
|
938
|
+
**Outputs**
|
|
939
|
+
|
|
940
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
941
|
+
- OpenAPI response codes: `200`
|
|
942
|
+
|
|
943
|
+
```ts
|
|
944
|
+
import posthog from "@utdk/posthog";
|
|
945
|
+
|
|
946
|
+
type WarehouseSavedQueriesRevertMaterializationCreateInput = Parameters<typeof posthog.warehouseSavedQueriesRevertMaterializationCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
947
|
+
type WarehouseSavedQueriesRevertMaterializationCreateOutput = Awaited<ReturnType<typeof posthog.warehouseSavedQueriesRevertMaterializationCreate>>;
|
|
948
|
+
|
|
949
|
+
const result: WarehouseSavedQueriesRevertMaterializationCreateOutput = await posthog.warehouseSavedQueriesRevertMaterializationCreate();
|
|
950
|
+
|
|
951
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
952
|
+
```
|
|
953
|
+
|
|
954
|
+
### `posthog.warehouseSavedQueriesRunHistoryRetrieve`
|
|
955
|
+
|
|
956
|
+
- **HTTP**: `GET /api/projects/{project_id}/warehouse_saved_queries/{id}/run_history/`
|
|
957
|
+
- **What it does**: Return the recent run history (up to 5 most recent) for this materialized view.
|
|
958
|
+
- **OpenAPI operationId**: `warehouse_saved_queries_run_history_retrieve`
|
|
959
|
+
- **Path params**: `id`
|
|
960
|
+
- **Query params**: None
|
|
961
|
+
- **Response codes**: `200`
|
|
962
|
+
- **Transport options**: None
|
|
963
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
964
|
+
|
|
965
|
+
**Inputs**
|
|
966
|
+
|
|
967
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
968
|
+
- Client transport options: None
|
|
969
|
+
|
|
970
|
+
**Outputs**
|
|
971
|
+
|
|
972
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
973
|
+
- OpenAPI response codes: `200`
|
|
974
|
+
|
|
975
|
+
```ts
|
|
976
|
+
import posthog from "@utdk/posthog";
|
|
977
|
+
|
|
978
|
+
type WarehouseSavedQueriesRunHistoryRetrieveInput = Parameters<typeof posthog.warehouseSavedQueriesRunHistoryRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
979
|
+
type WarehouseSavedQueriesRunHistoryRetrieveOutput = Awaited<ReturnType<typeof posthog.warehouseSavedQueriesRunHistoryRetrieve>>;
|
|
980
|
+
|
|
981
|
+
const result: WarehouseSavedQueriesRunHistoryRetrieveOutput = await posthog.warehouseSavedQueriesRunHistoryRetrieve();
|
|
982
|
+
|
|
983
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
984
|
+
```
|
|
985
|
+
|
|
986
|
+
### `posthog.warehouseSavedQueriesRunCreate`
|
|
987
|
+
|
|
988
|
+
- **HTTP**: `POST /api/projects/{project_id}/warehouse_saved_queries/{id}/run/`
|
|
989
|
+
- **What it does**: Run this saved query.
|
|
990
|
+
- **OpenAPI operationId**: `warehouse_saved_queries_run_create`
|
|
991
|
+
- **Path params**: `id`
|
|
992
|
+
- **Query params**: None
|
|
993
|
+
- **Response codes**: `200`
|
|
994
|
+
- **Transport options**: None
|
|
995
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
996
|
+
|
|
997
|
+
**Inputs**
|
|
998
|
+
|
|
999
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
1000
|
+
- Client transport options: None
|
|
1001
|
+
|
|
1002
|
+
**Outputs**
|
|
1003
|
+
|
|
1004
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
1005
|
+
- OpenAPI response codes: `200`
|
|
1006
|
+
|
|
1007
|
+
```ts
|
|
1008
|
+
import posthog from "@utdk/posthog";
|
|
1009
|
+
|
|
1010
|
+
type WarehouseSavedQueriesRunCreateInput = Parameters<typeof posthog.warehouseSavedQueriesRunCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
1011
|
+
type WarehouseSavedQueriesRunCreateOutput = Awaited<ReturnType<typeof posthog.warehouseSavedQueriesRunCreate>>;
|
|
1012
|
+
|
|
1013
|
+
const result: WarehouseSavedQueriesRunCreateOutput = await posthog.warehouseSavedQueriesRunCreate();
|
|
1014
|
+
|
|
1015
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
1016
|
+
```
|
|
1017
|
+
|
|
1018
|
+
### `posthog.warehouseSavedQueriesResumeSchedulesCreate`
|
|
1019
|
+
|
|
1020
|
+
- **HTTP**: `POST /api/projects/{project_id}/warehouse_saved_queries/resume_schedules/`
|
|
1021
|
+
- **What it does**: Resume paused materialization schedules for multiple matviews.
|
|
1022
|
+
|
|
1023
|
+
Accepts a list of view IDs in the request body: {"view_ids": ["id1", "id2", ...]}
|
|
1024
|
+
This endpoint is idempotent - calling it on already running or non-existent schedules is safe.
|
|
1025
|
+
- **OpenAPI operationId**: `warehouse_saved_queries_resume_schedules_create`
|
|
1026
|
+
- **Path params**: None
|
|
1027
|
+
- **Query params**: None
|
|
1028
|
+
- **Response codes**: `200`
|
|
1029
|
+
- **Transport options**: None
|
|
1030
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
1031
|
+
|
|
1032
|
+
**Inputs**
|
|
1033
|
+
|
|
1034
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
1035
|
+
- Client transport options: None
|
|
1036
|
+
|
|
1037
|
+
**Outputs**
|
|
1038
|
+
|
|
1039
|
+
- Client return type: `{ id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...`
|
|
1040
|
+
- OpenAPI response codes: `200`
|
|
1041
|
+
|
|
1042
|
+
```ts
|
|
1043
|
+
import posthog from "@utdk/posthog";
|
|
1044
|
+
|
|
1045
|
+
type WarehouseSavedQueriesResumeSchedulesCreateInput = Parameters<typeof posthog.warehouseSavedQueriesResumeSchedulesCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
1046
|
+
type WarehouseSavedQueriesResumeSchedulesCreateOutput = Awaited<ReturnType<typeof posthog.warehouseSavedQueriesResumeSchedulesCreate>>;
|
|
1047
|
+
|
|
1048
|
+
const result: WarehouseSavedQueriesResumeSchedulesCreateOutput = await posthog.warehouseSavedQueriesResumeSchedulesCreate();
|
|
1049
|
+
|
|
1050
|
+
// Result shape (from schema): { id: string; deleted?: boolean | null; name: string; query: { kind?: "HogQLQuery"; query: string }; created_by: { id: number; uuid: string; distinct_id?: string | null; first_name?: string; last_name?: string; email: s...
|
|
1051
|
+
```
|
|
1052
|
+
|
|
1053
|
+
|
|
1054
|
+
<!-- prompt-hash:
|
|
1055
|
+
8c3694991a4c289225f05a4e8f1e098cc74d085a088d7dffd82f00d93797b7f8
|
|
1056
|
+
-->
|