refactor(leads): export function → V3 action endpoint
Updated download_export__event_exhibit_tracking to call
/v3/action/event_exhibit/{exhibit_id}/tracking_export instead of the
legacy /event/exhibit/{exhibit_id}/tracking/export (V1 path).
Added doc comment listing the expected export columns so the backend
agent has the full field spec when implementing the endpoint.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -400,13 +400,25 @@ export async function update_ae_obj__exhibit_tracking({
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Legacy Export (Special Case - V3 Not Ready)
|
* Export exhibit tracking (leads) to CSV/XLSX.
|
||||||
|
*
|
||||||
|
* V3 Action endpoint: GET /v3/action/event_exhibit/{exhibit_id}/tracking_export
|
||||||
|
* Backend must return the file as a binary response with appropriate Content-Disposition.
|
||||||
|
*
|
||||||
|
* Columns expected in the export (all denormalized onto the tracking record):
|
||||||
|
* event_exhibit_tracking_id, created_on, updated_on,
|
||||||
|
* event_exhibit_name,
|
||||||
|
* event_badge_full_name, event_badge_email, event_badge_professional_title,
|
||||||
|
* event_badge_affiliations, event_badge_location, event_badge_country,
|
||||||
|
* external_person_id (captured by), exhibitor_notes,
|
||||||
|
* responses_json (flattened — one column per custom question code),
|
||||||
|
* priority, enable, hide
|
||||||
*/
|
*/
|
||||||
export async function download_export__event_exhibit_tracking({
|
export async function download_export__event_exhibit_tracking({
|
||||||
api_cfg,
|
api_cfg,
|
||||||
exhibit_id,
|
exhibit_id,
|
||||||
file_type = 'CSV',
|
file_type = 'CSV',
|
||||||
filename = 'exhibit_tracking_export.csv',
|
filename = 'leads_export.csv',
|
||||||
log_lvl = 0
|
log_lvl = 0
|
||||||
}: {
|
}: {
|
||||||
api_cfg: any;
|
api_cfg: any;
|
||||||
@@ -415,10 +427,14 @@ export async function download_export__event_exhibit_tracking({
|
|||||||
filename?: string;
|
filename?: string;
|
||||||
log_lvl?: number;
|
log_lvl?: number;
|
||||||
}) {
|
}) {
|
||||||
const endpoint = `/event/exhibit/${exhibit_id}/tracking/export`;
|
if (log_lvl) {
|
||||||
const params = {
|
console.log(`*** download_export__event_exhibit_tracking() *** exhibit_id=${exhibit_id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const endpoint = `/v3/action/event_exhibit/${exhibit_id}/tracking_export`;
|
||||||
|
const params: key_val = {
|
||||||
file_type,
|
file_type,
|
||||||
return_file: true
|
return_file: 'true' // V3 convention: string 'true' for bool query flags
|
||||||
};
|
};
|
||||||
|
|
||||||
return await api.get_object({
|
return await api.get_object({
|
||||||
|
|||||||
Reference in New Issue
Block a user