@vendasta/meetings 1.3.1 → 1.4.0

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.
@@ -1701,6 +1701,29 @@ class HostUser {
1701
1701
  return toReturn;
1702
1702
  }
1703
1703
  }
1704
+ class IsoDateTimeRange {
1705
+ static fromProto(proto) {
1706
+ let m = new IsoDateTimeRange();
1707
+ m = Object.assign(m, proto);
1708
+ return m;
1709
+ }
1710
+ constructor(kwargs) {
1711
+ if (!kwargs) {
1712
+ return;
1713
+ }
1714
+ Object.assign(this, kwargs);
1715
+ }
1716
+ toApiJson() {
1717
+ const toReturn = {};
1718
+ if (typeof this.start !== 'undefined') {
1719
+ toReturn['start'] = this.start;
1720
+ }
1721
+ if (typeof this.end !== 'undefined') {
1722
+ toReturn['end'] = this.end;
1723
+ }
1724
+ return toReturn;
1725
+ }
1726
+ }
1704
1727
  class PagedRequestOptions {
1705
1728
  static fromProto(proto) {
1706
1729
  let m = new PagedRequestOptions();
@@ -3065,29 +3088,6 @@ class InviteeRegisterSessionMeetingRequest {
3065
3088
  return toReturn;
3066
3089
  }
3067
3090
  }
3068
- class IsoDateTimeRange {
3069
- static fromProto(proto) {
3070
- let m = new IsoDateTimeRange();
3071
- m = Object.assign(m, proto);
3072
- return m;
3073
- }
3074
- constructor(kwargs) {
3075
- if (!kwargs) {
3076
- return;
3077
- }
3078
- Object.assign(this, kwargs);
3079
- }
3080
- toApiJson() {
3081
- const toReturn = {};
3082
- if (typeof this.start !== 'undefined') {
3083
- toReturn['start'] = this.start;
3084
- }
3085
- if (typeof this.end !== 'undefined') {
3086
- toReturn['end'] = this.end;
3087
- }
3088
- return toReturn;
3089
- }
3090
- }
3091
3091
  class ListAvailableTimeSlotsRequest {
3092
3092
  static fromProto(proto) {
3093
3093
  let m = new ListAvailableTimeSlotsRequest();
@@ -3319,9 +3319,9 @@ class BuildHostIdRequestApplicationContextPropertiesEntry {
3319
3319
  return toReturn;
3320
3320
  }
3321
3321
  }
3322
- class EnsurePersonalCalendarExistsRequestApplicationContextPropertiesEntry {
3322
+ class IsCalendarConfiguredRequestApplicationContextPropertiesEntry {
3323
3323
  static fromProto(proto) {
3324
- let m = new EnsurePersonalCalendarExistsRequestApplicationContextPropertiesEntry();
3324
+ let m = new IsCalendarConfiguredRequestApplicationContextPropertiesEntry();
3325
3325
  m = Object.assign(m, proto);
3326
3326
  return m;
3327
3327
  }
@@ -3342,9 +3342,9 @@ class EnsurePersonalCalendarExistsRequestApplicationContextPropertiesEntry {
3342
3342
  return toReturn;
3343
3343
  }
3344
3344
  }
3345
- class IsCalendarConfiguredRequestApplicationContextPropertiesEntry {
3345
+ class EnsurePersonalCalendarExistsRequestApplicationContextPropertiesEntry {
3346
3346
  static fromProto(proto) {
3347
- let m = new IsCalendarConfiguredRequestApplicationContextPropertiesEntry();
3347
+ let m = new EnsurePersonalCalendarExistsRequestApplicationContextPropertiesEntry();
3348
3348
  m = Object.assign(m, proto);
3349
3349
  return m;
3350
3350
  }
@@ -4095,13 +4095,10 @@ class EnsureSessionEventCalendarsExistResponse {
4095
4095
  return toReturn;
4096
4096
  }
4097
4097
  }
4098
- class ListBookedMeetingsRequestFilters {
4098
+ class ListAvailabilityRequestFilters {
4099
4099
  static fromProto(proto) {
4100
- let m = new ListBookedMeetingsRequestFilters();
4100
+ let m = new ListAvailabilityRequestFilters();
4101
4101
  m = Object.assign(m, proto);
4102
- if (proto.timeSpan) {
4103
- m.timeSpan = DateRange.fromProto(proto.timeSpan);
4104
- }
4105
4102
  return m;
4106
4103
  }
4107
4104
  constructor(kwargs) {
@@ -4112,22 +4109,22 @@ class ListBookedMeetingsRequestFilters {
4112
4109
  }
4113
4110
  toApiJson() {
4114
4111
  const toReturn = {};
4115
- if (typeof this.meetingTypeIds !== 'undefined') {
4116
- toReturn['meetingTypeIds'] = this.meetingTypeIds;
4117
- }
4118
4112
  if (typeof this.hostId !== 'undefined') {
4119
4113
  toReturn['hostId'] = this.hostId;
4120
4114
  }
4121
- if (typeof this.timeSpan !== 'undefined' && this.timeSpan !== null) {
4122
- toReturn['timeSpan'] = 'toApiJson' in this.timeSpan ? this.timeSpan.toApiJson() : this.timeSpan;
4115
+ if (typeof this.meetingTypeId !== 'undefined') {
4116
+ toReturn['meetingTypeId'] = this.meetingTypeId;
4123
4117
  }
4124
4118
  return toReturn;
4125
4119
  }
4126
4120
  }
4127
- class ListAvailabilityRequestFilters {
4121
+ class ListBookedMeetingsRequestFilters {
4128
4122
  static fromProto(proto) {
4129
- let m = new ListAvailabilityRequestFilters();
4123
+ let m = new ListBookedMeetingsRequestFilters();
4130
4124
  m = Object.assign(m, proto);
4125
+ if (proto.timeSpan) {
4126
+ m.timeSpan = DateRange.fromProto(proto.timeSpan);
4127
+ }
4131
4128
  return m;
4132
4129
  }
4133
4130
  constructor(kwargs) {
@@ -4138,11 +4135,14 @@ class ListAvailabilityRequestFilters {
4138
4135
  }
4139
4136
  toApiJson() {
4140
4137
  const toReturn = {};
4138
+ if (typeof this.meetingTypeIds !== 'undefined') {
4139
+ toReturn['meetingTypeIds'] = this.meetingTypeIds;
4140
+ }
4141
4141
  if (typeof this.hostId !== 'undefined') {
4142
4142
  toReturn['hostId'] = this.hostId;
4143
4143
  }
4144
- if (typeof this.meetingTypeId !== 'undefined') {
4145
- toReturn['meetingTypeId'] = this.meetingTypeId;
4144
+ if (typeof this.timeSpan !== 'undefined' && this.timeSpan !== null) {
4145
+ toReturn['timeSpan'] = 'toApiJson' in this.timeSpan ? this.timeSpan.toApiJson() : this.timeSpan;
4146
4146
  }
4147
4147
  return toReturn;
4148
4148
  }
@@ -4869,6 +4869,9 @@ class ListAttendeesRequest {
4869
4869
  if (typeof this.pagingOptions !== 'undefined' && this.pagingOptions !== null) {
4870
4870
  toReturn['pagingOptions'] = 'toApiJson' in this.pagingOptions ? this.pagingOptions.toApiJson() : this.pagingOptions;
4871
4871
  }
4872
+ if (typeof this.attendeeSearch !== 'undefined') {
4873
+ toReturn['attendeeSearch'] = this.attendeeSearch;
4874
+ }
4872
4875
  return toReturn;
4873
4876
  }
4874
4877
  }
@@ -5408,6 +5411,70 @@ class SessionAttendees {
5408
5411
  return toReturn;
5409
5412
  }
5410
5413
  }
5414
+ class ListAvailableTimeslotsForSessionRequest {
5415
+ static fromProto(proto) {
5416
+ let m = new ListAvailableTimeslotsForSessionRequest();
5417
+ m = Object.assign(m, proto);
5418
+ if (proto.timeSpan) {
5419
+ m.timeSpan = DateRange.fromProto(proto.timeSpan);
5420
+ }
5421
+ if (proto.timeZone) {
5422
+ m.timeZone = TimeZone.fromProto(proto.timeZone);
5423
+ }
5424
+ return m;
5425
+ }
5426
+ constructor(kwargs) {
5427
+ if (!kwargs) {
5428
+ return;
5429
+ }
5430
+ Object.assign(this, kwargs);
5431
+ }
5432
+ toApiJson() {
5433
+ const toReturn = {};
5434
+ if (typeof this.eventTypeId !== 'undefined') {
5435
+ toReturn['eventTypeId'] = this.eventTypeId;
5436
+ }
5437
+ if (typeof this.timeSpan !== 'undefined' && this.timeSpan !== null) {
5438
+ toReturn['timeSpan'] = 'toApiJson' in this.timeSpan ? this.timeSpan.toApiJson() : this.timeSpan;
5439
+ }
5440
+ if (typeof this.timeZone !== 'undefined' && this.timeZone !== null) {
5441
+ toReturn['timeZone'] = 'toApiJson' in this.timeZone ? this.timeZone.toApiJson() : this.timeZone;
5442
+ }
5443
+ if (typeof this.userIds !== 'undefined') {
5444
+ toReturn['userIds'] = this.userIds;
5445
+ }
5446
+ return toReturn;
5447
+ }
5448
+ }
5449
+ class ListAvailableTimeslotsForSessionResponse {
5450
+ static fromProto(proto) {
5451
+ let m = new ListAvailableTimeslotsForSessionResponse();
5452
+ m = Object.assign(m, proto);
5453
+ if (proto.timeSlots) {
5454
+ m.timeSlots = proto.timeSlots.map(DateRange.fromProto);
5455
+ }
5456
+ if (proto.isoTimeSlots) {
5457
+ m.isoTimeSlots = proto.isoTimeSlots.map(IsoDateTimeRange.fromProto);
5458
+ }
5459
+ return m;
5460
+ }
5461
+ constructor(kwargs) {
5462
+ if (!kwargs) {
5463
+ return;
5464
+ }
5465
+ Object.assign(this, kwargs);
5466
+ }
5467
+ toApiJson() {
5468
+ const toReturn = {};
5469
+ if (typeof this.timeSlots !== 'undefined' && this.timeSlots !== null) {
5470
+ toReturn['timeSlots'] = 'toApiJson' in this.timeSlots ? this.timeSlots.toApiJson() : this.timeSlots;
5471
+ }
5472
+ if (typeof this.isoTimeSlots !== 'undefined' && this.isoTimeSlots !== null) {
5473
+ toReturn['isoTimeSlots'] = 'toApiJson' in this.isoTimeSlots ? this.isoTimeSlots.toApiJson() : this.isoTimeSlots;
5474
+ }
5475
+ return toReturn;
5476
+ }
5477
+ }
5411
5478
  class SetGeneralAvailabilityRequest {
5412
5479
  static fromProto(proto) {
5413
5480
  let m = new SetGeneralAvailabilityRequest();
@@ -6431,6 +6498,11 @@ class MeetingHostApiService {
6431
6498
  const request = (r.toApiJson) ? r : new RescheduleMeetingRequest(r);
6432
6499
  return this.http.post(this._host + "/meetings.v1.MeetingHost/RescheduleSession", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
6433
6500
  }
6501
+ listAvailableTimeslotsForSession(r) {
6502
+ const request = (r.toApiJson) ? r : new ListAvailableTimeslotsForSessionRequest(r);
6503
+ return this.http.post(this._host + "/meetings.v1.MeetingHost/ListAvailableTimeslotsForSession", request.toApiJson(), this.apiOptions())
6504
+ .pipe(map(resp => ListAvailableTimeslotsForSessionResponse.fromProto(resp)));
6505
+ }
6434
6506
  }
6435
6507
  MeetingHostApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: MeetingHostApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6436
6508
  MeetingHostApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: MeetingHostApiService, providedIn: 'root' });
@@ -7593,6 +7665,9 @@ class HostService {
7593
7665
  })
7594
7666
  .pipe(mapTo(null));
7595
7667
  }
7668
+ listAvailableTimeslotsForSession(req) {
7669
+ return this.hostAPIService.listAvailableTimeslotsForSession(req).pipe(map(resp => resp.timeSlots ? resp.timeSlots.map(ts => TimeSpanFromApi(ts)) : []));
7670
+ }
7596
7671
  }
7597
7672
  HostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: HostService, deps: [{ token: MeetingHostApiService }], target: i0.ɵɵFactoryTarget.Injectable });
7598
7673
  HostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: HostService, providedIn: "root" });