@vendasta/meetings 1.0.1 → 1.0.5

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/enums/index.mjs +2 -1
  2. package/esm2020/lib/_internal/enums/meeting-host.enum.mjs +12 -0
  3. package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
  4. package/esm2020/lib/_internal/interfaces/meeting-guest.interface.mjs +1 -1
  5. package/esm2020/lib/_internal/interfaces/meeting-host.interface.mjs +1 -1
  6. package/esm2020/lib/_internal/meeting-guest.api.service.mjs +7 -7
  7. package/esm2020/lib/_internal/meeting-host.api.service.mjs +9 -1
  8. package/esm2020/lib/_internal/objects/index.mjs +2 -2
  9. package/esm2020/lib/_internal/objects/meeting-guest.mjs +134 -90
  10. package/esm2020/lib/_internal/objects/meeting-host.mjs +20 -2
  11. package/esm2020/lib/guest/guest.service.mjs +1 -8
  12. package/fesm2015/vendasta-meetings.mjs +175 -96
  13. package/fesm2015/vendasta-meetings.mjs.map +1 -1
  14. package/fesm2020/vendasta-meetings.mjs +175 -100
  15. package/fesm2020/vendasta-meetings.mjs.map +1 -1
  16. package/lib/_internal/enums/index.d.ts +1 -0
  17. package/lib/_internal/enums/meeting-host.enum.d.ts +4 -0
  18. package/lib/_internal/interfaces/index.d.ts +1 -1
  19. package/lib/_internal/interfaces/meeting-guest.interface.d.ts +26 -19
  20. package/lib/_internal/interfaces/meeting-host.interface.d.ts +5 -1
  21. package/lib/_internal/meeting-guest.api.service.d.ts +3 -3
  22. package/lib/_internal/meeting-host.api.service.d.ts +2 -0
  23. package/lib/_internal/objects/index.d.ts +1 -1
  24. package/lib/_internal/objects/meeting-guest.d.ts +36 -27
  25. package/lib/_internal/objects/meeting-host.d.ts +5 -1
  26. package/lib/guest/guest.service.d.ts +0 -7
  27. package/package.json +1 -1
@@ -165,6 +165,18 @@ var TeamEventMeetingType;
165
165
  TeamEventMeetingType[TeamEventMeetingType["PRIORITY_ROUND_ROBIN"] = 3] = "PRIORITY_ROUND_ROBIN";
166
166
  })(TeamEventMeetingType || (TeamEventMeetingType = {}));
167
167
 
168
+ // *********************************
169
+ // Code generated by sdkgen
170
+ // DO NOT EDIT!.
171
+ //
172
+ // Enums.
173
+ // *********************************
174
+ var BookingFailureReason;
175
+ (function (BookingFailureReason) {
176
+ BookingFailureReason[BookingFailureReason["BOOKING_FAILURE_REASON_REGISTRATION_CUTOFF_EXCEEDED"] = 0] = "BOOKING_FAILURE_REASON_REGISTRATION_CUTOFF_EXCEEDED";
177
+ BookingFailureReason[BookingFailureReason["BOOKING_FAILURE_REASON_MAX_INVITEE_COUNT_EXCEEDED"] = 1] = "BOOKING_FAILURE_REASON_MAX_INVITEE_COUNT_EXCEEDED";
178
+ })(BookingFailureReason || (BookingFailureReason = {}));
179
+
168
180
  // *********************************
169
181
  // Code generated by sdkgen
170
182
  // DO NOT EDIT!.
@@ -2619,6 +2631,100 @@ class GetServiceResponse {
2619
2631
  return toReturn;
2620
2632
  }
2621
2633
  }
