@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') {
@@ -9278,6 +9474,15 @@ class MeetingGuestApiService {
9278
9474
  return this.http.post(this._host + "/meetings.v1.MeetingGuest/BookBatchMeeting", request.toApiJson(), this.apiOptions())
9279
9475
  .pipe(map(resp => BookBatchMeetingResponse.fromProto(resp)));
9280
9476
  }
9477
+ cancelBatchMeeting(r) {
9478
+ const request = (r.toApiJson) ? r : new CancelBatchMeetingRequest(r);
9479
+ return this.http.post(this._host + "/meetings.v1.MeetingGuest/CancelBatchMeeting", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
9480
+ }
9481
+ getServiceV2(r) {
9482
+ const request = (r.toApiJson) ? r : new GetServiceV2Request(r);
9483
+ return this.http.post(this._host + "/meetings.v1.MeetingGuest/GetServiceV2", request.toApiJson(), this.apiOptions())
9484
+ .pipe(map(resp => GetServiceV2Response.fromProto(resp)));
9485
+ }
9281
9486
  }
9282
9487
  MeetingGuestApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: MeetingGuestApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
9283
9488
  MeetingGuestApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: MeetingGuestApiService, providedIn: 'root' });
@@ -10107,12 +10312,14 @@ class GuestService {
10107
10312
  this.guestAPIService = guestAPIService;
10108
10313
  }
