medos-sdk 1.1.13 → 1.1.14

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.
@@ -142,6 +142,7 @@ export interface AppointmentState {
142
142
  bookingOptionType: BookingOptionType;
143
143
  showPackageExplorer: boolean;
144
144
  packagesLoading: boolean;
145
+ arePackagesConfigured: boolean;
145
146
  bookingType: "PACKAGE_PURCHASE" | "ONE_TIME_APPOINTMENT" | "USE_ACTIVE_PACKAGE";
146
147
  paymentMode: "CASH" | "CARD" | string;
147
148
  packageConfigId?: number;
@@ -41,6 +41,7 @@ export const INITIAL_STATE = {
41
41
  bookingOptionType: null,
42
42
  showPackageExplorer: false,
43
43
  packagesLoading: false,
44
+ arePackagesConfigured: false,
44
45
  bookingType: "ONE_TIME_APPOINTMENT",
45
46
  paymentMode: "CASH",
46
47
  packageConfigId: undefined,
@@ -1,3 +1,3 @@
1
- export declare const API_BASE_URL = "https://api.medos.one/v1";
1
+ export declare const API_BASE_URL = "https://api-dev.medapi.in/v1";
2
2
  export declare const MONTHS: string[];
3
3
  export declare const WEEKDAYS: string[];
@@ -1,4 +1,4 @@
1
- export const API_BASE_URL = "https://api.medos.one/v1";
1
+ export const API_BASE_URL = "https://api-dev.medapi.in/v1";
2
2
  export const MONTHS = [
3
3
  "January",
4
4
  "February",
@@ -1,5 +1,5 @@
1
1
  import axios from "axios";
2
- import { API_BASE_URL } from "../components";
2
+ import { API_BASE_URL } from "../components/constants";
3
3
  let sessionToken = null;
4
4
  const AuthService = {
5
5
  async init(apiKey) {
@@ -1,3 +1,5 @@
1
+ import { Doctor } from "../services/AppointmentService";
2
+ import { SessionPack, AvailablePackage, Patient } from "../components/appointment-booking/types";
1
3
  interface AppointmentCalendarWidgetOptions {
2
4
  containerId: string;
3
5
  apiKey?: string;
@@ -20,6 +22,7 @@ declare class AppointmentCalendarWidget {
20
22
  private bloodGroupSelect;
21
23
  constructor(container: HTMLElement | string, options: AppointmentCalendarWidgetOptions);
22
24
  private init;
25
+ private loadWorkspaceConfiguration;
23
26
  private loadAddresses;
24
27
  private handleAddressChange;
25
28
  private loadSlots;
@@ -28,6 +31,7 @@ declare class AppointmentCalendarWidget {
28
31
  private updatePatientDetailsButtonState;
29
32
  private sendOtp;
30
33
  private verifyOtp;
34
+ private processOtpVerificationResponse;
31
35
  private submitAppointment;
32
36
  private goToNext;
33
37
  private goBack;
@@ -41,6 +45,8 @@ declare class AppointmentCalendarWidget {
41
45
  private renderPackageExplorerStep;
42
46
  private renderLocationDoctorStep;
43
47
  private renderNewAppointmentStep;
48
+ private groupSlotsByPeriod;
49
+ private renderGroupedSlots;
44
50
  private renderPatientSelectionStep;
45
51
  private renderPatientDetailsStep;
46
52
  private renderAppointmentSummaryStep;
@@ -49,6 +55,8 @@ declare class AppointmentCalendarWidget {
49
55
  private formatTime;
50
56
  private calculateDuration;
51
57
  private attachEventListeners;
58
+ private handleSelectExistingPatient;
59
+ private handleProceedAsNewPatient;
52
60
  private getPlaceholderPatients;
53
61
  private escapeHtml;
54
62
  private isValidDateOfBirth;
@@ -57,6 +65,74 @@ declare class AppointmentCalendarWidget {
57
65
  private safeFormatDateOfBirth;
58
66
  private getDateOfBirthErrorMessage;
59
67
  private displayFieldValidationError;
68
+ handleSubmitAppointment(): Promise<void>;
69
+ handleOtpVerification(otpCode: string): Promise<void>;
70
+ handleAddressSelect(addressId: number): Promise<void>;
71
+ handleDoctorSelect(doctorId: number): void;
72
+ handleDateSelect(date: Date): void;
73
+ handleSlotSelect(slot: {
74
+ start: string;
75
+ end: string;
76
+ id?: string;
77
+ }): void;
78
+ handleSessionPackSelect(sessionPack: SessionPack): void;
79
+ handleExplorePackages(): void;
80
+ handlePackageSelect(packageItem: AvailablePackage): void;
81
+ handleNewAppointmentSelect(): void;
82
+ handlePatientSelect(patient: Patient): void;
83
+ handleNewPatient(): void;
84
+ goToNextStep(): void;
85
+ goBackStep(): void;
86
+ getState(): {
87
+ step: number;
88
+ loading: boolean;
89
+ error: string | null;
90
+ workspaceId: number | null;
91
+ addresses: import("../services/AppointmentService").AddressItem[];
92
+ addressDoctorsMap: Record<number, Doctor[]>;
93
+ selectedAddress: number | null;
94
+ selectedDoctor: number | null;
95
+ selectedDate: Date;
96
+ slots: import("../services/AppointmentService").Slot[];
97
+ selectedSlot: import("../services/AppointmentService").Slot | null;
98
+ consultationMode: "ONLINE" | "OFFLINE";
99
+ consultationCharge: string;
100
+ patientName: string;
101
+ patientAge: string;
102
+ patientEmail: string;
103
+ patientGender: string;
104
+ bloodGroup: string;
105
+ patientDob: string;
106
+ patientAddress: string;
107
+ patientCity: string;
108
+ patientState: string;
109
+ patientCountry: string;
110
+ patientZipcode: string;
111
+ patientLandmark: string;
112
+ countryCode: string;
113
+ patientPhone: string;
114
+ otpCode: string;
115
+ otpSent: boolean;
116
+ otpVerified: boolean;
117
+ otpSending: boolean;
118
+ otpVerifying: boolean;
119
+ verifiedPatients: Patient[];
120
+ selectedPatient: Patient | null;
121
+ useExistingPatient: boolean;
122
+ userSessionPacks: SessionPack[];
123
+ availablePackages: AvailablePackage[];
124
+ selectedSessionPack: SessionPack | null;
125
+ selectedNewPackage: AvailablePackage | null;
126
+ bookingOptionType: import("../components/appointment-booking/types").BookingOptionType;
127
+ showPackageExplorer: boolean;
128
+ packagesLoading: boolean;
129
+ arePackagesConfigured: boolean;
130
+ bookingType: "PACKAGE_PURCHASE" | "ONE_TIME_APPOINTMENT" | "USE_ACTIVE_PACKAGE";
131
+ paymentMode: "CASH" | "CARD" | string;
132
+ packageConfigId?: number;
133
+ patientPackageId?: number;
134
+ packageAmount?: number;
135
+ };
60
136
  destroy(): void;
61
137
  }
62
138
  export declare function initAppointmentCalendar(options: AppointmentCalendarWidgetOptions): AppointmentCalendarWidget;