@anker-in/ui 0.3.6 → 0.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1424,7 +1424,25 @@ var DemoRoomApiClient = class {
1424
1424
  `/api/v1/store/bookings/${token}`,
1425
1425
  { headers }
1426
1426
  );
1427
- return response.booking;
1427
+ const { questionnaire, booking } = response;
1428
+ if (questionnaire?.length) {
1429
+ const normalized = questionnaire.reduce(
1430
+ (acc, item) => {
1431
+ if (!item.key) return acc;
1432
+ acc[item.key] = item.value;
1433
+ return acc;
1434
+ },
1435
+ {}
1436
+ );
1437
+ return {
1438
+ ...booking,
1439
+ questionnaire_response: {
1440
+ ...booking.questionnaire_response || {},
1441
+ ...normalized
1442
+ }
1443
+ };
1444
+ }
1445
+ return booking;
1428
1446
  }
1429
1447
  /**
1430
1448
  * 取消预约(支持多语言邮件通知)