@vendasta/meetings 1.6.9 → 1.6.10

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 +7 -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 +175 -2
  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 +216 -16
  14. package/fesm2015/vendasta-meetings.mjs.map +1 -1
  15. package/fesm2020/vendasta-meetings.mjs +216 -16
  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 +36 -1
  20. package/lib/_internal/interfaces/meeting-host.interface.d.ts +1 -1
  21. package/lib/_internal/meeting-guest.api.service.d.ts +3 -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 +48 -1
  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
@@ -4285,6 +4285,73 @@ class GetServiceResponse {
4285
4285
  return toReturn;
4286
4286
  }
4287
4287
  }
4288
+ class GetServiceV2Request {
4289
+ static fromProto(proto) {
4290
+ let m = new GetServiceV2Request();
4291
+ m = Object.assign(m, proto);
4292
+ return m;
4293
+ }
4294
+ constructor(kwargs) {
4295
+ if (!kwargs) {
4296
+ return;
4297
+ }
4298
+ Object.assign(this, kwargs);
4299
+ }
4300
+ toApiJson() {
4301
+ const toReturn = {};
4302
+ if (typeof this.serviceId !== 'undefined') {
4303
+ toReturn['serviceId'] = this.serviceId;
4304
+ }
4305
+ return toReturn;
4306
+ }
4307
+ }
4308
+ class GetServiceV2Response {
4309
+ static fromProto(proto) {
4310
+ let m = new GetServiceV2Response();
4311
+ m = Object.assign(m, proto);
4312
+ if (proto.groups) {
4313
+ m.groups = proto.groups.map(ServiceGroup.fromProto);
4314
+ }
4315
+ if (proto.eventTypes) {
4316
+ m.eventTypes = proto.eventTypes.map(ServiceEventType.fromProto);
4317
+ }
4318
+ return m;
4319
+ }
4320
+ constructor(kwargs) {
4321
+ if (!kwargs) {
4322
+ return;
4323
+ }
4324
+ Object.assign(this, kwargs);
4325
+ }
4326
+ toApiJson() {
4327
+ const toReturn = {};
4328
+ if (typeof this.id !== 'undefined') {
4329
+ toReturn['id'] = this.id;
4330
+ }
4331
+ if (typeof this.name !== 'undefined') {
4332
+ toReturn['name'] = this.name;
4333
+ }
4334
+ if (typeof this.description !== 'undefined') {
4335
+ toReturn['description'] = this.description;
4336
+ }
4337
+ if (typeof this.groups !== 'undefined' && this.groups !== null) {
4338
+ toReturn['groups'] = 'toApiJson' in this.groups ? this.groups.toApiJson() : this.groups;
4339
+ }
4340
+ if (typeof this.eventTypes !== 'undefined' && this.eventTypes !== null) {
4341
+ toReturn['eventTypes'] = 'toApiJson' in this.eventTypes ? this.eventTypes.toApiJson() : this.eventTypes;
4342
+ }
4343
+ if (typeof this.businessDisplayLogoUrl !== 'undefined') {
4344
+ toReturn['businessDisplayLogoUrl'] = this.businessDisplayLogoUrl;
4345
+ }
4346
+ if (typeof this.bookingUrl !== 'undefined') {
4347
+ toReturn['bookingUrl'] = this.bookingUrl;
4348
+ }
4349
+ if (typeof this.isBatchBookingEnabled !== 'undefined') {
4350
+ toReturn['isBatchBookingEnabled'] = this.isBatchBookingEnabled;
4351
+ }
4352
+ return toReturn;
4353
+ }
4354
+ }
4288
4355
  class GetSessionInviteeMeetingInfoRequest {
4289
4356
  static fromProto(proto) {
4290
4357
  let m = new GetSessionInviteeMeetingInfoRequest();
@@ -5060,6 +5127,112 @@ class RegisterSessionRequest {
5060
5127
  return toReturn;
5061
5128
  }
5062
5129
  }
5130
+ class ServiceEventType {
5131
+ static fromProto(proto) {
5132
+ let m = new ServiceEventType();
5133
+ m = Object.assign(m, proto);
5134
+ if (proto.hostUser) {
5135
+ m.hostUser = proto.hostUser.map(HostUser.fromProto);
5136
+ }
5137
+ if (proto.notificationType) {
5138
+ m.notificationType = enumStringToValue$6(NotificationType, proto.notificationType);
5139
+ }
5140
+ if (proto.eventType) {
5141
+ m.eventType = enumStringToValue$6(TeamEventMeetingType, proto.eventType);
5142
+ }
5143
+ if (proto.meetingType) {
5144
+ m.meetingType = enumStringToValue$6(MeetingLocation, proto.meetingType);
5145
+ }
5146
+ if (proto.locationType) {
5147
+ m.locationType = enumStringToValue$6(MeetingLocationType, proto.locationType);
5148
+ }
5149
+ return m;
5150
+ }
5151
+ constructor(kwargs) {
5152
+ if (!kwargs) {
5153
+ return;
5154
+ }
5155
+ Object.assign(this, kwargs);
5156
+ }
5157
+ toApiJson() {
5158
+ const toReturn = {};
5159
+ if (typeof this.id !== 'undefined') {
5160
+ toReturn['id'] = this.id;
5161
+ }
5162
+ if (typeof this.name !== 'undefined') {
5163
+ toReturn['name'] = this.name;
5164
+ }
5165
+ if (typeof this.description !== 'undefined') {
5166
+ toReturn['description'] = this.description;
5167
+ }
5168
+ if (typeof this.hostUser !== 'undefined' && this.hostUser !== null) {
5169
+ toReturn['hostUser'] = 'toApiJson' in this.hostUser ? this.hostUser.toApiJson() : this.hostUser;
5170
+ }
5171
+ if (typeof this.duration !== 'undefined') {
5172
+ toReturn['duration'] = this.duration;
5173
+ }
5174
+ if (typeof this.emailRequired !== 'undefined') {
5175
+ toReturn['emailRequired'] = this.emailRequired;
5176
+ }
5177
+ if (typeof this.smsRequired !== 'undefined') {
5178
+ toReturn['smsRequired'] = this.smsRequired;
5179
+ }
5180
+ if (typeof this.notificationType !== 'undefined') {
5181
+ toReturn['notificationType'] = this.notificationType;
5182
+ }
5183
+ if (typeof this.eventType !== 'undefined') {
5184
+ toReturn['eventType'] = this.eventType;
5185
+ }
5186
+ if (typeof this.meetingType !== 'undefined') {
5187
+ toReturn['meetingType'] = this.meetingType;
5188
+ }
5189
+ if (typeof this.locationType !== 'undefined') {
5190
+ toReturn['locationType'] = this.locationType;
5191
+ }
5192
+ if (typeof this.locationGuideline !== 'undefined') {
5193
+ toReturn['locationGuideline'] = this.locationGuideline;
5194
+ }
5195
+ if (typeof this.location !== 'undefined') {
5196
+ toReturn['location'] = this.location;
5197
+ }
5198
+ return toReturn;
5199
+ }
5200
+ }
5201
+ class ServiceGroup {
5202
+ static fromProto(proto) {
5203
+ let m = new ServiceGroup();
5204
+ m = Object.assign(m, proto);
5205
+ if (proto.eventTypes) {
5206
+ m.eventTypes = proto.eventTypes.map(ServiceEventType.fromProto);
5207
+ }
5208
+ return m;
5209
+ }
5210
+ constructor(kwargs) {
5211
+ if (!kwargs) {
5212
+ return;
5213
+ }
5214
+ Object.assign(this, kwargs);
5215
+ }
5216
+ toApiJson() {
5217
+ const toReturn = {};
5218
+ if (typeof this.id !== 'undefined') {
5219
+ toReturn['id'] = this.id;
5220
+ }
5221
+ if (typeof this.name !== 'undefined') {
5222
+ toReturn['name'] = this.name;
5223
+ }
5224
+ if (typeof this.description !== 'undefined') {
5225
+ toReturn['description'] = this.description;
5226
+ }
5227
+ if (typeof this.eventTypes !== 'undefined' && this.eventTypes !== null) {
5228
+ toReturn['eventTypes'] = 'toApiJson' in this.eventTypes ? this.eventTypes.toApiJson() : this.eventTypes;
5229
+ }
5230
+ if (typeof this.isBatchBookingEnabled !== 'undefined') {
5231
+ toReturn['isBatchBookingEnabled'] = this.isBatchBookingEnabled;
5232
+ }
5233
+ return toReturn;
5234
+ }
5235
+ }
5063
5236
 
5064
5237
  function enumStringToValue$5(enumRef, value) {
5065
5238
  if (typeof value === 'number') {
@@ -9569,6 +9742,11 @@ class MeetingGuestApiService {
9569
9742
  return this.http.post(this._host + "/meetings.v1.MeetingGuest/BookBatchMeeting", request.toApiJson(), this.apiOptions())
9570
9743
  .pipe(map(resp => BookBatchMeetingResponse.fromProto(resp)));
9571
9744
  }
9745
+ getServiceV2(r) {
9746
+ const request = (r.toApiJson) ? r : new GetServiceV2Request(r);
9747
+ return this.http.post(this._host + "/meetings.v1.MeetingGuest/GetServicesV2", request.toApiJson(), this.apiOptions())
9748
+ .pipe(map(resp => GetServiceV2Response.fromProto(resp)));
9749
+ }
9572
9750
  }
9573
9751
  MeetingGuestApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: MeetingGuestApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
9574
9752
  MeetingGuestApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: MeetingGuestApiService, providedIn: 'root' });