2634
+ class GetSessionMeetingRequest {
2635
+ static fromProto(proto) {
2636
+ let m = new GetSessionMeetingRequest();
2637
+ m = Object.assign(m, proto);
2638
+ return m;
2639
+ }
2640
+ constructor(kwargs) {
2641
+ if (!kwargs) {
2642
+ return;
2643
+ }
2644
+ Object.assign(this, kwargs);
2645
+ }
2646
+ toApiJson() {
2647
+ const toReturn = {};
2648
+ if (typeof this.sessionMeetingId !== 'undefined') {
2649
+ toReturn['sessionMeetingId'] = this.sessionMeetingId;
2650
+ }
2651
+ if (typeof this.slug !== 'undefined') {
2652
+ toReturn['slug'] = this.slug;
2653
+ }
2654
+ return toReturn;
2655
+ }
2656
+ }
2657
+ class GetSessionMeetingResponse {
2658
+ static fromProto(proto) {
2659
+ let m = new GetSessionMeetingResponse();
2660
+ m = Object.assign(m, proto);
2661
+ if (proto.start) {
2662
+ m.start = new Date(proto.start);
2663
+ }
2664
+ if (proto.hostUsers) {
2665
+ m.hostUsers = proto.hostUsers.map(HostUser.fromProto);
2666
+ }
2667
+ if (proto.form) {
2668
+ m.form = Form.fromProto(proto.form);
2669
+ }
2670
+ if (proto.attendeeCount) {
2671
+ m.attendeeCount = parseInt(proto.attendeeCount, 10);
2672
+ }
2673
+ if (proto.registeredAttendeeCount) {
2674
+ m.registeredAttendeeCount = parseInt(proto.registeredAttendeeCount, 10);
2675
+ }
2676
+ if (proto.registrationCutOffTime) {
2677
+ m.registrationCutOffTime = new Date(proto.registrationCutOffTime);
2678
+ }
2679
+ return m;
2680
+ }
2681
+ constructor(kwargs) {
2682
+ if (!kwargs) {
2683
+ return;
2684
+ }
2685
+ Object.assign(this, kwargs);
2686
+ }
2687
+ toApiJson() {
2688
+ const toReturn = {};
2689
+ if (typeof this.title !== 'undefined') {
2690
+ toReturn['title'] = this.title;
2691
+ }
2692
+ if (typeof this.location !== 'undefined') {
2693
+ toReturn['location'] = this.location;
2694
+ }
2695
+ if (typeof this.start !== 'undefined' && this.start !== null) {
2696
+ toReturn['start'] = 'toApiJson' in this.start ? this.start.toApiJson() : this.start;
2697
+ }
2698
+ if (typeof this.duration !== 'undefined') {
2699
+ toReturn['duration'] = this.duration;
2700
+ }
2701
+ if (typeof this.businessLogoUrl !== 'undefined') {
2702
+ toReturn['businessLogoUrl'] = this.businessLogoUrl;
2703
+ }
2704
+ if (typeof this.imageUrl !== 'undefined') {
2705
+ toReturn['imageUrl'] = this.imageUrl;
2706
+ }
2707
+ if (typeof this.hostUsers !== 'undefined' && this.hostUsers !== null) {
2708
+ toReturn['hostUsers'] = 'toApiJson' in this.hostUsers ? this.hostUsers.toApiJson() : this.hostUsers;
2709
+ }
2710
+ if (typeof this.description !== 'undefined') {
2711
+ toReturn['description'] = this.description;
2712
+ }
2713
+ if (typeof this.form !== 'undefined' && this.form !== null) {
2714
+ toReturn['form'] = 'toApiJson' in this.form ? this.form.toApiJson() : this.form;
2715
+ }
2716
+ if (typeof this.attendeeCount !== 'undefined') {
2717
+ toReturn['attendeeCount'] = this.attendeeCount;
2718
+ }
2719
+ if (typeof this.registeredAttendeeCount !== 'undefined') {
2720
+ toReturn['registeredAttendeeCount'] = this.registeredAttendeeCount;
2721
+ }
2722
+ if (typeof this.registrationCutOffTime !== 'undefined' && this.registrationCutOffTime !== null) {
2723
+ toReturn['registrationCutOffTime'] = 'toApiJson' in this.registrationCutOffTime ? this.registrationCutOffTime.toApiJson() : this.registrationCutOffTime;
2724
+ }
2725
+ return toReturn;
2726
+ }
2727
+ }
2622
2728
  class GuestCancelMeetingRequest {
2623
2729
  static fromProto(proto) {
2624
2730
  let m = new GuestCancelMeetingRequest();
@@ -2808,6 +2914,44 @@ class GuestRescheduleMeetingRequest {
2808
2914
  return toReturn;
2809
2915
  }
2810
2916
  }
2917
+ class InviteeRegisterSessionMeetingRequest {
2918
+ static fromProto(proto) {
2919
+ let m = new InviteeRegisterSessionMeetingRequest();
2920
+ m = Object.assign(m, proto);
2921
+ if (proto.attendee) {
2922
+ m.attendee = Contact.fromProto(proto.attendee);
2923
+ }
2924
+ if (proto.formAnswers) {
2925
+ m.formAnswers = Answers.fromProto(proto.formAnswers);
2926
+ }
2927
+ return m;
2928
+ }
2929
+ constructor(kwargs) {
2930
+ if (!kwargs) {
2931
+ return;
2932
+ }
2933
+ Object.assign(this, kwargs);
2934
+ }
2935
+ toApiJson() {
2936
+ const toReturn = {};
2937
+ if (typeof this.meetingId !== 'undefined') {
2938
+ toReturn['meetingId'] = this.meetingId;
2939
+ }
2940
+ if (typeof this.attendee !== 'undefined' && this.attendee !== null) {
2941
+ toReturn['attendee'] = 'toApiJson' in this.attendee ? this.attendee.toApiJson() : this.attendee;
2942
+ }
2943
+ if (typeof this.comment !== 'undefined') {
2944
+ toReturn['comment'] = this.comment;
2945
+ }
2946
+ if (typeof this.formAnswers !== 'undefined' && this.formAnswers !== null) {
2947
+ toReturn['formAnswers'] = 'toApiJson' in this.formAnswers ? this.formAnswers.toApiJson() : this.formAnswers;
2948
+ }
2949
+ if (typeof this.recaptchaToken !== 'undefined') {
2950
+ toReturn['recaptchaToken'] = this.recaptchaToken;
2951
+ }
2952
+ return toReturn;
2953
+ }
2954
+ }
2811
2955
  class IsoDateTimeRange {
2812
2956
  static fromProto(proto) {
2813
2957
  let m = new IsoDateTimeRange();
@@ -3005,94 +3149,6 @@ class RegisterSessionRequest {
3005
3149
  return toReturn;
3006
3150
  }
3007
3151
  }
3008
- class GetSessionMeetingRequest {
3009
- static fromProto(proto) {
3010
- let m = new GetSessionMeetingRequest();
3011
- m = Object.assign(m, proto);
3012
- return m;
3013
- }
3014
- constructor(kwargs) {
3015
- if (!kwargs) {
3016
- return;
3017
- }
3018
- Object.assign(this, kwargs);
3019
- }
3020
- toApiJson() {
3021
- const toReturn = {};
3022
- if (typeof this.meetingId !== 'undefined') {
3023
- toReturn['meetingId'] = this.meetingId;
3024
- }
3025
- if (typeof this.slug !== 'undefined') {
3026
- toReturn['slug'] = this.slug;
3027
- }
3028
- return toReturn;
3029
- }
3030
- }
3031
- class GetSessionMeetingResponse {
3032
- static fromProto(proto) {
3033
- let m = new GetSessionMeetingResponse();
3034
- m = Object.assign(m, proto);
3035
- if (proto.start) {
3036
- m.start = new Date(proto.start);
3037
- }
3038
- if (proto.hostUsers) {
3039
- m.hostUsers = proto.hostUsers.map(HostUser.fromProto);
3040
- }
3041
- if (proto.form) {
3042
- m.form = Form.fromProto(proto.form);
3043
- }
3044
- if (proto.registrationCutOffTime) {
3045
- m.registrationCutOffTime = new Date(proto.registrationCutOffTime);
3046
- }
3047
- return m;
3048
- }
3049
- constructor(kwargs) {
3050
- if (!kwargs) {
3051
- return;
3052
- }
3053
- Object.assign(this, kwargs);
3054
- }
3055
- toApiJson() {
3056
- const toReturn = {};
3057
- if (typeof this.title !== 'undefined') {
3058
- toReturn['title'] = this.title;
3059
- }
3060
- if (typeof this.location !== 'undefined') {
3061
- toReturn['location'] = this.location;
3062
- }
3063
- if (typeof this.start !== 'undefined' && this.start !== null) {
3064
- toReturn['start'] = 'toApiJson' in this.start ? this.start.toApiJson() : this.start;
3065
- }
3066
- if (typeof this.duration !== 'undefined') {
3067
- toReturn['duration'] = this.duration;
3068
- }
3069
- if (typeof this.businessLogoUrl !== 'undefined') {
3070
- toReturn['businessLogoUrl'] = this.businessLogoUrl;
3071
- }
3072
- if (typeof this.imageUrl !== 'undefined') {
3073
- toReturn['imageUrl'] = this.imageUrl;
3074
- }
3075
- if (typeof this.hostUsers !== 'undefined' && this.hostUsers !== null) {
3076
- toReturn['hostUsers'] = 'toApiJson' in this.hostUsers ? this.hostUsers.toApiJson() : this.hostUsers;
3077
- }
3078
- if (typeof this.description !== 'undefined') {
3079
- toReturn['description'] = this.description;
3080
- }
3081
- if (typeof this.form !== 'undefined' && this.form !== null) {
3082
- toReturn['form'] = 'toApiJson' in this.form ? this.form.toApiJson() : this.form;
3083
- }
3084
- if (typeof this.attendeeCount !== 'undefined') {
3085
- toReturn['attendeeCount'] = this.attendeeCount;
3086
- }
3087
- if (typeof this.registeredAttendeeCount !== 'undefined') {
3088
- toReturn['registeredAttendeeCount'] = this.registeredAttendeeCount;
3089
- }
3090
- if (typeof this.registrationCutOffTime !== 'undefined' && this.registrationCutOffTime !== null) {
3091
- toReturn['registrationCutOffTime'] = 'toApiJson' in this.registrationCutOffTime ? this.registrationCutOffTime.toApiJson() : this.registrationCutOffTime;
3092
- }
3093
- return toReturn;
3094
- }
3095
- }
3096
3152
 
3097
3153
  function enumStringToValue$3(enumRef, value) {
3098
3154
  if (typeof value === 'number') {
@@ -4681,6 +4737,9 @@ class ListAttendeesRequest {
4681
4737
  static fromProto(proto) {
4682
4738
  let m = new ListAttendeesRequest();
4683
4739
  m = Object.assign(m, proto);
4740
+ if (proto.pagingOptions) {
4741
+ m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);
4742
+ }
4684
4743
  return m;
4685
4744
  }
4686
4745
  constructor(kwargs) {
@@ -4694,6 +4753,9 @@ class ListAttendeesRequest {
4694
4753
  if (typeof this.meetingId !== 'undefined') {
4695
4754
  toReturn['meetingId'] = this.meetingId;
4696
4755
  }
4756
+ if (typeof this.pagingOptions !== 'undefined' && this.pagingOptions !== null) {
4757
+ toReturn['pagingOptions'] = 'toApiJson' in this.pagingOptions ? this.pagingOptions.toApiJson() : this.pagingOptions;
4758
+ }
4697
4759
  return toReturn;
4698
4760
  }
4699
4761
  }
@@ -5190,6 +5252,9 @@ class SessionAttendees {
5190
5252
  if (proto.formAnswers) {
5191
5253
  m.formAnswers = Answers.fromProto(proto.formAnswers);
5192
5254
  }
5255
+ if (proto.bookingFailureReason) {
5256
+ m.bookingFailureReason = enumStringToValue$2(BookingFailureReason, proto.bookingFailureReason);
5257
+ }
5193
5258
  return m;
5194
5259
  }
5195
5260
  constructor(kwargs) {
@@ -5218,6 +5283,15 @@ class SessionAttendees {
5218
5283
  if (typeof this.formAnswers !== 'undefined' && this.formAnswers !== null) {
5219
5284
  toReturn['formAnswers'] = 'toApiJson' in this.formAnswers ? this.formAnswers.toApiJson() : this.formAnswers;
5220
5285
  }
5286
+ if (typeof this.comment !== 'undefined') {
5287
+ toReturn['comment'] = this.comment;
5288
+ }
5289
+ if (typeof this.isBookingConfirmed !== 'undefined') {
5290
+ toReturn['isBookingConfirmed'] = this.isBookingConfirmed;
5291
+ }
5292
+ if (typeof this.bookingFailureReason !== 'undefined') {
5293
+ toReturn['bookingFailureReason'] = this.bookingFailureReason;
5294
+ }
5221
5295
  return toReturn;
5222
5296
  }
5223
5297
  }
@@ -5968,15 +6042,15 @@ class MeetingGuestApiService {
5968
6042
  return this.http.post(this._host + "/meetings.v1.MeetingGuest/GetService", request.toApiJson(), this.apiOptions())
5969
6043
  .pipe(map(resp => GetServiceResponse.fromProto(resp)));
5970
6044
  }
5971
- registerSession(r) {
5972
- const request = (r.toApiJson) ? r : new RegisterSessionRequest(r);
5973
- return this.http.post(this._host + "/meetings.v1.MeetingGuest/RegisterSession", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
5974
- }
5975
6045
  getSessionMeetingInfo(r) {
5976
6046
  const request = (r.toApiJson) ? r : new GetSessionMeetingRequest(r);
5977
- return this.http.post(this._host + "/meetings.v1.MeetingGuest/GetSessionMeetingRequest", request.toApiJson(), this.apiOptions())
6047
+ return this.http.post(this._host + "/meetings.v1.MeetingGuest/GetSessionMeetingInfo", request.toApiJson(), this.apiOptions())
5978
6048
  .pipe(map(resp => GetSessionMeetingResponse.fromProto(resp)));
5979
6049
  }
6050
+ inviteeRegisterSessionMeeting(r) {
6051
+ const request = (r.toApiJson) ? r : new InviteeRegisterSessionMeetingRequest(r);
6052
+ return this.http.post(this._host + "/meetings.v1.MeetingGuest/InviteeRegisterSessionMeeting", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
6053
+ }
5980
6054
  }
5981
6055
  MeetingGuestApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: MeetingGuestApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5982
6056
  MeetingGuestApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: MeetingGuestApiService, providedIn: 'root' });
@@ -6227,6 +6301,14 @@ class MeetingHostApiService {
6227
6301
  return this.http.post(this._host + "/meetings.v1.MeetingHost/ListAttendees", request.toApiJson(), this.apiOptions())
6228
6302
  .pipe(map(resp => ListAttendeesResponse.fromProto(resp)));
6229
6303
  }
6304
+ cancelSession(r) {
6305
+ const request = (r.toApiJson) ? r : new CancelMeetingRequest(r);
6306
+ return this.http.post(this._host + "/meetings.v1.MeetingHost/CancelSession", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
6307
+ }
6308
+ rescheduleSession(r) {
6309
+ const request = (r.toApiJson) ? r : new RescheduleMeetingRequest(r);
6310
+ return this.http.post(this._host + "/meetings.v1.MeetingHost/RescheduleSession", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
6311
+ }
6230
6312
  }
6231
6313
  MeetingHostApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: MeetingHostApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6232
6314
  MeetingHostApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: MeetingHostApiService, providedIn: 'root' });
@@ -6797,13 +6879,6 @@ class GuestService {
6797
6879
  rescheduleMeeting(req) {
6798
6880
  return this.guestAPIService.rescheduleMeeting(req).pipe(mapTo(null));
6799
6881
  }
6800
- registerSession(req) {
6801
- return this.guestAPIService.registerSession({
6802
- ...req,
6803
- attendees: req.attendees,
6804
- formAnswers: req.formAnswers,
6805
- }).pipe(mapTo(null));
6806
- }
6807
6882
  // getHost returns an individual host by their hostId
6808
6883
  getHost(req) {
6809
6884
  return this.guestAPIService.getHost(req).pipe(map(resp => HostFromApi(resp.host)));