@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
@@ -209,6 +209,9 @@ class MeetingSourceListRequest {
209
209
  if (typeof this.namespace !== 'undefined') {
210
210
  toReturn['namespace'] = this.namespace;
211
211
  }
212
+ if (typeof this.origin !== 'undefined') {
213
+ toReturn['origin'] = this.origin;
214
+ }
212
215
  return toReturn;
213
216
  }
214
217
  }
@@ -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();
@@ -4804,16 +4853,18 @@ class MeetingsService {
4804
4853
  * @deprecated Use listForUser instead. This method will result in the backend grabbing the userID from the user's JWT
4805
4854
  * This will eventually no longer be supported because it breaks our impersonation workflows.
4806
4855
  */
4807
- list(meetingSources, namespace) {
4856
+ list(meetingSources, namespace, origin) {
4808
4857
  return this._api.list({
4809
4858
  queriedSources: meetingSources,
4810
4859
  namespace: namespace,
4860
+ origin: origin,
4811
4861
  });
4812
4862
  }
4813
- listForUser(iamUserId, namespace, queriedSources) {
4863
+ listForUser(iamUserId, namespace, origin, queriedSources) {
4814
4864
  return this._api.list({
4815
4865
  iamUserId: iamUserId,
4816
4866
  namespace: namespace,
4867
+ origin: origin,
4817
4868
  queriedSources: queriedSources,
4818
4869
  });
4819
4870
  }
@@ -5221,6 +5272,11 @@ class MeetingHostApiService {
5221
5272
  return this.http.post(this._host + "/meetings.v1.MeetingHost/GetService", request.toApiJson(), this.apiOptions())
5222
5273
  .pipe(map(resp => GetServiceResponse.fromProto(resp)));
5223
5274
  }
5275
+ checkGroupOrServiceSlugExist(r) {
5276
+ const request = (r.toApiJson) ? r : new CheckGroupOrServiceSlugExistRequest(r);
5277
+ return this.http.post(this._host + "/meetings.v1.MeetingHost/CheckGroupOrServiceSlugExist", request.toApiJson(), this.apiOptions())
5278
+ .pipe(map(resp => CheckGroupOrServiceSlugExistResponse.fromProto(resp)));
5279
+ }
5224
5280
  }
5225
5281
  MeetingHostApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: MeetingHostApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5226
5282
  MeetingHostApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: MeetingHostApiService, providedIn: 'root' });
@@ -5709,6 +5765,14 @@ function ServiceFromApi(req) {
5709
5765
  };
5710
5766
  }
5711
5767
 
