@vendasta/meetings 0.93.5 → 0.95.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 (29) hide show
  1. package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
  2. package/esm2020/lib/_internal/interfaces/meeting-host.interface.mjs +1 -1
  3. package/esm2020/lib/_internal/interfaces/meeting-source.interface.mjs +1 -1
  4. package/esm2020/lib/_internal/meeting-host.api.service.mjs +7 -2
  5. package/esm2020/lib/_internal/objects/index.mjs +2 -2
  6. package/esm2020/lib/_internal/objects/meeting-host.mjs +47 -1
  7. package/esm2020/lib/_internal/objects/meeting-source.mjs +4 -1
  8. package/esm2020/lib/host/host.service.mjs +231 -128
  9. package/esm2020/lib/index.mjs +2 -2
  10. package/esm2020/lib/meetings.service.mjs +5 -3
  11. package/esm2020/lib/shared/index.mjs +2 -1
  12. package/esm2020/lib/shared/origin.mjs +8 -0
  13. package/fesm2015/vendasta-meetings.mjs +282 -115
  14. package/fesm2015/vendasta-meetings.mjs.map +1 -1
  15. package/fesm2020/vendasta-meetings.mjs +290 -123
  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-host.interface.d.ts +8 -0
  19. package/lib/_internal/interfaces/meeting-source.interface.d.ts +1 -0
  20. package/lib/_internal/meeting-host.api.service.d.ts +3 -2
  21. package/lib/_internal/objects/index.d.ts +1 -1
  22. package/lib/_internal/objects/meeting-host.d.ts +14 -0
  23. package/lib/_internal/objects/meeting-source.d.ts +1 -0
  24. package/lib/host/host.service.d.ts +9 -4
  25. package/lib/index.d.ts +1 -1
  26. package/lib/meetings.service.d.ts +2 -2
  27. package/lib/shared/index.d.ts +1 -0
  28. package/lib/shared/origin.d.ts +6 -0
  29. package/package.json +1 -1
@@ -1124,6 +1124,9 @@ class MeetingSourceListRequest {
1124
1124
  if (typeof this.namespace !== 'undefined') {
1125
1125
  toReturn['namespace'] = this.namespace;
1126
1126
  }
1127
+ if (typeof this.origin !== 'undefined') {
1128
+ toReturn['origin'] = this.origin;
1129
+ }
1127
1130
  return toReturn;
1128
1131
  }
1129
1132
  }
@@ -2864,6 +2867,52 @@ class CancelMeetingRequest {
2864
2867
  return toReturn;
2865
2868
  }
2866
2869
  }
