mirror of
https://github.com/hanzoai/insights.git
synced 2026-11-02 14:32:45 +00:00
The tree was a debranded snapshot of upstream taken around 2026-02-20, and upstream has moved about five months since. This replaces it with upstream master, mechanically re-derived: bin/debrand does the rename, and the pipeline and squashed migrations are restored from the shipped tree. Not a merge. The previous import replaced the tree wholesale in a single commit, so there is no shared content history to merge against. Reproducing the rename on the new tree is what actually converges. What survives: .hanzo/workflows, the Dockerfiles and bin/docker* entrypoints, compose files, LLM.md, and insights/migrations. The squashed initial migration is load-bearing — the live database records it by name, so upstream's ~918 individual migrations cannot come back. Nine products are dropped as unreferenced. Twenty-one more that we do not run are kept anyway because the core app still imports them; unpicking those is a refactor and does not belong in a rebase. This base does not build yet, and the reasons are not in the rename: upstream now wants Python 3.13.13 against our 3.12.12 and Django 5.2 against our 4.2, and the dependency manifests still name upstream packages that we republish under our own names. Those are decisions, not renames.
218 lines
10 KiB
TypeScript
Generated
218 lines
10 KiB
TypeScript
Generated
/**
|
|
* Auto-generated Zod validation schemas from the Django backend OpenAPI schema.
|
|
* To modify these schemas, 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
|
|
*/
|
|
import * as zod from 'zod'
|
|
|
|
export const sessionRecordingPlaylistsCreateBodyNameMax = 400
|
|
|
|
export const sessionRecordingPlaylistsCreateBodyDerivedNameMax = 400
|
|
|
|
export const SessionRecordingPlaylistsCreateBody = /* @__PURE__ */ zod.object({
|
|
name: zod
|
|
.string()
|
|
.max(sessionRecordingPlaylistsCreateBodyNameMax)
|
|
.nullish()
|
|
.describe('Human-readable name for the playlist.'),
|
|
derived_name: zod.string().max(sessionRecordingPlaylistsCreateBodyDerivedNameMax).nullish(),
|
|
description: zod.string().optional().describe("Optional description of the playlist's purpose or contents."),
|
|
pinned: zod.boolean().optional().describe('Whether this playlist is pinned to the top of the list.'),
|
|
deleted: zod.boolean().optional().describe('Set to true to soft-delete the playlist.'),
|
|
filters: zod
|
|
.unknown()
|
|
.optional()
|
|
.describe(
|
|
"JSON object with recording filter criteria. Only used when type is 'filters'. Defines which recordings match this saved filter view. When updating a filters-type playlist, you must include the existing filters alongside any other changes — omitting filters will be treated as removing them."
|
|
),
|
|
type: zod
|
|
.union([
|
|
zod.enum(['collection', 'filters']).describe('\* `collection` - Collection\n\* `filters` - Filters'),
|
|
zod.null(),
|
|
])
|
|
.optional()
|
|
.describe(
|
|
"Playlist type: 'collection' for manually curated recordings, 'filters' for saved filter views. Required on create, cannot be changed after.\n\n\* `collection` - Collection\n\* `filters` - Filters"
|
|
),
|
|
_create_in_folder: zod.string().optional(),
|
|
})
|
|
|
|
export const sessionRecordingPlaylistsUpdateBodyNameMax = 400
|
|
|
|
export const sessionRecordingPlaylistsUpdateBodyDerivedNameMax = 400
|
|
|
|
export const SessionRecordingPlaylistsUpdateBody = /* @__PURE__ */ zod.object({
|
|
name: zod
|
|
.string()
|
|
.max(sessionRecordingPlaylistsUpdateBodyNameMax)
|
|
.nullish()
|
|
.describe('Human-readable name for the playlist.'),
|
|
derived_name: zod.string().max(sessionRecordingPlaylistsUpdateBodyDerivedNameMax).nullish(),
|
|
description: zod.string().optional().describe("Optional description of the playlist's purpose or contents."),
|
|
pinned: zod.boolean().optional().describe('Whether this playlist is pinned to the top of the list.'),
|
|
deleted: zod.boolean().optional().describe('Set to true to soft-delete the playlist.'),
|
|
filters: zod
|
|
.unknown()
|
|
.optional()
|
|
.describe(
|
|
"JSON object with recording filter criteria. Only used when type is 'filters'. Defines which recordings match this saved filter view. When updating a filters-type playlist, you must include the existing filters alongside any other changes — omitting filters will be treated as removing them."
|
|
),
|
|
type: zod
|
|
.union([
|
|
zod.enum(['collection', 'filters']).describe('\* `collection` - Collection\n\* `filters` - Filters'),
|
|
zod.null(),
|
|
])
|
|
.optional()
|
|
.describe(
|
|
"Playlist type: 'collection' for manually curated recordings, 'filters' for saved filter views. Required on create, cannot be changed after.\n\n\* `collection` - Collection\n\* `filters` - Filters"
|
|
),
|
|
_create_in_folder: zod.string().optional(),
|
|
})
|
|
|
|
export const sessionRecordingPlaylistsPartialUpdateBodyNameMax = 400
|
|
|
|
export const sessionRecordingPlaylistsPartialUpdateBodyDerivedNameMax = 400
|
|
|
|
export const SessionRecordingPlaylistsPartialUpdateBody = /* @__PURE__ */ zod.object({
|
|
name: zod
|
|
.string()
|
|
.max(sessionRecordingPlaylistsPartialUpdateBodyNameMax)
|
|
.nullish()
|
|
.describe('Human-readable name for the playlist.'),
|
|
derived_name: zod.string().max(sessionRecordingPlaylistsPartialUpdateBodyDerivedNameMax).nullish(),
|
|
description: zod.string().optional().describe("Optional description of the playlist's purpose or contents."),
|
|
pinned: zod.boolean().optional().describe('Whether this playlist is pinned to the top of the list.'),
|
|
deleted: zod.boolean().optional().describe('Set to true to soft-delete the playlist.'),
|
|
filters: zod
|
|
.unknown()
|
|
.optional()
|
|
.describe(
|
|
"JSON object with recording filter criteria. Only used when type is 'filters'. Defines which recordings match this saved filter view. When updating a filters-type playlist, you must include the existing filters alongside any other changes — omitting filters will be treated as removing them."
|
|
),
|
|
type: zod
|
|
.union([
|
|
zod.enum(['collection', 'filters']).describe('\* `collection` - Collection\n\* `filters` - Filters'),
|
|
zod.null(),
|
|
])
|
|
.optional()
|
|
.describe(
|
|
"Playlist type: 'collection' for manually curated recordings, 'filters' for saved filter views. Required on create, cannot be changed after.\n\n\* `collection` - Collection\n\* `filters` - Filters"
|
|
),
|
|
_create_in_folder: zod.string().optional(),
|
|
})
|
|
|
|
export const sessionRecordingPlaylistsRecordingsCreateBodyNameMax = 400
|
|
|
|
export const sessionRecordingPlaylistsRecordingsCreateBodyDerivedNameMax = 400
|
|
|
|
export const SessionRecordingPlaylistsRecordingsCreateBody = /* @__PURE__ */ zod.object({
|
|
name: zod
|
|
.string()
|
|
.max(sessionRecordingPlaylistsRecordingsCreateBodyNameMax)
|
|
.nullish()
|
|
.describe('Human-readable name for the playlist.'),
|
|
derived_name: zod.string().max(sessionRecordingPlaylistsRecordingsCreateBodyDerivedNameMax).nullish(),
|
|
description: zod.string().optional().describe("Optional description of the playlist's purpose or contents."),
|
|
pinned: zod.boolean().optional().describe('Whether this playlist is pinned to the top of the list.'),
|
|
deleted: zod.boolean().optional().describe('Set to true to soft-delete the playlist.'),
|
|
filters: zod
|
|
.unknown()
|
|
.optional()
|
|
.describe(
|
|
"JSON object with recording filter criteria. Only used when type is 'filters'. Defines which recordings match this saved filter view. When updating a filters-type playlist, you must include the existing filters alongside any other changes — omitting filters will be treated as removing them."
|
|
),
|
|
type: zod
|
|
.union([
|
|
zod.enum(['collection', 'filters']).describe('\* `collection` - Collection\n\* `filters` - Filters'),
|
|
zod.null(),
|
|
])
|
|
.optional()
|
|
.describe(
|
|
"Playlist type: 'collection' for manually curated recordings, 'filters' for saved filter views. Required on create, cannot be changed after.\n\n\* `collection` - Collection\n\* `filters` - Filters"
|
|
),
|
|
_create_in_folder: zod.string().optional(),
|
|
})
|
|
|
|
export const SessionRecordingsUpdateBody = /* @__PURE__ */ zod.object({
|
|
person: zod
|
|
.object({
|
|
id: zod.number().describe('Numeric person ID.'),
|
|
name: zod.string().describe('Display name derived from person properties (email, name, or username).'),
|
|
distinct_ids: zod.array(zod.string()),
|
|
properties: zod
|
|
.unknown()
|
|
.optional()
|
|
.describe('Key-value map of person properties set via $set and $set_once operations.'),
|
|
created_at: zod.iso.datetime({ offset: true }).describe('When this person was first seen (ISO 8601).'),
|
|
uuid: zod.uuid().describe('Unique identifier (UUID) for this person.'),
|
|
last_seen_at: zod.iso
|
|
.datetime({ offset: true })
|
|
.nullable()
|
|
.describe('Timestamp of the last event from this person, or null.'),
|
|
})
|
|
.optional(),
|
|
})
|
|
|
|
export const SessionRecordingsPartialUpdateBody = /* @__PURE__ */ zod.object({
|
|
person: zod
|
|
.object({
|
|
id: zod.number().describe('Numeric person ID.'),
|
|
name: zod.string().describe('Display name derived from person properties (email, name, or username).'),
|
|
distinct_ids: zod.array(zod.string()),
|
|
properties: zod
|
|
.unknown()
|
|
.optional()
|
|
.describe('Key-value map of person properties set via $set and $set_once operations.'),
|
|
created_at: zod.iso.datetime({ offset: true }).describe('When this person was first seen (ISO 8601).'),
|
|
uuid: zod.uuid().describe('Unique identifier (UUID) for this person.'),
|
|
last_seen_at: zod.iso
|
|
.datetime({ offset: true })
|
|
.nullable()
|
|
.describe('Timestamp of the last event from this person, or null.'),
|
|
})
|
|
.optional(),
|
|
})
|
|
|
|
/**
|
|
* Delete a batch of session recordings by session ID. Deletion is permanent and cannot be undone. IDs that don't match an existing recording are skipped and counted in `total_requested` but not `deleted_count`.
|
|
*/
|
|
export const sessionRecordingsBulkDeleteCreateBodySessionRecordingIdsMax = 100
|
|
|
|
export const SessionRecordingsBulkDeleteCreateBody = /* @__PURE__ */ zod.object({
|
|
session_recording_ids: zod
|
|
.array(zod.string())
|
|
.min(1)
|
|
.max(sessionRecordingsBulkDeleteCreateBodySessionRecordingIdsMax)
|
|
.describe('Session IDs of the recordings to delete (max 100 per call).'),
|
|
date_from: zod
|
|
.string()
|
|
.nullish()
|
|
.describe(
|
|
"Earliest start time of the recordings, as an ISO date or a relative offset like '-30d'. Providing this narrows the lookup and speeds up the request; defaults to the project's recording retention period."
|
|
),
|
|
})
|
|
|
|
/**
|
|
* Generate AI individual summary for each session, without grouping.
|
|
*/
|
|
export const createSessionSummariesIndividuallyBodySessionIdsMax = 300
|
|
|
|
export const createSessionSummariesIndividuallyBodyFocusAreaMax = 500
|
|
|
|
export const CreateSessionSummariesIndividuallyBody = /* @__PURE__ */ zod.object({
|
|
session_ids: zod
|
|
.array(zod.string())
|
|
.min(1)
|
|
.max(createSessionSummariesIndividuallyBodySessionIdsMax)
|
|
.describe('List of session IDs to summarize (max 300)'),
|
|
focus_area: zod
|
|
.string()
|
|
.max(createSessionSummariesIndividuallyBodyFocusAreaMax)
|
|
.optional()
|
|
.describe('Optional focus area for the summarization'),
|
|
})
|