5768
+ var MeetingSourceOrigin;
5769
+ (function (MeetingSourceOrigin) {
5770
+ MeetingSourceOrigin["TaskManager"] = "task-manager";
5771
+ MeetingSourceOrigin["PartnerCenter"] = "partner-center";
5772
+ MeetingSourceOrigin["BusinessApp"] = "business-app";
5773
+ MeetingSourceOrigin["SalesCenter"] = "sales-center";
5774
+ })(MeetingSourceOrigin || (MeetingSourceOrigin = {}));
5775
+
5712
5776
  class GuestService {
5713
5777
  constructor(guestAPIService) {
5714
5778
  this.guestAPIService = guestAPIService;
@@ -5803,57 +5867,75 @@ class HostService {
5803
5867
  }
5804
5868
  // Use buildHostId to get an identifier that can be used in subsequent requests. See vendastaapis for more details
5805
5869
  buildHostId(req) {
5806
- return this.hostAPIService.buildHostId({
5870
+ return this.hostAPIService
5871
+ .buildHostId({
5807
5872
  userId: req.userId,
5808
5873
  // Gross typecast exists because I want to restrict the properties on the map (for now).
5809
- applicationContextProperties: req.applicationContextProperties
5810
- }).pipe(map(res => res.hostId || ''));
5874
+ applicationContextProperties: req.applicationContextProperties,
5875
+ })
5876
+ .pipe(map((res) => res.hostId || ""));
5811
5877
  }
5812
5878
  doesCalendarExist(calendarIdentifier) {
5813
- return this.hostAPIService.doesCalendarExist({ calendarIdentifier: calendarIdentifier }).pipe(map(resp => resp.exists));
5879
+ return this.hostAPIService
5880
+ .doesCalendarExist({ calendarIdentifier: calendarIdentifier })
5881
+ .pipe(map((resp) => resp.exists));
5814
5882
  }
5815
5883
  getCalendar(req) {
5816
- return this.hostAPIService.getCalendar({ calendarId: req.calendarId }).pipe(map(res => CalendarFromApi(res?.calendar)));
5884
+ return this.hostAPIService
5885
+ .getCalendar({ calendarId: req.calendarId })
5886
+ .pipe(map((res) => CalendarFromApi(res?.calendar)));
5817
5887
  }
5818
5888
  ensurePersonalCalendarExists(req) {
5819
- return this.hostAPIService.ensurePersonalCalendarExists({
5889
+ return this.hostAPIService
5890
+ .ensurePersonalCalendarExists({
5820
5891
  userId: req.userId,
5821
5892
  applicationContextProperties: req.applicationContextProperties,
5822
- }).pipe(map(res => res ? res.calendarId : ''));
5893
+ })
5894
+ .pipe(map((res) => (res ? res.calendarId : "")));
5823
5895
  }
5824
5896
  ensureGroupCalendarsExist(req) {
5825
- return this.hostAPIService.ensureGroupCalendarsExist({ externalIds: req.externalIds }).pipe(map(res => res?.calendarIds || []));
5897
+ return this.hostAPIService
5898
+ .ensureGroupCalendarsExist({ externalIds: req.externalIds })
5899
+ .pipe(map((res) => res?.calendarIds || []));
5826
5900
  }
5827
5901
  /*
5828
- createCalendar creates a calendar which meeting types can be created for and events can be booked on
5829
- The fields of a calendar are documented in https://github.com/vendasta/vendastaapis/blob/master/meetings/v1/shared.proto
5830
- */
5902
+ createCalendar creates a calendar which meeting types can be created for and events can be booked on
5903
+ The fields of a calendar are documented in https://github.com/vendasta/vendastaapis/blob/master/meetings/v1/shared.proto
5904
+ */
5831
5905
  createCalendar(req) {
5832
5906
  return this.hostAPIService.createCalendar(req);
5833
5907
  }
5834
5908
  updateCalendarSlug(calendarId, newSlug) {
5835
- return this.hostAPIService.updateCalendar({
5909
+ return this.hostAPIService
5910
+ .updateCalendar({
5836
5911
  calendarId: calendarId,
5837
5912
  calendarUpdate: { slug: newSlug },
5838
- fieldMask: { paths: ['slug'] },
5839
- }).pipe(mapTo(undefined));
5913
+ fieldMask: { paths: ["slug"] },
5914
+ })
5915
+ .pipe(mapTo(undefined));
5840
5916
  }
5841
5917
  updateCalendarHostUserIDs(calendarId, replacementHostUserIds) {
5842
- return this.hostAPIService.updateCalendar({
5918
+ return this.hostAPIService
5919
+ .updateCalendar({
5843
5920
  calendarId: calendarId,
5844
5921
  calendarUpdate: { hostUserIds: replacementHostUserIds },
5845
- fieldMask: { paths: ['host_user_ids'] },
5846
- }).pipe(mapTo(undefined));
5922
+ fieldMask: { paths: ["host_user_ids"] },
5923
+ })
5924
+ .pipe(mapTo(undefined));
5847
5925
  }
5848
5926
  getMeetingTypesForCalendars(req) {
5849
- return this.hostAPIService.getMeetingTypesForCalendars({ calendarIds: req.calendarIds }).pipe(map(res => {
5927
+ return this.hostAPIService
5928
+ .getMeetingTypesForCalendars({ calendarIds: req.calendarIds })
5929
+ .pipe(map((res) => {
5850
5930
  if (!res?.calendarMeetingTypesMap) {
5851
5931
  return {};
5852
5932
  }
5853
5933
  return Object.keys(res.calendarMeetingTypesMap).reduce((calendarToMeetingTypeMap, calendarId) => {
5854
- const meetingTypes = (res.calendarMeetingTypesMap[calendarId]?.meetingTypes || []).map(mt => MeetingTypeFromApi({
5934
+ const meetingTypes = (res.calendarMeetingTypesMap[calendarId]?.meetingTypes || []).map((mt) => MeetingTypeFromApi({
5855
5935
  meetingTypeApi: mt,
5856
- environment: onProductionGlobal() ? Environment.PROD : Environment.DEMO,
5936
+ environment: onProductionGlobal()
5937
+ ? Environment.PROD
5938
+ : Environment.DEMO,
5857
5939
  calendarId,
5858
5940
  metadata: req.metadata,
5859
5941
  }));
@@ -5865,22 +5947,24 @@ class HostService {
5865
5947
  }));
5866
5948
  }
5867
5949
  /*
5868
- listMeetingTypes returns a list of meeting types for a host
5869
- @param hostId: An identifier for an individual host
5870
- @param metadata: optional metadata to include on the meeting type booking link
5871
- @param calendarSlug: used to replace hostId in the url. Use it when you are confident you know the host's slug.
5872
- - calendarSlug IS NOT USED TO RETRIEVE MEETING TYPES, ONLY TO MAKE THE BOOKING URLS
5873
- */
5950
+ listMeetingTypes returns a list of meeting types for a host
5951
+ @param hostId: An identifier for an individual host
5952
+ @param metadata: optional metadata to include on the meeting type booking link
5953
+ @param calendarSlug: used to replace hostId in the url. Use it when you are confident you know the host's slug.
5954
+ - calendarSlug IS NOT USED TO RETRIEVE MEETING TYPES, ONLY TO MAKE THE BOOKING URLS
5955
+ */
5874
5956
  listMeetingTypes(req) {
5875
- return this.hostAPIService.listMeetingTypes(req).pipe(map(resp => {
5957
+ return this.hostAPIService.listMeetingTypes(req).pipe(map((resp) => {
5876
5958
  if (!resp || !resp.meetingTypes) {
5877
5959
  return [];
5878
5960
  }
5879
- return resp.meetingTypes.map(mt => {
5961
+ return resp.meetingTypes.map((mt) => {
5880
5962
  return MeetingTypeFromApi({
5881
5963
  meetingTypeApi: mt,
5882
5964
  calendarId: req.hostId,
5883
- environment: onProductionGlobal() ? Environment.PROD : Environment.DEMO,
5965
+ environment: onProductionGlobal()
5966
+ ? Environment.PROD
5967
+ : Environment.DEMO,
5884
5968
  metadata: req.metadata,
5885
5969
  calendarSlug: req.calendarSlug,
5886
5970
  });
@@ -5888,15 +5972,15 @@ class HostService {
5888
5972
  }));
5889
5973
  }
5890
5974
  /*
5891
- getBookingUrl returns a link that can be used to book a meeting with this host.
5892
- @param calendarId: An identifier for an individual host or grouping of hosts (i.e., team).
5893
- @param @deprecated hostId: An identifier for an individual host.
5894
- @param meetingTypeId: An optional identifier for the meeting type. Default: 30-minutes.
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
- */
5975
+ getBookingUrl returns a link that can be used to book a meeting with this host.
5976
+ @param calendarId: An identifier for an individual host or grouping of hosts (i.e., team).
5977
+ @param @deprecated hostId: An identifier for an individual host.
5978
+ @param meetingTypeId: An optional identifier for the meeting type. Default: 30-minutes.
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
  getBookingUrl(req) {
5901
5985
  return of(getBookingUrlImplementation({
5902
5986
  ...req,
@@ -5906,13 +5990,13 @@ class HostService {
5906
5990
  }));
5907
5991
  }
5908
5992
  /*
5909
- getGeneralBookingUrl returns a link that can be used to select a meeting type to book with the given calendar.
5910
- @param calendarId: An identifier for an individual host or grouping of hosts (i.e., team).
5911
- @param metadata: optional metadata to include in the url.
5912
- - metadata can be used to pre-fill certain form fields and will be stored during the booking process.
5913
- - metadata can be obtained by subscribing to the booking event.
5914
- @param calendarSlug: used to replace hostId in the url. Use it when you are confident you know the host's slug.
5915
- */
5993
+ getGeneralBookingUrl returns a link that can be used to select a meeting type to book with the given calendar.
5994
+ @param calendarId: An identifier for an individual host or grouping of hosts (i.e., team).
5995
+ @param metadata: optional metadata to include in the url.
5996
+ - metadata can be used to pre-fill certain form fields and will be stored during the booking process.
5997
+ - metadata can be obtained by subscribing to the booking event.
5998
+ @param calendarSlug: used to replace hostId in the url. Use it when you are confident you know the host's slug.
5999
+ */
5916
6000
  getGeneralBookingUrl(req) {
5917
6001
  return of(getGeneralBookingUrlImplementation({
5918
6002
  environment: onProductionGlobal() ? Environment.PROD : Environment.DEMO,
@@ -5922,14 +6006,14 @@ class HostService {
5922
6006
  }));
5923
6007
  }
5924
6008
  /*
5925
- getBookingUrlsMulti returns a mapping of hosts -> event types -> booking links.
5926
- @param calendarId: An identifier for an individual host or grouping of hosts.
5927
- @param meetingTypeSlug: meetingTypeSlugs are passed in the form {hostId: [meetingTypeSlug1, meetingTypeSlug2]}
5928
- @param metadata: optional metadata to include in the url.
5929
- - metadata can be used to pre-fill certain form fields and will be stored during the booking process.
5930
- - metadata can be obtained by subscribing to the booking event.
5931
- @param calendarSlug: used to replace hostId in the url. Use it when you are confident you know the host's slug.
5932
- */
6009
+ getBookingUrlsMulti returns a mapping of hosts -> event types -> booking links.
6010
+ @param calendarId: An identifier for an individual host or grouping of hosts.
6011
+ @param meetingTypeSlug: meetingTypeSlugs are passed in the form {hostId: [meetingTypeSlug1, meetingTypeSlug2]}
6012
+ @param metadata: optional metadata to include in the url.
6013
+ - metadata can be used to pre-fill certain form fields and will be stored during the booking process.
6014
+ - metadata can be obtained by subscribing to the booking event.
6015
+ @param calendarSlug: used to replace hostId in the url. Use it when you are confident you know the host's slug.
6016
+ */
5933
6017
  getBookingUrlsMulti(req, metadata, calendarSlug) {
5934
6018
  return of(Object.keys(req).reduce((hostMap, calendarId) => {
5935
6019
  return {
@@ -5941,16 +6025,20 @@ class HostService {
5941
6025
  calendarId,
5942
6026
  meetingTypeSlug,
5943
6027
  metadata,
5944
- environment: onProductionGlobal() ? Environment.PROD : Environment.DEMO,
6028
+ environment: onProductionGlobal()
6029
+ ? Environment.PROD
6030
+ : Environment.DEMO,
5945
6031
  calendarSlug,
5946
- })
6032
+ }),
5947
6033
  };
5948
- }, {})
6034
+ }, {}),
5949
6035
  };
5950
6036
  }, {}));
5951
6037
  }
5952
6038
  isHostConfigured(req) {
5953
- return this.hostAPIService.isHostConfigured(req).pipe(map((resp) => resp.isConfigured));
6039
+ return this.hostAPIService
6040
+ .isHostConfigured(req)
6041
+ .pipe(map((resp) => resp.isConfigured));
5954
6042
  }
5955
6043
  setGeneralAvailability(req) {
5956
6044
  const apiReq = {
@@ -5963,32 +6051,43 @@ class HostService {
5963
6051
  return this.hostAPIService.setGeneralAvailability(apiReq).pipe(mapTo(null));
5964
6052
  }
5965
6053
  listBookedMeetings(req) {
5966
- return this.hostAPIService.listBookedMeetings({
6054
+ return this.hostAPIService
6055
+ .listBookedMeetings({
5967
6056
  ...req,
5968
- pagingOptions: new PagedRequestOptions({ cursor: req.cursor, pageSize: req.pageSize }),
6057
+ pagingOptions: new PagedRequestOptions({
6058
+ cursor: req.cursor,
6059
+ pageSize: req.pageSize,
6060
+ }),
5969
6061
  filters: new ListBookedMeetingsRequestFilters(req.filters),
5970
6062
  timeZone: new TimeZone(req.timeZone),
5971
- }).pipe(map((resp) => {
5972
- const meetings = (resp.meetings || []).map(meeting => meetingFromApi(meeting));
6063
+ })
6064
+ .pipe(map((resp) => {
6065
+ const meetings = (resp.meetings || []).map((meeting) => meetingFromApi(meeting));
5973
6066
  return new PagedResponse(meetings, resp.pagingMetadata.nextCursor, resp.pagingMetadata.hasMore);
5974
6067
  }));
5975
6068
  }
5976
6069
  cancelMeeting(req) {
5977
- return this.hostAPIService.cancelMeeting({
5978
- ...req
5979
- }).pipe(mapTo(null));
6070
+ return this.hostAPIService
6071
+ .cancelMeeting({
6072
+ ...req,
6073
+ })
6074
+ .pipe(mapTo(null));
5980
6075
  }
5981
6076
  rescheduleMeeting(req) {
5982
- return this.hostAPIService.rescheduleMeeting({
5983
- ...req
5984
- }).pipe(mapTo(null));
6077
+ return this.hostAPIService
6078
+ .rescheduleMeeting({
6079
+ ...req,
6080
+ })
6081
+ .pipe(mapTo(null));
5985
6082
  }
5986
6083
  listAvailability(req) {
5987
- return this.hostAPIService.listAvailability(req).pipe(map(response => {
5988
- const results = (response.availabilityRules || []).filter(Boolean).map(a => {
6084
+ return this.hostAPIService.listAvailability(req).pipe(map((response) => {
6085
+ const results = (response.availabilityRules || [])
6086
+ .filter(Boolean)
6087
+ .map((a) => {
5989
6088
  return {
5990
- hostId: a.hostId || '',
5991
- meetingTypeId: a.meetingTypeId || '',
6089
+ hostId: a.hostId || "",
6090
+ meetingTypeId: a.meetingTypeId || "",
5992
6091
  day: a.day,
5993
6092
  timeSlot: a.timeSlot,
5994
6093
  timeZone: a.timeZone,
@@ -6013,51 +6112,71 @@ class HostService {
6013
6112
  * `Preferences` is an error.
6014
6113
  */
6015
6114
  updatePreferences(req) {
6016
- const fieldMask = getFieldMask({ o: req.preferences, updateFields: req.updateFields });
6115
+ const fieldMask = getFieldMask({
6116
+ o: req.preferences,
6117
+ updateFields: req.updateFields,
6118
+ });
6017
6119
  if (fieldMask.paths.length === 0) {
6018
6120
  return of();
6019
6121
  }
6020
- return this.hostAPIService.updateHostPreferences({
6122
+ return this.hostAPIService
6123
+ .updateHostPreferences({
6021
6124
  hostId: req.hostId,
6022
6125
  preferences: req.preferences,
6023
6126
  fieldMask,
6024
- }).pipe(mapTo(undefined));
6127
+ })
6128
+ .pipe(mapTo(undefined));
6025
6129
  }
6026
6130
  getPreferences(req) {
6027
- return this.hostAPIService.getHostPreferences({
6028
- hostId: req.hostId
6029
- }).pipe(map(response => PreferencesFromApi(response.preferences)));
6131
+ return this.hostAPIService
6132
+ .getHostPreferences({
6133
+ hostId: req.hostId,
6134
+ })
6135
+ .pipe(map((response) => PreferencesFromApi(response.preferences)));
6030
6136
  }
6031
6137
  getMeeting(meetingId, location) {
6032
- return this.hostAPIService.getHostMeeting({
6033
- meetingId: meetingId, location: location,
6034
- }).pipe(map((resp) => meetingFromApi(resp.meeting)));
6138
+ return this.hostAPIService
6139
+ .getHostMeeting({
6140
+ meetingId: meetingId,
6141
+ location: location,
6142
+ })
6143
+ .pipe(map((resp) => meetingFromApi(resp.meeting)));
6035
6144
  }
6036
6145
  updateMeetingMetadata(req) {
6037
- return this.hostAPIService.updateMeetingMetadata({
6146
+ return this.hostAPIService
6147
+ .updateMeetingMetadata({
6038
6148
  meetingId: req.meetingId,
6039
- metadata: req.metadata
6040
- }).pipe(mapTo(undefined));
6149
+ metadata: req.metadata,
6150
+ })
6151
+ .pipe(mapTo(undefined));
6041
6152
  }
6042
6153
  bookMeeting(req) {
6043
- return this.hostAPIService.bookMeeting(req).pipe(map((resp) => resp.meetingId));
6154
+ return this.hostAPIService
6155
+ .bookMeeting(req)
6156
+ .pipe(map((resp) => resp.meetingId));
6044
6157
  }
6045
6158
  // createDefaultMeetingTypes will create what Meeting Scheduler deems to be the default meeting types.
6046
6159
  // If the calendar already has meeting types, this is guaranteed to be a no-op.
6047
6160
  createDefaultMeetingTypes(req) {
6048
- return this.hostAPIService.createDefaultMeetingTypes({ calendarIds: req.calendarIds }).pipe(mapTo(undefined));
6161
+ return this.hostAPIService
6162
+ .createDefaultMeetingTypes({ calendarIds: req.calendarIds })
6163
+ .pipe(mapTo(undefined));
6049
6164
  }
6050
6165
  createMeetingType(req) {
6051
- const fieldMask = getFieldMask({ o: req.meetingType, updateFields: req.updateFields });
6166
+ const fieldMask = getFieldMask({
6167
+ o: req.meetingType,
6168
+ updateFields: req.updateFields,
6169
+ });
6052
6170
  if (fieldMask.paths.length === 0) {
6053
6171
  return of();
6054
6172
  }
6055
- return this.hostAPIService.createMeetingType({
6173
+ return this.hostAPIService
6174
+ .createMeetingType({
6056
6175
  meetingType: MeetingTypeToApi({ meetingType: req.meetingType }),
6057
6176
  fieldMask,
6058
- hostId: req.HostId
6177
+ hostId: req.HostId,
6059
6178
  })
6060
- .pipe(map(res => res.id));
6179
+ .pipe(map((res) => res.id));
6061
6180
  }
6062
6181
  /* updateMeetingType will update the meeting type fields.
6063
6182
  * It is guaranteed to only update the fields provided.
@@ -6075,23 +6194,32 @@ class HostService {
6075
6194
  * `MeetingType` is an error.
6076
6195
  */
6077
6196
  updateMeetingType(req) {
6078
- const fieldMask = getFieldMask({ o: req.meetingType, updateFields: req.updateFields });
6197
+ const fieldMask = getFieldMask({
6198
+ o: req.meetingType,
6199
+ updateFields: req.updateFields,
6200
+ });
6079
6201
  if (fieldMask.paths.length === 0) {
6080
6202
  return of();
6081
6203
  }
6082
- return this.hostAPIService.updateMeetingType({
6204
+ return this.hostAPIService
6205
+ .updateMeetingType({
6083
6206
  id: req.id,
6084
6207
  meetingType: MeetingTypeToApi({ meetingType: req.meetingType }),
6085
6208
  fieldMask,
6086
- hostId: req.HostId
6087
- }).pipe(mapTo(undefined));
6209
+ hostId: req.HostId,
6210
+ })
6211
+ .pipe(mapTo(undefined));
6088
6212
  }
6089
6213
  deleteMeetingType(req) {
6090
- return this.hostAPIService.deleteMeetingType({ id: req.id }).pipe(mapTo(undefined));
6214
+ return this.hostAPIService
6215
+ .deleteMeetingType({ id: req.id })
6216
+ .pipe(mapTo(undefined));
6091
6217
  }
6092
6218
  getHostsForCalendar(req) {
6093
- return this.hostAPIService.getHostsForCalendar({ calendarId: req.calendarId }).pipe(map(res => {
6094
- return (res.hostUsers || []).map(hostuser => {
6219
+ return this.hostAPIService
6220
+ .getHostsForCalendar({ calendarId: req.calendarId })
6221
+ .pipe(map((res) => {
6222
+ return (res.hostUsers || []).map((hostuser) => {
6095
6223
  return hostUserFromApi(hostuser);
6096
6224
  });
6097
6225
  }));
@@ -6103,71 +6231,105 @@ class HostService {
6103
6231
  return this.hostAPIService.sendMeetingRequestEmail(req);
6104
6232
  }
6105
6233
  createService(req) {
6106
- const fieldMask = getFieldMask({ o: req.service, updateFields: req.updateFields });
6234
+ const fieldMask = getFieldMask({
6235
+ o: req.service,
6236
+ updateFields: req.updateFields,
6237
+ });
6107
6238
  if (fieldMask.paths.length === 0) {
6108
6239
  return of();
6109
6240
  }
6110
- return this.hostAPIService.createService({
6241
+ return this.hostAPIService
6242
+ .createService({
6111
6243
  service: ServiceTypeToApi({ service: req.service }),
6112
6244
  fieldMask,
6113
- hostId: req.HostId
6114
- }).pipe(map(res => res.id));
6245
+ hostId: req.HostId,
6246
+ })
6247
+ .pipe(map((res) => res.id));
6115
6248
  }
6116
6249
  updateService(req) {
6117
- const fieldMask = getFieldMask({ o: req.service, updateFields: req.updateFields });
6250
+ const fieldMask = getFieldMask({
6251
+ o: req.service,
6252
+ updateFields: req.updateFields,
6253
+ });
6118
6254
  if (fieldMask.paths.length === 0) {
6119
6255
  return of();
6120
6256
  }
6121
- return this.hostAPIService.updateService({
6257
+ return this.hostAPIService
6258
+ .updateService({
6122
6259
  id: req.id,
6123
6260
  service: ServiceTypeToApi({ service: req.service }),
6124
6261
  fieldMask,
6125
- hostId: req.HostId
6126
- }).pipe(mapTo(undefined));
6262
+ hostId: req.HostId,
6263
+ })
6264
+ .pipe(mapTo(undefined));
6127
6265
  }
6128
6266
  deleteService(req) {
6129
- return this.hostAPIService.deleteService({ id: req.id, hostId: req.hostId }).pipe(mapTo(undefined));
6267
+ return this.hostAPIService
6268
+ .deleteService({ id: req.id, hostId: req.hostId })
6269
+ .pipe(mapTo(undefined));
6130
6270
  }
6131
6271
  listServices(req) {
6132
- return this.hostAPIService.listServices({ hostId: req.hostId }).pipe(map(res => {
6272
+ return this.hostAPIService.listServices({ hostId: req.hostId }).pipe(map((res) => {
6133
6273
  if (!res || !res.services) {
6134
6274
  return [];
6135
6275
  }
6136
- return res.services.map(service => ServiceFromApi({ serviceApi: service, environment: onProductionGlobal() ? Environment.PROD : Environment.DEMO }));
6276
+ return res.services.map((service) => ServiceFromApi({
6277
+ serviceApi: service,
6278
+ environment: onProductionGlobal()
6279
+ ? Environment.PROD
6280
+ : Environment.DEMO,
6281
+ }));
6137
6282
  }));
6138
6283
  }
6139
6284
  createGroup(req) {
6140
- const fieldMask = getFieldMask({ o: req.group, updateFields: req.updateFields });
6285
+ const fieldMask = getFieldMask({
6286
+ o: req.group,
6287
+ updateFields: req.updateFields,
6288
+ });
6141
6289
  if (fieldMask.paths.length === 0) {
6142
6290
  return of();
6143
6291
  }
6144
- return this.hostAPIService.createGroup({
6292
+ return this.hostAPIService
6293
+ .createGroup({
6145
6294
  group: GroupTypeToAPi({ group: req.group }),
6146
6295
  fieldMask,
6147
- hostId: req.HostId
6148
- }).pipe(map(res => res.id));
6296
+ hostId: req.HostId,
6297
+ })
6298
+ .pipe(map((res) => res.id));
6149
6299
  }
6150
6300
  updateGroup(req) {
6151
- const fieldMask = getFieldMask({ o: req.group, updateFields: req.updateFields });
6301
+ const fieldMask = getFieldMask({
6302
+ o: req.group,
6303
+ updateFields: req.updateFields,
6304
+ });
6152
6305
  if (fieldMask.paths.length === 0) {
6153
6306
  return of();
6154
6307
  }
6155
- return this.hostAPIService.updateGroup({
6308
+ return this.hostAPIService
6309
+ .updateGroup({
6156
6310
  id: req.id,
6157
6311
  group: GroupTypeToAPi({ group: req.group }),
6158
6312
  fieldMask,
6159
- hostId: req.HostId
6160
- }).pipe(mapTo(undefined));
6313
+ hostId: req.HostId,
6314
+ })
6315
+ .pipe(mapTo(undefined));
6161
6316
  }
6162
6317
  deleteGroup(req) {
6163
- return this.hostAPIService.deleteGroup({ id: req.id, hostId: req.hostId }).pipe(mapTo(undefined));
6318
+ return this.hostAPIService
6319
+ .deleteGroup({ id: req.id, hostId: req.hostId })
6320
+ .pipe(mapTo(undefined));
6164
6321
  }
6165
6322
  listGroups(req) {
6166
- return this.hostAPIService.listGroups({ hostId: req.hostId }).pipe(map(res => {
6323
+ return this.hostAPIService.listGroups({ hostId: req.hostId }).pipe(map((res) => {
6167
6324
  if (!res || !res.groups) {
6168
6325
  return [];
6169
6326
  }
6170
- return res.groups.map(group => GroupFromApi({ groupApi: group, environment: onProductionGlobal() ? Environment.PROD : Environment.DEMO }));
6327
+ return res.groups.map((group) => GroupFromApi({
6328
+ groupApi: group,
6329
+ environment: onProductionGlobal()
6330
+ ? Environment.PROD
6331
+ : Environment.DEMO,
6332
+ }));
6171
6333
  }));
6172
6334
  }
6173
6335
  getGroup(req) {
@@ -6176,17 +6338,22 @@ class HostService {
6176
6338
  getService(req) {
6177
6339
  return this.hostAPIService.getService(req);
6178
6340
  }
6341
+ checkGroupOrServiceSlugExist(req) {
6342
+ return this.hostAPIService
6343
+ .checkGroupOrServiceSlugExist(req)
6344
+ .pipe(map((res) => res.exists));
6345
+ }
6179
6346
  }
6180
6347
  HostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: HostService, deps: [{ token: MeetingHostApiService }], target: i0.ɵɵFactoryTarget.Injectable });
6181
- HostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: HostService, providedIn: 'root' });
6348
+ HostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: HostService, providedIn: "root" });
6182
6349
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: HostService, decorators: [{
6183
6350
  type: Injectable,
6184
- args: [{ providedIn: 'root' }]
6351
+ args: [{ providedIn: "root" }]
6185
6352
  }], ctorParameters: function () { return [{ type: MeetingHostApiService }]; } });
6186
6353
 
6187
6354
  /**
6188
6355
  * Generated bundle index. Do not edit.
6189
6356
  */
6190
6357
 
6191
- 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 };
6358
+ 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 };
6192
6359
  //# sourceMappingURL=vendasta-meetings.mjs.map