@vendasta/meetings 1.15.0 → 1.15.1

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.
@@ -5214,6 +5214,38 @@ class ListAvailableTimeSlotsResponse {
5214
5214
  return toReturn;
5215
5215
  }
5216
5216
  }
5217
+ class ListBatchAvailableTimeSlotsForRescheduleRequest {
5218
+ static fromProto(proto) {
5219
+ let m = new ListBatchAvailableTimeSlotsForRescheduleRequest();
5220
+ m = Object.assign(m, proto);
5221
+ if (proto.timeSpan) {
5222
+ m.timeSpan = DateRange.fromProto(proto.timeSpan);
5223
+ }
5224
+ if (proto.timeZone) {
5225
+ m.timeZone = TimeZone.fromProto(proto.timeZone);
5226
+ }
5227
+ return m;
5228
+ }
5229
+ constructor(kwargs) {
5230
+ if (!kwargs) {
5231
+ return;
5232
+ }
5233
+ Object.assign(this, kwargs);
5234
+ }
5235
+ toApiJson() {
5236
+ const toReturn = {};
5237
+ if (typeof this.id !== 'undefined') {
5238
+ toReturn['id'] = this.id;
5239
+ }
5240
+ if (typeof this.timeSpan !== 'undefined' && this.timeSpan !== null) {
5241
+ toReturn['timeSpan'] = 'toApiJson' in this.timeSpan ? this.timeSpan.toApiJson() : this.timeSpan;
5242
+ }
5243
+ if (typeof this.timeZone !== 'undefined' && this.timeZone !== null) {
5244
+ toReturn['timeZone'] = 'toApiJson' in this.timeZone ? this.timeZone.toApiJson() : this.timeZone;
5245
+ }
5246
+ return toReturn;
5247
+ }
5248
+ }
5217
5249
  class ListBatchAvailableTimeSlotsRequest {
5218
5250
  static fromProto(proto) {
5219
5251
  let m = new ListBatchAvailableTimeSlotsRequest();
@@ -5551,9 +5583,9 @@ class MeetingSummary {
5551
5583
  return toReturn;
5552
5584
  }
5553
5585
  }
5554
- class BookMeetingRequestMetadataEntry {
5586
+ class BookBatchMeetingRequestMetadataEntry {
5555
5587
  static fromProto(proto) {
5556
- let m = new BookMeetingRequestMetadataEntry();
5588
+ let m = new BookBatchMeetingRequestMetadataEntry();
5557
5589
  m = Object.assign(m, proto);
5558
5590
  return m;
5559
5591
  }
@@ -5574,9 +5606,9 @@ class BookMeetingRequestMetadataEntry {
5574
5606
  return toReturn;
5575
5607
  }
5576
5608
  }
5577
- class BookBatchMeetingRequestMetadataEntry {
5609
+ class BookMeetingRequestMetadataEntry {
5578
5610
  static fromProto(proto) {
5579
- let m = new BookBatchMeetingRequestMetadataEntry();
5611
+ let m = new BookMeetingRequestMetadataEntry();
5580
5612
  m = Object.assign(m, proto);
5581
5613
  return m;
5582
5614
  }
@@ -6541,9 +6573,9 @@ class IsCalendarConfiguredRequestApplicationContextPropertiesEntry {
6541
6573
  return toReturn;
6542
6574
  }
6543
6575
  }
6544
- class BuildHostIdRequestApplicationContextPropertiesEntry {
6576
+ class EnsurePersonalCalendarExistsRequestApplicationContextPropertiesEntry {
6545
6577
  static fromProto(proto) {
6546
- let m = new BuildHostIdRequestApplicationContextPropertiesEntry();
6578
+ let m = new EnsurePersonalCalendarExistsRequestApplicationContextPropertiesEntry();
6547
6579
  m = Object.assign(m, proto);
6548
6580
  return m;
6549
6581
  }
@@ -6564,9 +6596,9 @@ class BuildHostIdRequestApplicationContextPropertiesEntry {
6564
6596
  return toReturn;
6565
6597
  }
6566
6598
  }
6567
- class EnsurePersonalCalendarExistsRequestApplicationContextPropertiesEntry {
6599
+ class BuildHostIdRequestApplicationContextPropertiesEntry {
6568
6600
  static fromProto(proto) {
6569
- let m = new EnsurePersonalCalendarExistsRequestApplicationContextPropertiesEntry();
6601
+ let m = new BuildHostIdRequestApplicationContextPropertiesEntry();
6570
6602
  m = Object.assign(m, proto);
6571
6603
  return m;
6572
6604
  }
@@ -7493,13 +7525,10 @@ class EventTypeSummary {
7493
7525
  return toReturn;
7494
7526
  }
7495
7527
  }
7496
- class ListBookedMeetingsRequestFilters {
7528
+ class ListAvailabilityRequestFilters {
7497
7529
  static fromProto(proto) {
7498
- let m = new ListBookedMeetingsRequestFilters();
7530
+ let m = new ListAvailabilityRequestFilters();
7499
7531
  m = Object.assign(m, proto);
7500
- if (proto.timeSpan) {
7501
- m.timeSpan = DateRange.fromProto(proto.timeSpan);
7502
- }
7503
7532
  return m;
7504
7533
  }
7505
7534
  constructor(kwargs) {
@@ -7510,25 +7539,22 @@ class ListBookedMeetingsRequestFilters {
7510
7539
  }
7511
7540
  toApiJson() {
7512
7541
  const toReturn = {};
7513
- if (typeof this.meetingTypeIds !== 'undefined') {
7514
- toReturn['meetingTypeIds'] = this.meetingTypeIds;
7515
- }
7516
7542
  if (typeof this.hostId !== 'undefined') {
7517
7543
  toReturn['hostId'] = this.hostId;
7518
7544
  }
7519
- if (typeof this.timeSpan !== 'undefined' && this.timeSpan !== null) {
7520
- toReturn['timeSpan'] = 'toApiJson' in this.timeSpan ? this.timeSpan.toApiJson() : this.timeSpan;
7521
- }
7522
- if (typeof this.userIds !== 'undefined') {
7523
- toReturn['userIds'] = this.userIds;
7545
+ if (typeof this.meetingTypeId !== 'undefined') {
7546
+ toReturn['meetingTypeId'] = this.meetingTypeId;
7524
7547
  }
7525
7548
  return toReturn;
7526
7549
  }
7527
7550
  }
7528
- class ListAvailabilityRequestFilters {
7551
+ class ListBookedMeetingsRequestFilters {
7529
7552
  static fromProto(proto) {
7530
- let m = new ListAvailabilityRequestFilters();
7553
+ let m = new ListBookedMeetingsRequestFilters();
7531
7554
  m = Object.assign(m, proto);
7555
+ if (proto.timeSpan) {
7556
+ m.timeSpan = DateRange.fromProto(proto.timeSpan);
7557
+ }
7532
7558
  return m;
7533
7559
  }
7534
7560
  constructor(kwargs) {
@@ -7539,11 +7565,17 @@ class ListAvailabilityRequestFilters {
7539
7565
  }
7540
7566
  toApiJson() {
7541
7567
  const toReturn = {};
7568
+ if (typeof this.meetingTypeIds !== 'undefined') {
7569
+ toReturn['meetingTypeIds'] = this.meetingTypeIds;
7570
+ }
7542
7571
  if (typeof this.hostId !== 'undefined') {
7543
7572
  toReturn['hostId'] = this.hostId;
7544
7573
  }
7545
- if (typeof this.meetingTypeId !== 'undefined') {
7546
- toReturn['meetingTypeId'] = this.meetingTypeId;
7574
+ if (typeof this.timeSpan !== 'undefined' && this.timeSpan !== null) {
7575
+ toReturn['timeSpan'] = 'toApiJson' in this.timeSpan ? this.timeSpan.toApiJson() : this.timeSpan;
7576
+ }
7577
+ if (typeof this.userIds !== 'undefined') {
7578
+ toReturn['userIds'] = this.userIds;
7547
7579
  }
7548
7580
  return toReturn;
7549
7581
  }
@@ -8361,6 +8393,38 @@ class HostGetMeetingTypeResponse {
8361
8393
  return toReturn;
8362
8394
  }
8363
8395
  }
8396
+ class HostListBatchAvailableTimeSlotsForRescheduleRequest {
8397
+ static fromProto(proto) {
8398
+ let m = new HostListBatchAvailableTimeSlotsForRescheduleRequest();
8399
+ m = Object.assign(m, proto);
8400
+ if (proto.timeSpan) {
8401
+ m.timeSpan = DateRange.fromProto(proto.timeSpan);
8402
+ }
8403
+ if (proto.timeZone) {
8404
+ m.timeZone = TimeZone.fromProto(proto.timeZone);
8405
+ }
8406
+ return m;
8407
+ }
8408
+ constructor(kwargs) {
8409
+ if (!kwargs) {
8410
+ return;
8411
+ }
8412
+ Object.assign(this, kwargs);
8413
+ }
8414
+ toApiJson() {
8415
+ const toReturn = {};
8416
+ if (typeof this.id !== 'undefined') {
8417
+ toReturn['id'] = this.id;
8418
+ }
8419
+ if (typeof this.timeSpan !== 'undefined' && this.timeSpan !== null) {
8420
+ toReturn['timeSpan'] = 'toApiJson' in this.timeSpan ? this.timeSpan.toApiJson() : this.timeSpan;
8421
+ }
8422
+ if (typeof this.timeZone !== 'undefined' && this.timeZone !== null) {
8423
+ toReturn['timeZone'] = 'toApiJson' in this.timeZone ? this.timeZone.toApiJson() : this.timeZone;
8424
+ }
8425
+ return toReturn;
8426
+ }
8427
+ }
8364
8428
  class HostListBatchAvailableTimeSlotsRequest {
8365
8429
  static fromProto(proto) {
8366
8430
  let m = new HostListBatchAvailableTimeSlotsRequest();
@@ -8396,6 +8460,9 @@ class HostListBatchAvailableTimeSlotsRequest {
8396
8460
  if (typeof this.timeZone !== 'undefined' && this.timeZone !== null) {
8397
8461
  toReturn['timeZone'] = 'toApiJson' in this.timeZone ? this.timeZone.toApiJson() : this.timeZone;
8398
8462
  }
8463
+ if (typeof this.namespace !== 'undefined') {
8464
+ toReturn['namespace'] = this.namespace;
8465
+ }
8399
8466
  return toReturn;
8400
8467
  }
8401
8468
  }
@@ -9363,9 +9430,9 @@ class MeetingTypeList {
9363
9430
  return toReturn;
9364
9431
  }
9365
9432
  }
9366
- class HostBookBatchMeetingRequestMetadataEntry {
9433
+ class UpdateMeetingMetadataRequestMetadataEntry {
9367
9434
  static fromProto(proto) {
9368
- let m = new HostBookBatchMeetingRequestMetadataEntry();
9435
+ let m = new UpdateMeetingMetadataRequestMetadataEntry();
9369
9436
  m = Object.assign(m, proto);
9370
9437
  return m;
9371
9438
  }
@@ -9386,9 +9453,9 @@ class HostBookBatchMeetingRequestMetadataEntry {
9386
9453
  return toReturn;
9387
9454
  }
9388
9455
  }
9389
- class MeetingMetadataEntry {
9456
+ class HostBookBatchMeetingRequestMetadataEntry {
9390
9457
  static fromProto(proto) {
9391
- let m = new MeetingMetadataEntry();
9458
+ let m = new HostBookBatchMeetingRequestMetadataEntry();
9392
9459
  m = Object.assign(m, proto);
9393
9460
  return m;
9394
9461
  }
@@ -9409,9 +9476,9 @@ class MeetingMetadataEntry {
9409
9476
  return toReturn;
9410
9477
  }
9411
9478
  }
9412
- class UpdateMeetingMetadataRequestMetadataEntry {
9479
+ class MeetingMetadataEntry {
9413
9480
  static fromProto(proto) {
9414
- let m = new UpdateMeetingMetadataRequestMetadataEntry();
9481
+ let m = new MeetingMetadataEntry();
9415
9482
  m = Object.assign(m, proto);
9416
9483
  return m;
9417
9484
  }
@@ -10562,6 +10629,11 @@ class MeetingGuestApiService {
10562
10629
  return this.http.post(this._host + "/meetings.v1.MeetingGuest/ListBatchAvailableTimeSlots", request.toApiJson(), this.apiOptions())
10563
10630
  .pipe(map(resp => ListBatchAvailableTimeSlotsResponse.fromProto(resp)));
10564
10631
  }
10632
+ listBatchAvailableTimeSlotsForReschedule(r) {
10633
+ const request = (r.toApiJson) ? r : new ListBatchAvailableTimeSlotsForRescheduleRequest(r);
10634
+ return this.http.post(this._host + "/meetings.v1.MeetingGuest/ListBatchAvailableTimeSlotsForReschedule", request.toApiJson(), this.apiOptions())
10635
+ .pipe(map(resp => ListBatchAvailableTimeSlotsResponse.fromProto(resp)));
10636
+ }
10565
10637
  bookBatchMeeting(r) {
10566
10638
  const request = (r.toApiJson) ? r : new BookBatchMeetingRequest(r);
10567
10639
  return this.http.post(this._host + "/meetings.v1.MeetingGuest/BookBatchMeeting", request.toApiJson(), this.apiOptions())
@@ -10758,6 +10830,11 @@ class MeetingHostApiService {
10758
10830
  return this.http.post(this._host + "/meetings.v1.MeetingHost/HostListBatchAvailableTimeSlots", request.toApiJson(), this.apiOptions())
10759
10831
  .pipe(map(resp => HostListBatchAvailableTimeSlotsResponse.fromProto(resp)));
10760
10832
  }
10833
+ hostListBatchAvailableTimeSlotsForReschedule(r) {
10834
+ const request = (r.toApiJson) ? r : new HostListBatchAvailableTimeSlotsForRescheduleRequest(r);
10835
+ return this.http.post(this._host + "/meetings.v1.MeetingHost/HostListBatchAvailableTimeSlotsForReschedule", request.toApiJson(), this.apiOptions())
10836
+ .pipe(map(resp => HostListBatchAvailableTimeSlotsResponse.fromProto(resp)));
10837
+ }
10761
10838
  getMeetingType(r) {
10762
10839
  const request = (r.toApiJson) ? r : new HostGetMeetingTypeRequest(r);
10763
10840
  return this.http.post(this._host + "/meetings.v1.MeetingHost/GetMeetingType", request.toApiJson(), this.apiOptions())
@@ -11603,6 +11680,23 @@ class GuestService {
11603
11680
  return [];
11604
11681
  }));
11605
11682
  }
11683
+ // listBatchAvailableTimeSlotsForReschedule returns valid chain start times for rescheduling an
11684
+ // existing meeting or booking group (id is a meeting_id or BG- group id). Config is resolved from
11685
+ // the booked record(s) rather than the current event-type settings.
11686
+ listBatchAvailableTimeSlotsForReschedule(req) {
11687
+ return this.guestAPIService.listBatchAvailableTimeSlotsForReschedule(req).pipe(map((resp) => {
11688
+ if (resp.timeSlots?.length) {
11689
+ return resp.timeSlots.map((ts) => TimeSpanFromApi(ts));
11690
+ }
11691
+ if (resp.isoTimeSlots?.length) {
11692
+ return resp.isoTimeSlots.map((iso) => ({
11693
+ start: new Date(iso.start),
11694
+ end: new Date(iso.end),
11695
+ }));
11696
+ }
11697
+ return [];
11698
+ }));
11699
+ }
11606
11700
  bookBatchMeeting(req) {
11607
11701
  return this.guestAPIService.bookBatchMeeting({
11608
11702
  ...req,
@@ -12026,6 +12120,22 @@ class HostService {
12026
12120
  return [];
12027
12121
  }));
12028
12122
  }
12123
+ // hostListBatchAvailableTimeSlotsForReschedule returns valid chain start times for rescheduling
12124
+ // an existing meeting or booking group (id is a meeting_id or BG- group id). Config is resolved
12125
+ // from the booked record(s) rather than the current event-type settings.
12126
+ hostListBatchAvailableTimeSlotsForReschedule(req) {
12127
+ return this.hostAPIService
12128
+ .hostListBatchAvailableTimeSlotsForReschedule(req)
12129
+ .pipe(map((resp) => {
12130
+ if (resp.isoTimeSlots?.length) {
12131
+ return resp.isoTimeSlots.map((iso) => ({
12132
+ start: new Date(iso.start),
12133
+ end: new Date(iso.end),
12134
+ }));
12135
+ }
12136
+ return [];
12137
+ }));
12138
+ }
12029
12139
  // createDefaultMeetingTypes will create what Meeting Scheduler deems to be the default meeting types.
12030
12140
  // If the calendar already has meeting types, this is guaranteed to be a no-op.
12031
12141
  createDefaultMeetingTypes(req) {