@vendasta/meetings 1.6.9 → 1.7.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.
Files changed (27) hide show
  1. package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
  2. package/esm2020/lib/_internal/interfaces/meeting-external.interface.mjs +1 -1
  3. package/esm2020/lib/_internal/interfaces/meeting-guest.interface.mjs +1 -1
  4. package/esm2020/lib/_internal/interfaces/meeting-host.interface.mjs +1 -1
  5. package/esm2020/lib/_internal/interfaces/shared.interface.mjs +1 -1
  6. package/esm2020/lib/_internal/meeting-guest.api.service.mjs +11 -2
  7. package/esm2020/lib/_internal/objects/index.mjs +2 -2
  8. package/esm2020/lib/_internal/objects/meeting-external.mjs +2 -2
  9. package/esm2020/lib/_internal/objects/meeting-guest.mjs +202 -6
  10. package/esm2020/lib/_internal/objects/meeting-host.mjs +2 -2
  11. package/esm2020/lib/_internal/objects/shared.mjs +1 -1
  12. package/esm2020/lib/guest/guest.service.mjs +43 -21
  13. package/fesm2015/vendasta-meetings.mjs +247 -20
  14. package/fesm2015/vendasta-meetings.mjs.map +1 -1
  15. package/fesm2020/vendasta-meetings.mjs +247 -20
  16. package/fesm2020/vendasta-meetings.mjs.map +1 -1
  17. package/lib/_internal/interfaces/index.d.ts +1 -1
  18. package/lib/_internal/interfaces/meeting-external.interface.d.ts +1 -1
  19. package/lib/_internal/interfaces/meeting-guest.interface.d.ts +42 -3
  20. package/lib/_internal/interfaces/meeting-host.interface.d.ts +1 -1
  21. package/lib/_internal/meeting-guest.api.service.d.ts +4 -2
  22. package/lib/_internal/objects/index.d.ts +1 -1
  23. package/lib/_internal/objects/meeting-external.d.ts +1 -1
  24. package/lib/_internal/objects/meeting-guest.d.ts +61 -7
  25. package/lib/_internal/objects/meeting-host.d.ts +1 -1
  26. package/lib/guest/guest.service.d.ts +7 -4
  27. package/package.json +1 -1
@@ -3954,6 +3954,29 @@ class BookMeetingResponse {
3954
3954
  return toReturn;
3955
3955
  }
3956
3956
  }
