@vendasta/meetings 1.1.0 → 1.1.2

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.
@@ -1646,6 +1646,32 @@ class Host {
1646
1646
  return toReturn;
1647
1647
  }
1648
1648
  }
1649
+ class HostOrderDetails {
1650
+ static fromProto(proto) {
1651
+ let m = new HostOrderDetails();
1652
+ m = Object.assign(m, proto);
1653
+ if (proto.hostOrder) {
1654
+ m.hostOrder = parseInt(proto.hostOrder, 10);
1655
+ }
1656
+ return m;
1657
+ }
1658
+ constructor(kwargs) {
1659
+ if (!kwargs) {
1660
+ return;
1661
+ }
1662
+ Object.assign(this, kwargs);
1663
+ }
1664
+ toApiJson() {
1665
+ const toReturn = {};
1666
+ if (typeof this.userId !== 'undefined') {
1667
+ toReturn['userId'] = this.userId;
1668
+ }
1669
+ if (typeof this.hostOrder !== 'undefined') {
1670
+ toReturn['hostOrder'] = this.hostOrder;
1671
+ }
1672
+ return toReturn;
1673
+ }
1674
+ }
1649
1675
  class HostUser {
1650
1676
  static fromProto(proto) {
1651
1677
  let m = new HostUser();
@@ -1991,6 +2017,9 @@ class MeetingType {
1991
2017
  if (proto.registrationCutoff) {
1992
2018
  m.registrationCutoff = RegistrationCutOff.fromProto(proto.registrationCutoff);
1993
2019
  }
2020
+ if (proto.hostOrderDetails) {
2021
+ m.hostOrderDetails = proto.hostOrderDetails.map(HostOrderDetails.fromProto);
2022
+ }
1994
2023
  return m;
1995
2024
  }
1996
2025
  constructor(kwargs) {
@@ -2094,6 +2123,9 @@ class MeetingType {
2094
2123
  if (typeof this.registrationCutoff !== 'undefined' && this.registrationCutoff !== null) {
2095
2124
  toReturn['registrationCutoff'] = 'toApiJson' in this.registrationCutoff ? this.registrationCutoff.toApiJson() : this.registrationCutoff;
2096
2125
  }
2126
+ if (typeof this.hostOrderDetails !== 'undefined' && this.hostOrderDetails !== null) {
2127
+ toReturn['hostOrderDetails'] = 'toApiJson' in this.hostOrderDetails ? this.hostOrderDetails.toApiJson() : this.hostOrderDetails;
2128
+ }
2097
2129
  return toReturn;
2098
2130
  }
2099
2131
  }
@@ -6457,6 +6489,7 @@ function MeetingTypeFromApi(req) {
6457
6489
  attendeeCount: req.meetingTypeApi.attendeeCount || 0,
6458
6490
  registrationCutoff: req.meetingTypeApi.registrationCutoff || undefined,
6459
6491
  sessionTitle: req.meetingTypeApi.sessionTitle || "",
6492
+ hostOrderDetails: req.meetingTypeApi.hostOrderDetails || [],
6460
6493
  };
6461
6494
  }
6462
6495
  function MeetingTypeToApi(req) {
@@ -6493,6 +6526,7 @@ function MeetingTypeToApi(req) {
6493
6526
  attendeeCount: m.attendeeCount || 0,
6494
6527
  registrationCutoff: m.registrationCutoff || undefined,
6495
6528
  sessionTitle: m.sessionTitle || undefined,
6529
+ hostOrderDetails: m.hostOrderDetails || undefined,
6496
6530
  };
6497
6531
  }
6498
6532
 
@@ -6518,9 +6552,9 @@ var WellKnownFormFieldIds;
6518
6552
  // This can also be used on fields that are not metadata to ensure they will come across in metadata.
6519
6553
  function meetingSchedulerIdToMetadataKey(id) {
6520
6554
  if (!id) {
6521
- return '';
6555
+ return "";
6522
6556
  }
6523
- return id.startsWith('msm_') || id.startsWith('utm_') ? id : `msm_${id}`;
6557
+ return id.startsWith("msm_") || id.startsWith("utm_") ? id : `msm_${id}`;
6524
6558
  }
6525
6559
  function meetingFromApi(meetingApi) {
6526
6560
  return {
@@ -6529,37 +6563,44 @@ function meetingFromApi(meetingApi) {
6529
6563
  hostId: meetingApi.hostId,
6530
6564
  start: meetingApi.start,
6531
6565
  end: meetingApi.end,
6532
- description: meetingApi.description || '',
6533
- joinMeetingUrl: meetingApi.joinMeetingUrl || '',
6534
- attendees: meetingApi.attendees ? meetingApi.attendees.map(a => ({
6535
- firstName: a.firstName,
6536
- lastName: a.lastName,
6537
- email: a.email,
6538
- phoneNumber: a.phoneNumber,
6539
- timeZone: a.timeZone,
6540
- isPrimary: a.isPrimary || false,
6541
- })) : [],
6566
+ description: meetingApi.description || "",
6567
+ joinMeetingUrl: meetingApi.joinMeetingUrl || "",
6568
+ attendees: meetingApi.attendees
6569
+ ? meetingApi.attendees.map((a) => ({
6570
+ firstName: a.firstName,
6571
+ lastName: a.lastName,
6572
+ email: a.email,
6573
+ phoneNumber: a.phoneNumber,
6574
+ timeZone: a.timeZone,
6575
+ isPrimary: a.isPrimary || false,
6576
+ }))
6577
+ : [],
6542
6578
  created: meetingApi.created,
6543
6579
  updated: meetingApi.updated,
6544
6580
  topic: meetingApi.topic,
6545
6581
  formAnswers: answersFromAPI(meetingApi.formAnswers),
6546
6582
  metadata: meetingApi.metadata || {},
6547
- attachments: (meetingApi.attachments || []).map(a => {
6583
+ attachments: (meetingApi.attachments || []).map((a) => {
6548
6584
  return {
6549
- fileTitle: a.fileTitle || '',
6550
- fileUrl: a.fileUrl || '',
6551
- fileType: a.fileType || '',
6585
+ fileTitle: a.fileTitle || "",
6586
+ fileUrl: a.fileUrl || "",
6587
+ fileType: a.fileType || "",
6552
6588
  };
6553
6589
  }),
6554
- location: meetingApi.location || '',
6555
- calendarId: meetingApi.calendarId || '',
6556
- hostDetails: (meetingApi.hostDetails || []).map(h => {
6590
+ location: meetingApi.location || "",
6591
+ calendarId: meetingApi.calendarId || "",
6592
+ hostDetails: (meetingApi.hostDetails || []).map((h) => {
6557
6593
  return {
6558
- hostID: h.hostId || '',
6559
- name: h.name || '',
6594
+ hostID: h.hostId || "",
6595
+ name: h.name || "",
6560
6596
  };
6561
6597
  }),
6562
6598
  meetingType: meetingApi.meetingType,
6599
+ sessionTitle: meetingApi.sessionTitle || "",
6600
+ sessionRegistrationUrl: meetingApi.sessionRegistrationUrl || "",
6601
+ maxAttendeeCount: meetingApi.maxAttendeeCount || 0,
6602
+ registeredAttendeeCount: meetingApi.registeredAttendeeCount || 0,
6603
+ registrationCutoff: meetingApi.registrationCutoff || "",
6563
6604
  };
6564
6605
  }
6565
6606
  function answersFromAPI(formAnswers) {
@@ -6567,14 +6608,14 @@ function answersFromAPI(formAnswers) {
6567
6608
  return { formAnswers: [] };
6568
6609
  }
6569
6610
  return {
6570
- formAnswers: (formAnswers.formAnswers ? formAnswers.formAnswers : []).map(a => {
6611
+ formAnswers: (formAnswers.formAnswers ? formAnswers.formAnswers : []).map((a) => {
6571
6612
  return {
6572
- id: a.id || '',
6573
- label: a.label || '',
6613
+ id: a.id || "",
6614
+ label: a.label || "",
6574
6615
  type: a.type || FormFieldType.FORM_FIELD_TYPE_INVALID,
6575
6616
  answer: a.answer || [],
6576
6617
  };
6577
- })
6618
+ }),
6578
6619
  };
6579
6620
  }
6580
6621
  function answersToAPI(formAnswers) {
@@ -6582,14 +6623,14 @@ function answersToAPI(formAnswers) {
6582
6623
  return { formAnswers: [] };
6583
6624
  }
6584
6625
  return {
6585
- formAnswers: (formAnswers.formAnswers || []).map(a => {
6626
+ formAnswers: (formAnswers.formAnswers || []).map((a) => {
6586
6627
  return {
6587
6628
  id: a.id || undefined,
6588
6629
  label: a.label || undefined,
6589
6630
  type: a.type,
6590
6631
  answer: a.answer || undefined,
6591
6632
  };
6592
- })
6633
+ }),
6593
6634
  };
6594
6635
  }
6595
6636