2870
+ class CheckGroupOrServiceSlugExistRequest {
2871
+ static fromProto(proto) {
2872
+ let m = new CheckGroupOrServiceSlugExistRequest();
2873
+ m = Object.assign(m, proto);
2874
+ return m;
2875
+ }
2876
+ constructor(kwargs) {
2877
+ if (!kwargs) {
2878
+ return;
2879
+ }
2880
+ Object.assign(this, kwargs);
2881
+ }
2882
+ toApiJson() {
2883
+ const toReturn = {};
2884
+ if (typeof this.hostId !== 'undefined') {
2885
+ toReturn['hostId'] = this.hostId;
2886
+ }
2887
+ if (typeof this.slugIdentifier !== 'undefined') {
2888
+ toReturn['slugIdentifier'] = this.slugIdentifier;
2889
+ }
2890
+ if (typeof this.category !== 'undefined') {
2891
+ toReturn['category'] = this.category;
2892
+ }
2893
+ return toReturn;
2894
+ }
2895
+ }
2896
+ class CheckGroupOrServiceSlugExistResponse {
2897
+ static fromProto(proto) {
2898
+ let m = new CheckGroupOrServiceSlugExistResponse();
2899
+ m = Object.assign(m, proto);
2900
+ return m;
2901
+ }
2902
+ constructor(kwargs) {
2903
+ if (!kwargs) {
2904
+ return;
2905
+ }
2906
+ Object.assign(this, kwargs);
2907
+ }
2908
+ toApiJson() {
2909
+ const toReturn = {};
2910
+ if (typeof this.exists !== 'undefined') {
2911
+ toReturn['exists'] = this.exists;
2912
+ }
2913
+ return toReturn;
2914
+ }
2915
+ }
2867
2916
  class CreateAvailabilityRequest {
2868
2917
  static fromProto(proto) {
2869
2918
  let m = new CreateAvailabilityRequest();
@@ -4805,16 +4854,18 @@ class MeetingsService {
4805
4854
  * @deprecated Use listForUser instead. This method will result in the backend grabbing the userID from the user's JWT
4806
4855
  * This will eventually no longer be supported because it breaks our impersonation workflows.
4807
4856
  */
4808
- list(meetingSources, namespace) {
4857
+ list(meetingSources, namespace, origin) {
4809
4858
  return this._api.list({
4810
4859
  queriedSources: meetingSources,
4811
4860
  namespace: namespace,
4861
+ origin: origin,
4812
4862
  });
4813
4863
  }
4814
- listForUser(iamUserId, namespace, queriedSources) {
4864
+ listForUser(iamUserId, namespace, origin, queriedSources) {
4815
4865
  return this._api.list({
4816
4866
  iamUserId: iamUserId,
4817
4867
  namespace: namespace,
4868
+ origin: origin,
4818
4869
  queriedSources: queriedSources,
4819
4870
  });
4820
4871
  }
@@ -5475,6 +5526,11 @@ class MeetingHostApiService {
5475
5526
  return this.http.post(this._host + "/meetings.v1.MeetingHost/GetService", request.toApiJson(), this.apiOptions())
5476
5527
  .pipe(map(resp => GetServiceResponse.fromProto(resp)));
5477
5528
  }
5529
+ checkGroupOrServiceSlugExist(r) {
5530
+ const request = (r.toApiJson) ? r : new CheckGroupOrServiceSlugExistRequest(r);
5531
+ return this.http.post(this._host + "/meetings.v1.MeetingHost/CheckGroupOrServiceSlugExist", request.toApiJson(), this.apiOptions())
5532
+ .pipe(map(resp => CheckGroupOrServiceSlugExistResponse.fromProto(resp)));
5533
+ }
5478
5534
  }
5479
5535
  MeetingHostApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: MeetingHostApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5480
5536
  MeetingHostApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: MeetingHostApiService, providedIn: 'root' });
@@ -5704,6 +5760,14 @@ function ServiceFromApi(req) {
5704
5760
  };
5705
5761
  }
5706
5762
 
5763
+ var MeetingSourceOrigin;
5764
+ (function (MeetingSourceOrigin) {
5765
+ MeetingSourceOrigin["TaskManager"] = "task-manager";
5766
+ MeetingSourceOrigin["PartnerCenter"] = "partner-center";
5767
+ MeetingSourceOrigin["BusinessApp"] = "business-app";
5768
+ MeetingSourceOrigin["SalesCenter"] = "sales-center";
5769
+ })(MeetingSourceOrigin || (MeetingSourceOrigin = {}));
5770
+
5707
5771
  class GuestService {
5708
5772
  constructor(guestAPIService) {
5709
5773
  this.guestAPIService = guestAPIService;
@@ -5794,58 +5858,76 @@ class HostService {
5794
5858
  }
5795
5859
  // Use buildHostId to get an identifier that can be used in subsequent requests. See vendastaapis for more details
5796
5860
  buildHostId(req) {
5797
- return this.hostAPIService.buildHostId({
5861
+ return this.hostAPIService
5862
+ .buildHostId({
5798
5863
  userId: req.userId,
5799
5864
  // Gross typecast exists because I want to restrict the properties on the map (for now).
5800
- applicationContextProperties: req.applicationContextProperties
5801
- }).pipe(map(res => res.hostId || ''));
5865
+ applicationContextProperties: req.applicationContextProperties,
5866
+ })
5867
+ .pipe(map((res) => res.hostId || ""));
5802
5868
  }
5803
5869
  doesCalendarExist(calendarIdentifier) {
5804
- return this.hostAPIService.doesCalendarExist({ calendarIdentifier: calendarIdentifier }).pipe(map(resp => resp.exists));
5870
+ return this.hostAPIService
5871
+ .doesCalendarExist({ calendarIdentifier: calendarIdentifier })
5872
+ .pipe(map((resp) => resp.exists));
5805
5873
  }
5806
5874
  getCalendar(req) {
5807
- return this.hostAPIService.getCalendar({ calendarId: req.calendarId }).pipe(map(res => CalendarFromApi(res === null || res === void 0 ? void 0 : res.calendar)));
5875
+ return this.hostAPIService
5876
+ .getCalendar({ calendarId: req.calendarId })
5877
+ .pipe(map((res) => CalendarFromApi(res === null || res === void 0 ? void 0 : res.calendar)));
5808
5878
  }
5809
5879
  ensurePersonalCalendarExists(req) {
5810
- return this.hostAPIService.ensurePersonalCalendarExists({
5880
+ return this.hostAPIService
5881
+ .ensurePersonalCalendarExists({
5811
5882
  userId: req.userId,
5812
5883
  applicationContextProperties: req.applicationContextProperties,
5813
- }).pipe(map(res => res ? res.calendarId : ''));
5884
+ })
5885
+ .pipe(map((res) => (res ? res.calendarId : "")));
5814
5886
  }
5815
5887
  ensureGroupCalendarsExist(req) {
5816
- return this.hostAPIService.ensureGroupCalendarsExist({ externalIds: req.externalIds }).pipe(map(res => (res === null || res === void 0 ? void 0 : res.calendarIds) || []));
5888
+ return this.hostAPIService
5889
+ .ensureGroupCalendarsExist({ externalIds: req.externalIds })
5890
+ .pipe(map((res) => (res === null || res === void 0 ? void 0 : res.calendarIds) || []));
5817
5891
  }
5818
5892
  /*
5819
- createCalendar creates a calendar which meeting types can be created for and events can be booked on
5820
- The fields of a calendar are documented in https://github.com/vendasta/vendastaapis/blob/master/meetings/v1/shared.proto
5821
- */
5893
+ createCalendar creates a calendar which meeting types can be created for and events can be booked on
5894
+ The fields of a calendar are documented in https://github.com/vendasta/vendastaapis/blob/master/meetings/v1/shared.proto
5895
+ */
5822
5896
  createCalendar(req) {
5823
5897
  return this.hostAPIService.createCalendar(req);
5824
5898
  }
5825
5899
  updateCalendarSlug(calendarId, newSlug) {
5826
- return this.hostAPIService.updateCalendar({
5900
+ return this.hostAPIService
5901
+ .updateCalendar({
5827
5902
  calendarId: calendarId,
5828
5903
  calendarUpdate: { slug: newSlug },
5829
- fieldMask: { paths: ['slug'] },
5830
- }).pipe(mapTo(undefined));
5904
+ fieldMask: { paths: ["slug"] },
5905
+ })
5906
+ .pipe(mapTo(undefined));
5831
5907
  }
5832
5908
  updateCalendarHostUserIDs(calendarId, replacementHostUserIds) {
5833
- return this.hostAPIService.updateCalendar({
5909
+ return this.hostAPIService
5910
+ .updateCalendar({
5834
5911
  calendarId: calendarId,
5835
5912
  calendarUpdate: { hostUserIds: replacementHostUserIds },
5836
- fieldMask: { paths: ['host_user_ids'] },
5837
- }).pipe(mapTo(undefined));
5913
+ fieldMask: { paths: ["host_user_ids"] },
5914
+ })
5915
+ .pipe(mapTo(undefined));
5838
5916
  }
5839
5917
  getMeetingTypesForCalendars(req) {
5840
- return this.hostAPIService.getMeetingTypesForCalendars({ calendarIds: req.calendarIds }).pipe(map(res => {
5918
+ return this.hostAPIService
5919
+ .getMeetingTypesForCalendars({ calendarIds: req.calendarIds })
5920
+ .pipe(map((res) => {
5841
5921
  if (!(res === null || res === void 0 ? void 0 : res.calendarMeetingTypesMap)) {
5842
5922
  return {};
5843
5923
  }
5844
5924
  return Object.keys(res.calendarMeetingTypesMap).reduce((calendarToMeetingTypeMap, calendarId) => {
5845
5925
  var _a;
5846
- const meetingTypes = (((_a = res.calendarMeetingTypesMap[calendarId]) === null || _a === void 0 ? void 0 : _a.meetingTypes) || []).map(mt => MeetingTypeFromApi({
5926
+ const meetingTypes = (((_a = res.calendarMeetingTypesMap[calendarId]) === null || _a === void 0 ? void 0 : _a.meetingTypes) || []).map((mt) => MeetingTypeFromApi({
5847
5927
  meetingTypeApi: mt,
5848
- environment: onProductionGlobal() ? Environment.PROD : Environment.DEMO,
5928
+ environment: onProductionGlobal()
5929
+ ? Environment.PROD
5930
+ : Environment.DEMO,
5849
5931
  calendarId,
5850
5932
  metadata: req.metadata,
5851
5933
  }));
@@ -5854,22 +5936,24 @@ class HostService {
5854
5936
  }));
5855
5937
  }
5856
5938
  /*
5857
- listMeetingTypes returns a list of meeting types for a host
5858
- @param hostId: An identifier for an individual host
5859
- @param metadata: optional metadata to include on the meeting type booking link
5860
- @param calendarSlug: used to replace hostId in the url. Use it when you are confident you know the host's slug.
5861
- - calendarSlug IS NOT USED TO RETRIEVE MEETING TYPES, ONLY TO MAKE THE BOOKING URLS
5862
- */
5939
+ listMeetingTypes returns a list of meeting types for a host
5940
+ @param hostId: An identifier for an individual host
5941
+ @param metadata: optional metadata to include on the meeting type booking link
5942
+ @param calendarSlug: used to replace hostId in the url. Use it when you are confident you know the host's slug.
5943
+ - calendarSlug IS NOT USED TO RETRIEVE MEETING TYPES, ONLY TO MAKE THE BOOKING URLS
5944
+ */
5863
5945
  listMeetingTypes(req) {
5864
- return this.hostAPIService.listMeetingTypes(req).pipe(map(resp => {
5946
+ return this.hostAPIService.listMeetingTypes(req).pipe(map((resp) => {
5865
5947
  if (!resp || !resp.meetingTypes) {
5866
5948
  return [];
5867
5949
  }
5868
- return resp.meetingTypes.map(mt => {
5950
+ return resp.meetingTypes.map((mt) => {
5869
5951
  return MeetingTypeFromApi({
5870
5952
  meetingTypeApi: mt,
5871
5953
  calendarId: req.hostId,
5872
- environment: onProductionGlobal() ? Environment.PROD : Environment.DEMO,
5954
+ environment: onProductionGlobal()
5955
+ ? Environment.PROD
5956
+ : Environment.DEMO,
5873
5957
  metadata: req.metadata,
5874
5958
  calendarSlug: req.calendarSlug,
5875
5959
  });
@@ -5877,26 +5961,26 @@ class HostService {
5877
5961
  }));
5878
5962
  }
5879
5963
  /*
5880
- getBookingUrl returns a link that can be used to book a meeting with this host.
5881
- @param calendarId: An identifier for an individual host or grouping of hosts (i.e., team).
5882
- @param @deprecated hostId: An identifier for an individual host.
5883
- @param meetingTypeId: An optional identifier for the meeting type. Default: 30-minutes.
5884
- @param metadata: optional metadata to include in the url.
5885
- - metadata can be used to pre-fill certain form fields and will be stored during the booking process.
5886
- - metadata can be obtained by subscribing to the booking event.
5887
- @param calendarSlug: used to replace hostId in the url. Use it when you are confident you know the host's slug.
5888
- */
5964
+ getBookingUrl returns a link that can be used to book a meeting with this host.
5965
+ @param calendarId: An identifier for an individual host or grouping of hosts (i.e., team).
5966
+ @param @deprecated hostId: An identifier for an individual host.
5967
+ @param meetingTypeId: An optional identifier for the meeting type. Default: 30-minutes.
5968
+ @param metadata: optional metadata to include in the url.
5969
+ - metadata can be used to pre-fill certain form fields and will be stored during the booking process.
5970
+ - metadata can be obtained by subscribing to the booking event.
5971
+ @param calendarSlug: used to replace hostId in the url. Use it when you are confident you know the host's slug.
5972
+ */
5889
5973
  getBookingUrl(req) {
5890
5974
  return of(getBookingUrlImplementation(Object.assign(Object.assign({}, req), { calendarId: req.calendarId || req.hostId, environment: onProductionGlobal() ? Environment.PROD : Environment.DEMO, calendarSlug: req.calendarSlug })));
5891
5975
  }
5892
5976
  /*
5893
- getGeneralBookingUrl returns a link that can be used to select a meeting type to book with the given calendar.
5894
- @param calendarId: An identifier for an individual host or grouping of hosts (i.e., team).
5895
- @param metadata: optional metadata to include in the url.
5896
- - metadata can be used to pre-fill certain form fields and will be stored during the booking process.
5897
- - metadata can be obtained by subscribing to the booking event.
5898
- @param calendarSlug: used to replace hostId in the url. Use it when you are confident you know the host's slug.
5899
- */
5977
+ getGeneralBookingUrl returns a link that can be used to select a meeting type to book with the given calendar.
5978
+ @param calendarId: An identifier for an individual host or grouping of hosts (i.e., team).
5979
+ @param metadata: optional metadata to include in the url.
5980
+ - metadata can be used to pre-fill certain form fields and will be stored during the booking process.
5981
+ - metadata can be obtained by subscribing to the booking event.
5982
+ @param calendarSlug: used to replace hostId in the url. Use it when you are confident you know the host's slug.
5983
+ */
5900
5984
  getGeneralBookingUrl(req) {
5901
5985
  return of(getGeneralBookingUrlImplementation({
5902
5986
  environment: onProductionGlobal() ? Environment.PROD : Environment.DEMO,
@@ -5906,14 +5990,14 @@ class HostService {
5906
5990
  }));
5907
5991
  }
5908
5992
  /*
5909
- getBookingUrlsMulti returns a mapping of hosts -> event types -> booking links.
5910
- @param calendarId: An identifier for an individual host or grouping of hosts.
5911
- @param meetingTypeSlug: meetingTypeSlugs are passed in the form {hostId: [meetingTypeSlug1, meetingTypeSlug2]}
5912
- @param metadata: optional metadata to include in the url.
5913
- - metadata can be used to pre-fill certain form fields and will be stored during the booking process.
5914
- - metadata can be obtained by subscribing to the booking event.
5915
- @param calendarSlug: used to replace hostId in the url. Use it when you are confident you know the host's slug.
5916
- */
5993
+ getBookingUrlsMulti returns a mapping of hosts -> event types -> booking links.
5994
+ @param calendarId: An identifier for an individual host or grouping of hosts.
5995
+ @param meetingTypeSlug: meetingTypeSlugs are passed in the form {hostId: [meetingTypeSlug1, meetingTypeSlug2]}
5996
+ @param metadata: optional metadata to include in the url.
5997
+ - metadata can be used to pre-fill certain form fields and will be stored during the booking process.
5998
+ - metadata can be obtained by subscribing to the booking event.
5999
+ @param calendarSlug: used to replace hostId in the url. Use it when you are confident you know the host's slug.
6000
+ */
5917
6001
  getBookingUrlsMulti(req, metadata, calendarSlug) {
5918
6002
  return of(Object.keys(req).reduce((hostMap, calendarId) => {
5919
6003
  return Object.assign(Object.assign({}, hostMap), { [calendarId]: req[calendarId].reduce((meetingTypeMap, meetingTypeSlug) => {
@@ -5921,14 +6005,18 @@ class HostService {
5921
6005
  calendarId,
5922
6006
  meetingTypeSlug,
5923
6007
  metadata,
5924
- environment: onProductionGlobal() ? Environment.PROD : Environment.DEMO,
6008
+ environment: onProductionGlobal()
6009
+ ? Environment.PROD
6010
+ : Environment.DEMO,
5925
6011
  calendarSlug,
5926
6012
  }) });
5927
6013
  }, {}) });
5928
6014
  }, {}));
5929
6015
  }
5930
6016
  isHostConfigured(req) {
5931
- return this.hostAPIService.isHostConfigured(req).pipe(map((resp) => resp.isConfigured));
6017
+ return this.hostAPIService
6018
+ .isHostConfigured(req)
6019
+ .pipe(map((resp) => resp.isConfigured));
5932
6020
  }
5933
6021
  setGeneralAvailability(req) {
5934
6022
  const apiReq = Object.assign(Object.assign({}, req), { timeZone: new TimeZone(req.timeZone) });
@@ -5938,23 +6026,34 @@ class HostService {
5938
6026
  return this.hostAPIService.setGeneralAvailability(apiReq).pipe(mapTo(null));
5939
6027
  }
5940
6028
  listBookedMeetings(req) {
5941
- return this.hostAPIService.listBookedMeetings(Object.assign(Object.assign({}, req), { pagingOptions: new PagedRequestOptions({ cursor: req.cursor, pageSize: req.pageSize }), filters: new ListBookedMeetingsRequestFilters(req.filters), timeZone: new TimeZone(req.timeZone) })).pipe(map((resp) => {
5942
- const meetings = (resp.meetings || []).map(meeting => meetingFromApi(meeting));
6029
+ return this.hostAPIService
6030
+ .listBookedMeetings(Object.assign(Object.assign({}, req), { pagingOptions: new PagedRequestOptions({
6031
+ cursor: req.cursor,
6032
+ pageSize: req.pageSize,
6033
+ }), filters: new ListBookedMeetingsRequestFilters(req.filters), timeZone: new TimeZone(req.timeZone) }))
6034
+ .pipe(map((resp) => {
6035
+ const meetings = (resp.meetings || []).map((meeting) => meetingFromApi(meeting));
5943
6036
  return new PagedResponse(meetings, resp.pagingMetadata.nextCursor, resp.pagingMetadata.hasMore);
5944
6037
  }));
5945
6038
  }
5946
6039
  cancelMeeting(req) {
5947
- return this.hostAPIService.cancelMeeting(Object.assign({}, req)).pipe(mapTo(null));
6040
+ return this.hostAPIService
6041
+ .cancelMeeting(Object.assign({}, req))
6042
+ .pipe(mapTo(null));
5948
6043
  }
5949
6044
  rescheduleMeeting(req) {
5950
- return this.hostAPIService.rescheduleMeeting(Object.assign({}, req)).pipe(mapTo(null));
6045
+ return this.hostAPIService
6046
+ .rescheduleMeeting(Object.assign({}, req))
6047
+ .pipe(mapTo(null));
5951
6048
  }
5952
6049
  listAvailability(req) {
5953
- return this.hostAPIService.listAvailability(req).pipe(map(response => {
5954
- const results = (response.availabilityRules || []).filter(Boolean).map(a => {
6050
+ return this.hostAPIService.listAvailability(req).pipe(map((response) => {
6051
+ const results = (response.availabilityRules || [])
6052
+ .filter(Boolean)
6053
+ .map((a) => {
5955
6054
  return {
5956
- hostId: a.hostId || '',
5957
- meetingTypeId: a.meetingTypeId || '',
6055
+ hostId: a.hostId || "",
6056
+ meetingTypeId: a.meetingTypeId || "",
5958
6057
  day: a.day,
5959
6058
  timeSlot: a.timeSlot,
5960
6059
  timeZone: a.timeZone,
@@ -5979,51 +6078,71 @@ class HostService {
5979
6078
  * `Preferences` is an error.
5980
6079
  */
5981
6080
  updatePreferences(req) {
5982
- const fieldMask = getFieldMask({ o: req.preferences, updateFields: req.updateFields });
6081
+ const fieldMask = getFieldMask({
6082
+ o: req.preferences,
6083
+ updateFields: req.updateFields,
6084
+ });
5983
6085
  if (fieldMask.paths.length === 0) {
5984
6086
  return of();
5985
6087
  }
5986
- return this.hostAPIService.updateHostPreferences({
6088
+ return this.hostAPIService
6089
+ .updateHostPreferences({
5987
6090
  hostId: req.hostId,
5988
6091
  preferences: req.preferences,
5989
6092
  fieldMask,
5990
- }).pipe(mapTo(undefined));
6093
+ })
6094
+ .pipe(mapTo(undefined));
5991
6095
  }
5992
6096
  getPreferences(req) {
5993
- return this.hostAPIService.getHostPreferences({
5994
- hostId: req.hostId
5995
- }).pipe(map(response => PreferencesFromApi(response.preferences)));
6097
+ return this.hostAPIService
6098
+ .getHostPreferences({
6099
+ hostId: req.hostId,
6100
+ })
6101
+ .pipe(map((response) => PreferencesFromApi(response.preferences)));
5996
6102
  }
5997
6103
  getMeeting(meetingId, location) {
5998
- return this.hostAPIService.getHostMeeting({
5999
- meetingId: meetingId, location: location,
6000
- }).pipe(map((resp) => meetingFromApi(resp.meeting)));
6104
+ return this.hostAPIService
6105
+ .getHostMeeting({
6106
+ meetingId: meetingId,
6107
+ location: location,
6108
+ })
6109
+ .pipe(map((resp) => meetingFromApi(resp.meeting)));
6001
6110
  }
6002
6111
  updateMeetingMetadata(req) {
6003
- return this.hostAPIService.updateMeetingMetadata({
6112
+ return this.hostAPIService
6113
+ .updateMeetingMetadata({
6004
6114
  meetingId: req.meetingId,
6005
- metadata: req.metadata
6006
- }).pipe(mapTo(undefined));
6115
+ metadata: req.metadata,
6116
+ })
6117
+ .pipe(mapTo(undefined));
6007
6118
  }
6008
6119
  bookMeeting(req) {
6009
- return this.hostAPIService.bookMeeting(req).pipe(map((resp) => resp.meetingId));
6120
+ return this.hostAPIService
6121
+ .bookMeeting(req)
6122
+ .pipe(map((resp) => resp.meetingId));
6010
6123
  }
6011
6124
  // createDefaultMeetingTypes will create what Meeting Scheduler deems to be the default meeting types.
6012
6125
  // If the calendar already has meeting types, this is guaranteed to be a no-op.
6013
6126
  createDefaultMeetingTypes(req) {
6014
- return this.hostAPIService.createDefaultMeetingTypes({ calendarIds: req.calendarIds }).pipe(mapTo(undefined));
6127
+ return this.hostAPIService
6128
+ .createDefaultMeetingTypes({ calendarIds: req.calendarIds })
6129
+ .pipe(mapTo(undefined));
6015
6130
  }
6016
6131
  createMeetingType(req) {
6017
- const fieldMask = getFieldMask({ o: req.meetingType, updateFields: req.updateFields });
6132
+ const fieldMask = getFieldMask({
6133
+ o: req.meetingType,
6134
+ updateFields: req.updateFields,
6135
+ });
6018
6136
  if (fieldMask.paths.length === 0) {
6019
6137
  return of();
6020
6138
  }
6021
- return this.hostAPIService.createMeetingType({
6139
+ return this.hostAPIService
6140
+ .createMeetingType({
6022
6141
  meetingType: MeetingTypeToApi({ meetingType: req.meetingType }),
6023
6142
  fieldMask,
6024
- hostId: req.HostId
6143
+ hostId: req.HostId,
6025
6144
  })
6026
- .pipe(map(res => res.id));
6145
+ .pipe(map((res) => res.id));
6027
6146
  }
6028
6147
  /* updateMeetingType will update the meeting type fields.
6029
6148
  * It is guaranteed to only update the fields provided.
@@ -6041,23 +6160,32 @@ class HostService {
6041
6160
  * `MeetingType` is an error.
6042
6161
  */
6043
6162
  updateMeetingType(req) {
6044
- const fieldMask = getFieldMask({ o: req.meetingType, updateFields: req.updateFields });
6163
+ const fieldMask = getFieldMask({
6164
+ o: req.meetingType,
6165
+ updateFields: req.updateFields,
6166
+ });
6045
6167
  if (fieldMask.paths.length === 0) {
6046
6168
  return of();
6047
6169
  }
6048
- return this.hostAPIService.updateMeetingType({
6170
+ return this.hostAPIService
6171
+ .updateMeetingType({
6049
6172
  id: req.id,
6050
6173
  meetingType: MeetingTypeToApi({ meetingType: req.meetingType }),
6051
6174
  fieldMask,
6052
- hostId: req.HostId
6053
- }).pipe(mapTo(undefined));
6175
+ hostId: req.HostId,
6176
+ })
6177
+ .pipe(mapTo(undefined));
6054
6178
  }
6055
6179
  deleteMeetingType(req) {
6056
- return this.hostAPIService.deleteMeetingType({ id: req.id }).pipe(mapTo(undefined));
6180
+ return this.hostAPIService
6181
+ .deleteMeetingType({ id: req.id })
6182
+ .pipe(mapTo(undefined));
6057
6183
  }
6058
6184
  getHostsForCalendar(req) {
6059
- return this.hostAPIService.getHostsForCalendar({ calendarId: req.calendarId }).pipe(map(res => {
6060
- return (res.hostUsers || []).map(hostuser => {
6185
+ return this.hostAPIService
6186
+ .getHostsForCalendar({ calendarId: req.calendarId })
6187
+ .pipe(map((res) => {
6188
+ return (res.hostUsers || []).map((hostuser) => {
6061
6189
  return hostUserFromApi(hostuser);
6062
6190
  });
6063
6191
  }));
@@ -6069,71 +6197,105 @@ class HostService {
6069
6197
  return this.hostAPIService.sendMeetingRequestEmail(req);
6070
6198
  }
6071
6199
  createService(req) {
6072
- const fieldMask = getFieldMask({ o: req.service, updateFields: req.updateFields });
6200
+ const fieldMask = getFieldMask({
6201
+ o: req.service,
6202
+ updateFields: req.updateFields,
6203
+ });
6073
6204
  if (fieldMask.paths.length === 0) {
6074
6205
  return of();
6075
6206
  }
6076
- return this.hostAPIService.createService({
6207
+ return this.hostAPIService
6208
+ .createService({
6077
6209
  service: ServiceTypeToApi({ service: req.service }),
6078
6210
  fieldMask,
6079
- hostId: req.HostId
6080
- }).pipe(map(res => res.id));
6211
+ hostId: req.HostId,
6212
+ })
6213
+ .pipe(map((res) => res.id));
6081
6214
  }
6082
6215
  updateService(req) {
6083
- const fieldMask = getFieldMask({ o: req.service, updateFields: req.updateFields });
6216
+ const fieldMask = getFieldMask({
6217
+ o: req.service,
6218
+ updateFields: req.updateFields,
6219
+ });
6084
6220
  if (fieldMask.paths.length === 0) {
6085
6221
  return of();
6086
6222
  }
6087
- return this.hostAPIService.updateService({
6223
+ return this.hostAPIService
6224
+ .updateService({
6088
6225
  id: req.id,
6089
6226
  service: ServiceTypeToApi({ service: req.service }),
6090
6227
  fieldMask,
6091
- hostId: req.HostId
6092
- }).pipe(mapTo(undefined));
6228
+ hostId: req.HostId,
6229
+ })
6230
+ .pipe(mapTo(undefined));
6093
6231
  }
6094
6232
  deleteService(req) {
6095
- return this.hostAPIService.deleteService({ id: req.id, hostId: req.hostId }).pipe(mapTo(undefined));
6233
+ return this.hostAPIService
6234
+ .deleteService({ id: req.id, hostId: req.hostId })
6235
+ .pipe(mapTo(undefined));
6096
6236
  }
6097
6237
  listServices(req) {
6098
- return this.hostAPIService.listServices({ hostId: req.hostId }).pipe(map(res => {
6238
+ return this.hostAPIService.listServices({ hostId: req.hostId }).pipe(map((res) => {
6099
6239
  if (!res || !res.services) {
6100
6240
  return [];
6101
6241
  }
6102
- return res.services.map(service => ServiceFromApi({ serviceApi: service, environment: onProductionGlobal() ? Environment.PROD : Environment.DEMO }));
6242
+ return res.services.map((service) => ServiceFromApi({
6243
+ serviceApi: service,
6244
+ environment: onProductionGlobal()
6245
+ ? Environment.PROD
6246
+ : Environment.DEMO,
6247
+ }));
6103
6248
  }));
6104
6249
  }
6105
6250
  createGroup(req) {
6106
- const fieldMask = getFieldMask({ o: req.group, updateFields: req.updateFields });
6251
+ const fieldMask = getFieldMask({
6252
+ o: req.group,
6253
+ updateFields: req.updateFields,
6254
+ });
6107
6255
  if (fieldMask.paths.length === 0) {
6108
6256
  return of();
6109
6257
  }
6110
- return this.hostAPIService.createGroup({
6258
+ return this.hostAPIService
6259
+ .createGroup({
6111
6260
  group: GroupTypeToAPi({ group: req.group }),
6112
6261
  fieldMask,
6113
- hostId: req.HostId
6114
- }).pipe(map(res => res.id));
6262
+ hostId: req.HostId,
6263
+ })
6264
+ .pipe(map((res) => res.id));
6115
6265
  }
6116
6266
  updateGroup(req) {
6117
- const fieldMask = getFieldMask({ o: req.group, updateFields: req.updateFields });
6267
+ const fieldMask = getFieldMask({
6268
+ o: req.group,
6269
+ updateFields: req.updateFields,
6270
+ });
6118
6271
  if (fieldMask.paths.length === 0) {
6119
6272
  return of();
6120
6273
  }
6121
- return this.hostAPIService.updateGroup({
6274
+ return this.hostAPIService
6275
+ .updateGroup({
6122
6276
  id: req.id,
6123
6277
  group: GroupTypeToAPi({ group: req.group }),
6124
6278
  fieldMask,
6125
- hostId: req.HostId
6126
- }).pipe(mapTo(undefined));
6279
+ hostId: req.HostId,
6280
+ })
6281
+ .pipe(mapTo(undefined));
6127
6282
  }
6128
6283
  deleteGroup(req) {
6129
- return this.hostAPIService.deleteGroup({ id: req.id, hostId: req.hostId }).pipe(mapTo(undefined));
6284
+ return this.hostAPIService
6285
+ .deleteGroup({ id: req.id, hostId: req.hostId })
6286
+ .pipe(mapTo(undefined));
6130
6287
  }
6131
6288
  listGroups(req) {
6132
- return this.hostAPIService.listGroups({ hostId: req.hostId }).pipe(map(res => {
6289
+ return this.hostAPIService.listGroups({ hostId: req.hostId }).pipe(map((res) => {
6133
6290
  if (!res || !res.groups) {
6134
6291
  return [];
6135
6292
  }
6136
- return res.groups.map(group => GroupFromApi({ groupApi: group, environment: onProductionGlobal() ? Environment.PROD : Environment.DEMO }));
6293
+ return res.groups.map((group) => GroupFromApi({
6294
+ groupApi: group,
6295
+ environment: onProductionGlobal()
6296
+ ? Environment.PROD
6297
+ : Environment.DEMO,
6298
+ }));
6137
6299
  }));
6138
6300
  }
6139
6301
  getGroup(req) {
@@ -6142,17 +6304,22 @@ class HostService {
6142
6304
  getService(req) {
6143
6305
  return this.hostAPIService.getService(req);
6144
6306
  }
6307
+ checkGroupOrServiceSlugExist(req) {
6308
+ return this.hostAPIService
6309
+ .checkGroupOrServiceSlugExist(req)
6310
+ .pipe(map((res) => res.exists));
6311
+ }
6145
6312
  }
6146
6313
  HostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: HostService, deps: [{ token: MeetingHostApiService }], target: i0.ɵɵFactoryTarget.Injectable });
6147
- HostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: HostService, providedIn: 'root' });
6314
+ HostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: HostService, providedIn: "root" });
6148
6315
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: HostService, decorators: [{
6149
6316
  type: Injectable,
6150
- args: [{ providedIn: 'root' }]
6317
+ args: [{ providedIn: "root" }]
6151
6318
  }], ctorParameters: function () { return [{ type: MeetingHostApiService }]; } });
6152
6319
 
6153
6320
  /**
6154
6321
  * Generated bundle index. Do not edit.
6155
6322
  */
6156
6323
 
6157
- export { CalendarType, Contact, CreateCalendarRequest, CreateCalendarResponse, DayOfWeek, FormFieldType, GuestService, HostService, KnownCalendarApplicationContextKeys, KnownCalendarExternalIntegrations, MeetingLocationType, MeetingSource, MeetingSourceInfo, MeetingSourceListResponse, MeetingSourceQuery, MeetingSourceStatus, MeetingsService, PagedResponse, WeekdayAvailability, WellKnownFormFieldIds, WellKnownMeetingMetadataKeys, addMetadataToBookingLink, durationFromString, durationStringToMinutes, durationToString, meetingSchedulerIdToMetadataKey, newBusinessCenterApplicationContextProperties, newPartnerCenterApplicationContextProperties, newSalesCenterApplicationContextProperties };
6324
+ export { CalendarType, Contact, CreateCalendarRequest, CreateCalendarResponse, DayOfWeek, FormFieldType, GuestService, HostService, KnownCalendarApplicationContextKeys, KnownCalendarExternalIntegrations, MeetingLocationType, MeetingSource, MeetingSourceInfo, MeetingSourceListResponse, MeetingSourceOrigin, MeetingSourceQuery, MeetingSourceStatus, MeetingsService, PagedResponse, WeekdayAvailability, WellKnownFormFieldIds, WellKnownMeetingMetadataKeys, addMetadataToBookingLink, durationFromString, durationStringToMinutes, durationToString, meetingSchedulerIdToMetadataKey, newBusinessCenterApplicationContextProperties, newPartnerCenterApplicationContextProperties, newSalesCenterApplicationContextProperties };
6158
6325
  //# sourceMappingURL=vendasta-meetings.mjs.map