3957
+ class CancelBatchMeetingRequest {
3958
+ static fromProto(proto) {
3959
+ let m = new CancelBatchMeetingRequest();
3960
+ m = Object.assign(m, proto);
3961
+ return m;
3962
+ }
3963
+ constructor(kwargs) {
3964
+ if (!kwargs) {
3965
+ return;
3966
+ }
3967
+ Object.assign(this, kwargs);
3968
+ }
3969
+ toApiJson() {
3970
+ const toReturn = {};
3971
+ if (typeof this.id !== 'undefined') {
3972
+ toReturn['id'] = this.id;
3973
+ }
3974
+ if (typeof this.cancellationReason !== 'undefined') {
3975
+ toReturn['cancellationReason'] = this.cancellationReason;
3976
+ }
3977
+ return toReturn;
3978
+ }
3979
+ }
3957
3980
  class CheckFeatureFlagRequest {
3958
3981
  static fromProto(proto) {
3959
3982
  let m = new CheckFeatureFlagRequest();
@@ -4285,6 +4308,73 @@ class GetServiceResponse {
4285
4308
  return toReturn;
4286
4309
  }
4287
4310
  }
4311
+ class GetServiceV2Request {
4312
+ static fromProto(proto) {
4313
+ let m = new GetServiceV2Request();
4314
+ m = Object.assign(m, proto);
4315
+ return m;
4316
+ }
4317
+ constructor(kwargs) {
4318
+ if (!kwargs) {
4319
+ return;
4320
+ }
4321
+ Object.assign(this, kwargs);
4322
+ }
4323
+ toApiJson() {
4324
+ const toReturn = {};
4325
+ if (typeof this.serviceId !== 'undefined') {
4326
+ toReturn['serviceId'] = this.serviceId;
4327
+ }
4328
+ return toReturn;
4329
+ }
4330
+ }
4331
+ class GetServiceV2Response {
4332
+ static fromProto(proto) {
4333
+ let m = new GetServiceV2Response();
4334
+ m = Object.assign(m, proto);
4335
+ if (proto.groups) {
4336
+ m.groups = proto.groups.map(ServiceGroup.fromProto);
4337
+ }
4338
+ if (proto.eventTypes) {
4339
+ m.eventTypes = proto.eventTypes.map(ServiceEventType.fromProto);
4340
+ }
4341
+ return m;
4342
+ }
4343
+ constructor(kwargs) {
4344
+ if (!kwargs) {
4345
+ return;
4346
+ }
4347
+ Object.assign(this, kwargs);
4348
+ }
4349
+ toApiJson() {
4350
+ const toReturn = {};
4351
+ if (typeof this.id !== 'undefined') {
4352
+ toReturn['id'] = this.id;
4353
+ }
4354
+ if (typeof this.name !== 'undefined') {
4355
+ toReturn['name'] = this.name;
4356
+ }
4357
+ if (typeof this.description !== 'undefined') {
4358
+ toReturn['description'] = this.description;
4359
+ }
4360
+ if (typeof this.groups !== 'undefined' && this.groups !== null) {
4361
+ toReturn['groups'] = 'toApiJson' in this.groups ? this.groups.toApiJson() : this.groups;
4362
+ }
4363
+ if (typeof this.eventTypes !== 'undefined' && this.eventTypes !== null) {
4364
+ toReturn['eventTypes'] = 'toApiJson' in this.eventTypes ? this.eventTypes.toApiJson() : this.eventTypes;
4365
+ }
4366
+ if (typeof this.businessDisplayLogoUrl !== 'undefined') {
4367
+ toReturn['businessDisplayLogoUrl'] = this.businessDisplayLogoUrl;
4368
+ }
4369
+ if (typeof this.bookingUrl !== 'undefined') {
4370
+ toReturn['bookingUrl'] = this.bookingUrl;
4371
+ }
4372
+ if (typeof this.isBatchBookingEnabled !== 'undefined') {
4373
+ toReturn['isBatchBookingEnabled'] = this.isBatchBookingEnabled;
4374
+ }
4375
+ return toReturn;
4376
+ }
4377
+ }
4288
4378
  class GetSessionInviteeMeetingInfoRequest {
4289
4379
  static fromProto(proto) {
4290
4380
  let m = new GetSessionInviteeMeetingInfoRequest();
@@ -4976,9 +5066,9 @@ class ListMeetingTypesResponse {
4976
5066
  return toReturn;
4977
5067
  }
4978
5068
  }
4979
- class BookBatchMeetingRequestMetadataEntry {
5069
+ class BookMeetingRequestMetadataEntry {
4980
5070
  static fromProto(proto) {
4981
- let m = new BookBatchMeetingRequestMetadataEntry();
5071
+ let m = new BookMeetingRequestMetadataEntry();
4982
5072
  m = Object.assign(m, proto);
4983
5073
  return m;
4984
5074
  }
@@ -4999,9 +5089,9 @@ class BookBatchMeetingRequestMetadataEntry {
4999
5089
  return toReturn;
5000
5090
  }
5001
5091
  }
5002
- class BookMeetingRequestMetadataEntry {
5092
+ class BookBatchMeetingRequestMetadataEntry {
5003
5093
  static fromProto(proto) {
5004
- let m = new BookMeetingRequestMetadataEntry();
5094
+ let m = new BookBatchMeetingRequestMetadataEntry();
5005
5095
  m = Object.assign(m, proto);
5006
5096
  return m;
5007
5097
  }
@@ -5060,6 +5150,112 @@ class RegisterSessionRequest {
5060
5150
  return toReturn;
5061
5151
  }
5062
5152
  }
5153
+ class ServiceEventType {
5154
+ static fromProto(proto) {
5155
+ let m = new ServiceEventType();
5156
+ m = Object.assign(m, proto);
5157
+ if (proto.hostUser) {
5158
+ m.hostUser = proto.hostUser.map(HostUser.fromProto);
5159
+ }
5160
+ if (proto.notificationType) {
5161
+ m.notificationType = enumStringToValue$6(NotificationType, proto.notificationType);
5162
+ }
5163
+ if (proto.eventType) {
5164
+ m.eventType = enumStringToValue$6(TeamEventMeetingType, proto.eventType);
5165
+ }
5166
+ if (proto.meetingType) {
5167
+ m.meetingType = enumStringToValue$6(MeetingLocation, proto.meetingType);
5168
+ }
5169
+ if (proto.locationType) {
5170
+ m.locationType = enumStringToValue$6(MeetingLocationType, proto.locationType);
5171
+ }
5172
+ return m;
5173
+ }
5174
+ constructor(kwargs) {
5175
+ if (!kwargs) {
5176
+ return;
5177
+ }
5178
+ Object.assign(this, kwargs);
5179
+ }
5180
+ toApiJson() {
5181
+ const toReturn = {};
5182
+ if (typeof this.id !== 'undefined') {
5183
+ toReturn['id'] = this.id;
5184
+ }
5185
+ if (typeof this.name !== 'undefined') {
5186
+ toReturn['name'] = this.name;
5187
+ }
5188
+ if (typeof this.description !== 'undefined') {
5189
+ toReturn['description'] = this.description;
5190
+ }
5191
+ if (typeof this.hostUser !== 'undefined' && this.hostUser !== null) {
5192
+ toReturn['hostUser'] = 'toApiJson' in this.hostUser ? this.hostUser.toApiJson() : this.hostUser;
5193
+ }
5194
+ if (typeof this.duration !== 'undefined') {
5195
+ toReturn['duration'] = this.duration;
5196
+ }
5197
+ if (typeof this.emailRequired !== 'undefined') {
5198
+ toReturn['emailRequired'] = this.emailRequired;
5199
+ }
5200
+ if (typeof this.smsRequired !== 'undefined') {
5201
+ toReturn['smsRequired'] = this.smsRequired;
5202
+ }
5203
+ if (typeof this.notificationType !== 'undefined') {
5204
+ toReturn['notificationType'] = this.notificationType;
5205
+ }
5206
+ if (typeof this.eventType !== 'undefined') {
5207
+ toReturn['eventType'] = this.eventType;
5208
+ }
5209
+ if (typeof this.meetingType !== 'undefined') {
5210
+ toReturn['meetingType'] = this.meetingType;
5211
+ }
5212
+ if (typeof this.locationType !== 'undefined') {
5213
+ toReturn['locationType'] = this.locationType;
5214
+ }
5215
+ if (typeof this.locationGuideline !== 'undefined') {
5216
+ toReturn['locationGuideline'] = this.locationGuideline;
5217
+ }
5218
+ if (typeof this.location !== 'undefined') {
5219
+ toReturn['location'] = this.location;
5220
+ }
5221
+ return toReturn;
5222
+ }
5223
+ }
5224
+ class ServiceGroup {
5225
+ static fromProto(proto) {
5226
+ let m = new ServiceGroup();
5227
+ m = Object.assign(m, proto);
5228
+ if (proto.eventTypes) {
5229
+ m.eventTypes = proto.eventTypes.map(ServiceEventType.fromProto);
5230
+ }
5231
+ return m;
5232
+ }
5233
+ constructor(kwargs) {
5234
+ if (!kwargs) {
5235
+ return;
5236
+ }
5237
+ Object.assign(this, kwargs);
5238
+ }
5239
+ toApiJson() {
5240
+ const toReturn = {};
5241
+ if (typeof this.id !== 'undefined') {
5242
+ toReturn['id'] = this.id;
5243
+ }
5244
+ if (typeof this.name !== 'undefined') {
5245
+ toReturn['name'] = this.name;
5246
+ }
5247
+ if (typeof this.description !== 'undefined') {
5248
+ toReturn['description'] = this.description;
5249
+ }
5250
+ if (typeof this.eventTypes !== 'undefined' && this.eventTypes !== null) {
5251
+ toReturn['eventTypes'] = 'toApiJson' in this.eventTypes ? this.eventTypes.toApiJson() : this.eventTypes;
5252
+ }
5253
+ if (typeof this.isBatchBookingEnabled !== 'undefined') {
5254
+ toReturn['isBatchBookingEnabled'] = this.isBatchBookingEnabled;
5255
+ }
5256
+ return toReturn;
5257
+ }
5258
+ }
5063
5259
 
5064
5260
  function enumStringToValue$5(enumRef, value) {
5065
5261
  if (typeof value === 'number') {
@@ -9569,6 +9765,15 @@ class MeetingGuestApiService {
9569
9765
  return this.http.post(this._host + "/meetings.v1.MeetingGuest/BookBatchMeeting", request.toApiJson(), this.apiOptions())
9570
9766
  .pipe(map(resp => BookBatchMeetingResponse.fromProto(resp)));
9571
9767
  }
9768
+ cancelBatchMeeting(r) {
9769
+ const request = (r.toApiJson) ? r : new CancelBatchMeetingRequest(r);
9770
+ return this.http.post(this._host + "/meetings.v1.MeetingGuest/CancelBatchMeeting", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
9771
+ }
9772
+ getServiceV2(r) {
9773
+ const request = (r.toApiJson) ? r : new GetServiceV2Request(r);
9774
+ return this.http.post(this._host + "/meetings.v1.MeetingGuest/GetServiceV2", request.toApiJson(), this.apiOptions())
9775
+ .pipe(map(resp => GetServiceV2Response.fromProto(resp)));
9776
+ }
9572
9777
  }
9573
9778
  MeetingGuestApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: MeetingGuestApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
9574
9779
  MeetingGuestApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: MeetingGuestApiService, providedIn: 'root' });
@@ -10102,12 +10307,14 @@ class GuestService {
10102
10307
  this.guestAPIService = guestAPIService;
10103
10308
  }
10104
10309
  getMeetingType(req) {
10105
- return this.guestAPIService.getMeetingType(req).pipe(map(resp => {
10310
+ return this.guestAPIService.getMeetingType(req).pipe(map((resp) => {
10106
10311
  if (!resp || !resp.meetingType) {
10107
10312
  return {};
10108
10313
  }
10109
10314
  return MeetingTypeFromApi({
10110
- environment: onProductionGlobal() ? Environment.PROD : Environment.DEMO,
10315
+ environment: onProductionGlobal()
10316
+ ? Environment.PROD
10317
+ : Environment.DEMO,
10111
10318
  calendarId: req.calendarSlug,
10112
10319
  meetingTypeApi: resp.meetingType,
10113
10320
  metadata: req.metadata,
@@ -10116,13 +10323,15 @@ class GuestService {
10116
10323
  }));
10117
10324
  }
10118
10325
  listMeetingTypes(req) {
10119
- return this.guestAPIService.listMeetingTypes(req).pipe(map(resp => {
10326
+ return this.guestAPIService.listMeetingTypes(req).pipe(map((resp) => {
10120
10327
  if (!resp || !resp.meetingTypes) {
10121
10328
  return [];
10122
10329
  }
10123
- return resp.meetingTypes.map(mt => {
10330
+ return resp.meetingTypes.map((mt) => {
10124
10331
  return MeetingTypeFromApi({
10125
- environment: onProductionGlobal() ? Environment.PROD : Environment.DEMO,
10332
+ environment: onProductionGlobal()
10333
+ ? Environment.PROD
10334
+ : Environment.DEMO,
10126
10335
  calendarId: req.hostId,
10127
10336
  meetingTypeApi: mt,
10128
10337
  metadata: req.metadata,
@@ -10132,7 +10341,9 @@ class GuestService {
10132
10341
  }));
10133
10342
  }
10134
10343
  listAvailableTimeSlots(req) {
10135
- return this.guestAPIService.listAvailableTimeSlots(req).pipe(map(resp => resp.timeSlots ? resp.timeSlots.map(ts => TimeSpanFromApi(ts)) : []));
10344
+ return this.guestAPIService
10345
+ .listAvailableTimeSlots(req)
10346
+ .pipe(map((resp) => resp.timeSlots ? resp.timeSlots.map((ts) => TimeSpanFromApi(ts)) : []));
10136
10347
  }
10137
10348
  bookMeeting(req) {
10138
10349
  return this.guestAPIService.bookMeeting(Object.assign(Object.assign({}, req), { attendees: req.attendees, formAnswers: answersToAPI(req.formAnswers) }));
@@ -10145,16 +10356,23 @@ class GuestService {
10145
10356
  }
10146
10357
  // getHost returns an individual host by their hostId
10147
10358
  getHost(req) {
10148
- return this.guestAPIService.getHost(req).pipe(map(resp => HostFromApi(resp.host)));
10359
+ return this.guestAPIService
10360
+ .getHost(req)
10361
+ .pipe(map((resp) => HostFromApi(resp.host)));
10149
10362
  }
10150
10363
  // getCalendar returns a Calendar, which may represent an individual host OR a grouping of hosts (I.e., a team)
10151
10364
  getCalendar(req) {
10152
- return this.guestAPIService.getCalendar(req).pipe(map(resp => CalendarFromApi(resp.calendar)));
10365
+ return this.guestAPIService
10366
+ .getCalendar(req)
10367
+ .pipe(map((resp) => CalendarFromApi(resp.calendar)));
10153
10368
  }
10154
10369
  getBookedMeetingInfo(meetingId, authToken) {
10155
- return this.guestAPIService.getGuestBookedMeeting({
10156
- meetingId: meetingId, authToken: authToken,
10157
- }).pipe(map(resp => ({
10370
+ return this.guestAPIService
10371
+ .getGuestBookedMeeting({
10372
+ meetingId: meetingId,
10373
+ authToken: authToken,
10374
+ })
10375
+ .pipe(map((resp) => ({
10158
10376
  start: resp.startTime,
10159
10377
  end: resp.endTime,
10160
10378
  timeZone: resp.timeZone,
@@ -10171,7 +10389,9 @@ class GuestService {
10171
10389
  return this.guestAPIService.getGuestBookedMeetingV2(req);
10172
10390
  }
10173
10391
  isHostConfigured(req) {
10174
- return this.guestAPIService.isHostConfigured(req).pipe(map((resp) => resp.isConfigured));
10392
+ return this.guestAPIService
10393
+ .isHostConfigured(req)
10394
+ .pipe(map((resp) => resp.isConfigured));
10175
10395
  }
10176
10396
  getGroup(req) {
10177
10397
  return this.guestAPIService.getGroup(req);
@@ -10183,13 +10403,17 @@ class GuestService {
10183
10403
  return this.guestAPIService.getSessionMeetingInfo(req);
10184
10404
  }
10185
10405
  inviteeRegisterSessionMeeting(req) {
10186
- return this.guestAPIService.inviteeRegisterSessionMeeting(req).pipe(mapTo(null));
10406
+ return this.guestAPIService
10407
+ .inviteeRegisterSessionMeeting(req)
10408
+ .pipe(mapTo(null));
10187
10409
  }
10188
10410
  getSessionInviteeMeetingInfo(req) {
10189
10411
  return this.guestAPIService.getSessionInviteeMeetingInfo(req);
10190
10412
  }
10191
10413
  inviteeDeregisterSessionMeeting(req) {
10192
- return this.guestAPIService.inviteeDeregisterSessionMeeting(req).pipe(mapTo(null));
10414
+ return this.guestAPIService
10415
+ .inviteeDeregisterSessionMeeting(req)
10416
+ .pipe(mapTo(null));
10193
10417
  }
10194
10418
  getMeetingCalendarInfo(req) {
10195
10419
  return this.guestAPIService.getMeetingCalendarInfo(req);
@@ -10197,12 +10421,15 @@ class GuestService {
10197
10421
  checkFeatureFlag(req) {
10198
10422
  return this.guestAPIService.checkFeatureFlag(req);
10199
10423
  }
10424
+ getServiceV2(req) {
10425
+ return this.guestAPIService.getServiceV2(req);
10426
+ }
10200
10427
  }
10201
10428
  GuestService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: GuestService, deps: [{ token: MeetingGuestApiService }], target: i0.ɵɵFactoryTarget.Injectable });
10202
- GuestService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: GuestService, providedIn: 'root' });
10429
+ GuestService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: GuestService, providedIn: "root" });
10203
10430
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: GuestService, decorators: [{
10204
10431
  type: Injectable,
10205
- args: [{ providedIn: 'root' }]
10432
+ args: [{ providedIn: "root" }]
10206
10433
  }], ctorParameters: function () { return [{ type: MeetingGuestApiService }]; } });
10207
10434
 
10208
10435
  class HostService {