Files
zeekay bc4ddf332b chore: rebase the tree onto upstream master fa1a9a60
Mechanically re-derived: bin/debrand runs over a fresh import of
posthog/posthog@fa1a9a60d4 (2026-08-06).
The pipeline (.hanzo/workflows), the Dockerfiles and bin/docker*
entrypoints, compose files, LLM.md and the squashed initial migration
are restored from the shipped tree, same as the previous import.

The prune's import-closure guard kept 21 products the new core now
imports; dropping them is a refactor now, recorded rather than forced.
2026-08-06 01:25:36 -07:00

232 lines
6.9 KiB
TypeScript
Generated

/**
* Auto-generated from the Django backend OpenAPI schema.
* To modify these types, update the Django serializers or views, then run:
* insightscli build:openapi
* Questions or issues? #team-devex on Slack
*
* Insights API - generated
* OpenAPI spec version: 1.0.0
*/
/**
* * `USR` - user
* * `GIT` - GitHub
*/
export type CreationTypeEnumApi = (typeof CreationTypeEnumApi)[keyof typeof CreationTypeEnumApi]
export const CreationTypeEnumApi = {
Usr: 'USR',
Git: 'GIT',
} as const
/**
* * `engineering` - Engineering
* * `data` - Data
* * `product` - Product Management
* * `founder` - Founder
* * `leadership` - Leadership
* * `marketing` - Marketing
* * `sales` - Sales / Success
* * `student` - Student
* * `other` - Other
*/
export type RoleAtOrganizationEnumApi = (typeof RoleAtOrganizationEnumApi)[keyof typeof RoleAtOrganizationEnumApi]
export const RoleAtOrganizationEnumApi = {
Engineering: 'engineering',
Data: 'data',
Product: 'product',
Founder: 'founder',
Leadership: 'leadership',
Marketing: 'marketing',
Sales: 'sales',
Student: 'student',
Other: 'other',
} as const
export type BlankEnumApi = (typeof BlankEnumApi)[keyof typeof BlankEnumApi]
export const BlankEnumApi = {
'': '',
} as const
/**
* @nullable
*/
export type UserBasicApiMascotConfig = { [key: string]: unknown } | null
export interface UserBasicApi {
readonly id: number
readonly uuid: string
/**
* @maxLength 200
* @nullable
*/
distinct_id?: string | null
/** @maxLength 150 */
first_name?: string
/** @maxLength 150 */
last_name?: string
/** @maxLength 254 */
email: string
/** @nullable */
is_email_verified?: boolean | null
/** @nullable */
readonly mascot_config: UserBasicApiMascotConfig
role_at_organization?: RoleAtOrganizationEnumApi | BlankEnumApi | null
}
/**
* * `dashboard_item` - insight
* * `dashboard` - dashboard
* * `project` - project
* * `organization` - organization
* * `recording` - recording
*/
export type AnnotationScopeEnumApi = (typeof AnnotationScopeEnumApi)[keyof typeof AnnotationScopeEnumApi]
export const AnnotationScopeEnumApi = {
DashboardItem: 'dashboard_item',
Dashboard: 'dashboard',
Project: 'project',
Organization: 'organization',
Recording: 'recording',
} as const
export interface AnnotationApi {
readonly id: number
/**
* Annotation text shown on charts to describe the change, release, or incident.
* @maxLength 8192
* @nullable
*/
content?: string | null
/**
* When this annotation happened (ISO 8601 timestamp). Used to position it on charts.
* @nullable
*/
date_marker?: string | null
/** Who created this annotation. Use `USR` for user-created notes and `GIT` for bot/deployment notes.
*
* * `USR` - user
* * `GIT` - GitHub */
creation_type?: CreationTypeEnumApi
/** @nullable */
dashboard_item?: number | null
/** @nullable */
dashboard_id?: number | null
/** @nullable */
readonly dashboard_name: string | null
/** @nullable */
readonly insight_short_id: string | null
/** @nullable */
readonly insight_name: string | null
/** @nullable */
readonly insight_derived_name: string | null
readonly created_by: UserBasicApi
/** @nullable */
readonly created_at: string | null
readonly updated_at: string
/** Soft-delete flag. Set to true to hide the annotation, or false to restore it. */
deleted?: boolean
/** Annotation visibility scope: `project`, `organization`, `dashboard`, or `dashboard_item`. `recording` is deprecated and rejected.
*
* * `dashboard_item` - insight
* * `dashboard` - dashboard
* * `project` - project
* * `organization` - organization
* * `recording` - recording */
scope?: AnnotationScopeEnumApi
/**
* Optional emoji shown in place of the default badge when this annotation is surfaced on a chart.
* @maxLength 16
* @nullable
*/
emoji?: string | null
/**
* When true, the annotation is hidden from the Insights UI (charts and the annotations list) but still readable over the API and MCP. Use for high-frequency markers like deployments that would otherwise crowd the UI. Null (the default) means the annotation is shown.
* @nullable
*/
hidden_in_user_interface?: boolean | null
}
export interface PaginatedAnnotationListApi {
count: number
/** @nullable */
next?: string | null
/** @nullable */
previous?: string | null
results: AnnotationApi[]
}
export interface PatchedAnnotationApi {
readonly id?: number
/**
* Annotation text shown on charts to describe the change, release, or incident.
* @maxLength 8192
* @nullable
*/
content?: string | null
/**
* When this annotation happened (ISO 8601 timestamp). Used to position it on charts.
* @nullable
*/
date_marker?: string | null
/** Who created this annotation. Use `USR` for user-created notes and `GIT` for bot/deployment notes.
*
* * `USR` - user
* * `GIT` - GitHub */
creation_type?: CreationTypeEnumApi
/** @nullable */
dashboard_item?: number | null
/** @nullable */
dashboard_id?: number | null
/** @nullable */
readonly dashboard_name?: string | null
/** @nullable */
readonly insight_short_id?: string | null
/** @nullable */
readonly insight_name?: string | null
/** @nullable */
readonly insight_derived_name?: string | null
readonly created_by?: UserBasicApi
/** @nullable */
readonly created_at?: string | null
readonly updated_at?: string
/** Soft-delete flag. Set to true to hide the annotation, or false to restore it. */
deleted?: boolean
/** Annotation visibility scope: `project`, `organization`, `dashboard`, or `dashboard_item`. `recording` is deprecated and rejected.
*
* * `dashboard_item` - insight
* * `dashboard` - dashboard
* * `project` - project
* * `organization` - organization
* * `recording` - recording */
scope?: AnnotationScopeEnumApi
/**
* Optional emoji shown in place of the default badge when this annotation is surfaced on a chart.
* @maxLength 16
* @nullable
*/
emoji?: string | null
/**
* When true, the annotation is hidden from the Insights UI (charts and the annotations list) but still readable over the API and MCP. Use for high-frequency markers like deployments that would otherwise crowd the UI. Null (the default) means the annotation is shown.
* @nullable
*/
hidden_in_user_interface?: boolean | null
}
export type AnnotationsListParams = {
/**
* Number of results to return per page.
*/
limit?: number
/**
* The initial index from which to return the results.
*/
offset?: number
/**
* A search term.
*/
search?: string
}