feat(parser): Parse targetId

Used by the UI to identify interactions/commands sent by nodes deep into the response (ChipCloudChip, Button, etc..)
This commit is contained in:
Luan
2025-04-13 16:47:46 -03:00
parent f8690118c3
commit 458c4900d7
3 changed files with 6 additions and 0 deletions

View File

@@ -517,6 +517,10 @@ export function parseResponse<T extends IParsedResponse = IParsedResponse>(data:
if (data.entries) {
parsed_data.entries = data.entries.map((entry) => new NavigationEndpoint(entry));
}
if (data.targetId) {
parsed_data.target_id = data.targetId;
}
return parsed_data;
}

View File

@@ -75,6 +75,7 @@ export interface IParsedResponse {
items?: SuperParsedResult<YTNode>;
entries?: NavigationEndpoint[];
entries_memo?: Memo;
target_id?: string;
continuation_endpoint?: YTNode;
player_response?: IPlayerResponse;
watch_next_response?: INextResponse;

View File

@@ -112,6 +112,7 @@ export interface IRawResponse {
cpn: string;
cpnSource: CpnSource;
},
targetId?: string;
items?: RawNode[];
frameworkUpdates?: any;
engagementPanels?: RawNode[];