Function: detectAttachmentType()
detectAttachmentType(
att):string
Inspect a GenieAttachment and return the
AttachmentType of payload it carries. Returns the first
known sub-object that’s present; if none of the known ones are
populated, falls back to the first non-bookkeeping key
(forward-compat for types we don’t model yet), else "unknown".
Honors a pre-set attachment_type if one is already on the
value, so this is idempotent across re-detections.
Parameters
Section titled “Parameters”attachment_id?
Section titled “attachment_id?”string = ...
attachment_type?
Section titled “attachment_type?”string = ...
query?
Section titled “query?”{ description?: string; id?: string; last_updated_timestamp?: number; parameters?: object[]; query?: string; query_result_metadata?: { is_truncated?: boolean; row_count?: number; }; statement_id?: string; thoughts?: object[]; title?: string; } = ...
query.description?
Section titled “query.description?”string = ...
query.id?
Section titled “query.id?”string = ...
query.last_updated_timestamp?
Section titled “query.last_updated_timestamp?”number = ...
query.parameters?
Section titled “query.parameters?”object[] = ...
query.query?
Section titled “query.query?”string = ...
query.query_result_metadata?
Section titled “query.query_result_metadata?”{ is_truncated?: boolean; row_count?: number; } = ...
query.query_result_metadata.is_truncated?
Section titled “query.query_result_metadata.is_truncated?”boolean = ...
query.query_result_metadata.row_count?
Section titled “query.query_result_metadata.row_count?”number = ...
query.statement_id?
Section titled “query.statement_id?”string = ...
query.thoughts?
Section titled “query.thoughts?”object[] = ...
query.title?
Section titled “query.title?”string = ...
suggested_questions?
Section titled “suggested_questions?”{ questions?: string[]; } = ...
suggested_questions.questions?
Section titled “suggested_questions.questions?”string[] = ...
{ content?: string; id?: string; metadata?: unknown; purpose?: string; } = ...
text.content?
Section titled “text.content?”string = ...
text.id?
Section titled “text.id?”string = ...
text.metadata?
Section titled “text.metadata?”unknown = ...
text.purpose?
Section titled “text.purpose?”string = ...
Returns
Section titled “Returns”string