@@ -10102,12 +10280,14 @@ class GuestService {
10102
10280
  this.guestAPIService = guestAPIService;
10103
10281
  }
10104
10282
  getMeetingType(req) {
10105
- return this.guestAPIService.getMeetingType(req).pipe(map(resp => {
10283
+ return this.guestAPIService.getMeetingType(req).pipe(map((resp) => {
10106
10284
  if (!resp || !resp.meetingType) {
10107
10285
  return {};
10108
10286
  }
10109
10287
  return MeetingTypeFromApi({
10110
- environment: onProductionGlobal() ? Environment.PROD : Environment.DEMO,
10288
+ environment: onProductionGlobal()
10289
+ ? Environment.PROD
10290
+ : Environment.DEMO,
10111
10291
  calendarId: req.calendarSlug,
10112
10292
  meetingTypeApi: resp.meetingType,
10113
10293
  metadata: req.metadata,
@@ -10116,13 +10296,15 @@ class GuestService {
10116
10296
  }));
10117
10297
  }
10118
10298
  listMeetingTypes(req) {
10119
- return this.guestAPIService.listMeetingTypes(req).pipe(map(resp => {
10299
+ return this.guestAPIService.listMeetingTypes(req).pipe(map((resp) => {
10120
10300
  if (!resp || !resp.meetingTypes) {
10121
10301
  return [];
10122
10302
  }
10123
- return resp.meetingTypes.map(mt => {
10303
+ return resp.meetingTypes.map((mt) => {
10124
10304
  return MeetingTypeFromApi({
10125
- environment: onProductionGlobal() ? Environment.PROD : Environment.DEMO,
10305
+ environment: onProductionGlobal()
10306
+ ? Environment.PROD
10307
+ : Environment.DEMO,
10126
10308
  calendarId: req.hostId,
10127
10309
  meetingTypeApi: mt,
10128
10310
  metadata: req.metadata,
@@ -10132,7 +10314,9 @@ class GuestService {
10132
10314
  }));
10133
10315
  }
10134
10316
  listAvailableTimeSlots(req) {
10135
- return this.guestAPIService.listAvailableTimeSlots(req).pipe(map(resp => resp.timeSlots ? resp.timeSlots.map(ts => TimeSpanFromApi(ts)) : []));
10317
+ return this.guestAPIService
10318
+ .listAvailableTimeSlots(req)
10319
+ .pipe(map((resp) => resp.timeSlots ? resp.timeSlots.map((ts) => TimeSpanFromApi(ts)) : []));
10136
10320
  }
10137
10321
  bookMeeting(req) {
10138
10322
  return this.guestAPIService.bookMeeting(Object.assign(Object.assign({}, req), { attendees: req.attendees, formAnswers: answersToAPI(req.formAnswers) }));
@@ -10145,16 +10329,23 @@ class GuestService {
10145
10329
  }
10146
10330
  // getHost returns an individual host by their hostId
10147
10331
  getHost(req) {
10148
- return this.guestAPIService.getHost(req).pipe(map(resp => HostFromApi(resp.host)));
10332
+ return this.guestAPIService
10333
+ .getHost(req)
10334
+ .pipe(map((resp) => HostFromApi(resp.host)));
10149
10335
  }
10150
10336
  // getCalendar returns a Calendar, which may represent an individual host OR a grouping of hosts (I.e., a team)
10151
10337
  getCalendar(req) {
10152
- return this.guestAPIService.getCalendar(req).pipe(map(resp => CalendarFromApi(resp.calendar)));
10338
+ return this.guestAPIService
10339
+ .getCalendar(req)
10340
+ .pipe(map((resp) => CalendarFromApi(resp.calendar)));
10153
10341
  }
10154
10342
  getBookedMeetingInfo(meetingId, authToken) {
10155
- return this.guestAPIService.getGuestBookedMeeting({
10156
- meetingId: meetingId, authToken: authToken,
10157
- }).pipe(map(resp => ({
10343
+ return this.guestAPIService
10344
+ .getGuestBookedMeeting({
10345
+ meetingId: meetingId,
10346
+ authToken: authToken,
10347
+ })
10348
+ .pipe(map((resp) => ({
10158
10349
  start: resp.startTime,
10159
10350
  end: resp.endTime,
10160
10351
  timeZone: resp.timeZone,
@@ -10171,7 +10362,9 @@ class GuestService {
10171
10362
  return this.guestAPIService.getGuestBookedMeetingV2(req);
10172
10363
  }
10173
10364
  isHostConfigured(req) {
10174
- return this.guestAPIService.isHostConfigured(req).pipe(map((resp) => resp.isConfigured));
10365
+ return this.guestAPIService
10366
+ .isHostConfigured(req)
10367
+ .pipe(map((resp) => resp.isConfigured));
10175
10368
  }
10176
10369
  getGroup(req) {
10177
10370
  return this.guestAPIService.getGroup(req);
@@ -10183,13 +10376,17 @@ class GuestService {
10183
10376
  return this.guestAPIService.getSessionMeetingInfo(req);
10184
10377
  }
10185
10378
  inviteeRegisterSessionMeeting(req) {
10186
- return this.guestAPIService.inviteeRegisterSessionMeeting(req).pipe(mapTo(null));
10379
+ return this.guestAPIService
10380
+ .inviteeRegisterSessionMeeting(req)
10381
+ .pipe(mapTo(null));
10187
10382
  }
10188
10383
  getSessionInviteeMeetingInfo(req) {
10189
10384
  return this.guestAPIService.getSessionInviteeMeetingInfo(req);
10190
10385
  }
10191
10386
  inviteeDeregisterSessionMeeting(req) {
10192
- return this.guestAPIService.inviteeDeregisterSessionMeeting(req).pipe(mapTo(null));
10387
+ return this.guestAPIService
10388
+ .inviteeDeregisterSessionMeeting(req)
10389
+ .pipe(mapTo(null));
10193
10390
  }
10194
10391
  getMeetingCalendarInfo(req) {
10195
10392
  return this.guestAPIService.getMeetingCalendarInfo(req);
@@ -10197,12 +10394,15 @@ class GuestService {
10197
10394
  checkFeatureFlag(req) {
10198
10395
  return this.guestAPIService.checkFeatureFlag(req);
10199
10396
  }
10397
+ getServiceV2(req) {
10398
+ return this.guestAPIService.getServiceV2(req);
10399
+ }
10200
10400
  }
10201
10401
  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' });
10402
+ GuestService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: GuestService, providedIn: "root" });
10203
10403
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: GuestService, decorators: [{
10204
10404
  type: Injectable,
10205
- args: [{ providedIn: 'root' }]
10405
+ args: [{ providedIn: "root" }]
10206
10406
  }], ctorParameters: function () { return [{ type: MeetingGuestApiService }]; } });
10207
10407
 
10208
10408
  class HostService {