@peektravel/app-utilities 0.2.6 → 0.2.7

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.
package/dist/index.cjs CHANGED
@@ -256,6 +256,7 @@ function fromBookingNode(node, includeGuests = false, includePriceBreakdown = fa
256
256
  const data = node ?? {};
257
257
  const ticketQuantities = data.ticketQuantities ?? [];
258
258
  const app = data.order?.initialQuote?.source?.actor?.app ?? null;
259
+ const sourceDetails = data.order?.initialQuote?.source?.actor?.name ?? null;
259
260
  const customQuestionAnswers = (data.questionAnswers ?? []).map(
260
261
  (answer) => {
261
262
  const base = {
@@ -279,6 +280,7 @@ function fromBookingNode(node, includeGuests = false, includePriceBreakdown = fa
279
280
  source: sourceFromApp(app),
280
281
  sourceApp: app || UNKNOWN,
281
282
  sourceDescription: sourceDescriptionFromApp(app),
283
+ sourceDetails,
282
284
  customerName: data.primaryGuest?.name || "",
283
285
  customerEmail: data.primaryGuest?.email || null,
284
286
  customerPhone: data.primaryGuest?.phone || null,
@@ -714,6 +716,7 @@ var bookingQueryFields = `
714
716
  source {
715
717
  actor {
716
718
  app
719
+ name
717
720
  }
718
721
  }
719
722
  }
@@ -2349,7 +2352,7 @@ function fromTimeslotNode(node, productId) {
2349
2352
  durationMin: node.minuteLength ?? 0,
2350
2353
  date: node.date || "",
2351
2354
  startTime: node.start ?? null,
2352
- assignedResources: mapAssignedResources(node.resourceAllocations)
2355
+ assignedResources: mapAssignedResources(node.inheritedResourceAllocations)
2353
2356
  };
2354
2357
  }
2355
2358
  function mapAssignedResources(allocations) {
@@ -2359,11 +2362,11 @@ function mapAssignedResources(allocations) {
2359
2362
  return allocations.map((allocation) => {
2360
2363
  const pool = allocation.resourcePool;
2361
2364
  return {
2362
- id: pool?.id || "",
2363
2365
  name: pool?.name || "",
2364
2366
  capacity: pool?.capacity ?? 0,
2365
2367
  category: pool?.category || "",
2366
2368
  quantity: allocation.quantity ?? 0,
2369
+ status: allocation.status || "",
2367
2370
  accountUserId: pool?.accountUser?.id ?? null
2368
2371
  };
2369
2372
  });
@@ -2438,10 +2441,10 @@ var TIMESLOTS_QUERY = `
2438
2441
  minuteLength
2439
2442
  status
2440
2443
  date
2441
- resourceAllocations {
2444
+ inheritedResourceAllocations {
2442
2445
  quantity
2446
+ status
2443
2447
  resourcePool {
2444
- id
2445
2448
  name
2446
2449
  category
2447
2450
  capacity
@@ -2476,10 +2479,10 @@ var TIMESLOT_BY_ID_QUERY = `
2476
2479
  minuteLength
2477
2480
  status
2478
2481
  date
2479
- resourceAllocations {
2482
+ inheritedResourceAllocations {
2480
2483
  quantity
2484
+ status
2481
2485
  resourcePool {
2482
- id
2483
2486
  name
2484
2487
  category
2485
2488
  capacity