10109
10314
  getMeetingType(req) {
10110
- return this.guestAPIService.getMeetingType(req).pipe(map(resp => {
10315
+ return this.guestAPIService.getMeetingType(req).pipe(map((resp) => {
10111
10316
  if (!resp || !resp.meetingType) {
10112
10317
  return {};
10113
10318
  }
10114
10319
  return MeetingTypeFromApi({
10115
- environment: onProductionGlobal() ? Environment.PROD : Environment.DEMO,
10320
+ environment: onProductionGlobal()
10321
+ ? Environment.PROD
10322
+ : Environment.DEMO,
10116
10323
  calendarId: req.calendarSlug,
10117
10324
  meetingTypeApi: resp.meetingType,
10118
10325
  metadata: req.metadata,
@@ -10121,13 +10328,15 @@ class GuestService {
10121
10328
  }));
10122
10329
  }
10123
10330
  listMeetingTypes(req) {
10124
- return this.guestAPIService.listMeetingTypes(req).pipe(map(resp => {
10331
+ return this.guestAPIService.listMeetingTypes(req).pipe(map((resp) => {
10125
10332
  if (!resp || !resp.meetingTypes) {
10126
10333
  return [];
10127
10334
  }
10128
- return resp.meetingTypes.map(mt => {
10335
+ return resp.meetingTypes.map((mt) => {
10129
10336
  return MeetingTypeFromApi({
10130
- environment: onProductionGlobal() ? Environment.PROD : Environment.DEMO,
10337
+ environment: onProductionGlobal()
10338
+ ? Environment.PROD
10339
+ : Environment.DEMO,
10131
10340
  calendarId: req.hostId,
10132
10341
  meetingTypeApi: mt,
10133
10342
  metadata: req.metadata,
@@ -10137,7 +10346,9 @@ class GuestService {
10137
10346
  }));
10138
10347
  }
10139
10348
  listAvailableTimeSlots(req) {
10140
- return this.guestAPIService.listAvailableTimeSlots(req).pipe(map(resp => resp.timeSlots ? resp.timeSlots.map(ts => TimeSpanFromApi(ts)) : []));
10349
+ return this.guestAPIService
10350
+ .listAvailableTimeSlots(req)
10351
+ .pipe(map((resp) => resp.timeSlots ? resp.timeSlots.map((ts) => TimeSpanFromApi(ts)) : []));
10141
10352
  }
10142
10353
  bookMeeting(req) {
10143
10354
  return this.guestAPIService.bookMeeting({
@@ -10154,16 +10365,23 @@ class GuestService {
10154
10365
  }
10155
10366
  // getHost returns an individual host by their hostId
10156
10367
  getHost(req) {
10157
- return this.guestAPIService.getHost(req).pipe(map(resp => HostFromApi(resp.host)));
10368
+ return this.guestAPIService
10369
+ .getHost(req)
10370
+ .pipe(map((resp) => HostFromApi(resp.host)));
10158
10371
  }
10159
10372
  // getCalendar returns a Calendar, which may represent an individual host OR a grouping of hosts (I.e., a team)
10160
10373
  getCalendar(req) {
10161
- return this.guestAPIService.getCalendar(req).pipe(map(resp => CalendarFromApi(resp.calendar)));
10374
+ return this.guestAPIService
10375
+ .getCalendar(req)
10376
+ .pipe(map((resp) => CalendarFromApi(resp.calendar)));
10162
10377
  }
10163
10378
  getBookedMeetingInfo(meetingId, authToken) {
10164
- return this.guestAPIService.getGuestBookedMeeting({
10165
- meetingId: meetingId, authToken: authToken,
10166
- }).pipe(map(resp => ({
10379
+ return this.guestAPIService
10380
+ .getGuestBookedMeeting({
10381
+ meetingId: meetingId,
10382
+ authToken: authToken,
10383
+ })
10384
+ .pipe(map((resp) => ({
10167
10385
  start: resp.startTime,
10168
10386
  end: resp.endTime,
10169
10387
  timeZone: resp.timeZone,
@@ -10180,7 +10398,9 @@ class GuestService {
10180
10398
  return this.guestAPIService.getGuestBookedMeetingV2(req);
10181
10399
  }
10182
10400
  isHostConfigured(req) {
10183
- return this.guestAPIService.isHostConfigured(req).pipe(map((resp) => resp.isConfigured));
10401
+ return this.guestAPIService
10402
+ .isHostConfigured(req)
10403
+ .pipe(map((resp) => resp.isConfigured));
10184
10404
  }
10185
10405
  getGroup(req) {
10186
10406
  return this.guestAPIService.getGroup(req);
@@ -10192,13 +10412,17 @@ class GuestService {
10192
10412
  return this.guestAPIService.getSessionMeetingInfo(req);
10193
10413
  }
10194
10414
  inviteeRegisterSessionMeeting(req) {
10195
- return this.guestAPIService.inviteeRegisterSessionMeeting(req).pipe(mapTo(null));
10415
+ return this.guestAPIService
10416
+ .inviteeRegisterSessionMeeting(req)
10417
+ .pipe(mapTo(null));
10196
10418
  }
10197
10419
  getSessionInviteeMeetingInfo(req) {
10198
10420
  return this.guestAPIService.getSessionInviteeMeetingInfo(req);
10199
10421
  }
10200
10422
  inviteeDeregisterSessionMeeting(req) {
10201
- return this.guestAPIService.inviteeDeregisterSessionMeeting(req).pipe(mapTo(null));
10423
+ return this.guestAPIService
10424
+ .inviteeDeregisterSessionMeeting(req)
10425
+ .pipe(mapTo(null));
10202
10426
  }
10203
10427
  getMeetingCalendarInfo(req) {
10204
10428
  return this.guestAPIService.getMeetingCalendarInfo(req);
@@ -10206,12 +10430,15 @@ class GuestService {
10206
10430
  checkFeatureFlag(req) {
10207
10431
  return this.guestAPIService.checkFeatureFlag(req);
10208
10432
  }
10433
+ getServiceV2(req) {
10434
+ return this.guestAPIService.getServiceV2(req);
10435
+ }
10209
10436
  }
10210
10437
  GuestService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: GuestService, deps: [{ token: MeetingGuestApiService }], target: i0.ɵɵFactoryTarget.Injectable });
10211
- GuestService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: GuestService, providedIn: 'root' });
10438
+ GuestService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: GuestService, providedIn: "root" });
10212
10439
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: GuestService, decorators: [{
10213
10440
  type: Injectable,
10214
- args: [{ providedIn: 'root' }]
10441
+ args: [{ providedIn: "root" }]
10215
10442
  }], ctorParameters: function () { return [{ type: MeetingGuestApiService }]; } });
10216
10443
 
10217
10444
  class HostService {