@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') {
@@ -9278,6 +9451,11 @@ class MeetingGuestApiService {
9278
9451
  return this.http.post(this._host + "/meetings.v1.MeetingGuest/BookBatchMeeting", request.toApiJson(), this.apiOptions())
9279
9452
  .pipe(map(resp => BookBatchMeetingResponse.fromProto(resp)));
9280
9453
  }
9454
+ getServiceV2(r) {
9455
+ const request = (r.toApiJson) ? r : new GetServiceV2Request(r);
9456
+ return this.http.post(this._host + "/meetings.v1.MeetingGuest/GetServicesV2", request.toApiJson(), this.apiOptions())
9457
+ .pipe(map(resp => GetServiceV2Response.fromProto(resp)));
9458
+ }
9281
9459
  }
9282
9460
  MeetingGuestApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: MeetingGuestApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
9283
9461
  MeetingGuestApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: MeetingGuestApiService, providedIn: 'root' });
@@ -10107,12 +10285,14 @@ class GuestService {
10107
10285
  this.guestAPIService = guestAPIService;
10108
10286
  }
10109
10287
  getMeetingType(req) {
10110
- return this.guestAPIService.getMeetingType(req).pipe(map(resp => {
10288
+ return this.guestAPIService.getMeetingType(req).pipe(map((resp) => {
10111
10289
  if (!resp || !resp.meetingType) {
10112
10290
  return {};
10113
10291
  }
10114
10292
  return MeetingTypeFromApi({
10115
- environment: onProductionGlobal() ? Environment.PROD : Environment.DEMO,
10293
+ environment: onProductionGlobal()
10294
+ ? Environment.PROD
10295
+ : Environment.DEMO,
10116
10296
  calendarId: req.calendarSlug,
10117
10297
  meetingTypeApi: resp.meetingType,
10118
10298
  metadata: req.metadata,
@@ -10121,13 +10301,15 @@ class GuestService {
10121
10301
  }));
10122
10302
  }
10123
10303
  listMeetingTypes(req) {
10124
- return this.guestAPIService.listMeetingTypes(req).pipe(map(resp => {
10304
+ return this.guestAPIService.listMeetingTypes(req).pipe(map((resp) => {
10125
10305
  if (!resp || !resp.meetingTypes) {
10126
10306
  return [];
10127
10307
  }
10128
- return resp.meetingTypes.map(mt => {
10308
+ return resp.meetingTypes.map((mt) => {
10129
10309
  return MeetingTypeFromApi({
10130
- environment: onProductionGlobal() ? Environment.PROD : Environment.DEMO,
10310
+ environment: onProductionGlobal()
10311
+ ? Environment.PROD
10312
+ : Environment.DEMO,
10131
10313
  calendarId: req.hostId,
10132
10314
  meetingTypeApi: mt,
10133
10315
  metadata: req.metadata,
@@ -10137,7 +10319,9 @@ class GuestService {
10137
10319
  }));
10138
10320
  }
10139
10321
  listAvailableTimeSlots(req) {
10140
- return this.guestAPIService.listAvailableTimeSlots(req).pipe(map(resp => resp.timeSlots ? resp.timeSlots.map(ts => TimeSpanFromApi(ts)) : []));
10322
+ return this.guestAPIService
10323
+ .listAvailableTimeSlots(req)
10324
+ .pipe(map((resp) => resp.timeSlots ? resp.timeSlots.map((ts) => TimeSpanFromApi(ts)) : []));
10141
10325
  }
10142
10326
  bookMeeting(req) {
10143
10327
  return this.guestAPIService.bookMeeting({
@@ -10154,16 +10338,23 @@ class GuestService {
10154
10338
  }
10155
10339
  // getHost returns an individual host by their hostId
10156
10340
  getHost(req) {
10157
- return this.guestAPIService.getHost(req).pipe(map(resp => HostFromApi(resp.host)));
10341
+ return this.guestAPIService
10342
+ .getHost(req)
10343
+ .pipe(map((resp) => HostFromApi(resp.host)));
10158
10344
  }
10159
10345
  // getCalendar returns a Calendar, which may represent an individual host OR a grouping of hosts (I.e., a team)
10160
10346
  getCalendar(req) {
10161
- return this.guestAPIService.getCalendar(req).pipe(map(resp => CalendarFromApi(resp.calendar)));
10347
+ return this.guestAPIService
10348
+ .getCalendar(req)
10349
+ .pipe(map((resp) => CalendarFromApi(resp.calendar)));
10162
10350
  }
10163
10351
  getBookedMeetingInfo(meetingId, authToken) {
10164
- return this.guestAPIService.getGuestBookedMeeting({
10165
- meetingId: meetingId, authToken: authToken,
10166
- }).pipe(map(resp => ({
10352
+ return this.guestAPIService
10353
+ .getGuestBookedMeeting({
10354
+ meetingId: meetingId,
10355
+ authToken: authToken,
10356
+ })
10357
+ .pipe(map((resp) => ({
10167
10358
  start: resp.startTime,
10168
10359
  end: resp.endTime,
10169
10360
  timeZone: resp.timeZone,
@@ -10180,7 +10371,9 @@ class GuestService {
10180
10371
  return this.guestAPIService.getGuestBookedMeetingV2(req);
10181
10372
  }
10182
10373
  isHostConfigured(req) {
10183
- return this.guestAPIService.isHostConfigured(req).pipe(map((resp) => resp.isConfigured));
10374
+ return this.guestAPIService
10375
+ .isHostConfigured(req)
10376
+ .pipe(map((resp) => resp.isConfigured));
10184
10377
  }
10185
10378
  getGroup(req) {
10186
10379
  return this.guestAPIService.getGroup(req);
@@ -10192,13 +10385,17 @@ class GuestService {
10192
10385
  return this.guestAPIService.getSessionMeetingInfo(req);
10193
10386
  }
10194
10387
  inviteeRegisterSessionMeeting(req) {
10195
- return this.guestAPIService.inviteeRegisterSessionMeeting(req).pipe(mapTo(null));
10388
+ return this.guestAPIService
10389
+ .inviteeRegisterSessionMeeting(req)
10390
+ .pipe(mapTo(null));
10196
10391
  }
10197
10392
  getSessionInviteeMeetingInfo(req) {
10198
10393
  return this.guestAPIService.getSessionInviteeMeetingInfo(req);
10199
10394
  }
10200
10395
  inviteeDeregisterSessionMeeting(req) {
10201
- return this.guestAPIService.inviteeDeregisterSessionMeeting(req).pipe(mapTo(null));
10396
+ return this.guestAPIService
10397
+ .inviteeDeregisterSessionMeeting(req)
10398
+ .pipe(mapTo(null));
10202
10399
  }
10203
10400
  getMeetingCalendarInfo(req) {
10204
10401
  return this.guestAPIService.getMeetingCalendarInfo(req);
@@ -10206,12 +10403,15 @@ class GuestService {
10206
10403
  checkFeatureFlag(req) {
10207
10404
  return this.guestAPIService.checkFeatureFlag(req);
10208
10405
  }
10406
+ getServiceV2(req) {
10407
+ return this.guestAPIService.getServiceV2(req);
10408
+ }
10209
10409
  }
10210
10410
  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' });
10411
+ GuestService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: GuestService, providedIn: "root" });
10212
10412
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: GuestService, decorators: [{
10213
10413
  type: Injectable,
10214
- args: [{ providedIn: 'root' }]
10414
+ args: [{ providedIn: "root" }]
10215
10415
  }], ctorParameters: function () { return [{ type: MeetingGuestApiService }]; } });
10216
10416
 
10217
10417
  class HostService {