oro-sdk-apis 3.2.3 → 3.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"oro-sdk-apis.cjs.development.js","sources":["../src/helpers/hash.ts","../src/services/axios.ts","../src/services/api.ts","../src/services/apisPracticeManager.ts","../src/models/consult.ts","../src/models/diagnosis.ts","../src/models/error.ts","../src/models/practice.ts","../src/models/vault.ts","../src/models/workflow.ts","../src/models/search.ts","../src/services/consult.ts","../src/services/diagnosis.ts","../src/services/guard.ts","../src/services/search.ts","../src/services/practice.ts","../src/services/teller.ts","../src/services/vault.ts","../src/services/workflow.ts","../src/helpers/init.ts"],"sourcesContent":["import { sha256 } from 'hash.js'\nimport { Buffer } from 'buffer/'\n\n/**\n * This function return a base64 string representation of a hashed string\n * @param value the string to hash\n * @returns a base64 string representation of a hashed value\n */\nexport function hashToBase64String(value: string): string {\n return Buffer.from(sha256().update(value).digest('hex'), 'hex').toString('base64')\n}\n","import type { AxiosRequestConfig } from 'axios'\nimport axios, { AxiosInstance } from 'axios'\n\n\nexport class AxiosService {\n protected axios: AxiosInstance\n\n constructor(\n config?: AxiosRequestConfig\n ) {\n if (!config) config = {}\n\n this.axios = axios.create(config)\n }\n\n protected async apiRequest(config: AxiosRequestConfig, url: string, data?: any) {\n if (!config.headers) config.headers = {}\n\n config.headers['Content-Type'] = 'application/json'\n\n return this.axios({\n ...config,\n url,\n data: data,\n }).then((res) => {\n return res.data\n })\n }\n\n protected async apiRequestHeader(config: AxiosRequestConfig, url: string, headerToRetrieve?: string, data?: any,) {\n if (!config.headers) config.headers = {}\n\n config.headers['Content-Type'] = 'application/json'\n\n return this.axios({\n ...config,\n url,\n data: data,\n }).then((res) => {\n if (headerToRetrieve) {\n return res.headers[headerToRetrieve] ?? res.headers[headerToRetrieve.toLowerCase()]\n }\n\n return res.headers\n })\n }\n\n public get<T = any>(url: string, config?: AxiosRequestConfig): Promise<T> {\n return this.apiRequest({ ...config, method: 'get' }, url)\n }\n\n public deleteRequest<T = any>(\n url: string,\n config?: AxiosRequestConfig\n ): Promise<T> {\n return this.apiRequest({ ...config, method: 'delete' }, url)\n }\n\n public post<T = any>(\n url: string,\n data?: any,\n config?: AxiosRequestConfig\n ): Promise<T> {\n return this.apiRequest({ ...config, method: 'post' }, url, data)\n }\n\n public put<T = any>(\n url: string,\n data: any,\n config?: AxiosRequestConfig\n ): Promise<T> {\n return this.apiRequest({ ...config, method: 'put' }, url, data)\n }\n\n public patch<T = any>(\n url: string,\n data: any,\n config?: AxiosRequestConfig\n ): Promise<T> {\n return this.apiRequest({ ...config, method: 'patch' }, url, data)\n }\n\n public head<T = any>(\n url: string,\n config?: AxiosRequestConfig,\n headerToRetrieve?: string,\n data?: any\n ): Promise<T> {\n return this.apiRequestHeader({ ...config, method: 'head' }, url, headerToRetrieve, data)\n }\n}\n","import type { AxiosRequestConfig } from 'axios'\nimport createAuthRefreshInterceptor from 'axios-auth-refresh'\nimport { AuthRefreshFunc, Tokens } from '../models'\nimport { AxiosService } from './axios'\nimport { GuardRequestConfig } from './guard'\n\nexport class APIService extends AxiosService {\n private authRefreshFn?: AuthRefreshFunc\n private tokens: Tokens = {}\n\n /**\n * The API Service lets you use an axios API and handles oro backend services authentification via JWT tokens\n * @param useLocalStorage if set to true, tokens will be stored in localStorage\n * @param config (optional) an axios config\n * @param tokenRefreshFailureCallback (optional) callback to call when failing to refresh the auth token\n */\n constructor(\n private useLocalStorage: boolean,\n config?: AxiosRequestConfig,\n private tokenRefreshFailureCallback?: (err: Error) => void\n ) {\n super(config)\n const self = this\n\n this.axios.interceptors.request.use(\n (config) => {\n const token = (config as GuardRequestConfig).useRefreshToken\n ? self.getTokens().refreshToken\n : self.getTokens().accessToken\n\n config.headers = {\n ...config.headers,\n Authorization: `Bearer ${token}`,\n }\n return config\n },\n (error) => {\n Promise.reject(error)\n }\n )\n\n createAuthRefreshInterceptor(\n this.axios,\n async function (failedRequest) {\n if (self.authRefreshFn) {\n try {\n let tokenResp = await self.authRefreshFn(self.getTokens().refreshToken)\n self.setTokens({\n accessToken: tokenResp.accessToken,\n refreshToken: tokenResp.refreshToken,\n })\n failedRequest.response.config.headers['Authorization'] = `Bearer ${\n self.getTokens().accessToken\n }`\n return Promise.resolve()\n } catch (e) {\n console.error('an error occured while refreshing tokens (notifying callback)', e)\n if (self.tokenRefreshFailureCallback) self.tokenRefreshFailureCallback(failedRequest)\n return Promise.resolve() // We keep it like that. Otherwise, it seems to break the api service will it is not needed\n // return Promise.reject(e)\n }\n }\n console.error('The request could not refresh the token (authRefreshFn was not set)', failedRequest)\n return Promise.resolve() // We keep it like that. Otherwise, it seems to break the api service will it is not needed\n // return Promise.reject(failedRequest)\n },\n { statusCodes: [401, 403] }\n )\n }\n\n public setAuthRefreshFn(fn: AuthRefreshFunc) {\n this.authRefreshFn = fn\n }\n\n public setTokens(tokens: Tokens) {\n if (this.useLocalStorage) {\n localStorage.setItem('tokens', JSON.stringify(tokens))\n }\n this.tokens = tokens\n }\n\n public getTokens(): Tokens {\n if (this.useLocalStorage) {\n let tokens: Tokens = {}\n const item = localStorage.getItem('tokens')\n if (item) {\n tokens = JSON.parse(item)\n }\n return tokens\n } else {\n return this.tokens\n }\n }\n}\n","import { init } from '../helpers'\nimport { AuthTokenResponse, ServiceCollection, ServiceCollectionRequest } from '../models'\nimport { GuardService } from './guard'\n\n/**\n * This service enables you to handle one authentication token per practice\n */\nexport class ApisPracticeManager {\n private practiceInstances = new Map<string, ServiceCollection>()\n\n /**\n * The constructor\n * @param serviceCollReq the services to initialize. Only filled urls will get corresponding service to be initialized.\n * It will be used each time a new practices needs a `ServiceCollection`\n * @param getAuthTokenCbk the callback function used to get a new JWT token\n * @param useLocalStorage (default: false) if true store tokens into local storage (only for browsers)\n */\n constructor(\n private serviceCollReq: ServiceCollectionRequest,\n private getAuthTokenCbk: (guard: GuardService, practiceUuid: string) => Promise<AuthTokenResponse>,\n private useLocalStorage = false\n ) {}\n\n /**\n * This function is used to get a `ServiceCollection` associated to a practice. If missing, it will initialize a new `ServiceCollection`.\n * @param practiceUuid the uuid of the practice\n * @returns a promise holding a `ServiceCollection`\n */\n public async get(practiceUuid: string): Promise<ServiceCollection> {\n const practiceInstance = this.practiceInstances.get(practiceUuid)\n if (practiceInstance) return practiceInstance\n\n const newPracticeInstance = init(this.serviceCollReq, undefined, this.useLocalStorage)\n\n // Create one auth token callback per practice since the practice uuid needs to change\n const authTokenFunc = async () => {\n if (newPracticeInstance.guardService) {\n console.log(`\\x1b[36m[Auth] Refresh auth called (practiceUuid: ${practiceUuid})\\x1b[36m`)\n return await this.getAuthTokenCbk(newPracticeInstance.guardService, practiceUuid)\n } else {\n throw Error('[Auth] Unable to refresh token guard service is undefined')\n }\n }\n\n // Initialize the M2M token\n await authTokenFunc()\n\n // Set the refresh tokens callback\n newPracticeInstance.apiService.setAuthRefreshFn(authTokenFunc)\n\n this.practiceInstances.set(practiceUuid, newPracticeInstance)\n\n return newPracticeInstance\n }\n}\n","export enum AssistantType {\n MedicalSecretary = 'MedicalSecretary',\n Nurse = 'Nurse',\n Specialist = 'Specialist',\n Administrative = 'Administrative',\n Other = 'Other',\n}\n\nexport interface ConsultAssignedAssistant {\n id?: number ///optional for insertion\n uuidConsult: string\n uuidAssistant: string\n type: AssistantType\n tagSpecialty?: string\n duuidCurrentTaskDescription?: string\n}\n\nexport enum TransmissionKind {\n Fax = 'Fax',\n Email = 'Email',\n SMS = 'SMS',\n EncryptedEmail = 'EncryptedEmail',\n Logs = 'Logs',\n API = 'API',\n Other = 'Other',\n}\n\nexport enum TransmissionStatus {\n Preparing = 'Preparing',\n Sending = 'Sending',\n Sent = 'Sent',\n Retrying = 'Retrying',\n Failed = 'Failed',\n DriverError = 'DriverError',\n TimedOut = 'TimedOut',\n ReceiverNotExist = 'ReceiverNotExist',\n ReceiverNotAnswering = 'ReceiverNotAnswering',\n ReceiverIncompatible = 'ReceiverIncompatible',\n}\n\nexport interface ConsultTransmission {\n id: number\n uuidConsult: string\n kind: TransmissionKind\n status: TransmissionStatus\n nameDriverReceiver: string\n addressReceiver: string\n idDriverForTransmission: string\n txtLastDriverMessage: string\n numTry: number\n numTryLeft: number\n delay: number\n tsFirstTry: string\n tsLastStatusUpdate: string\n keyWebhookSecret: string\n}\n\nexport enum ConsultType {\n Onboard = 'Onboard',\n Refill = 'Refill',\n}\n\nexport enum FeeStatus {\n NoFee = 'NoFee',\n Pending = 'Pending',\n Paid = 'Paid',\n Reimbursed = 'Reimbursed',\n Cancelled = 'Cancelled',\n Contested = 'Contested',\n}\n\nexport enum MedicalStatus {\n Creating = 'Creating',\n New = 'New',\n ToAnswer = 'ToAnswer',\n Answered = 'Answered',\n Closed = 'Closed',\n Reopened = 'Reopened',\n Archived = 'Archived',\n Failed = 'Failed',\n}\n\nexport enum TaskStatus {\n None = 'None',\n ToDo = 'ToDo',\n InProgress = 'InProgress',\n Blocked = 'Blocked',\n Done = 'Done',\n}\n\nexport enum ClosedReasonType {\n /**\n * A completed consultation\n */\n Completed = 'Completed',\n /**\n * The conclusion was that what the patient submitted was not a disease\n */\n NotADisease = 'NotADisease',\n /**\n * The consultation was not appropriate for virtual\n */\n NotAppropriateForVirtual = 'NotAppropriateForVirtual',\n /**\n * Any other reason why the consultation was closed\n */\n Other = 'Other',\n /**\n * A consultation that is required to be done in person\n */\n RequiresInPerson = 'RequiresInPerson',\n}\n\nexport interface ClosedConsultReasonInsertFields {\n /**\n * The uuid of the consultation\n */\n consult_uuid: string\n /**\n * The reason why the consultation was closed\n */\n closed_reason_type: ClosedReasonType\n /**\n * The description why the consultation was closed\n */\n closed_reason_description: string\n /**\n * When the consultation was closed\n */\n created_at: string\n}\n\nexport interface ConsultClosedReason {\n /**\n * The reason why the consultation was closed\n */\n closedReasonType: ClosedReasonType\n /**\n * The description why the consultation was closed\n */\n closedReasonDescription?: string\n}\n\nexport interface ConsultRequest {\n uuidPractice: string\n consultType?: ConsultType\n tagSpecialtyRequired: string\n idStripeInvoiceOrPaymentIntent: string\n isoLocalityRequired?: string\n isoLanguageRequired: string\n uuidParent?: string\n}\nexport interface Consult {\n uuid: string\n uuidPracticeAdmin: string\n uuidPractice: string\n tagSpecialtyRequired: string\n isoLanguageRequired: string\n idPracticePayment: number\n statusFee?: FeeStatus\n isoLocalityRequired: string\n statusMedical?: MedicalStatus\n consultType: ConsultType\n uuidAssignedDoctor: string\n uuidCurrentAssigned: string\n uuidParent?: string\n statusTask?: TaskStatus\n hasTransmissions?: boolean\n assignedAssistant?: ConsultAssignedAssistant[]\n closeConsultReason?: ConsultClosedReason\n shortId?: string\n createdAt?: string\n expiresAt?: string\n}\n","export enum VisibilityType {\n Generic = 'Generic',\n Private = 'Private',\n Instance = 'Instance',\n}\n\nexport type DiagnosisType = VisibilityType\n\nexport type TreatmentType = VisibilityType\n\nexport interface DiagnosisRequest {\n uuid?: string\n name: string\n description: string\n type: DiagnosisType\n parentUuid?: string\n language: string\n tags?: string[]\n urlMultimedia?: string\n}\n\nexport interface Diagnosis extends DiagnosisRequest {\n uuid: string\n uuidPractice: string\n uuidPractitioner?: string\n createdAt: string\n}\n\nexport interface TreatmentRequest {\n uuid?: string\n uuidDiagnosis?: string\n uuidParentTreatment?: string\n name: string\n description: string\n refillable?: boolean\n urlMultimedia?: string\n type?: TreatmentType\n}\n\nexport interface Treatment extends TreatmentRequest {\n uuid: string\n uuidDiagnosis: string\n uuidPractitioner?: string\n createdAt: string\n}\n\nexport enum DrugType {\n Generic = 'Generic',\n Instance = 'Instance',\n}\n\nexport interface DrugRequest {\n name: string // name of the drug\n description?: string // Description of the drug\n type: DrugType // Entry type\n language: string // drug locale\n posology?: string // drug posology\n sideEffects?: string // Side effects of the drug\n imageUrl?: string // Image URL to the drug\n parentUuid?: string // (optional) parent uuid of the drug. In case of DrugType.Instance\n uuid?: string // uuid of the drug (will be used as parentUuid in case of creation of new drug)\n}\n\nexport interface Drug extends DrugRequest {\n uuid: string\n uuidPractice: string\n uuidPractitioner?: string\n createdAt: string\n}\n\n/**\n * Status of the prescription\n * Right now, it only serves a soft delete flag\n */\nexport enum PrescriptionStatus {\n Existing = 'Existing',\n Deleted = 'Deleted',\n}\n\nexport interface PrescriptionRequest {\n uuid?: string\n uuidTreatment?: string\n uuidDrug?: string\n quantity: string\n sig: string\n renewal: string\n}\n\nexport interface Prescription extends PrescriptionRequest {\n uuid: string\n uuidTreatment: string\n status?: PrescriptionStatus\n createdAt: string\n}\n\nexport enum PlanStatus {\n Pending = 'Pending',\n Accepted = 'Accepted',\n Rejected = 'Rejected',\n}\n\nexport interface TreatmentPlan {\n uuid: string\n uuidConsult: string\n uuidDiagnosis: string\n uuidTreatment?: string\n notes?: string\n status: PlanStatus\n decidedAt: string\n createdAt: string\n}\n\nexport interface DrugPrescription {\n prescription: Prescription\n drug: Drug\n}\n\nexport interface TreatmentAndDrugPrescription {\n treatmentsHistory?: TreatmentHistory[]\n notes?: string\n status: PlanStatus\n uuidTreatmentPlan: string\n /**\n * this field is used to store the datetime when the patient accepted or refused the prescription\n */\n decidedAt?: string\n createdAt: string\n}\n\n/**\n * An entry in the history of the treatments of the patient.\n * The history entry consists of the treatment and the prescriptions and the drugs\n * that were prescribed to the patient at that point of history\n */\nexport interface TreatmentHistory {\n treatment: Treatment\n prescriptionsAndDrugs: DrugPrescription[]\n}\n\nexport interface TreatmentPlans {\n uuidConsult: string\n diagnosis: Diagnosis\n plans?: TreatmentAndDrugPrescription[]\n}\n\nexport interface DrugPrescriptionRequest {\n prescription: PrescriptionRequest\n drug: DrugRequest\n}\n\nexport interface TreatmentAndDrugPrescriptionRequest {\n trackingId: string\n treatment: TreatmentRequest\n prescriptionsAndDrugs?: DrugPrescriptionRequest[]\n notes?: string\n}\n\nexport interface TreatmentPlansRequest {\n uuidConsult: string\n diagnosis: DiagnosisRequest\n plans?: TreatmentAndDrugPrescriptionRequest[]\n}\n\nexport interface TreatmentAndDrugPrescriptionUpdateRequest {\n treatment: Treatment\n prescriptionsAndDrugs?: DrugPrescriptionRequest[]\n notes?: string\n}\n\nexport interface TreatmentPlanUpdateRequest extends TreatmentPlansRequest {\n uuidConsult: string\n diagnosis: DiagnosisRequest\n plan: TreatmentAndDrugPrescriptionUpdateRequest\n /**\n * request to refill the treatment plan\n */\n refill?: boolean\n}\n\nexport interface TreatmentPlansResponseEntry {\n trackingId?: string // can be undefined if treatmentPlan does not contain a treatment\n treatmentPlan: TreatmentPlan\n}\n\nexport interface TreatmentPlansResponse extends Array<TreatmentPlansResponseEntry> {}","export class AuthenticationFailed extends Error { }\nexport class AuthenticationBadRequest extends Error { }\nexport class AuthenticationServerError extends Error { }\nexport class AuthenticationUnconfirmedEmail extends Error { }\nexport class IdentityCreationFailed extends Error { }\nexport class IdentityCreationBadRequest extends Error { }\nexport class IdentityCreationConflict extends Error { }\nexport class VaultDataMissing extends Error { }","import { PlaceData } from '.'\n\nexport enum WorkflowType {\n Onboard = 'Onboard',\n Followup = 'Followup',\n Renew = 'Renew',\n DataRetrieve = 'DataRetrieve',\n}\n\nexport enum RateDimension {\n RatioOnTotal = 'RatioOnTotal',\n FixedOnTotal = 'FixedOnTotal',\n RatioPlatformFee = 'RatioPlatformFee',\n FixedPlatformFee = 'FixedPlatformFee',\n RatioOnPlatformFeeTotal = 'RatioOnPlatformFeeTotal',\n FixedOnPlatformFeeTotal = 'FixedOnPlatformFeeTotal',\n RatioOnItem = 'RatioOnItem',\n FixedOnItem = 'FixedOnItem',\n}\n\nexport enum PlanType {\n Onboard = 'Onboard',\n Followup = 'Followup',\n Renew = 'Renew',\n DataRetrieve = 'DataRetrieve',\n}\n\nexport enum PaymentStatus {\n Pending = 'Pending',\n Success = 'Success',\n Failure = 'Failure',\n Canceled = 'Canceled',\n}\n\nexport enum PractitionerStatus {\n Practicing = 'Practicing',\n Retired = 'Retired',\n NotInvolvedAnymore = 'NotInvolvedAnymore',\n Deactivated = 'Deactivated',\n Flagged = 'Flagged',\n InConflict = 'InConflict',\n Delicensed = 'Delicensed',\n}\n\nexport enum AssignmentStatus {\n Assigned = 'Assigned',\n Reassigned = 'Reassigned',\n Cancelled = 'Cancelled',\n}\n\nexport enum PractitionnerRoleType {\n Doctor = 'Doctor',\n MedicalAssistant = 'MedicalAssistant',\n MedicalSecretary = 'MedicalSecretary',\n Nurse = 'Nurse',\n Specialist = 'Specialist',\n LabAssistant = 'LabAssistant',\n Administrative = 'Administrative',\n ManualDispatcher = 'ManualDispatcher',\n Other = 'Other',\n}\n\nexport enum OtherRoleType {\n Patient = 'Patient',\n User = 'User',\n System = 'System',\n}\n\nexport type AllRoleType = OtherRoleType | PractitionnerRoleType\n\nexport enum LicenseStatus {\n Valid = 'Valid',\n Invalid = 'Invalid',\n Expired = 'Expired',\n NA = 'NA',\n Removed = 'Removed',\n}\n\nexport enum PeriodType {\n PerYear = 'PerYear',\n PerQuarter = 'PerQuarter',\n PerMonth = 'PerMonth',\n PerWeek = 'PerWeek',\n PerBusinessDay = 'PerBusinessDay',\n PerDay = 'PerDay',\n PerHour = 'PerHour',\n}\n\nexport enum SyncStatus {\n Requested = 'Requested',\n Started = 'Started',\n Succeeded = 'Succeeded',\n Failed = 'Failed',\n Cancelled = 'Cancelled',\n}\n\nexport enum PracticeEmailKind {\n SignedUp = 'SignedUp',\n Onboarded = 'Onboarded',\n OnboardedPractitioner = 'OnboardedPractitioner',\n OnboardedPatient = 'OnboardedPatient',\n Answered = 'Answered',\n ToAnswer = 'ToAnswer',\n FollowedUp = 'FollowedUp',\n Renewed = 'Renewed',\n DataRetrieved = 'DataRetrieved',\n Closed = 'Closed',\n PasswordRecovery = 'PasswordRecovery',\n FaxFailed = 'FaxFailed',\n ExamResult = 'ExamResult',\n Reassigned = 'Reassigned',\n OnlinePharmacyFaxSent = 'OnlinePharmacyFaxSent',\n ResumeConsult = 'ResumeConsult',\n}\n\nexport interface PracticeAccount {\n id?: number ///optional for insertion\n uuidPractice: string\n isoLocality?: string\n idStripeAccount?: string\n emailBillingContact: string\n urlSubdomain?: string\n}\n\n/**\n * Defines all the practice config kind.\n *\n * Please respect the following when defining a new practice config:\n * - be really specific on its role\n * - all configs needs to have default values in app\n * - the default behavior should always to be display the feature.\n * In other words, practice configs should either be used to hide a functionnality or overwrite a default behavior.\n * To be extra explicit, if you want to show a functionnality only in one practice, you will have to add a practice configs in all other practice to hide it (yes it is cumbersome).\n *\n */\nexport enum PracticeConfigKind {\n PatientConsultCard = 'PatientConsultCard',\n PracticeCloseConsultationTypes = 'PracticeCloseConsultationTypes',\n PracticeConsultTabs = 'PracticeConsultTabs',\n PracticeConfigExample = 'PracticeConfigExample',\n PracticeCookieBanner = 'PracticeCookieBanner',\n PracticeCssVariables = 'PracticeCssVariables',\n PracticeFontsLinks = 'PracticeFontsLinks',\n PracticeLocaleSwitcher = 'PracticeLocaleSwitcher',\n PracticePharmacyPicker = 'PracticePharmacyPicker',\n PracticePrescriptionFields = 'PracticePrescriptionFields',\n PractitionerChatbox = 'PractitionerChatbox',\n PractitionerConsultList = 'PractitionerConsultList',\n PractitionerSearch = 'PractitionerSearch',\n PracticeRegisterWalkthrough = 'PracticeRegisterWalkthrough',\n PracticeExamsAndResults = 'PracticeExamsAndResults',\n PracticeLayout = 'PracticeLayout',\n PracticeAddressField = 'PracticeAddressField',\n PracticeDiagnosisAndTreatment = 'PracticeDiagnosisAndTreatment',\n}\n\n/**\n * Defines the close consultation types to hide in the close consultation modal of a practice\n */\nexport type PracticeConfigPracticeCloseConsultationTypes = PracticeConfig<\n PracticeConfigKind.PracticeCloseConsultationTypes,\n {\n /**\n * Should hide item with value \"Completed\"\n */\n hideCompleted?: boolean\n\n /**\n * Should hide item with value \"Requires-in-person\"\n */\n hideRequiresInPerson?: boolean\n\n /**\n * Should hide item with value \"Other\"\n */\n hideOther?: boolean\n\n /**\n * Should hide item with value \"Not-a-disease\"\n */\n hideNotADisease?: boolean\n\n /**\n * Should hide item with value \"Appropriate-for-virtual\"\n */\n hideNotAppropriateForVirtual?: boolean\n }\n>\n\n/**\n * Generic interface of a practice config\n *\n * Practice configs needs to have a JSDoc for **all** interface and fields.\n *\n */\nexport interface PracticeConfig<K, T> {\n /**\n * The uuid of the practice to apply the config\n */\n uuidPractice: string\n /**\n * The kind of the practice config. Used as a discriminator to help auto-completion.\n */\n kind: PracticeConfigKind\n /**\n * The actual interface of the config\n */\n config: T\n}\n\nexport type PracticeConfigPatientConsultCard = PracticeConfig<\n PracticeConfigKind.PatientConsultCard,\n { hideDiagnosis?: boolean }\n>\n\nexport type PracticeConfigPracticeConsultTabs = PracticeConfig<\n PracticeConfigKind.PracticeConsultTabs,\n { hideDxTx?: boolean }\n>\n\n/**\n * This type is for test (do not remove without updating the integration tests)\n */\nexport type PracticeConfigPracticeConfigExample = PracticeConfig<\n PracticeConfigKind.PracticeConfigExample,\n { primaryColor?: string }\n>\n\n/**\n * Defines the practice cookie banner\n */\nexport type PracticeConfigPracticeCookieBanner = PracticeConfig<\n PracticeConfigKind.PracticeCookieBanner,\n {\n showCookieBanner?: boolean\n policyLink?: string\n useOfCookieLink?: string\n }\n>\n\n/**\n * This interface describes all practice css variables\n * The keys should reflect the exact css name\n */\nexport type PracticeConfigPracticeCssVariables = PracticeConfig<\n PracticeConfigKind.PracticeCssVariables,\n Record<string, string>\n>\n\n/**\n * Defines the font of the practice css url\n */\nexport type PracticeConfigPracticeFontsLinks = PracticeConfig<\n PracticeConfigKind.PracticeFontsLinks,\n {\n /**\n * sans serif font family\n */\n sansSerif?: string\n /**\n * serif font family\n */\n serif?: string\n }\n>\n\n/**\n * Defines the locale switcher config\n */\nexport type PracticeConfigPracticeLocaleSwitcher = PracticeConfig<\n PracticeConfigKind.PracticeLocaleSwitcher,\n {\n /**\n * Should hide the locale switcher\n */\n hideLocaleSwitcher?: boolean\n }\n>\n\n/**\n * Defines the online pharmacy address of the practice\n */\nexport type PracticeConfigPracticeOnlinePharmacy = PracticeConfig<\n PracticeConfigKind.PracticePharmacyPicker,\n {\n /**\n * The address of the online pharmacy\n */\n onlinePharmacy?: PlaceData\n /**\n * Shows or hides the address input field in the treatment acceptance modal\n */\n showTreatmentAcceptanceAddressInput: boolean\n }\n>\n\n/**\n * Defines the consultation chatbox configs\n */\nexport type PracticeConfigPractitionerChatbox = PracticeConfig<\n PracticeConfigKind.PractitionerChatbox,\n {\n /**\n * If defined will replace the automatic chatbox comment notifiying the patient a new treatment plan has been added. Indexed by locale.\n */\n planAddedMessage?: { [languageISO639_3: string]: string }\n /**\n * If defined will replace the automatic chatbox comment notifiying the patient a new treatment plan has been updated. Indexed by locale.\n */\n planUpdatedMessage?: { [languageISO639_3: string]: string }\n /**\n * If defined will replace the automatic chatbox comment notifiying the patient a new exam has been dispatched. Indexed by locale.\n */\n examsUpdatedMessage?: { [languageISO639_3: string]: string }\n }\n>\n\n/**\n * This config is used to configure the layout of the consult list for practitioners\n */\nexport type PracticeConfigPractitionerConsultList = PracticeConfig<\n PracticeConfigKind.PractitionerConsultList,\n {\n /**\n * Hides the locality column\n */\n hideLocality?: boolean\n /**\n * Hides the plan name column\n */\n hidePlan?: boolean\n /**\n * Hides the fax column\n */\n hideFax?: boolean\n /**\n * Hides the expires at column\n */\n hideExpiresAt?: boolean\n }\n>\n\n/**\n * This config is used to configure the layout of the modular prescription fields\n */\nexport type PracticeConfigPracticePrescriptionFields = PracticeConfig<\n PracticeConfigKind.PracticePrescriptionFields,\n {\n /**\n * the y position in px of the first modular prescription\n */\n yCoordinate?: number\n }\n>\n\n/**\n * This config is used to enable or disable the Search feature\n */\nexport type PracticeConfigPractitionerSearch = PracticeConfig<\n PracticeConfigKind.PractitionerSearch,\n {\n /**\n * Disable search indexing a consultation on its creation\n */\n disableSearchIndexing?: boolean\n /**\n * Disable search for consultations from the ConsultList\n */\n disableSearch?: boolean\n }\n>\n\n/**\n * This config is used to configure the register walkthrough\n */\nexport type PracticeConfigPracticeRegisterWalkthrough = PracticeConfig<\n PracticeConfigKind.PracticeRegisterWalkthrough,\n {\n /**\n * The workflow uuid containing the walkthrough to display. If not defined, the walkthrough slides screen is skipped.\n */\n workflowUuid?: string\n }\n>\n\n/**\n * This config is used for all configs related to the Exams and Results module\n */\nexport type PracticeConfigPracticeExamsAndResults = PracticeConfig<\n PracticeConfigKind.PracticeExamsAndResults,\n {\n /**\n * If true, then show the deprecated URL prescription pad\n */\n showUrlPrescriptionPad?: boolean\n }\n>\n\n/**\n * This config is used for all configs related to the Layout of the app (Navbar, Footer, etc)\n */\nexport type PracticeConfigPracticeLayout = PracticeConfig<\n PracticeConfigKind.PracticeLayout,\n {\n /**\n * If true, then show the FAQ link in the Navbar\n */\n showFaqLink?: boolean\n }\n>\n\n/**\n * This config is used for all configs related to the Google Places address field\n */\nexport type PracticeConfigPracticeAddressField = PracticeConfig<\n PracticeConfigKind.PracticeAddressField,\n {\n /**\n * If true, then show the long version of the address, otherwise, show the short version\n */\n longAddress?: boolean\n }\n>\n\n/**\n * This config is used for all configs related to the Diagnosis and Treatments module\n */\nexport type PracticeConfigPracticeDiagnosisAndTreatment = PracticeConfig<\n PracticeConfigKind.PracticeDiagnosisAndTreatment,\n {\n /**\n * If true, then sort alphabetically the diagnoses, treatments, and drugs shown in their respective select dropdown\n */\n sortNames?: boolean\n }\n>\n\nexport type PracticeConfigs =\n | PracticeConfigPractitionerSearch\n | PracticeConfigPractitionerConsultList\n | PracticeConfigPractitionerChatbox\n | PracticeConfigPracticeLocaleSwitcher\n | PracticeConfigPracticeCookieBanner\n | PracticeConfigPracticeOnlinePharmacy\n | PracticeConfigPracticeCssVariables\n | PracticeConfigPracticeFontsLinks\n | PracticeConfigPracticePrescriptionFields\n | PracticeConfigPracticeConfigExample // Here for integration tests only\n | PracticeConfigPracticeConsultTabs\n | PracticeConfigPatientConsultCard\n | PracticeConfigPracticeExamsAndResults\n | PracticeConfigPracticeLayout\n | PracticeConfigPracticeAddressField\n | PracticeConfigPracticeDiagnosisAndTreatment\n\nexport interface PracticeWorkflow {\n id?: number ///optional for insertion\n uuidPractice: string\n uuidWorkflow: string\n typeWorkflow: WorkflowType\n tagSpecialty?: string\n}\n\nexport type PracticeWorkflowWithTagSpecialty = PracticeWorkflow & {\n tagSpecialty: string\n}\n\nexport interface PracticePlan {\n id?: number ///optional for insertion\n uuidPractice: string\n isoLocality?: string\n nameDefault: string\n descDefault: string\n hoursExpiration: number\n active: boolean\n namePriceCurrency: string // DEPRECATED: left only for in-app receipt display and lower migration risks\n numPriceAmount: number // DEPRECATED: left only for in-app receipt display and lower migration risks\n numPriceExtDecimal?: number // DEPRECATED: left only for in-app receipt display and lower migration risks\n numPriceExtNegativeExponential?: number // DEPRECATED: left only for in-app receipt display and lower migration risks\n kind: PlanType\n idStripeProduct: string\n idStripePrice: string // DEPRECATED: left only for in-app receipt display and lower migration risks\n dateCreatedAt: Date\n dateUpdateAt: Date\n ratePerThousandOverride: number // DEPRECATED: left only to lower migration risks\n}\n\nexport enum StripePriceType {\n Default = 'Default',\n Discount = 'Discount',\n}\n\n// Subset of Stripe.Price\nexport interface PracticePrice {\n /**\n * Unique identifier for the object in Stripe.\n */\n idStripePrice: string\n /**\n * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).\n */\n currency: string\n /**\n * The unit amount in %s to be charged, represented as a whole integer if possible.\n */\n unitAmount: number\n}\n\nexport interface PracticePlanPrices {\n idPlan: number\n default: PracticePrice\n discount?: PracticePrice\n}\n\nexport interface PracticeRate {\n id?: number\n uuidPractice: string\n idPlan: number\n isoLocality?: string\n dimension: RateDimension\n description: string\n uidTaxRate: string\n idStripeTaxRate: string\n}\n\nexport interface PracticePlatformFee {\n uuidPractice: string\n idPlan: number\n isoLocality?: string\n numPlatformFinalFee: number\n}\n\nexport interface PracticePayment {\n id?: number ///optional for insertion\n uuidPractice: string\n idPlan: number\n uuidConsult: string\n hoursConsultExpiration: number\n idStripeInvoiceOrPaymentIntent: string\n status: PaymentStatus\n dateCreatedAt: Date\n dateUpdateAt: Date\n}\n\nexport interface PracticePaymentIntent {\n id?: number ///optional for insertion\n uuidPractice: string\n idPlan: number\n idPayment: number\n hoursPlanExpiration: number\n isoLocality?: string\n textPaymentMethodOptions: string\n nameCurrency: string\n numTotalAmount: number\n numPlatformFeeAmount: number\n idStripeInvoice: string\n idStripePaymtIntent: string\n /**\n * This value is set only after the PracticePaymentIntent has been finalized and ready to be paid\n */\n stripeClientSecret?: string\n dateCreatedAt?: Date\n dateUpdateAt?: Date\n}\n\n/**\n * All the PaymentIntentRequestMetadata Kind available\n */\nexport enum PaymentIntentRequestMetadataKind {\n ConsultRequestMetadata = 'ConsultRequestMetadata',\n RefillTreatmentRequestMetadata = 'RefillTreatmentRequestMetadata',\n}\n\n/**\n * This interface is used as metadata when creating Stripe Invoice.\n * It will be used to create the consult when stripe use our hook.\n */\nexport interface ConsultRequestMetadata {\n /**\n * Defines the kind of `PaymentIntentRequestMetadata` it is\n *\n * Note: it can be `undefined` to handle backward compatibility when this interface didn't had a `kind`\n */\n kind: PaymentIntentRequestMetadataKind.ConsultRequestMetadata | undefined\n /**\n * The specialty required by the consultation\n */\n tagSpecialtyRequired: string\n /**\n * The locality required for the consultation in iso. COUNTRY (ISO 3166) - PROVINCE - COUNTY - CITY\n */\n isoLocalityRequired?: string\n /**\n * The language required for the consultation. Should respect ISO 639-3 https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes\n */\n isoLanguageRequired: string\n}\n\n/**\n * This interface is used as metadata when creating Stripe Invoice.\n * It will be used to refill a treatment plan of a consult.\n */\nexport interface RefillTreatmentRequestMetadata {\n /**\n * Defines the kind of `PaymentIntentRequestMetadata` it is\n */\n kind: PaymentIntentRequestMetadataKind.RefillTreatmentRequestMetadata\n /**\n * The consult uuid to refill\n */\n consultUuid: string\n}\n\n/**\n * This interface is used as metadata when creating Stripe Invoice.\n * It will be used when stripe uses our hook.\n */\nexport type PaymentIntentRequestMetadata = ConsultRequestMetadata | RefillTreatmentRequestMetadata\n\nexport interface AssignmentRequest {\n uuidAssignor: string //defaulting for insertion to the default practice admin\n uuidPractitioner?: string\n status?: AssignmentStatus\n uuidConsult?: string\n tagSpecialty?: string\n isoLocality?: string\n isoLanguage?: string\n}\n\nexport type Assignment = {\n id: number ///optional for insertion\n uuidPractice: string\n uuidAssignor: string //defaulting for insertion to the default practice admin\n uuidPractitioner?: string\n status?: AssignmentStatus\n uuidConsult?: string\n tagSpecialty?: string\n timeAssigned?: string //defaulting for insertion\n}\n\nexport interface PractitionerRole {\n id?: number //optional for insertion\n uuidPractice: string\n uuidPractitioner: string\n role: PractitionnerRoleType\n dateGiven?: Date //default during insertion\n}\n\nexport interface PractitionerLicense {\n id?: number ///optional for insertion\n uuidPractitioner: string\n country: string\n tagSpecialty: string\n isoLocality: string\n txtLicenseNumber: string\n txtComplementary?: string\n dateProvidedAt?: Date\n dateObtainedAt?: Date\n dateRenewedAt?: Date\n status?: LicenseStatus\n}\n\nexport interface PractitionerPreference {\n id?: number\n uuidPractitioner: string\n uuidPractice: string\n tagSpecialties: string\n isoLocalityConsult?: string\n periodQuotaConsult?: PeriodType\n quantityQuotaConsult?: number\n tagConsultLanguages?: string\n}\n\nexport interface PractitionerQuota {\n id?: number ///optional for insertion\n uuidPractitioner: string\n uuidPractice: string\n tagSpecialty: string\n isoLocality: string\n quantityLeft?: number\n dateRenewal?: Date\n dateLastUpdate?: Date\n}\n\nexport interface Practitioner {\n uuid: string\n uuidPractice: string\n txtFirstName: string\n txtLastName: string\n txtTitle: string\n emailAddress: string\n tagsSpecialties: string\n arrLanguages: string\n dateAddedAt?: Date //defaulting for insertion\n status?: PractitionerStatus //defaulting for insertion\n txtAddressTransmission?: string //the default non-fax address to send prescription to\n}\n\nexport interface HydratedPracticeConfigs {\n [PracticeConfigKind.PatientConsultCard]?: PracticeConfigPatientConsultCard\n [PracticeConfigKind.PracticeCloseConsultationTypes]?: PracticeConfigPracticeCloseConsultationTypes\n [PracticeConfigKind.PracticeConsultTabs]?: PracticeConfigPracticeConsultTabs\n [PracticeConfigKind.PracticeConfigExample]?: PracticeConfigPracticeConfigExample\n [PracticeConfigKind.PracticeCookieBanner]?: PracticeConfigPracticeCookieBanner\n [PracticeConfigKind.PracticeCssVariables]?: PracticeConfigPracticeCssVariables\n [PracticeConfigKind.PracticeFontsLinks]?: PracticeConfigPracticeFontsLinks\n [PracticeConfigKind.PracticeLocaleSwitcher]?: PracticeConfigPracticeLocaleSwitcher\n [PracticeConfigKind.PracticePharmacyPicker]?: PracticeConfigPracticeOnlinePharmacy\n [PracticeConfigKind.PracticePrescriptionFields]?: PracticeConfigPracticePrescriptionFields\n [PracticeConfigKind.PractitionerChatbox]?: PracticeConfigPractitionerChatbox\n [PracticeConfigKind.PractitionerConsultList]?: PracticeConfigPractitionerConsultList\n [PracticeConfigKind.PractitionerSearch]?: PracticeConfigPractitionerSearch\n [PracticeConfigKind.PracticeRegisterWalkthrough]?: PracticeConfigPracticeRegisterWalkthrough\n [PracticeConfigKind.PracticeExamsAndResults]?: PracticeConfigPracticeExamsAndResults\n [PracticeConfigKind.PracticeLayout]?: PracticeConfigPracticeLayout\n [PracticeConfigKind.PracticeAddressField]?: PracticeConfigPracticeAddressField\n [PracticeConfigKind.PracticeDiagnosisAndTreatment]?: PracticeConfigPracticeDiagnosisAndTreatment\n}\n\nexport interface Practice {\n uuid: string\n name: string\n shortName: string\n countryOperating: string\n urlPractice: string\n urlLinkedPage?: string\n urlTos?: string\n urlConfidentiality?: string\n uuidAdmin: string\n uuidDefaultAssigned: string\n uuidDefaultFallback: string\n prefDefaultLang: string\n keyGoogleTagNonProd: string\n keyGoogleTagProd: string\n txtAddress?: string\n emailBusiness?: string\n phoneBusiness?: string\n urlSupport?: string\n emailSupport?: string\n phoneSupport?: string\n phoneFax?: string\n txtTaxID?: string\n txtVATID?: string\n txtRegistrationID?: string\n txtLegalInfos?: string\n txtDefaultTransmissionDriver?: string\n txtDefaultTransmissionAddress?: string\n accounts?: PracticeAccount[]\n configs?: HydratedPracticeConfigs\n}\n\nexport interface Sync {\n id?: number\n status?: SyncStatus\n descriptionStep: string\n dateStarted?: Date\n dateFinished?: Date\n}\n\nexport interface PracticeEmail {\n id?: number\n uuidPractice: string\n kind: PracticeEmailKind\n idMailgunTemplate: string\n isoLanguage: string\n tags: string\n}\n\nexport interface PracticeSubscription {\n id?: number\n uuidPractice: string\n idMailChimpAudience: string\n isoLanguage: string\n}\n\nexport interface PracticeInvoice {\n id: string //Stripe invoice ID\n customerEmail: string\n total: number\n subtotal: number\n currency: string\n discount: number\n}\n\n/**\n * This interface represents a practice secret\n * It is used to generate a symetric key to encrypt\n * practice related data\n */\nexport interface PracticeSecret {\n practiceUuid: string\n /**\n * The payload is the actual base64 encoded bytes that can\n * be used as the practice secret. In the db,\n * this field is base64 encoded nonce+encrypted-payload.\n * It's decrypted on the fly when returned by the api.\n */\n payload: string\n}\n","import { Uuid, Base64String, Metadata } from './shared'\nimport { MetadataCategory } from './workflow'\n\nexport interface LockboxCreateResponse {\n lockboxUuid: Uuid\n}\n\nexport interface SharedSecretResponse {\n sharedSecret: Base64String\n}\n\nexport interface LockboxGrantRequest {\n granteeUuid: Uuid\n encryptedSecret: Base64String\n}\n\nexport interface LockboxDataRequest {\n publicMetadata?: Metadata\n privateMetadata?: Base64String\n data: Base64String\n}\n\nexport type LockboxManifest = ManifestEntry[]\n\nexport interface ManifestEntry {\n dataUuid: Uuid\n metadata: Metadata\n}\n\nexport interface GrantedLockboxes {\n grants: Grant[]\n}\n\nexport interface Grant {\n lockboxOwnerUuid?: Uuid\n encryptedLockbox?: Base64String\n lockboxUuid?: Uuid\n}\n\nexport interface DataCreateResponse {\n dataUuid: Uuid\n}\n\nexport interface DataResponse {\n data: Base64String\n}\n\nexport interface IndexEntry {\n uuid?: Uuid\n uniqueHash?: Base64String\n timestamp?: Date\n}\n\nexport interface IndexConsultLockbox extends IndexEntry {\n consultationId: Uuid\n grant: Grant\n}\n\nexport interface VaultIndex extends IndexEntry {\n [IndexKey.ConsultationLockbox]?: IndexConsultLockbox[] // only one should ever exist at a time\n [IndexKey.Consultation]?: IndexConsultLockbox[] // DEPRECATED REMOVE ME\n}\n\nexport interface EncryptedVaultIndex {\n [IndexKey.Consultation]?: EncryptedIndexEntry[]\n [IndexKey.ConsultationLockbox]?: EncryptedIndexEntry[]\n [IndexKey.IndexSnapshot]?: EncryptedIndexEntry[]\n}\n\nexport interface EncryptedIndexEntry extends IndexEntry {\n encryptedIndexEntry: Base64String\n}\n\nexport enum IndexKey {\n Consultation = 'Consultation', //DEPRECATED REMOVE ME\n IndexSnapshot = 'IndexSnapshot', //DEPRECATED REMOVE ME\n ConsultationLockbox = 'ConsultationLockbox'\n}\n\nexport interface Document extends ManifestEntry {\n lockboxOwnerUuid?: Uuid\n lockboxUuid: Uuid\n}\n\nexport interface Meta {\n documentType?: DocumentType\n category: MetadataCategory\n contentType?: string\n}\n\nexport interface PreferenceMeta extends Meta {\n category: MetadataCategory.Preference\n contentType: 'application/json'\n}\n\nexport interface RecoveryMeta extends Meta {\n category: MetadataCategory.Recovery\n contentType: 'application/json'\n}\n\nexport interface RawConsultationMeta extends Meta {\n category: MetadataCategory.Raw\n contentType: 'application/json'\n consultationId?: Uuid\n}\n\nexport interface ConsultationMeta extends Meta {\n documentType: DocumentType\n category: MetadataCategory.Consultation\n consultationId?: Uuid\n}\n\nexport interface ConsultationImageMeta extends ConsultationMeta {\n idbId: Uuid\n}\n\nexport interface MedicalMeta extends Meta {\n documentType:\n | DocumentType.PopulatedWorkflowData\n | DocumentType.Result\n | DocumentType.Prescription\n | DocumentType.DoctorsNote\n category: MetadataCategory.Medical\n consultationIds?: Uuid[]\n}\n\nexport interface PersonalMeta {\n documentType: DocumentType.PopulatedWorkflowData | DocumentType.Note\n category:\n | MetadataCategory.Personal\n | MetadataCategory.ChildPersonal\n | MetadataCategory.OtherPersonal\n consultationIds?: Uuid[]\n}\n\nexport enum DocumentType {\n Message = 'Message',\n Note = 'Note',\n DoctorsNote = 'DoctorsNote',\n Prescription = 'Prescription',\n ExamRequest = 'ExamRequest',\n Result = 'Result',\n Attachment = 'Attachment',\n BigFile = 'BigFile',\n MeetingRequest = 'MeetingRequest',\n AudioNote = 'AudioNote',\n VideoNote = 'VideoNote',\n PopulatedWorkflowData = 'PopulatedWorkflowData',\n TreatmentPlan = 'TreatmentPlan',\n ImageAlias = 'ImageAlias',\n}\n\nexport interface LocalizedData<T = any> {\n lockboxOwnerUuid?: string\n lockboxUuid: string\n dataUuid: string\n data: T\n}\n","/**\n * This type represents all the patient profile kind\n */\nexport type ProfileKind = 'myself' | 'child' | 'other'\n/**\n * this type is done as an example on how to add another data kind\n */\nexport type OtherKind = 'otherKindOfType'\n\n/**\n * This type represents all the kind a data that can define `ChoiceInputData` (`OtherKind` is here only as an example on how to add a new kind)\n */\nexport type AllChoiceInputDataKind = ProfileKind | OtherKind\n\n/**\n * This interface represents a `StateTrigger` on selected profile kind\n */\nexport interface ProfileTrigger {\n kind: 'profileTrigger'\n value: ProfileKind\n}\n\n/**\n * This interface is meant as an example of another kind of `StateTrigger`\n */\nexport interface OtherTrigger {\n kind: 'otherTrigger'\n field1: number\n field2: string\n}\n\n/**\n * This type represents all the state triggers that are defined.\n *\n * A state trigger is triggered onto app states. In other words, it is for triggers that cannot be defined thanks to pure workflow answers.\n */\nexport type StateTrigger = ProfileTrigger | OtherTrigger\n\nexport interface IndexedData<T> {\n [key: string]: T\n}\n\nexport type SelectedAnswerData = string | string[]\nexport type SelectedAnswersData = IndexedData<SelectedAnswerData>[]\n\nexport interface ChoiceInputData {\n text: string\n className?: string\n order?: number\n /** If defined, the choice input contains a kind that can be used into app. For instance, to check if a specific `kind` of answer has been selected */\n kind?: AllChoiceInputDataKind\n}\n\nexport interface RadioInputIconOptionsData {\n variant: 'icon'\n icon: string\n}\n\nexport interface RadioInputData extends ChoiceInputData {\n options?: RadioInputIconOptionsData\n}\n\nexport interface RadioCardInputData extends RadioInputData {\n bodyText: string\n}\n\nexport interface LanguagePickerData extends ChoiceInputData {\n flag: string // iso3166-1\n locale: string\n}\n\nexport interface TileRadioData extends ChoiceInputData {\n fullText?: string\n image?: string\n description?: string\n}\n\nexport interface EntryData {\n id?: number\n label?: string\n hideLabel?: boolean\n minorLabel?: string\n summaryLabel?: string\n summaryHidden?: boolean\n className?: string\n /**\n * This field represents a list of `selectedAnswers` that must be set for this entry to be displayed using the followng logical combination of rules:\n *\n * #### Single string\n *\n * ```\n * // Required: rule1\n * rules: rule1\n * ```\n *\n * #### Array of strings (AND is applied between statements):\n *\n * ```\n * // Required: rule1 AND rule2\n * rules: [ rule1, rule2 ]\n * ```\n *\n * #### Array of arrays of strings (OR is applied between inner arrays. AND is applied between inner arrays statements)\n *\n * ```\n * // Required: rule1 OR rule2\n * rules: [\n * [ rule1 ],\n * [ rule2 ]\n * ]\n *\n * // Required: rule1 OR (rule2 AND rule3)\n * rules: [\n * [ rule1 ],\n * [ rule2, rule3 ]\n * ]\n *\n * // THIS IS FORBIDDEN\n * rules: [\n * rule1, // <-- THIS IS FORBIDDEN. Instead use [ rule1 ]\n * [ rule2, rule3 ]\n * ]\n * ```\n */\n triggers?: string[][] | string[] | string\n /**\n * This field represents a list of `StateTrigger` that must be fulfilled for this entry to be displayed.\n */\n stateTriggers?: StateTrigger[]\n // represents the modal that it will be rendered as\n componentKind?: string\n message?: string\n}\n\nexport interface SlideData {\n header: string\n body: string\n image?: {\n src: string\n alt: string\n }\n icon?: string\n}\n\nexport enum MetadataCategory { //these are generic metadata categories\n ChildPersonal = 'ChildPersonal',\n Consultation = 'Consultation',\n DataRetrieval = 'DataRetrieval',\n Followup = 'Followup',\n Recovery = 'Recovery',\n Medical = 'Medical',\n OtherPersonal = 'OtherPersonal',\n Personal = 'Personal',\n Preference = 'Preference',\n Prescription = 'Prescription',\n Raw = 'Raw',\n}\n\n/**\n * This interface describes all images-alias question kind options\n */\nexport interface ImagesAliasQuestionOptions {\n /**\n * Comma separated list of accepted formats. Will be given to the input html element.\n * Use same format as described [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#accept)\n */\n accept?: string\n /**\n * Should allow multiple uploads or not\n */\n multiple?: boolean\n /**\n * Should display photo guide instructions or not\n */\n photoGuide?: boolean\n}\n\nexport interface GenericQuestionData<T, A = IndexedData<ChoiceInputData>, O = undefined> extends EntryData {\n kind: T\n metaCategory: MetadataCategory\n answers?: A\n formValidation?: any[] // use yup-ast expressions\n placeholder?: string\n defaultValue?: any\n value?: string\n /**\n * Options to forward to the workflow component\n */\n options?: O\n messages?: string\n}\n\nexport interface GroupedGenericQuestionData<T, A = IndexedData<ChoiceInputData>> extends GenericQuestionData<T, A> {\n inline?: boolean\n inlineLabel?: boolean\n order?: number\n}\n\nexport declare type QuestionData =\n | GenericQuestionData<'title' | 'paragraph' | 'checkbox', void>\n | GenericQuestionData<\n | 'text'\n | 'text-area'\n | 'date'\n | 'number'\n | 'images'\n | 'body-parts'\n | 'pharmacy-picker'\n | 'online-pharmacy-picker'\n | 'place-address'\n >\n | GenericQuestionData<'images-alias', IndexedData<ChoiceInputData>, ImagesAliasQuestionOptions>\n | GenericQuestionData<\n 'checkbox-group' | 'hair-loss-frontal' | 'select' | 'multiple' | 'text-select-group',\n IndexedData<ChoiceInputData>\n >\n | GroupedGenericQuestionData<\n 'radio' | 'hair-selector-women' | 'hair-selector-men' | 'hair-loss-stage' | 'hair-loss-other',\n IndexedData<RadioInputData>\n >\n | GroupedGenericQuestionData<'radio-card' | 'profile-selector', IndexedData<RadioCardInputData>>\n | GroupedGenericQuestionData<'language-picker', IndexedData<LanguagePickerData>>\n | GroupedGenericQuestionData<'tile-radio', IndexedData<TileRadioData>>\n\nexport interface FieldData {\n type: 'field'\n className?: string\n id: string\n}\n\nexport interface FieldGroupData {\n type: 'field-group'\n className?: string\n fieldsAndGroups: (FieldData | FieldGroupData)[]\n name?: string\n inline?: boolean\n fullWidth?: boolean\n}\n\nexport interface WorkflowPageData {\n className?: string\n groups?: FieldGroupData[]\n highlightMsg?: string\n questions: IndexedData<QuestionData>\n title?: string\n triggers?: string[]\n /**\n * This field represents a list of `ids` which will be spliced from the workflow groups and inserted into a designated location\n */\n prioritizeIds?: string[]\n}\n\nexport interface WorkflowData {\n createdAt: string\n culDeSacs: EntryData[]\n id: string\n locale?: string\n pages: WorkflowPageData[]\n summaryImageFieldName?: string // this field is used to show the consult summary image\n summarySymptomsFieldName?: string // this field is used to show the consult summary symptoms\n selectedAnswers?: SelectedAnswersData\n walkthroughSlides?: SlideData[]\n /**\n * (optional) the service name this workflow provides\n */\n serviceName?: string\n /**\n * (optional) the description of the service this workflow provides\n */\n serviceDescription?: string\n /**\n * (optional) rules to hide certain payment plans depending on the workflow answers\n */\n hidePlanRules?: HidePlanRule[]\n}\n\nexport interface HidePlanRule {\n /**\n * the stripe plan id from the practice service\n */\n idPlan: string\n /**\n * Questions to apply yup rules on in, if rules are met then hide the plan\n */\n rules: QuestionHidePlanRule[] | QuestionHidePlanRule[][]\n}\n\nexport interface QuestionHidePlanRule {\n /**\n * the id of the question to check the rule on\n */\n questionId: string\n /**\n * a collection of yup validated rules (same exact syntax we used for the workflow formValidation field, please reuse same functions)\n */\n yupRuleValueToHide: any\n}\n\n/**\n * This interface describes an upload of an image (could be a picture, a pdf, a text file, etc.)\n */\nexport interface WorkflowUploadedImage {\n /**\n * Depending on the driver used by WorkflowInput:\n * - 'indexdb': will fetch the image in IndexDB with this id\n * - 'vault': will fetch the image in the vault with this id\n */\n idbId?: string\n /**\n * The name of the image\n */\n name: string\n /**\n * the image data (could be a picture, a pdf, a text file, etc.)\n */\n imageData?: string\n}\n\n/**\n * This interface describes a workflow prepared and ready to be sent to vault\n */\nexport interface PopulatedWorkflowField {\n answer: SelectedAnswerData | WorkflowUploadedImage[] // Actual answer from the workflow\n displayedAnswer?: any // This answer is to be used only when it's impossible to get data from workflow\n kind: string // If we don't store question. We will need that field to at least know the field type\n}\n\nexport interface PopulatedWorkflowData {\n workflowId: string // The workflow id to refer\n workflowCreatedAt: string // The workflow version\n locale?: string\n fields: Record<string, PopulatedWorkflowField> // key corresponds to the QuestionData key in the workflow\n}","export interface SearchRequest {\n terms: Terms\n}\n\nexport interface SearchResponse {\n results: SearchResult[]\n}\n\nexport interface SearchResult {\n consultUuid: string\n kind: string\n score: number\n}\n\nexport interface IndexRequest {\n consultUUID: string\n terms: Terms\n}\n\nexport type Terms = Term[]\nexport interface Term {\n kind?: string\n value: string\n}\n\n\nexport enum IndexKind {\n consultUuid,\n consultShortid,\n firstName,\n lastName,\n healthId,\n dob,\n}\n","import { APIService } from './api'\nimport {\n Uuid,\n Consult,\n ConsultRequest,\n MedicalStatus,\n ConsultTransmission,\n ClosedReasonType,\n TransmissionKind,\n TransmissionStatus,\n} from '../models'\n\nexport class ConsultService {\n constructor(private api: APIService, private baseURL: string) {}\n\n public consultCreate(c: ConsultRequest): Promise<Consult> {\n return this.api.post<Consult>(`${this.baseURL}/v1/consults`, c)\n }\n\n /**\n * This function returns the number of consults using parameters\n * @param uuidPractice the practice uuid\n * @param uuidRequester the requester uuid\n * @param statusesMedical an array containing MedicalStatus to include\n * @param statusesExclude an array containing MedicalStatus to exclude\n * @param shortId a shortId matcher (will match all consult with a shortId starting with this `shortId`)\n * @param columnToSortTo the list of columns separated by commas, to sort to (in order of sorting)\n * @param orderToSortTo the type of sorting to do ('asc' for ascending or 'desc' for descending)\n * @param perPage the number of item to retrieve per \"page\"\n * @param indexPage the actual index of the page to retrieve (0 based: 0 is the first items)\n * @param filterAssignedDoctor the uuid of the doctor for which to filter with\n * @param filterCurrentPractitioner the uuid of the current assistant assigned to filter with\n * @param filterIsoLocality the of isoLocality to filter with\n * @param filterAssignee array of practitioner uuids with which you want to filter the consultations\n * @returns a number of consult\n */\n public countConsults(\n uuidPractice?: Uuid,\n uuidRequester?: Uuid,\n statusesMedical?: MedicalStatus[],\n statusesExclude?: MedicalStatus[],\n shortId?: string,\n columnToSortTo?: string[],\n orderToSortTo?: string[],\n perPage?: number,\n indexPage?: number,\n filterAssignedDoctor?: string,\n filterCurrentPractitioner?: string,\n filterIsoLocality?: string[],\n filterAssignee?: string[]\n ): Promise<number> {\n return this.api\n .head<any>(\n `${this.baseURL}/v1/consults`,\n {\n params: {\n uuidPractice,\n uuidRequester,\n statusesMedical,\n statusesExclude,\n shortId,\n perPage,\n page: indexPage,\n sortColumns: columnToSortTo,\n orderColumns: orderToSortTo,\n filterAssignedDoctor,\n filterCurrentPractitioner,\n filterIsoLocality,\n filterAssignee,\n },\n },\n 'Content-Range'\n )\n .then((resContentRange) => {\n if (!resContentRange || (typeof resContentRange !== 'string' && typeof resContentRange !== 'number')) {\n return 0\n }\n\n if (typeof resContentRange === 'number') {\n return resContentRange\n }\n\n return parseInt(resContentRange)\n })\n }\n\n /**\n * This function get consults using parameters\n * @param uuidPractice the practice uuid\n * @param uuidRequester the requester uuid\n * @param statusesMedical an array containing MedicalStatus to include\n * @param statusesExclude an array containing MedicalStatus to exclude\n * @param shortId a shortId matcher (will match all consult with a shortId starting with this `shortId`)\n * @param columnToSortTo the list of columns separated by commas, to sort to (in order of sorting)\n * @param orderToSortTo the type of sorting to do ('asc' for ascending or 'desc' for descending)\n * @param perPage the number of item to retrieve per \"page\"\n * @param indexPage the actual index of the page to retrieve (0 based: 0 is the first items)\n * @param filterAssignedDoctor the uuid of the doctor for which to filter with\n * @param filterCurrentPractitioner the uuid of the current assistant assigned to filter with\n * @param filterIsoLocality the of isoLocality to filter with\n * @returns a list of consult\n */\n public getConsults(\n uuidPractice?: Uuid,\n uuidRequester?: Uuid,\n statusesMedical?: MedicalStatus[],\n statusesExclude?: MedicalStatus[],\n shortId?: string,\n columnToSortTo?: string[],\n orderToSortTo?: string[],\n perPage?: number,\n indexPage?: number,\n filterAssignedDoctor?: string,\n filterCurrentPractitioner?: string,\n filterIsoLocality?: string[],\n filterAssignee?: string[]\n ): Promise<Consult[]> {\n return this.api.get<Consult[]>(`${this.baseURL}/v1/consults`, {\n params: {\n uuidPractice,\n uuidRequester,\n statusesMedical,\n statusesExclude,\n shortId,\n perPage,\n page: indexPage,\n sortColumns: columnToSortTo,\n orderColumns: orderToSortTo,\n filterAssignedDoctor,\n filterCurrentPractitioner,\n filterIsoLocality,\n filterAssignee,\n },\n })\n }\n\n public getConsultByUUID(uuidConsult: Uuid, uuidPractice?: Uuid): Promise<Consult> {\n return this.api.get<Consult>(`${this.baseURL}/v1/consults/${uuidConsult}`, { params: { uuidPractice } })\n }\n\n public updateConsultByUUID(\n uuidConsult: Uuid,\n consult: {\n statusMedical?: MedicalStatus\n closedReasonType?: ClosedReasonType\n closedReasonDescription?: string\n uuidAssignedDoctor?: Uuid\n neverExpires?: boolean\n },\n uuidPractice?: Uuid,\n uuidRequester?: Uuid\n ): Promise<Consult> {\n return this.api.put<Consult>(`${this.baseURL}/v1/consults/${uuidConsult}`, consult, {\n params: {\n uuidPractice,\n uuidRequester,\n },\n })\n }\n\n public getConsultFaxStatuses(uuidConsult: string): Promise<ConsultTransmission[]> {\n return this.api.get<ConsultTransmission[]>(`${this.baseURL}/v1/consults/${uuidConsult}/transmissions`, {\n params: {\n kind: TransmissionKind.Fax,\n },\n })\n }\n\n public postConsultTransmission(\n uuidConsult: string,\n nameDriver: string = 'Documo',\n addressOrPhoneToSendTo?: string,\n file?: File,\n nameReceiver?: string,\n txtTransmissionTitle?: string,\n txtTransmissionNotes?: string\n // numTry ?: number,\n // delay ?: number,\n ): Promise<ConsultTransmission> {\n let data = new FormData()\n\n data.append('nameDriverReceiver', nameDriver)\n if (addressOrPhoneToSendTo) {\n data.append('addressReceiver', addressOrPhoneToSendTo)\n }\n if (file) {\n data.append('file', file)\n }\n if (nameReceiver) {\n data.append('nameReceiver', nameReceiver)\n }\n if (txtTransmissionTitle) {\n data.append('txtTransmissionTitle', txtTransmissionTitle)\n }\n if (txtTransmissionNotes) {\n data.append('txtTransmissionNotes', txtTransmissionNotes)\n }\n\n return this.api.post<ConsultTransmission>(`${this.baseURL}/v1/consults/${uuidConsult}/transmissions`, data, {\n headers: { 'Content-Type': 'multipart/form-data;' },\n })\n }\n\n public postConsultFax(uuidConsult: string, addressReceiver: string, file: File): Promise<ConsultTransmission> {\n return this.postConsultTransmission(uuidConsult, 'Documo', addressReceiver, file)\n }\n\n public postConsultEmail(uuidConsult: string, file: File): Promise<ConsultTransmission> {\n return this.postConsultTransmission(uuidConsult, 'Pharmacierge', undefined, file)\n }\n\n public retryConsultFax(uuidConsult: string, transmissionId: string): Promise<ConsultTransmission> {\n return this.api.put<ConsultTransmission>(\n `${this.baseURL}/v1/consults/${uuidConsult}/transmissions/${transmissionId}`,\n { status: TransmissionStatus.Retrying }\n )\n }\n\n public updateConsultTransmissionStatus(\n transmissionId: string,\n uuidConsult: string,\n newStatus: TransmissionStatus\n ): Promise<ConsultTransmission> {\n return this.api.put<ConsultTransmission>(\n `${this.baseURL}/v1/consults/${uuidConsult}/transmissions/${transmissionId}`,\n { status: newStatus }\n )\n }\n}\n","import {\n Drug,\n TreatmentPlan,\n TreatmentPlans,\n TreatmentPlansRequest,\n TreatmentPlansResponse,\n TreatmentPlanUpdateRequest,\n Uuid,\n} from '..'\nimport {\n Diagnosis,\n Treatment,\n DiagnosisRequest,\n TreatmentAndDrugPrescriptionUpdateRequest,\n TreatmentRequest,\n} from '../models/diagnosis'\nimport { APIService } from './api'\n\nexport class DiagnosisService {\n constructor(private api: APIService, private baseURL: string) {}\n\n public getDiagnoses(): Promise<Diagnosis[]> {\n return this.api.get<Diagnosis[]>(`${this.baseURL}/v1/diagnoses`)\n }\n\n /**\n * Get a diagnosis by uuid that belongs to your practice\n * @param uuidDiagnosis the uuid of the diagnosis\n * @returns a diagnosis\n */\n public getDiagnosisByUuid(uuidDiagnosis: Uuid): Promise<Diagnosis> {\n return this.api.get<Diagnosis>(`${this.baseURL}/v1/diagnoses/${uuidDiagnosis}`)\n }\n\n public createDiagnosis(diagnosis: DiagnosisRequest): Promise<Diagnosis> {\n return this.api.post<Diagnosis>(`${this.baseURL}/v1/diagnoses`, diagnosis)\n }\n\n public updateDiagnosis(uuid: string, diagnosis: DiagnosisRequest): Promise<Diagnosis> {\n return this.api.put<Diagnosis>(`${this.baseURL}/v1/diagnoses/${uuid}`, diagnosis)\n }\n\n public getTreatmentsFromDiagnosisUuid(diagnosisUuid: Uuid): Promise<Treatment[]> {\n return this.api.get<Treatment[]>(`${this.baseURL}/v1/diagnoses/${diagnosisUuid}/treatments`)\n }\n\n /**\n * This function returns treatment plans associated to a consult\n * @param uuidConsult the consult uuid to fetch\n * @returns an array of TreatmentPlan\n */\n public getTreatmentPlansFromConsultUuid(uuidConsult: Uuid): Promise<TreatmentPlan[]> {\n return this.api.get<TreatmentPlan[]>(`${this.baseURL}/v1/treatment-plans/`, { params: { uuidConsult } })\n }\n\n /**\n * creates a new treatment for the specified diagnosis\n * @param diagnosisUuid uuid of the diagnosis that the treatment is linked to\n * @param treatmentRequest the treatment to be inserted\n */\n public createTreatment(diagnosisUuid: string, treatmentRequest: TreatmentRequest) {\n return this.api.post<Treatment>(`${this.baseURL}/v1/diagnoses/${diagnosisUuid}/treatments`, treatmentRequest)\n }\n\n /**\n * This function returns populated treatment plans associated to a consult\n * @param uuidConsult the consult uuid to fetch\n * @returns a TreatmentPlans object\n */\n public getTreatmentPlansPopulatedFromConsultUuid(uuidConsult: Uuid): Promise<TreatmentPlans> {\n return this.api.get<TreatmentPlans>(`${this.baseURL}/v1/treatment-plans/`, {\n params: { uuidConsult, populated: true },\n })\n }\n\n public postPlans(plans: TreatmentPlansRequest): Promise<TreatmentPlansResponse> {\n return this.api.post<TreatmentPlansResponse>(`${this.baseURL}/v1/treatment-plans`, plans)\n }\n\n public updateTreatmentPlan(\n uuidPlan: string,\n uuidConsult: string,\n diagnosisRequest: DiagnosisRequest,\n plan: TreatmentAndDrugPrescriptionUpdateRequest,\n refill?: boolean\n ): Promise<TreatmentPlan> {\n return this.api.put<TreatmentPlan>(`${this.baseURL}/v1/treatment-plans/${uuidPlan}`, <\n TreatmentPlanUpdateRequest\n >{\n uuidConsult,\n diagnosis: diagnosisRequest,\n plan,\n refill,\n })\n }\n\n public acceptTreatmentPlan(uuidPlan: string, uuidConsult: string): Promise<TreatmentPlan> {\n return this.api.put<TreatmentPlan>(`${this.baseURL}/v1/treatment-plans/${uuidPlan}/accept`, { uuidConsult })\n }\n\n /**\n * retrieves all the drugs of the specified practice\n * @param uuidPractice\n */\n public async getAllDrugs(uuidPractice: string): Promise<Drug[] | undefined> {\n const res = await this.api.get<{ foundDrugs: Drug[] }>(`${this.baseURL}/v1/drugs/practice/${uuidPractice}`)\n if (res && res.foundDrugs) return res.foundDrugs\n return undefined\n }\n}\n","import { AxiosError } from 'axios'\nimport type { AxiosAuthRefreshRequestConfig } from 'axios-auth-refresh'\nimport {\n AuthenticationBadRequest,\n AuthenticationFailed,\n AuthenticationServerError,\n AuthenticationUnconfirmedEmail,\n AuthRecoverRequest,\n AuthTokenRequest,\n AuthTokenResponse,\n Base64String,\n IdentityCreateRequest,\n IdentityCreationBadRequest,\n IdentityCreationConflict,\n IdentityCreationFailed,\n IdentityResendConfirmEmailRequest,\n IdentityResponse,\n IdentityUpdateRequest,\n M2MTokenRequest,\n QRCodeRequest,\n QRCodeResponse,\n Tokens,\n Uuid,\n WhoAmIResponse,\n} from '../models'\nimport { APIService } from './api'\n\nexport interface GuardRequestConfig extends AxiosAuthRefreshRequestConfig {\n useRefreshToken: boolean\n}\nexport class GuardService {\n private identityCache: Record<string, IdentityResponse>\n private whoAmICache: Record<string, WhoAmIResponse>\n\n constructor(private api: APIService, private baseURL: string) {\n this.api.setAuthRefreshFn(this.authRefresh.bind(this)) // This is the default behavior for User JWT tokens. If you want other kind of refresh you shall overwrite this call\n this.identityCache = {}\n this.whoAmICache = {}\n }\n\n /**\n * Will replace access and refresh tokens with `tokens`\n *\n * Note:\n * ```typescript\n * setTokens({accessToken: undefined, refreshToken: 'aTokenValue'}) // will erase accessToken and set refreshToken with 'aTokenValue'\n * setTokens({refreshToken: 'aTokenValue'}) // will keep actual value of accessToken and set refreshToken with 'aTokenValue'\n *\n * ```\n * @param tokens\n */\n public setTokens(tokens: Tokens) {\n this.api.setTokens({ ...this.api.getTokens(), ...tokens })\n }\n\n /**\n * Allow to retrieve a M2M token for a service\n *\n * @param req The credentials required to get an access token\n * @returns AuthTokenResponse\n */\n public async m2mToken(req: M2MTokenRequest): Promise<AuthTokenResponse> {\n let resp: AuthTokenResponse | undefined\n\n try {\n let config: AxiosAuthRefreshRequestConfig = {\n skipAuthRefresh: true,\n }\n\n resp = await this.api.post<AuthTokenResponse>(`${this.baseURL}/v1/m2m/token`, req, config)\n\n this.api.setTokens({\n accessToken: resp.accessToken,\n })\n } catch (e) {\n console.error('Error while posting m2m token:', e)\n\n if ((e as any).isAxiosError) {\n const code = (e as AxiosError).response?.status\n switch (code) {\n case 400:\n throw new AuthenticationBadRequest()\n case 500:\n throw new AuthenticationServerError()\n case 401:\n default:\n throw new AuthenticationFailed()\n }\n }\n throw new AuthenticationFailed()\n }\n\n return resp\n }\n\n /**\n * Allow to retrieve an access token and a refresh token in order\n * to do authenticated request afterward\n *\n * @param req The credentials required to get an access token\n * @returns AuthTokenResponse\n */\n public async authToken(req: AuthTokenRequest): Promise<AuthTokenResponse> {\n let resp: AuthTokenResponse\n\n try {\n let config: AxiosAuthRefreshRequestConfig = {\n skipAuthRefresh: true,\n }\n\n resp = await this.api.post<AuthTokenResponse>(`${this.baseURL}/v1/auth/token`, req, config)\n\n this.api.setTokens({\n accessToken: resp.accessToken,\n refreshToken: resp.refreshToken,\n })\n } catch (e) {\n console.error('Error while posting auth token:', e)\n\n if ((e as any).isAxiosError) {\n const code = (e as AxiosError).response?.status\n switch (code) {\n case 400:\n throw new AuthenticationBadRequest()\n case 424:\n throw new AuthenticationUnconfirmedEmail()\n case 500:\n throw new AuthenticationServerError()\n case 401:\n default:\n throw new AuthenticationFailed()\n }\n }\n throw new AuthenticationFailed()\n }\n return resp\n }\n\n /**\n * Get new access and refresh token\n *\n * @returns AuthTokenResponse\n */\n public async authRefresh(refreshToken?: string): Promise<AuthTokenResponse> {\n let config: GuardRequestConfig = {\n skipAuthRefresh: true,\n useRefreshToken: true,\n }\n return this.api.put<AuthTokenResponse>(`${this.baseURL}/v1/auth/token`, null, config)\n }\n\n /**\n * Call guard to overwrite existing refresh token cookie\n *\n * @returns void\n */\n public async authLogout(): Promise<void> {\n return this.api.get<void>(`${this.baseURL}/v1/auth/logout`)\n }\n\n /**\n * Call guard to attempt account recovery\n *\n * @param req The email address / practice of the account to recover\n * @returns void\n */\n public async authRecover(req: AuthRecoverRequest): Promise<void> {\n return this.api.post<void>(`${this.baseURL}/v1/auth/recover`, req)\n }\n\n /**\n * Allow to create a new identity. The identity will then need to be confirmed\n * via an email link\n *\n * @param req the information about the new identity to create\n * @returns IdentityResponse\n */\n public async identityCreate(req: IdentityCreateRequest): Promise<IdentityResponse> {\n let resp: IdentityResponse\n\n try {\n resp = await this.api.post<IdentityResponse>(`${this.baseURL}/v1/identities`, req)\n this.api.setTokens({\n refreshToken: resp.refreshToken,\n })\n } catch (e) {\n if ((e as any).isAxiosError) {\n const code = (e as AxiosError).response?.status\n switch (code) {\n case 400:\n throw new IdentityCreationBadRequest()\n case 409:\n throw new IdentityCreationConflict()\n case 500:\n default:\n throw new IdentityCreationFailed()\n }\n }\n throw new IdentityCreationFailed()\n }\n return resp\n }\n\n /**\n * Retrieve an identity. Will return public fields only when requested\n * without authentication\n *\n * @param identityID Unique id of the identity to retrieve\n * @param skipCache (default: false) will skip identity cache (not even update it)\n * @returns IdentityResponse\n */\n public async identityGet(identityID: Uuid, skipCache = false): Promise<IdentityResponse> {\n const tokens = this.api.getTokens()\n const cacheKey = (tokens.accessToken ?? '') + (tokens.refreshToken ?? '') + identityID\n\n if (skipCache || !tokens.accessToken || !this.identityCache[cacheKey]) {\n const identity = await this.api.get<IdentityResponse>(`${this.baseURL}/v1/identities/${identityID}`)\n\n if (skipCache) return identity\n\n this.identityCache[cacheKey] = identity\n }\n return this.identityCache[cacheKey]\n }\n\n /**\n * Get information about the current authenticated user\n *\n * @param refreshCache if true it will refresh the whoAmI cache (default: false)\n * @returns WhoAmIResponse\n */\n public async whoAmI(refreshCache: boolean = false): Promise<WhoAmIResponse> {\n const cacheKey = this.api.getTokens().accessToken ?? ''\n if (!this.whoAmICache[cacheKey] || refreshCache) {\n this.whoAmICache[cacheKey] = await this.api.get<WhoAmIResponse>(`${this.baseURL}/v1/auth/whoami`)\n }\n return this.whoAmICache[cacheKey]\n }\n\n /**\n * Update an existing identity\n *\n * @param identityID unique id of identity to update\n * @param req update request\n * @returns IdentityResponse\n */\n public async identityUpdate(identityID: Uuid, req: IdentityUpdateRequest): Promise<IdentityResponse> {\n return this.api.put<IdentityResponse>(`${this.baseURL}/v1/identities/${identityID}`, req)\n }\n\n /**\n * Return base64 data representing a QR code that the\n * current identity need in order to use MFA\n *\n * @param identityID unique id of the identity\n * @param password the identity password (already hashed and in base64)\n * @returns QRCodeResponse\n */\n public async identityMFAQRCode(identityID: Uuid, password: Base64String): Promise<QRCodeResponse> {\n const req: QRCodeRequest = { password }\n return this.api.post<QRCodeResponse>(`${this.baseURL}/v1/identities/${identityID}/mfa`, req, {\n headers: { Accept: 'application/json' },\n })\n }\n\n /**\n * Attempt to resend the email confirmation email\n *\n * @param req IdentityResendConfirmEmailRequest\n * @return void\n */\n public async identitySendConfirmEmail(req: IdentityResendConfirmEmailRequest): Promise<void> {\n return this.api.post<void>(`${this.baseURL}/v1/identity/confirm`, req)\n }\n\n /**\n * Get an identity using a customer email (format: customer+[b64Hash]@orohealth.me)\n *\n * @param email the customer email\n * @returns IdentityResponse\n */\n public async identityGetByCustomerEmail(email: string): Promise<IdentityResponse> {\n return this.identityGetByHash(email.substring(email.indexOf('+') + 1, email.indexOf('@')))\n }\n\n /**\n * Get an identity using a base64 hash\n *\n * @param b64Hash base64 hash of the identity\n * @returns IdentityResponse\n */\n public async identityGetByHash(b64Hash: string): Promise<IdentityResponse> {\n //TODO: Right now this maps directly to the IdentityGet call.\n //Eventually, with the mapping table method, this would lead to another\n //call (ie: /v1/mapping/[b64Hash]) which would return a blob to decrypt\n //which would contain the real identityID to call IdentityGet with.\n\n //The hash comes in base64 format but it isn't URL safe soe we have to convert\n //to base64URL (see https://en.wikipedia.org/wiki/Base64#The_URL_applications)\n return this.identityGet(b64Hash.replace(/\\+/g, '-').replace(/\\//g, '_'))\n }\n}\n","import {APIService} from \"./api\";\nimport {IndexRequest, SearchRequest, SearchResponse, Terms} from \"../models/search\";\n\nexport class SearchService {\n constructor(private api: APIService, private baseURL: string) {}\n\n /**\n * Creates search indexes for the terms passed in order to be able to search for it in the future\n * @param consultUUID\n * @param terms the search terms to be indexed\n */\n public index(\n consultUUID: string,\n terms: Terms\n ): Promise<any> {\n return this.api.post<IndexRequest>(\n `${this.baseURL}/v1/index`,\n <IndexRequest> {\n consultUUID,\n terms\n }\n )\n }\n\n /**\n * Searches for the consultations corresponding to the search terms entered in the query\n * @param terms array of search terms\n */\n public search(\n terms: Terms\n ): Promise<SearchResponse> {\n return this.api.post<SearchResponse>(\n `${this.baseURL}/v1/search`,\n <SearchRequest> {\n terms\n }\n )\n }\n}","import { hashToBase64String } from '../helpers'\nimport { PracticeAccount, Uuid } from '../models'\nimport {\n Assignment,\n AssignmentRequest,\n PaymentIntentRequestMetadata,\n PlanType,\n Practice,\n PracticeConfigKind,\n PracticeConfigs,\n PracticeInvoice,\n PracticePayment,\n PracticePaymentIntent,\n PracticePlan,\n PracticePlanPrices,\n PracticeWorkflow,\n PracticeWorkflowWithTagSpecialty,\n Practitioner,\n PractitionerLicense,\n PractitionerPreference,\n PractitionerQuota,\n PractitionerRole,\n WorkflowType,\n} from '../models/practice'\nimport { APIService } from './api'\n\nexport class PracticeService {\n constructor(private api: APIService, private baseURL: string) {}\n\n /**\n * This function get the practice from the URL of a practice\n * It is the entry point of our web apps\n * @param practiceURL URL of the practice to search\n * @param hydratePracticeConfigs (optional) if set true it the Practice field configs will be set\n * @param accounts (optional) if set true it the Practice field accounts will be set\n * @returns the found practice or undefined\n */\n public practiceGetFromURL(\n practiceURL: string,\n params?: {\n hydratePracticeConfigs?: boolean\n accounts?: boolean\n }\n ): Promise<Practice | undefined> {\n return this.api.get<Practice | undefined>(`${this.baseURL}/v1/practices`, {\n params: {\n url_practice: practiceURL,\n ...params,\n },\n })\n }\n\n public practiceGetFromUuid(practiceUuid: Uuid, locale?: string, withAccounts?: boolean): Promise<Practice> {\n return this.api.get<Practice>(`${this.baseURL}/v1/practices/${practiceUuid}`, {\n params: { locale, accounts: withAccounts },\n })\n }\n\n /// Practice Configs\n\n /**\n * This function retrieves all configs of a specific practice\n * @param practiceUuid uuid of the practice\n * @returns the practice configs\n */\n public practiceConfigGetFromPracticeUuid(practiceUuid: Uuid): Promise<PracticeConfigs[]> {\n return this.api.get<PracticeConfigs[]>(`${this.baseURL}/v1/practices/${practiceUuid}/configs`)\n }\n\n /**\n * This function retrieves a specific config of a practice\n * @param practiceUuid uuid of the practice\n * @param kind of the config\n * @returns the practice config\n */\n public practiceConfigGetByKindForPracticeUuid(\n practiceUuid: Uuid,\n kind: PracticeConfigKind\n ): Promise<PracticeConfigs> {\n return this.api.get<PracticeConfigs>(`${this.baseURL}/v1/practices/${practiceUuid}/configs/${kind}`)\n }\n\n /**\n * This function creates a config for a specific practice\n * @param practiceUuid uuid of the practice\n * @param config the config to add to the practice\n * @returns the created practice config\n */\n public practiceConfigCreateForPracticeUuid(practiceUuid: Uuid, config: PracticeConfigs): Promise<PracticeConfigs> {\n return this.api.post<PracticeConfigs>(`${this.baseURL}/v1/practices/${practiceUuid}/configs`, config)\n }\n\n /**\n * This function updates a specific config of a practice\n * @param practiceUuid uuid of the practice\n * @param config the config to update\n * @returns the practice config\n */\n public practiceConfigUpdate(config: PracticeConfigs): Promise<PracticeConfigs> {\n return this.api.put<PracticeConfigs>(\n `${this.baseURL}/v1/practices/${config.uuidPractice}/configs/${config.kind}`,\n config\n )\n }\n\n /// Accounts\n public practiceGetAccounts(practiceUuid: Uuid): Promise<PracticeAccount[]> {\n return this.api.get<PracticeAccount[]>(`${this.baseURL}/v1/practices/${practiceUuid}/accounts`)\n }\n\n public practiceGetAccount(practiceUuid: Uuid, accountUuid: Uuid): Promise<PracticeAccount> {\n return this.api.get<PracticeAccount>(`${this.baseURL}/v1/practices/${practiceUuid}/accounts/${accountUuid}`)\n }\n\n /**\n * Get the PracticeWorkflows of a specific practice\n * @param practiceUuid the uuid of the practice\n * @param kind (optional) the kind of WorkflowType to filter in\n * @returns a list of PracticeWorkflow\n */\n public practiceGetWorkflows(practiceUuid: Uuid, kind?: WorkflowType): Promise<PracticeWorkflow[]> {\n return this.api.get<PracticeWorkflow[]>(`${this.baseURL}/v1/practices/${practiceUuid}/workflows`, {\n params: { kind },\n })\n }\n\n public practiceGetWorkflow(\n practiceUuid: Uuid,\n workflowType: WorkflowType\n ): Promise<PracticeWorkflowWithTagSpecialty> {\n return this.api.get<PracticeWorkflowWithTagSpecialty>(\n `${this.baseURL}/v1/practices/${practiceUuid}/workflows/${workflowType}`\n )\n }\n\n /// Plans\n public practiceGetPlans(practiceUuid: Uuid, planType?: PlanType): Promise<PracticePlan[]> {\n return this.api.get<PracticePlan[]>(`${this.baseURL}/v1/practices/${practiceUuid}/plans`, {\n params: { kind: planType },\n })\n }\n\n public practiceGetPlan(practiceUuid: Uuid, planId: number): Promise<PracticePlan> {\n return this.api.get<PracticePlan>(`${this.baseURL}/v1/practices/${practiceUuid}/plans/${planId}`)\n }\n\n public practiceGetPlanPrices(practiceUuid: Uuid, planId: number): Promise<PracticePlanPrices> {\n return this.api.get<PracticePlanPrices>(`${this.baseURL}/v1/practices/${practiceUuid}/plans/${planId}/prices`)\n }\n\n // Payments\n public practiceGetPayments(practiceUuid: Uuid, planType?: PlanType): Promise<PracticePayment[]> {\n return this.api.get<PracticePayment[]>(`${this.baseURL}/v1/practices/${practiceUuid}/payments`, {\n params: { kind: planType },\n })\n }\n\n public practiceGetPayment(practiceUuid: Uuid, idStripeInvoiceOrPaymentIntent: string): Promise<PracticePayment> {\n return this.api.get<PracticePayment>(\n `${this.baseURL}/v1/practices/${practiceUuid}/payments/${idStripeInvoiceOrPaymentIntent}`\n )\n }\n\n public practiceGetPaymentForStripePaymentIntentWithID(\n practiceUuid: Uuid,\n stripePaymentIntentId: number\n ): Promise<PracticePayment> {\n return this.api.get<PracticePayment>(\n `${this.baseURL}/v1/practices/${practiceUuid}/payments/${stripePaymentIntentId}`\n )\n }\n\n // Payments Intent\n public practiceGetPaymentsIntents(practiceUuid: Uuid, planType?: PlanType): Promise<PracticePaymentIntent[]> {\n return this.api.get<PracticePaymentIntent[]>(`${this.baseURL}/v1/practices/${practiceUuid}/payments/intents`, {\n params: { kind: planType },\n })\n }\n\n /**\n * This function return the user hased email to be use for creating payment intent\n * @param email the email to hash\n * @returns a hashed email\n */\n public getPaymentIntentHashedEmail(email: string): string {\n return hashToBase64String(email.toLowerCase())\n }\n\n /**\n * Creates a PracticePaymentIntent\n * @param practiceUuid the uuid of the practice\n * @param planId the plan id to use\n * @param userEmail the email address of the user\n * @param isoLocality (optional) the desired locality\n * @param url_subdomain (optional) the url of the sub domain (@bruno-morel need you to document that)\n * @param promotionCode (optional) promotion code to apply\n * @param requestMetadata (optional) the request metadata to use. If defined, when payment service call our hooks in practice, it will use it to do required action (create a consult, refill a consult, etc.).\n * @returns\n */\n public practiceCreatePaymentsIntent(\n practiceUuid: Uuid,\n planId: number,\n userEmail: string,\n isoLocality?: string,\n url_subdomain?: string,\n requestMetadata?: PaymentIntentRequestMetadata\n ): Promise<PracticePaymentIntent> {\n return this.api.post<PracticePaymentIntent>(\n `${this.baseURL}/v1/practices/${practiceUuid}/payments/intents/`,\n {\n idPlan: planId,\n hashUserEmail: userEmail ? this.getPaymentIntentHashedEmail(userEmail) : undefined,\n isoLocality,\n requestMetadata,\n },\n { params: { url_subdomain } }\n )\n }\n\n public practiceGetPaymentsIntent(practiceUuid: Uuid, paymentIntentId: number): Promise<PracticePaymentIntent> {\n return this.api.get<PracticePaymentIntent>(\n `${this.baseURL}/v1/practices/${practiceUuid}/payments/intents/${paymentIntentId}`\n )\n }\n\n /**\n * Updates a PracticePaymentIntent\n * @param practiceUuid the practice uuid\n * @param idPraticePaymentIntent the id of the PracticePaymentIntent to update\n * @param practicePaymentIntent the desired PracticePaymentIntent\n * @param userEmail the email of the user\n * @param promotionCode (optional) promotional code to apply\n * @param finalize (optional) if true will finalize the PracticePaymentIntent and related Stripe.Invoice. Once, finalized you cannot modify the PracticePaymentIntent anymore.\n * @returns the updated PracticePaymentIntent\n */\n public practiceUpdatePaymentsIntent(\n practiceUuid: string,\n idPraticePaymentIntent: number,\n practicePaymentIntent: PracticePaymentIntent,\n userEmail: string,\n promotionCode?: string,\n finalize?: boolean\n ) {\n return this.api.put<PracticePaymentIntent>(\n `${this.baseURL}/v1/practices/${practiceUuid}/payments/intents/${idPraticePaymentIntent}`,\n {\n ...practicePaymentIntent,\n hashUserEmail: userEmail ? this.getPaymentIntentHashedEmail(userEmail) : undefined,\n },\n { params: { promotionCode, finalize } }\n )\n }\n\n /**\n * Invoice\n * @param practiceUuid UUID of the practice to get the invoice from\n * @param invoiceId ID of the invoice in stripe\n */\n public getInvoice(practiceUuid: Uuid, invoiceId: string): Promise<PracticeInvoice> {\n return this.api.get<PracticeInvoice>(\n `${this.baseURL}/v1/practices/${practiceUuid}/payments/invoices/${invoiceId}`\n )\n }\n\n // Practitioner\n public practiceGetPractitioners(practiceUuid: Uuid): Promise<Practitioner[]> {\n return this.api.get<Practitioner[]>(`${this.baseURL}/v1/practices/${practiceUuid}/practitioners`)\n }\n\n public practiceUpdatePractitioner(\n practiceUuid: Uuid,\n practitionerUuid: Uuid,\n requestBody: Practitioner\n ): Promise<Practitioner> {\n return this.api.put<Practitioner>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}`,\n requestBody\n )\n }\n\n public practiceGetPractitioner(practiceUuid: Uuid, practitionerUuid: Uuid): Promise<Practitioner> {\n return this.api.get<Practitioner>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}`\n )\n }\n\n // Practitioner Licenses\n public practiceGetPractitionerLicenses(practiceUuid: Uuid, practitionerUuid: Uuid): Promise<PractitionerLicense[]> {\n return this.api.get<PractitionerLicense[]>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/licenses`\n )\n }\n\n public practiceCreatePractitionerLicense(\n practiceUuid: Uuid,\n practitionerUuid: Uuid,\n requestBody: PractitionerLicense\n ): Promise<PractitionerLicense> {\n return this.api.post<PractitionerLicense>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/licenses`,\n requestBody\n )\n }\n\n public practiceUpdatePractitionerLicense(\n practiceUuid: Uuid,\n practitionerUuid: Uuid,\n licenseId: number,\n requestBody: PractitionerLicense\n ): Promise<PractitionerLicense> {\n return this.api.put<PractitionerLicense>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/licenses/${licenseId}`,\n requestBody\n )\n }\n\n public practiceGetPractitionerLicense(\n practiceUuid: Uuid,\n practitionerUuid: Uuid,\n licenseId: number\n ): Promise<PractitionerLicense> {\n return this.api.get<PractitionerLicense>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/licenses/${licenseId}`\n )\n }\n\n // Practitioner Preferences\n public practiceGetPractitionerPreferences(\n practiceUuid: Uuid,\n practitionerUuid: Uuid\n ): Promise<PractitionerPreference[]> {\n return this.api.get<PractitionerPreference[]>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/preferences`\n )\n }\n\n public practiceCreatePractitionerPreference(\n practiceUuid: Uuid,\n practitionerUuid: Uuid,\n requestBody: PractitionerPreference\n ): Promise<PractitionerPreference> {\n return this.api.post<PractitionerPreference>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/preferences`,\n requestBody\n )\n }\n\n public practiceUpdatePractitionerPreference(\n practiceUuid: Uuid,\n practitionerUuid: Uuid,\n preferenceId: number,\n requestBody: PractitionerPreference\n ): Promise<PractitionerPreference> {\n return this.api.put<PractitionerPreference>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/preferences/${preferenceId}`,\n requestBody\n )\n }\n\n public practiceGetPractitionerPreference(\n practiceUuid: Uuid,\n practitionerUuid: Uuid,\n preferenceId: number\n ): Promise<PractitionerPreference> {\n return this.api.get<PractitionerPreference>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/preferences/${preferenceId}`\n )\n }\n\n // Practitioner Roles\n public practiceGetPractitionerRoles(practiceUuid: Uuid, practitionerUuid: Uuid): Promise<PractitionerRole[]> {\n return this.api.get<PractitionerRole[]>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/roles`\n )\n }\n\n public practiceCreatePractitionerRole(\n practiceUuid: Uuid,\n practitionerUuid: Uuid,\n requestBody: PractitionerRole\n ): Promise<PractitionerRole> {\n return this.api.post<PractitionerRole>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/roles`,\n requestBody\n )\n }\n\n public practiceDeletePractitionerRoles(practiceUuid: Uuid, practitionerUuid: Uuid): Promise<PractitionerRole> {\n return this.api.deleteRequest<PractitionerRole>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/roles`\n )\n }\n\n public practiceUpdatePractitionerRole(\n practiceUuid: Uuid,\n practitionerUuid: Uuid,\n roleId: number,\n requestBody: PractitionerRole\n ): Promise<PractitionerRole> {\n return this.api.put<PractitionerRole>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/roles/${roleId}`,\n requestBody\n )\n }\n\n public practiceGetPractitionerRole(\n practiceUuid: Uuid,\n practitionerUuid: Uuid,\n roleId: number\n ): Promise<PractitionerRole> {\n return this.api.get<PractitionerRole>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/roles/${roleId}`\n )\n }\n\n public practiceDeletePractitionerRole(\n practiceUuid: Uuid,\n practitionerUuid: Uuid,\n roleId: number\n ): Promise<PractitionerRole> {\n return this.api.deleteRequest<PractitionerRole>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/roles/${roleId}`\n )\n }\n\n // Practitioner signature\n\n /**\n * This function returns the practitioner's signature as a Blob\n * @param practiceUuid the practice uuid of the practitioner\n * @param practitionerUuid the practitioner uuid\n * @returns a blob representing the signature\n */\n public practiceGetPractitionerSignature(practiceUuid: Uuid, practitionerUuid: Uuid): Promise<Blob> {\n return this.api.get<Blob>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/signature`,\n { responseType: 'blob' }\n )\n }\n\n // Assignments\n public practiceGetAssignments(practiceUuid: Uuid): Promise<Assignment[]> {\n return this.api.get<Assignment[]>(`${this.baseURL}/v1/practices/${practiceUuid}/assignments`)\n }\n\n public practiceCreateAssignment(practiceUuid: Uuid, requestBody: AssignmentRequest): Promise<Assignment> {\n return this.api.post<Assignment>(`${this.baseURL}/v1/practices/${practiceUuid}/assignments`, requestBody)\n }\n\n public practiceUpdateAssignment(\n practiceUuid: Uuid,\n assignmentId: number,\n requestBody: Assignment\n ): Promise<Assignment> {\n return this.api.put<Assignment>(\n `${this.baseURL}/v1/practices/${practiceUuid}/assignments/${assignmentId}`,\n requestBody\n )\n }\n\n public practiceGetAssignment(practiceUuid: Uuid, assignmentId: number): Promise<Assignment> {\n return this.api.get<Assignment>(`${this.baseURL}/v1/practices/${practiceUuid}/assignments/${assignmentId}`)\n }\n\n // Quotas\n public practiceGetQuotas(practiceUuid: Uuid): Promise<PractitionerQuota[]> {\n return this.api.get<PractitionerQuota[]>(`${this.baseURL}/v1/practices/${practiceUuid}/quotas`)\n }\n\n public practiceGetQuota(practiceUuid: Uuid, quotaId: number): Promise<PractitionerQuota> {\n return this.api.get<PractitionerQuota>(`${this.baseURL}/v1/practices/${practiceUuid}/quotas/${quotaId}`)\n }\n}\n","import { APIService } from './api'\nimport {\n ClosedReasonType,\n Consult,\n DataCreateResponse,\n LockboxDataRequest,\n MedicalStatus,\n ResumeConsultEmailRequest,\n Uuid,\n} from '../models'\nexport class TellerService {\n constructor(private api: APIService, private baseURL: string) {}\n\n public async lockboxDataStore(\n lockboxUuid: Uuid,\n req: LockboxDataRequest,\n lockboxOwnerUuid?: Uuid,\n previousDataUuid?: Uuid\n ): Promise<DataCreateResponse> {\n return this.api.post<DataCreateResponse>(`${this.baseURL}/v1/lockboxes/${lockboxUuid}/data`, req, {\n params: {\n lockbox_owner_uuid: lockboxOwnerUuid,\n data_uuid: previousDataUuid,\n },\n })\n }\n\n public updateConsultByUUID(\n patientUuid: Uuid,\n uuidConsult: Uuid,\n statusMedical: MedicalStatus,\n closedReasonType?: ClosedReasonType,\n closedReasonDescription?: string,\n neverExpires?: boolean\n ): Promise<Consult> {\n return this.api.put<Consult>(`${this.baseURL}/v1/consults/${uuidConsult}`, {\n patientUuid,\n statusMedical,\n closedReasonType,\n closedReasonDescription,\n neverExpires,\n })\n }\n\n /**\n * This function notifies teller that the fax sent for a specific consult did not get through\n * @todo - Make service only exposed route\n * @param practiceUuid the practice uuid linked to the consult\n * @param consultationUuid the consultation uuid\n * @param consultationShortId the consultation short id\n * @param fax the address where to send the fax\n * @returns void\n */\n public notifyFaxFailed(practiceUuid: Uuid, consultationUuid: Uuid, consultationShortId: string, fax: string) {\n return this.api.post<void>(\n `${this.baseURL}/v1/fax-failed`,\n {\n consultationUuid,\n consultationShortId,\n fax,\n },\n {\n params: { practice_uuid: practiceUuid },\n }\n )\n }\n\n /**\n * This function let's you reassign a practictioner to a consult and send a notification email\n * @todo - Make service only exposed route\n * @param uuidConsult the uuid of the consult to reassign\n * @param newPractitionerUuid the uuid of the practitioner that will get reassigned\n */\n public reassignmentEmail(uuidConsult: Uuid, newPractitionerUuid: Uuid) {\n return this.api.post<void>(`${this.baseURL}/v1/consult/${uuidConsult}/reassignment-email`, {\n newPractitionerUuid,\n })\n }\n\n /**\n * This function will send an email to the patientUuid, saying that the online practice has been sent a fax successfully\n * @todo - Make service only exposed route\n * @param consult\n * @param patientUuid\n * @returns void\n */\n public sendOnlineFaxSuccessfulEmail(consult: Consult, patientUuid: Uuid): Promise<void> {\n return this.api.post(`${this.baseURL}/v1/online-fax-notify`, { consult, patientUuid })\n }\n\n /**\n * This function will send an email to patient to allow them to resume the consult.\n * @param req the body of the resume consult request\n * @returns void\n */\n public sendResumeConsultEmail(req: ResumeConsultEmailRequest): Promise<void> {\n return this.api.post(`${this.baseURL}/v1/resume-consult-email`, req)\n }\n}\n","import { APIService } from './api'\nimport {\n DataCreateResponse,\n DataResponse,\n GrantedLockboxes,\n LockboxCreateResponse,\n LockboxDataRequest,\n LockboxGrantRequest,\n LockboxManifest,\n SharedSecretResponse,\n Uuid,\n EncryptedVaultIndex,\n IndexKey,\n EncryptedIndexEntry\n} from '../models'\n\nexport class VaultService {\n constructor(private api: APIService, private baseURL: string) { }\n\n public async lockboxCreate(lockboxMetadata?: Object): Promise<LockboxCreateResponse> {\n return this.api.post<LockboxCreateResponse>(\n `${this.baseURL}/v1/lockbox`,\n lockboxMetadata\n )\n }\n\n public async lockboxMetadataAdd(\n lockboxUuid: Uuid,\n lockboxMetadata: Object,\n lockboxOwnerUuid?: Uuid\n ): Promise<LockboxCreateResponse> {\n return this.api.put<LockboxCreateResponse>(\n `${this.baseURL}/v1/lockbox/${lockboxUuid}`,\n lockboxMetadata,\n { params: { lockbox_owner_uuid: lockboxOwnerUuid } }\n )\n }\n\n public async lockboxSecretGet(\n lockboxUuid: Uuid,\n lockboxOwnerUuid?: Uuid\n ): Promise<SharedSecretResponse> {\n return this.api.get<SharedSecretResponse>(\n `${this.baseURL}/v1/lockboxes/${lockboxUuid}/secret`,\n { params: { lockbox_owner_uuid: lockboxOwnerUuid } }\n )\n }\n\n public async lockboxGrant(\n lockboxUuid: Uuid,\n req: LockboxGrantRequest,\n lockboxOwnerUuid?: Uuid\n ): Promise<void> {\n return this.api.post<void>(\n `${this.baseURL}/v1/lockboxes/${lockboxUuid}/grant`,\n req,\n { params: { lockbox_owner_uuid: lockboxOwnerUuid } }\n )\n }\n\n /**\n * Get all lockboxes granted to user\n * @param filter filter of lockbox metadata\n * @returns decrypted lockboxes granted to user\n */\n public async grantsGet(): Promise<GrantedLockboxes> {\n return this.api.get<GrantedLockboxes>(`${this.baseURL}/v1/grants`)\n }\n\n /**\n * This function create or update a data into the vault.\n * @note At creation it is necessary to have all `req` filled\n * @note When setting `previousDataUuid` you are updating the data. `req` metadata fields are optional.\n * @param lockboxUuid The lockbox uuid the data will be stored in\n * @param req The request (please see notes)\n * @param lockboxOwnerUuid The uuid of the owner of the lockbox (@deprecated)\n * @param previousDataUuid The data uuid of the data you want to update\n * @returns \n */\n public async lockboxDataStore(\n lockboxUuid: Uuid,\n req: LockboxDataRequest,\n lockboxOwnerUuid?: Uuid,\n previousDataUuid?: Uuid\n ): Promise<DataCreateResponse> {\n return this.api.post<DataCreateResponse>(\n `${this.baseURL}/v1/lockboxes/${lockboxUuid}/data`,\n req,\n {\n params: {\n lockbox_owner_uuid: lockboxOwnerUuid,\n data_uuid: previousDataUuid,\n },\n }\n )\n }\n\n public async lockboxDataGet(\n lockboxUuid: Uuid,\n dataUuid: Uuid,\n lockboxOwnerUuid?: Uuid,\n stream: boolean = true\n ): Promise<DataResponse> {\n let data = await this.api.get(\n `${this.baseURL}/v1/lockboxes/${lockboxUuid}/data/${dataUuid}`,\n { params: { lockbox_owner_uuid: lockboxOwnerUuid, stream } }\n )\n\n // returned as stream, we need to put inside a DataResponse object\n if (stream)\n return { data }\n\n return data\n }\n\n public async lockboxManifestGet(\n lockboxUuid: Uuid,\n filter?: Object,\n lockboxOwnerUuid?: Uuid\n ): Promise<LockboxManifest> {\n return this.api.get(`${this.baseURL}/v1/lockboxes/${lockboxUuid}`, {\n params: { lockbox_owner_uuid: lockboxOwnerUuid, filter },\n })\n }\n\n public async lockboxMetadataGet(\n lockboxUuid: Uuid,\n fields: string[],\n groupby: string[],\n filter?: Object,\n lockboxOwnerUuid?: Uuid\n ): Promise<any[]> {\n return this.api.get(`${this.baseURL}/v1/lockboxes/${lockboxUuid}/metadata`, {\n params: { lockbox_owner_uuid: lockboxOwnerUuid, fields, groupby, filter },\n })\n }\n\n /**\n * inserts or updates encrypted index entries\n * @note if the index data is being inserted for a user other than the requester, use `indexOwnerUuid`\n * @note if a uuid for an entry is provided, the service will perform an update\n * @param entries the encrypted index data\n * @param indexOwnerUuid\n */\n public async vaultIndexPut(entries: EncryptedVaultIndex, indexOwnerUuid?: Uuid): Promise<void> {\n return this.api.put(`${this.baseURL}/v1/index`,\n entries,\n {\n params: {\n index_owner_uuid: indexOwnerUuid,\n },\n }\n )\n }\n\n /**\n * inserts or updates index snapshot for the provided index owner\n * @note if the index data is being inserted for a user other than the requester, use `indexOwnerUuid`\n * @param entry the encrypted index snapshot\n */\n public async vaultIndexSnapshotPut(entry: EncryptedIndexEntry): Promise<void> {\n return this.api.put(`${this.baseURL}/v1/index-snapshot`, entry)\n }\n\n /**\n * Retrieves the encrypted index from the vault for the requesting user\n * @note index keys can be specified to narrow the scope of index being requested\n * @param indexKeys accepted index fields determined by vault\n * @param identifiers: an array of unique_hashes or consultation uuids used to identify an index entry\n * @param timestamp the minimum timestamp that index entries were created\n * @returns the encrypted index\n */\n public async vaultIndexGet(indexKeys: IndexKey[], identifiers?: string[], timestamp?: Date): Promise<EncryptedVaultIndex> {\n return this.api.get<EncryptedVaultIndex>(`${this.baseURL}/v1/index`, {\n params: { index_keys: indexKeys, identifiers, timestamp },\n })\n }\n}\n","import { WorkflowData } from '../models/workflow'\nimport { APIService } from './api'\n\nexport class WorkflowService {\n private v1Url: string\n\n constructor(private api: APIService, url: string) {\n this.v1Url = `${url}/v1`\n }\n\n /**\n * This function returns all workflows\n * @returns desired workflow\n */\n public getWorkflows(): Promise<WorkflowData[]> {\n return this.api.get<WorkflowData[]>(`${this.v1Url}/workflows`)\n }\n\n /**\n * This function retrieves a workflow. If `locale` is not found, it will try to find 'en' version of it.\n * By default, will return most recent workflow of a specific `id`. `createdAt` can be used to select older version.\n * @param id The uuid of the workflow\n * @param locale (optional) The desired locale of the workflow (default: 'en')\n * @param createdAt (optional) The creation date of the workflow (also used for versionning)\n * @returns desired workflow\n */\n public getWorkflow(\n id: string,\n locale?: string,\n createdAt?: string\n ): Promise<WorkflowData> {\n return this.api.get<WorkflowData>(`${this.v1Url}/workflows/${id}`, {\n params: { locale, createdAt },\n })\n }\n}\n","import { ServiceCollection, ServiceCollectionRequest } from '../models'\nimport {\n APIService,\n ConsultService,\n DiagnosisService,\n GuardService,\n PracticeService,\n SearchService,\n TellerService,\n VaultService,\n WorkflowService,\n} from '../services'\n\n/**\n * This function is used to initialize services with a provided url\n * @param services an object containing the url of the services to init\n * @param authenticationCallback (optional) the authentification callback. Called when the token were not able to be refreshed.\n * @param useLocalStorage (default: true) if true store tokens into local storage (only for browsers)\n * @returns an instance of each services with a provided url\n */\nexport const init = (\n services: ServiceCollectionRequest,\n authenticationCallback?: (err: Error, practiceUuid?: string) => void,\n useLocalStorage = true\n): ServiceCollection => {\n const {\n tellerBaseURL,\n practiceBaseURL,\n consultBaseURL,\n vaultBaseURL,\n guardBaseURL,\n searchBaseURL,\n workflowBaseURL,\n diagnosisBaseURL,\n } = services\n\n const apiService = new APIService(useLocalStorage, undefined, authenticationCallback)\n\n return {\n apiService,\n tellerService: tellerBaseURL ? new TellerService(apiService, tellerBaseURL) : undefined,\n practiceService: practiceBaseURL ? new PracticeService(apiService, practiceBaseURL) : undefined,\n consultService: consultBaseURL ? new ConsultService(apiService, consultBaseURL) : undefined,\n vaultService: vaultBaseURL ? new VaultService(apiService, vaultBaseURL) : undefined,\n guardService: guardBaseURL ? new GuardService(apiService, guardBaseURL) : undefined,\n searchService: searchBaseURL ? new SearchService(apiService, searchBaseURL) : undefined,\n workflowService: workflowBaseURL ? new WorkflowService(apiService, workflowBaseURL) : undefined,\n diagnosisService: diagnosisBaseURL ? new DiagnosisService(apiService, diagnosisBaseURL) : undefined,\n }\n}\n"],"names":["hashToBase64String","value","Buffer","from","sha256","update","digest","toString","AxiosService","config","axios","create","apiRequest","url","data","headers","then","res","apiRequestHeader","headerToRetrieve","toLowerCase","get","method","deleteRequest","post","put","patch","head","APIService","useLocalStorage","tokenRefreshFailureCallback","self","interceptors","request","use","token","useRefreshToken","getTokens","refreshToken","accessToken","Authorization","error","Promise","reject","createAuthRefreshInterceptor","failedRequest","authRefreshFn","tokenResp","setTokens","response","resolve","console","statusCodes","setAuthRefreshFn","fn","tokens","localStorage","setItem","JSON","stringify","item","getItem","parse","ApisPracticeManager","serviceCollReq","getAuthTokenCbk","Map","practiceUuid","practiceInstance","practiceInstances","newPracticeInstance","init","undefined","authTokenFunc","guardService","log","Error","apiService","set","AssistantType","TransmissionKind","TransmissionStatus","ConsultType","FeeStatus","MedicalStatus","TaskStatus","ClosedReasonType","VisibilityType","DrugType","PrescriptionStatus","PlanStatus","AuthenticationFailed","AuthenticationBadRequest","AuthenticationServerError","AuthenticationUnconfirmedEmail","IdentityCreationFailed","IdentityCreationBadRequest","IdentityCreationConflict","VaultDataMissing","WorkflowType","RateDimension","PlanType","PaymentStatus","PractitionerStatus","AssignmentStatus","PractitionnerRoleType","OtherRoleType","LicenseStatus","PeriodType","SyncStatus","PracticeEmailKind","PracticeConfigKind","StripePriceType","PaymentIntentRequestMetadataKind","IndexKey","DocumentType","MetadataCategory","IndexKind","ConsultService","api","baseURL","consultCreate","c","countConsults","uuidPractice","uuidRequester","statusesMedical","statusesExclude","shortId","columnToSortTo","orderToSortTo","perPage","indexPage","filterAssignedDoctor","filterCurrentPractitioner","filterIsoLocality","filterAssignee","params","page","sortColumns","orderColumns","resContentRange","parseInt","getConsults","getConsultByUUID","uuidConsult","updateConsultByUUID","consult","getConsultFaxStatuses","kind","Fax","postConsultTransmission","nameDriver","addressOrPhoneToSendTo","file","nameReceiver","txtTransmissionTitle","txtTransmissionNotes","FormData","append","postConsultFax","addressReceiver","postConsultEmail","retryConsultFax","transmissionId","status","Retrying","updateConsultTransmissionStatus","newStatus","DiagnosisService","getDiagnoses","getDiagnosisByUuid","uuidDiagnosis","createDiagnosis","diagnosis","updateDiagnosis","uuid","getTreatmentsFromDiagnosisUuid","diagnosisUuid","getTreatmentPlansFromConsultUuid","createTreatment","treatmentRequest","getTreatmentPlansPopulatedFromConsultUuid","populated","postPlans","plans","updateTreatmentPlan","uuidPlan","diagnosisRequest","plan","refill","acceptTreatmentPlan","getAllDrugs","foundDrugs","GuardService","authRefresh","bind","identityCache","whoAmICache","m2mToken","req","skipAuthRefresh","resp","isAxiosError","code","authToken","authLogout","authRecover","identityCreate","identityGet","identityID","skipCache","cacheKey","identity","whoAmI","refreshCache","identityUpdate","identityMFAQRCode","password","Accept","identitySendConfirmEmail","identityGetByCustomerEmail","email","identityGetByHash","substring","indexOf","b64Hash","replace","SearchService","index","consultUUID","terms","search","PracticeService","practiceGetFromURL","practiceURL","url_practice","practiceGetFromUuid","locale","withAccounts","accounts","practiceConfigGetFromPracticeUuid","practiceConfigGetByKindForPracticeUuid","practiceConfigCreateForPracticeUuid","practiceConfigUpdate","practiceGetAccounts","practiceGetAccount","accountUuid","practiceGetWorkflows","practiceGetWorkflow","workflowType","practiceGetPlans","planType","practiceGetPlan","planId","practiceGetPlanPrices","practiceGetPayments","practiceGetPayment","idStripeInvoiceOrPaymentIntent","practiceGetPaymentForStripePaymentIntentWithID","stripePaymentIntentId","practiceGetPaymentsIntents","getPaymentIntentHashedEmail","practiceCreatePaymentsIntent","userEmail","isoLocality","url_subdomain","requestMetadata","idPlan","hashUserEmail","practiceGetPaymentsIntent","paymentIntentId","practiceUpdatePaymentsIntent","idPraticePaymentIntent","practicePaymentIntent","promotionCode","finalize","getInvoice","invoiceId","practiceGetPractitioners","practiceUpdatePractitioner","practitionerUuid","requestBody","practiceGetPractitioner","practiceGetPractitionerLicenses","practiceCreatePractitionerLicense","practiceUpdatePractitionerLicense","licenseId","practiceGetPractitionerLicense","practiceGetPractitionerPreferences","practiceCreatePractitionerPreference","practiceUpdatePractitionerPreference","preferenceId","practiceGetPractitionerPreference","practiceGetPractitionerRoles","practiceCreatePractitionerRole","practiceDeletePractitionerRoles","practiceUpdatePractitionerRole","roleId","practiceGetPractitionerRole","practiceDeletePractitionerRole","practiceGetPractitionerSignature","responseType","practiceGetAssignments","practiceCreateAssignment","practiceUpdateAssignment","assignmentId","practiceGetAssignment","practiceGetQuotas","practiceGetQuota","quotaId","TellerService","lockboxDataStore","lockboxUuid","lockboxOwnerUuid","previousDataUuid","lockbox_owner_uuid","data_uuid","patientUuid","statusMedical","closedReasonType","closedReasonDescription","neverExpires","notifyFaxFailed","consultationUuid","consultationShortId","fax","practice_uuid","reassignmentEmail","newPractitionerUuid","sendOnlineFaxSuccessfulEmail","sendResumeConsultEmail","VaultService","lockboxCreate","lockboxMetadata","lockboxMetadataAdd","lockboxSecretGet","lockboxGrant","grantsGet","lockboxDataGet","dataUuid","stream","lockboxManifestGet","filter","lockboxMetadataGet","fields","groupby","vaultIndexPut","entries","indexOwnerUuid","index_owner_uuid","vaultIndexSnapshotPut","entry","vaultIndexGet","indexKeys","identifiers","timestamp","index_keys","WorkflowService","v1Url","getWorkflows","getWorkflow","id","createdAt","services","authenticationCallback","tellerBaseURL","practiceBaseURL","consultBaseURL","vaultBaseURL","guardBaseURL","searchBaseURL","workflowBaseURL","diagnosisBaseURL","tellerService","practiceService","consultService","vaultService","searchService","workflowService","diagnosisService"],"mappings":";;;;;;;;;;;AAGA;;;;;;SAKgBA,mBAAmBC;EAC/B,OAAOC,QAAM,CAACC,IAAP,CAAYC,cAAM,GAAGC,MAAT,CAAgBJ,KAAhB,EAAuBK,MAAvB,CAA8B,KAA9B,CAAZ,EAAkD,KAAlD,EAAyDC,QAAzD,CAAkE,QAAlE,CAAP;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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B,EAAgCuS,eAAhC,CAAH,GAAsD5S,SARnF;IASHoT,gBAAgB,EAAEP,gBAAgB,GAAG,IAAI5M,gBAAJ,CAAqB5F,UAArB,EAAiCwS,gBAAjC,CAAH,GAAwD7S;GAT9F;AAWH,CA7BM;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"oro-sdk-apis.cjs.development.js","sources":["../src/helpers/hash.ts","../src/services/axios.ts","../src/services/api.ts","../src/services/apisPracticeManager.ts","../src/models/consult.ts","../src/models/diagnosis.ts","../src/models/error.ts","../src/models/practice.ts","../src/models/vault.ts","../src/models/workflow.ts","../src/models/search.ts","../src/services/consult.ts","../src/services/diagnosis.ts","../src/services/guard.ts","../src/services/search.ts","../src/services/practice.ts","../src/services/teller.ts","../src/services/vault.ts","../src/services/workflow.ts","../src/helpers/init.ts"],"sourcesContent":["import { sha256 } from 'hash.js'\nimport { Buffer } from 'buffer/'\n\n/**\n * This function return a base64 string representation of a hashed string\n * @param value the string to hash\n * @returns a base64 string representation of a hashed value\n */\nexport function hashToBase64String(value: string): string {\n return Buffer.from(sha256().update(value).digest('hex'), 'hex').toString('base64')\n}\n","import type { AxiosRequestConfig } from 'axios'\nimport axios, { AxiosInstance } from 'axios'\n\n\nexport class AxiosService {\n protected axios: AxiosInstance\n\n constructor(\n config?: AxiosRequestConfig\n ) {\n if (!config) config = {}\n\n this.axios = axios.create(config)\n }\n\n protected async apiRequest(config: AxiosRequestConfig, url: string, data?: any) {\n if (!config.headers) config.headers = {}\n\n config.headers['Content-Type'] = 'application/json'\n\n return this.axios({\n ...config,\n url,\n data: data,\n }).then((res) => {\n return res.data\n })\n }\n\n protected async apiRequestHeader(config: AxiosRequestConfig, url: string, headerToRetrieve?: string, data?: any,) {\n if (!config.headers) config.headers = {}\n\n config.headers['Content-Type'] = 'application/json'\n\n return this.axios({\n ...config,\n url,\n data: data,\n }).then((res) => {\n if (headerToRetrieve) {\n return res.headers[headerToRetrieve] ?? res.headers[headerToRetrieve.toLowerCase()]\n }\n\n return res.headers\n })\n }\n\n public get<T = any>(url: string, config?: AxiosRequestConfig): Promise<T> {\n return this.apiRequest({ ...config, method: 'get' }, url)\n }\n\n public deleteRequest<T = any>(\n url: string,\n config?: AxiosRequestConfig\n ): Promise<T> {\n return this.apiRequest({ ...config, method: 'delete' }, url)\n }\n\n public post<T = any>(\n url: string,\n data?: any,\n config?: AxiosRequestConfig\n ): Promise<T> {\n return this.apiRequest({ ...config, method: 'post' }, url, data)\n }\n\n public put<T = any>(\n url: string,\n data: any,\n config?: AxiosRequestConfig\n ): Promise<T> {\n return this.apiRequest({ ...config, method: 'put' }, url, data)\n }\n\n public patch<T = any>(\n url: string,\n data: any,\n config?: AxiosRequestConfig\n ): Promise<T> {\n return this.apiRequest({ ...config, method: 'patch' }, url, data)\n }\n\n public head<T = any>(\n url: string,\n config?: AxiosRequestConfig,\n headerToRetrieve?: string,\n data?: any\n ): Promise<T> {\n return this.apiRequestHeader({ ...config, method: 'head' }, url, headerToRetrieve, data)\n }\n}\n","import type { AxiosRequestConfig } from 'axios'\nimport createAuthRefreshInterceptor from 'axios-auth-refresh'\nimport { AuthRefreshFunc, Tokens } from '../models'\nimport { AxiosService } from './axios'\nimport { GuardRequestConfig } from './guard'\n\nexport class APIService extends AxiosService {\n private authRefreshFn?: AuthRefreshFunc\n private tokens: Tokens = {}\n\n /**\n * The API Service lets you use an axios API and handles oro backend services authentification via JWT tokens\n * @param useLocalStorage if set to true, tokens will be stored in localStorage\n * @param config (optional) an axios config\n * @param tokenRefreshFailureCallback (optional) callback to call when failing to refresh the auth token\n */\n constructor(\n private useLocalStorage: boolean,\n config?: AxiosRequestConfig,\n private tokenRefreshFailureCallback?: (err: Error) => void\n ) {\n super(config)\n const self = this\n\n this.axios.interceptors.request.use(\n (config) => {\n const token = (config as GuardRequestConfig).useRefreshToken\n ? self.getTokens().refreshToken\n : self.getTokens().accessToken\n\n config.headers = {\n ...config.headers,\n Authorization: `Bearer ${token}`,\n }\n return config\n },\n (error) => {\n Promise.reject(error)\n }\n )\n\n createAuthRefreshInterceptor(\n this.axios,\n async function (failedRequest) {\n if (self.authRefreshFn) {\n try {\n let tokenResp = await self.authRefreshFn(self.getTokens().refreshToken)\n self.setTokens({\n accessToken: tokenResp.accessToken,\n refreshToken: tokenResp.refreshToken,\n })\n failedRequest.response.config.headers['Authorization'] = `Bearer ${\n self.getTokens().accessToken\n }`\n return Promise.resolve()\n } catch (e) {\n console.error('an error occured while refreshing tokens (notifying callback)', e)\n if (self.tokenRefreshFailureCallback) self.tokenRefreshFailureCallback(failedRequest)\n return Promise.resolve() // We keep it like that. Otherwise, it seems to break the api service will it is not needed\n // return Promise.reject(e)\n }\n }\n console.error('The request could not refresh the token (authRefreshFn was not set)', failedRequest)\n return Promise.resolve() // We keep it like that. Otherwise, it seems to break the api service will it is not needed\n // return Promise.reject(failedRequest)\n },\n { statusCodes: [401, 403] }\n )\n }\n\n public setAuthRefreshFn(fn: AuthRefreshFunc) {\n this.authRefreshFn = fn\n }\n\n public setTokens(tokens: Tokens) {\n if (this.useLocalStorage) {\n localStorage.setItem('tokens', JSON.stringify(tokens))\n }\n this.tokens = tokens\n }\n\n public getTokens(): Tokens {\n if (this.useLocalStorage) {\n let tokens: Tokens = {}\n const item = localStorage.getItem('tokens')\n if (item) {\n tokens = JSON.parse(item)\n }\n return tokens\n } else {\n return this.tokens\n }\n }\n}\n","import { init } from '../helpers'\nimport { AuthTokenResponse, ServiceCollection, ServiceCollectionRequest } from '../models'\nimport { GuardService } from './guard'\n\n/**\n * This service enables you to handle one authentication token per practice\n */\nexport class ApisPracticeManager {\n private practiceInstances = new Map<string, ServiceCollection>()\n\n /**\n * The constructor\n * @param serviceCollReq the services to initialize. Only filled urls will get corresponding service to be initialized.\n * It will be used each time a new practices needs a `ServiceCollection`\n * @param getAuthTokenCbk the callback function used to get a new JWT token\n * @param useLocalStorage (default: false) if true store tokens into local storage (only for browsers)\n */\n constructor(\n private serviceCollReq: ServiceCollectionRequest,\n private getAuthTokenCbk: (guard: GuardService, practiceUuid: string) => Promise<AuthTokenResponse>,\n private useLocalStorage = false\n ) {}\n\n /**\n * This function is used to get a `ServiceCollection` associated to a practice. If missing, it will initialize a new `ServiceCollection`.\n * @param practiceUuid the uuid of the practice\n * @returns a promise holding a `ServiceCollection`\n */\n public async get(practiceUuid: string): Promise<ServiceCollection> {\n const practiceInstance = this.practiceInstances.get(practiceUuid)\n if (practiceInstance) return practiceInstance\n\n const newPracticeInstance = init(this.serviceCollReq, undefined, this.useLocalStorage)\n\n // Create one auth token callback per practice since the practice uuid needs to change\n const authTokenFunc = async () => {\n if (newPracticeInstance.guardService) {\n console.log(`\\x1b[36m[Auth] Refresh auth called (practiceUuid: ${practiceUuid})\\x1b[36m`)\n return await this.getAuthTokenCbk(newPracticeInstance.guardService, practiceUuid)\n } else {\n throw Error('[Auth] Unable to refresh token guard service is undefined')\n }\n }\n\n // Initialize the M2M token\n await authTokenFunc()\n\n // Set the refresh tokens callback\n newPracticeInstance.apiService.setAuthRefreshFn(authTokenFunc)\n\n this.practiceInstances.set(practiceUuid, newPracticeInstance)\n\n return newPracticeInstance\n }\n}\n","export enum AssistantType {\n MedicalSecretary = 'MedicalSecretary',\n Nurse = 'Nurse',\n Specialist = 'Specialist',\n Administrative = 'Administrative',\n Other = 'Other',\n}\n\nexport interface ConsultAssignedAssistant {\n id?: number ///optional for insertion\n uuidConsult: string\n uuidAssistant: string\n type: AssistantType\n tagSpecialty?: string\n duuidCurrentTaskDescription?: string\n}\n\nexport enum TransmissionKind {\n Fax = 'Fax',\n Email = 'Email',\n SMS = 'SMS',\n EncryptedEmail = 'EncryptedEmail',\n Logs = 'Logs',\n API = 'API',\n Other = 'Other',\n}\n\nexport enum TransmissionStatus {\n Preparing = 'Preparing',\n Sending = 'Sending',\n Sent = 'Sent',\n Retrying = 'Retrying',\n Failed = 'Failed',\n DriverError = 'DriverError',\n TimedOut = 'TimedOut',\n ReceiverNotExist = 'ReceiverNotExist',\n ReceiverNotAnswering = 'ReceiverNotAnswering',\n ReceiverIncompatible = 'ReceiverIncompatible',\n}\n\nexport interface ConsultTransmission {\n id: number\n uuidConsult: string\n kind: TransmissionKind\n status: TransmissionStatus\n nameDriverReceiver: string\n addressReceiver: string\n idDriverForTransmission: string\n txtLastDriverMessage: string\n numTry: number\n numTryLeft: number\n delay: number\n tsFirstTry: string\n tsLastStatusUpdate: string\n keyWebhookSecret: string\n}\n\nexport enum ConsultType {\n Onboard = 'Onboard',\n Refill = 'Refill',\n}\n\nexport enum FeeStatus {\n NoFee = 'NoFee',\n Pending = 'Pending',\n Paid = 'Paid',\n Reimbursed = 'Reimbursed',\n Cancelled = 'Cancelled',\n Contested = 'Contested',\n}\n\nexport enum MedicalStatus {\n Creating = 'Creating',\n New = 'New',\n ToAnswer = 'ToAnswer',\n Answered = 'Answered',\n Closed = 'Closed',\n Reopened = 'Reopened',\n Archived = 'Archived',\n Failed = 'Failed',\n}\n\nexport enum TaskStatus {\n None = 'None',\n ToDo = 'ToDo',\n InProgress = 'InProgress',\n Blocked = 'Blocked',\n Done = 'Done',\n}\n\nexport enum ClosedReasonType {\n /**\n * A completed consultation\n */\n Completed = 'Completed',\n /**\n * The conclusion was that what the patient submitted was not a disease\n */\n NotADisease = 'NotADisease',\n /**\n * The consultation was not appropriate for virtual\n */\n NotAppropriateForVirtual = 'NotAppropriateForVirtual',\n /**\n * Any other reason why the consultation was closed\n */\n Other = 'Other',\n /**\n * A consultation that is required to be done in person\n */\n RequiresInPerson = 'RequiresInPerson',\n}\n\nexport interface ClosedConsultReasonInsertFields {\n /**\n * The uuid of the consultation\n */\n consult_uuid: string\n /**\n * The reason why the consultation was closed\n */\n closed_reason_type: ClosedReasonType\n /**\n * The description why the consultation was closed\n */\n closed_reason_description: string\n /**\n * When the consultation was closed\n */\n created_at: string\n}\n\nexport interface ConsultClosedReason {\n /**\n * The reason why the consultation was closed\n */\n closedReasonType: ClosedReasonType\n /**\n * The description why the consultation was closed\n */\n closedReasonDescription?: string\n}\n\nexport interface ConsultRequest {\n uuidPractice: string\n consultType?: ConsultType\n tagSpecialtyRequired: string\n idStripeInvoiceOrPaymentIntent: string\n isoLocalityRequired?: string\n isoLanguageRequired: string\n uuidParent?: string\n}\nexport interface Consult {\n uuid: string\n uuidPracticeAdmin: string\n uuidPractice: string\n tagSpecialtyRequired: string\n isoLanguageRequired: string\n idPracticePayment: number\n statusFee?: FeeStatus\n isoLocalityRequired: string\n statusMedical?: MedicalStatus\n consultType: ConsultType\n uuidAssignedDoctor: string\n uuidCurrentAssigned: string\n uuidParent?: string\n statusTask?: TaskStatus\n hasTransmissions?: boolean\n assignedAssistant?: ConsultAssignedAssistant[]\n closeConsultReason?: ConsultClosedReason\n shortId?: string\n createdAt?: string\n expiresAt?: string\n}\n","export enum VisibilityType {\n Generic = 'Generic',\n Private = 'Private',\n Instance = 'Instance',\n}\n\nexport type DiagnosisType = VisibilityType\n\nexport type TreatmentType = VisibilityType\n\nexport interface DiagnosisRequest {\n uuid?: string\n name: string\n description: string\n type: DiagnosisType\n parentUuid?: string\n language: string\n tags?: string[]\n urlMultimedia?: string\n}\n\nexport interface Diagnosis extends DiagnosisRequest {\n uuid: string\n uuidPractice: string\n uuidPractitioner?: string\n createdAt: string\n}\n\nexport interface TreatmentRequest {\n uuid?: string\n uuidDiagnosis?: string\n uuidParentTreatment?: string\n name: string\n description: string\n refillable?: boolean\n urlMultimedia?: string\n type?: TreatmentType\n}\n\nexport interface Treatment extends TreatmentRequest {\n uuid: string\n uuidDiagnosis: string\n uuidPractitioner?: string\n createdAt: string\n}\n\nexport enum DrugType {\n Generic = 'Generic',\n Instance = 'Instance',\n}\n\nexport interface DrugRequest {\n name: string // name of the drug\n description?: string // Description of the drug\n type: DrugType // Entry type\n language: string // drug locale\n posology?: string // drug posology\n sideEffects?: string // Side effects of the drug\n imageUrl?: string // Image URL to the drug\n parentUuid?: string // (optional) parent uuid of the drug. In case of DrugType.Instance\n uuid?: string // uuid of the drug (will be used as parentUuid in case of creation of new drug)\n}\n\nexport interface Drug extends DrugRequest {\n uuid: string\n uuidPractice: string\n uuidPractitioner?: string\n createdAt: string\n}\n\n/**\n * Status of the prescription\n * Right now, it only serves a soft delete flag\n */\nexport enum PrescriptionStatus {\n Existing = 'Existing',\n Deleted = 'Deleted',\n}\n\nexport interface PrescriptionRequest {\n uuid?: string\n uuidTreatment?: string\n uuidDrug?: string\n quantity: string\n sig: string\n renewal: string\n}\n\nexport interface Prescription extends PrescriptionRequest {\n uuid: string\n uuidTreatment: string\n status?: PrescriptionStatus\n createdAt: string\n}\n\nexport enum PlanStatus {\n Pending = 'Pending',\n Accepted = 'Accepted',\n Rejected = 'Rejected',\n}\n\nexport interface TreatmentPlan {\n uuid: string\n uuidConsult: string\n uuidDiagnosis: string\n uuidTreatment?: string\n notes?: string\n status: PlanStatus\n decidedAt: string\n createdAt: string\n}\n\nexport interface DrugPrescription {\n prescription: Prescription\n drug: Drug\n}\n\nexport interface TreatmentAndDrugPrescription {\n treatmentsHistory?: TreatmentHistory[]\n notes?: string\n status: PlanStatus\n uuidTreatmentPlan: string\n /**\n * this field is used to store the datetime when the patient accepted or refused the prescription\n */\n decidedAt?: string\n createdAt: string\n}\n\n/**\n * An entry in the history of the treatments of the patient.\n * The history entry consists of the treatment and the prescriptions and the drugs\n * that were prescribed to the patient at that point of history\n */\nexport interface TreatmentHistory {\n treatment: Treatment\n prescriptionsAndDrugs: DrugPrescription[]\n}\n\nexport interface TreatmentPlans {\n uuidConsult: string\n diagnosis: Diagnosis\n plans?: TreatmentAndDrugPrescription[]\n}\n\nexport interface DrugPrescriptionRequest {\n prescription: PrescriptionRequest\n drug: DrugRequest\n}\n\nexport interface TreatmentAndDrugPrescriptionRequest {\n trackingId: string\n treatment: TreatmentRequest\n prescriptionsAndDrugs?: DrugPrescriptionRequest[]\n notes?: string\n}\n\nexport interface TreatmentPlansRequest {\n uuidConsult: string\n diagnosis: DiagnosisRequest\n plans?: TreatmentAndDrugPrescriptionRequest[]\n}\n\nexport interface TreatmentAndDrugPrescriptionUpdateRequest {\n treatment: Treatment\n prescriptionsAndDrugs?: DrugPrescriptionRequest[]\n notes?: string\n}\n\nexport interface TreatmentPlanUpdateRequest extends TreatmentPlansRequest {\n uuidConsult: string\n diagnosis: DiagnosisRequest\n plan: TreatmentAndDrugPrescriptionUpdateRequest\n /**\n * request to refill the treatment plan\n */\n refill?: boolean\n}\n\nexport interface TreatmentPlansResponseEntry {\n trackingId?: string // can be undefined if treatmentPlan does not contain a treatment\n treatmentPlan: TreatmentPlan\n}\n\nexport interface TreatmentPlansResponse extends Array<TreatmentPlansResponseEntry> {}","export class AuthenticationFailed extends Error { }\nexport class AuthenticationBadRequest extends Error { }\nexport class AuthenticationServerError extends Error { }\nexport class AuthenticationUnconfirmedEmail extends Error { }\nexport class IdentityCreationFailed extends Error { }\nexport class IdentityCreationBadRequest extends Error { }\nexport class IdentityCreationConflict extends Error { }\nexport class VaultDataMissing extends Error { }","import { PlaceData } from '.'\n\nexport enum WorkflowType {\n Onboard = 'Onboard',\n Followup = 'Followup',\n Renew = 'Renew',\n DataRetrieve = 'DataRetrieve',\n}\n\nexport enum RateDimension {\n RatioOnTotal = 'RatioOnTotal',\n FixedOnTotal = 'FixedOnTotal',\n RatioPlatformFee = 'RatioPlatformFee',\n FixedPlatformFee = 'FixedPlatformFee',\n RatioOnPlatformFeeTotal = 'RatioOnPlatformFeeTotal',\n FixedOnPlatformFeeTotal = 'FixedOnPlatformFeeTotal',\n RatioOnItem = 'RatioOnItem',\n FixedOnItem = 'FixedOnItem',\n}\n\nexport enum PlanType {\n Onboard = 'Onboard',\n Followup = 'Followup',\n Renew = 'Renew',\n DataRetrieve = 'DataRetrieve',\n}\n\nexport enum PaymentStatus {\n Pending = 'Pending',\n Success = 'Success',\n Failure = 'Failure',\n Canceled = 'Canceled',\n}\n\nexport enum PractitionerStatus {\n Practicing = 'Practicing',\n Retired = 'Retired',\n NotInvolvedAnymore = 'NotInvolvedAnymore',\n Deactivated = 'Deactivated',\n Flagged = 'Flagged',\n InConflict = 'InConflict',\n Delicensed = 'Delicensed',\n}\n\nexport enum AssignmentStatus {\n Assigned = 'Assigned',\n Reassigned = 'Reassigned',\n Cancelled = 'Cancelled',\n}\n\nexport enum PractitionnerRoleType {\n Doctor = 'Doctor',\n MedicalAssistant = 'MedicalAssistant',\n MedicalSecretary = 'MedicalSecretary',\n Nurse = 'Nurse',\n Specialist = 'Specialist',\n LabAssistant = 'LabAssistant',\n Administrative = 'Administrative',\n ManualDispatcher = 'ManualDispatcher',\n Other = 'Other',\n}\n\nexport enum OtherRoleType {\n Patient = 'Patient',\n User = 'User',\n System = 'System',\n}\n\nexport type AllRoleType = OtherRoleType | PractitionnerRoleType\n\nexport enum LicenseStatus {\n Valid = 'Valid',\n Invalid = 'Invalid',\n Expired = 'Expired',\n NA = 'NA',\n Removed = 'Removed',\n}\n\nexport enum PeriodType {\n PerYear = 'PerYear',\n PerQuarter = 'PerQuarter',\n PerMonth = 'PerMonth',\n PerWeek = 'PerWeek',\n PerBusinessDay = 'PerBusinessDay',\n PerDay = 'PerDay',\n PerHour = 'PerHour',\n}\n\nexport enum SyncStatus {\n Requested = 'Requested',\n Started = 'Started',\n Succeeded = 'Succeeded',\n Failed = 'Failed',\n Cancelled = 'Cancelled',\n}\n\nexport enum PracticeEmailKind {\n SignedUp = 'SignedUp',\n Onboarded = 'Onboarded',\n OnboardedPractitioner = 'OnboardedPractitioner',\n OnboardedPatient = 'OnboardedPatient',\n Answered = 'Answered',\n ToAnswer = 'ToAnswer',\n FollowedUp = 'FollowedUp',\n Renewed = 'Renewed',\n DataRetrieved = 'DataRetrieved',\n Closed = 'Closed',\n PasswordRecovery = 'PasswordRecovery',\n FaxFailed = 'FaxFailed',\n ExamResult = 'ExamResult',\n Reassigned = 'Reassigned',\n OnlinePharmacyFaxSent = 'OnlinePharmacyFaxSent',\n ResumeConsult = 'ResumeConsult',\n}\n\nexport interface PracticeAccount {\n id?: number ///optional for insertion\n uuidPractice: string\n isoLocality?: string\n idStripeAccount?: string\n emailBillingContact: string\n urlSubdomain?: string\n}\n\n/**\n * Defines all the practice config kind.\n *\n * Please respect the following when defining a new practice config:\n * - be really specific on its role\n * - all configs needs to have default values in app\n * - the default behavior should always to be display the feature.\n * In other words, practice configs should either be used to hide a functionnality or overwrite a default behavior.\n * To be extra explicit, if you want to show a functionnality only in one practice, you will have to add a practice configs in all other practice to hide it (yes it is cumbersome).\n *\n */\nexport enum PracticeConfigKind {\n PatientConsultCard = 'PatientConsultCard',\n PracticeCloseConsultationTypes = 'PracticeCloseConsultationTypes',\n PracticeConsultTabs = 'PracticeConsultTabs',\n PracticeConfigExample = 'PracticeConfigExample',\n PracticeCookieBanner = 'PracticeCookieBanner',\n PracticeCssVariables = 'PracticeCssVariables',\n PracticeFontsLinks = 'PracticeFontsLinks',\n PracticeLocaleSwitcher = 'PracticeLocaleSwitcher',\n PracticePharmacyPicker = 'PracticePharmacyPicker',\n PracticePrescriptionFields = 'PracticePrescriptionFields',\n PractitionerChatbox = 'PractitionerChatbox',\n PractitionerConsultList = 'PractitionerConsultList',\n PractitionerSearch = 'PractitionerSearch',\n PracticeRegisterWalkthrough = 'PracticeRegisterWalkthrough',\n PracticeExamsAndResults = 'PracticeExamsAndResults',\n PracticeLayout = 'PracticeLayout',\n PracticeAddressField = 'PracticeAddressField',\n PracticeDiagnosisAndTreatment = 'PracticeDiagnosisAndTreatment',\n}\n\n/**\n * Defines the close consultation types to hide in the close consultation modal of a practice\n */\nexport type PracticeConfigPracticeCloseConsultationTypes = PracticeConfig<\n PracticeConfigKind.PracticeCloseConsultationTypes,\n {\n /**\n * Should hide item with value \"Completed\"\n */\n hideCompleted?: boolean\n\n /**\n * Should hide item with value \"Requires-in-person\"\n */\n hideRequiresInPerson?: boolean\n\n /**\n * Should hide item with value \"Other\"\n */\n hideOther?: boolean\n\n /**\n * Should hide item with value \"Not-a-disease\"\n */\n hideNotADisease?: boolean\n\n /**\n * Should hide item with value \"Appropriate-for-virtual\"\n */\n hideNotAppropriateForVirtual?: boolean\n }\n>\n\n/**\n * Generic interface of a practice config\n *\n * Practice configs needs to have a JSDoc for **all** interface and fields.\n *\n */\nexport interface PracticeConfig<K, T> {\n /**\n * The uuid of the practice to apply the config\n */\n uuidPractice: string\n /**\n * The kind of the practice config. Used as a discriminator to help auto-completion.\n */\n kind: PracticeConfigKind\n /**\n * The actual interface of the config\n */\n config: T\n}\n\nexport type PracticeConfigPatientConsultCard = PracticeConfig<\n PracticeConfigKind.PatientConsultCard,\n { hideDiagnosis?: boolean }\n>\n\nexport type PracticeConfigPracticeConsultTabs = PracticeConfig<\n PracticeConfigKind.PracticeConsultTabs,\n { hideDxTx?: boolean }\n>\n\n/**\n * This type is for test (do not remove without updating the integration tests)\n */\nexport type PracticeConfigPracticeConfigExample = PracticeConfig<\n PracticeConfigKind.PracticeConfigExample,\n { primaryColor?: string }\n>\n\n/**\n * Defines the practice cookie banner\n */\nexport type PracticeConfigPracticeCookieBanner = PracticeConfig<\n PracticeConfigKind.PracticeCookieBanner,\n {\n showCookieBanner?: boolean\n policyLink?: string\n useOfCookieLink?: string\n }\n>\n\n/**\n * This interface describes all practice css variables\n * The keys should reflect the exact css name\n */\nexport type PracticeConfigPracticeCssVariables = PracticeConfig<\n PracticeConfigKind.PracticeCssVariables,\n Record<string, string>\n>\n\n/**\n * Defines the font of the practice css url\n */\nexport type PracticeConfigPracticeFontsLinks = PracticeConfig<\n PracticeConfigKind.PracticeFontsLinks,\n {\n /**\n * sans serif font family\n */\n sansSerif?: string\n /**\n * serif font family\n */\n serif?: string\n }\n>\n\n/**\n * Defines the locale switcher config\n */\nexport type PracticeConfigPracticeLocaleSwitcher = PracticeConfig<\n PracticeConfigKind.PracticeLocaleSwitcher,\n {\n /**\n * Should hide the locale switcher\n */\n hideLocaleSwitcher?: boolean\n }\n>\n\n/**\n * Defines the online pharmacy address of the practice\n */\nexport type PracticeConfigPracticeOnlinePharmacy = PracticeConfig<\n PracticeConfigKind.PracticePharmacyPicker,\n {\n /**\n * The address of the online pharmacy\n */\n onlinePharmacy?: PlaceData\n /**\n * Shows or hides the address input field in the treatment acceptance modal\n */\n showTreatmentAcceptanceAddressInput: boolean\n }\n>\n\n/**\n * Defines the consultation chatbox configs\n */\nexport type PracticeConfigPractitionerChatbox = PracticeConfig<\n PracticeConfigKind.PractitionerChatbox,\n {\n /**\n * If defined will replace the automatic chatbox comment notifiying the patient a new treatment plan has been added. Indexed by locale.\n */\n planAddedMessage?: { [languageISO639_3: string]: string }\n /**\n * If defined will replace the automatic chatbox comment notifiying the patient a new treatment plan has been updated. Indexed by locale.\n */\n planUpdatedMessage?: { [languageISO639_3: string]: string }\n /**\n * If defined will replace the automatic chatbox comment notifiying the patient a new exam has been dispatched. Indexed by locale.\n */\n examsUpdatedMessage?: { [languageISO639_3: string]: string }\n }\n>\n\n/**\n * This config is used to configure the layout of the consult list for practitioners\n */\nexport type PracticeConfigPractitionerConsultList = PracticeConfig<\n PracticeConfigKind.PractitionerConsultList,\n {\n /**\n * Hides the locality column\n */\n hideLocality?: boolean\n /**\n * Hides the plan name column\n */\n hidePlan?: boolean\n /**\n * Hides the fax column\n */\n hideFax?: boolean\n /**\n * Hides the expires at column\n */\n hideExpiresAt?: boolean\n }\n>\n\n/**\n * This config is used to configure the layout of the modular prescription fields\n */\nexport type PracticeConfigPracticePrescriptionFields = PracticeConfig<\n PracticeConfigKind.PracticePrescriptionFields,\n {\n /**\n * the y position in px of the first modular prescription\n */\n yCoordinate?: number\n }\n>\n\n/**\n * This config is used to enable or disable the Search feature\n */\nexport type PracticeConfigPractitionerSearch = PracticeConfig<\n PracticeConfigKind.PractitionerSearch,\n {\n /**\n * Disable search indexing a consultation on its creation\n */\n disableSearchIndexing?: boolean\n /**\n * Disable search for consultations from the ConsultList\n */\n disableSearch?: boolean\n }\n>\n\n/**\n * This config is used to configure the register walkthrough\n */\nexport type PracticeConfigPracticeRegisterWalkthrough = PracticeConfig<\n PracticeConfigKind.PracticeRegisterWalkthrough,\n {\n /**\n * The workflow uuid containing the walkthrough to display. If not defined, the walkthrough slides screen is skipped.\n */\n workflowUuid?: string\n }\n>\n\n/**\n * This config is used for all configs related to the Exams and Results module\n */\nexport type PracticeConfigPracticeExamsAndResults = PracticeConfig<\n PracticeConfigKind.PracticeExamsAndResults,\n {\n /**\n * If true, then show the deprecated URL prescription pad\n */\n showUrlPrescriptionPad?: boolean\n }\n>\n\n/**\n * This config is used for all configs related to the Layout of the app (Navbar, Footer, etc)\n */\nexport type PracticeConfigPracticeLayout = PracticeConfig<\n PracticeConfigKind.PracticeLayout,\n {\n /**\n * If true, then show the FAQ link in the Navbar\n */\n showFaqLink?: boolean\n }\n>\n\n/**\n * This config is used for all configs related to the Google Places address field\n */\nexport type PracticeConfigPracticeAddressField = PracticeConfig<\n PracticeConfigKind.PracticeAddressField,\n {\n /**\n * If true, then show the long version of the address, otherwise, show the short version\n */\n longAddress?: boolean\n }\n>\n\n/**\n * This config is used for all configs related to the Diagnosis and Treatments module\n */\nexport type PracticeConfigPracticeDiagnosisAndTreatment = PracticeConfig<\n PracticeConfigKind.PracticeDiagnosisAndTreatment,\n {\n /**\n * If true, then sort alphabetically the diagnoses, treatments, and drugs shown in their respective select dropdown\n */\n sortNames?: boolean\n }\n>\n\nexport type PracticeConfigs =\n | PracticeConfigPractitionerSearch\n | PracticeConfigPractitionerConsultList\n | PracticeConfigPractitionerChatbox\n | PracticeConfigPracticeLocaleSwitcher\n | PracticeConfigPracticeCookieBanner\n | PracticeConfigPracticeOnlinePharmacy\n | PracticeConfigPracticeCssVariables\n | PracticeConfigPracticeFontsLinks\n | PracticeConfigPracticePrescriptionFields\n | PracticeConfigPracticeConfigExample // Here for integration tests only\n | PracticeConfigPracticeConsultTabs\n | PracticeConfigPatientConsultCard\n | PracticeConfigPracticeExamsAndResults\n | PracticeConfigPracticeLayout\n | PracticeConfigPracticeAddressField\n | PracticeConfigPracticeDiagnosisAndTreatment\n\nexport interface PracticeWorkflow {\n id?: number ///optional for insertion\n uuidPractice: string\n uuidWorkflow: string\n typeWorkflow: WorkflowType\n tagSpecialty?: string\n}\n\nexport type PracticeWorkflowWithTagSpecialty = PracticeWorkflow & {\n tagSpecialty: string\n}\n\nexport interface PracticePlan {\n id?: number ///optional for insertion\n uuidPractice: string\n isoLocality?: string\n nameDefault: string\n descDefault: string\n hoursExpiration: number\n active: boolean\n namePriceCurrency: string // DEPRECATED: left only for in-app receipt display and lower migration risks\n numPriceAmount: number // DEPRECATED: left only for in-app receipt display and lower migration risks\n numPriceExtDecimal?: number // DEPRECATED: left only for in-app receipt display and lower migration risks\n numPriceExtNegativeExponential?: number // DEPRECATED: left only for in-app receipt display and lower migration risks\n kind: PlanType\n idStripeProduct: string\n idStripePrice: string // DEPRECATED: left only for in-app receipt display and lower migration risks\n dateCreatedAt: Date\n dateUpdateAt: Date\n ratePerThousandOverride: number // DEPRECATED: left only to lower migration risks\n}\n\nexport enum StripePriceType {\n Default = 'Default',\n Discount = 'Discount',\n}\n\n// Subset of Stripe.Price\nexport interface PracticePrice {\n /**\n * Unique identifier for the object in Stripe.\n */\n idStripePrice: string\n /**\n * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).\n */\n currency: string\n /**\n * The unit amount in %s to be charged, represented as a whole integer if possible.\n */\n unitAmount: number\n}\n\nexport interface PracticePlanPrices {\n idPlan: number\n default: PracticePrice\n discount?: PracticePrice\n}\n\nexport interface PracticeRate {\n id?: number\n uuidPractice: string\n idPlan: number\n isoLocality?: string\n dimension: RateDimension\n description: string\n uidTaxRate: string\n idStripeTaxRate: string\n}\n\nexport interface PracticePlatformFee {\n uuidPractice: string\n idPlan: number\n isoLocality?: string\n numPlatformFinalFee: number\n}\n\nexport interface PracticePayment {\n id?: number ///optional for insertion\n uuidPractice: string\n idPlan: number\n uuidConsult: string\n hoursConsultExpiration: number\n idStripeInvoiceOrPaymentIntent: string\n status: PaymentStatus\n dateCreatedAt: Date\n dateUpdateAt: Date\n}\n\nexport interface PracticePaymentIntent {\n id?: number ///optional for insertion\n uuidPractice: string\n idPlan: number\n idPayment: number\n hoursPlanExpiration: number\n isoLocality?: string\n textPaymentMethodOptions: string\n nameCurrency: string\n numTotalAmount: number\n numPlatformFeeAmount: number\n idStripeInvoice: string\n idStripePaymtIntent: string\n /**\n * This value is set only after the PracticePaymentIntent has been finalized and ready to be paid\n */\n stripeClientSecret?: string\n dateCreatedAt?: Date\n dateUpdateAt?: Date\n}\n\n/**\n * All the PaymentIntentRequestMetadata Kind available\n */\nexport enum PaymentIntentRequestMetadataKind {\n ConsultRequestMetadata = 'ConsultRequestMetadata',\n RefillTreatmentRequestMetadata = 'RefillTreatmentRequestMetadata',\n}\n\n/**\n * This interface is used as metadata when creating Stripe Invoice.\n * It will be used to create the consult when stripe use our hook.\n */\nexport interface ConsultRequestMetadata {\n /**\n * Defines the kind of `PaymentIntentRequestMetadata` it is\n *\n * Note: it can be `undefined` to handle backward compatibility when this interface didn't had a `kind`\n */\n kind: PaymentIntentRequestMetadataKind.ConsultRequestMetadata | undefined\n /**\n * The specialty required by the consultation\n */\n tagSpecialtyRequired: string\n /**\n * The locality required for the consultation in iso. COUNTRY (ISO 3166) - PROVINCE - COUNTY - CITY\n */\n isoLocalityRequired?: string\n /**\n * The language required for the consultation. Should respect ISO 639-3 https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes\n */\n isoLanguageRequired: string\n}\n\n/**\n * This interface is used as metadata when creating Stripe Invoice.\n * It will be used to refill a treatment plan of a consult.\n */\nexport interface RefillTreatmentRequestMetadata {\n /**\n * Defines the kind of `PaymentIntentRequestMetadata` it is\n */\n kind: PaymentIntentRequestMetadataKind.RefillTreatmentRequestMetadata\n /**\n * The consult uuid to refill\n */\n consultUuid: string\n}\n\n/**\n * This interface is used as metadata when creating Stripe Invoice.\n * It will be used when stripe uses our hook.\n */\nexport type PaymentIntentRequestMetadata = ConsultRequestMetadata | RefillTreatmentRequestMetadata\n\nexport interface AssignmentRequest {\n uuidAssignor: string //defaulting for insertion to the default practice admin\n uuidPractitioner?: string\n status?: AssignmentStatus\n uuidConsult?: string\n tagSpecialty?: string\n isoLocality?: string\n isoLanguage?: string\n}\n\nexport type Assignment = {\n id: number ///optional for insertion\n uuidPractice: string\n uuidAssignor: string //defaulting for insertion to the default practice admin\n uuidPractitioner?: string\n status?: AssignmentStatus\n uuidConsult?: string\n tagSpecialty?: string\n timeAssigned?: string //defaulting for insertion\n}\n\nexport interface PractitionerRole {\n id?: number //optional for insertion\n uuidPractice: string\n uuidPractitioner: string\n role: PractitionnerRoleType\n dateGiven?: Date //default during insertion\n}\n\nexport interface PractitionerLicense {\n id?: number ///optional for insertion\n uuidPractitioner: string\n country: string\n tagSpecialty: string\n isoLocality: string\n txtLicenseNumber: string\n txtComplementary?: string\n dateProvidedAt?: Date\n dateObtainedAt?: Date\n dateRenewedAt?: Date\n status?: LicenseStatus\n}\n\nexport interface PractitionerPreference {\n id?: number\n uuidPractitioner: string\n uuidPractice: string\n tagSpecialties: string\n isoLocalityConsult?: string\n periodQuotaConsult?: PeriodType\n quantityQuotaConsult?: number\n tagConsultLanguages?: string\n}\n\nexport interface PractitionerQuota {\n id?: number ///optional for insertion\n uuidPractitioner: string\n uuidPractice: string\n tagSpecialty: string\n isoLocality: string\n quantityLeft?: number\n dateRenewal?: Date\n dateLastUpdate?: Date\n}\n\nexport interface Practitioner {\n uuid: string\n uuidPractice: string\n txtFirstName: string\n txtLastName: string\n txtTitle: string\n emailAddress: string\n tagsSpecialties: string\n arrLanguages: string\n dateAddedAt?: Date //defaulting for insertion\n status?: PractitionerStatus //defaulting for insertion\n txtAddressTransmission?: string //the default non-fax address to send prescription to\n}\n\nexport interface HydratedPracticeConfigs {\n [PracticeConfigKind.PatientConsultCard]?: PracticeConfigPatientConsultCard\n [PracticeConfigKind.PracticeCloseConsultationTypes]?: PracticeConfigPracticeCloseConsultationTypes\n [PracticeConfigKind.PracticeConsultTabs]?: PracticeConfigPracticeConsultTabs\n [PracticeConfigKind.PracticeConfigExample]?: PracticeConfigPracticeConfigExample\n [PracticeConfigKind.PracticeCookieBanner]?: PracticeConfigPracticeCookieBanner\n [PracticeConfigKind.PracticeCssVariables]?: PracticeConfigPracticeCssVariables\n [PracticeConfigKind.PracticeFontsLinks]?: PracticeConfigPracticeFontsLinks\n [PracticeConfigKind.PracticeLocaleSwitcher]?: PracticeConfigPracticeLocaleSwitcher\n [PracticeConfigKind.PracticePharmacyPicker]?: PracticeConfigPracticeOnlinePharmacy\n [PracticeConfigKind.PracticePrescriptionFields]?: PracticeConfigPracticePrescriptionFields\n [PracticeConfigKind.PractitionerChatbox]?: PracticeConfigPractitionerChatbox\n [PracticeConfigKind.PractitionerConsultList]?: PracticeConfigPractitionerConsultList\n [PracticeConfigKind.PractitionerSearch]?: PracticeConfigPractitionerSearch\n [PracticeConfigKind.PracticeRegisterWalkthrough]?: PracticeConfigPracticeRegisterWalkthrough\n [PracticeConfigKind.PracticeExamsAndResults]?: PracticeConfigPracticeExamsAndResults\n [PracticeConfigKind.PracticeLayout]?: PracticeConfigPracticeLayout\n [PracticeConfigKind.PracticeAddressField]?: PracticeConfigPracticeAddressField\n [PracticeConfigKind.PracticeDiagnosisAndTreatment]?: PracticeConfigPracticeDiagnosisAndTreatment\n}\n\nexport interface Practice {\n uuid: string\n name: string\n shortName: string\n countryOperating: string\n urlPractice: string\n urlLinkedPage?: string\n urlTos?: string\n urlConfidentiality?: string\n uuidAdmin: string\n uuidDefaultAssigned: string\n uuidDefaultFallback: string\n prefDefaultLang: string\n keyGoogleTagNonProd: string\n keyGoogleTagProd: string\n txtAddress?: string\n emailBusiness?: string\n phoneBusiness?: string\n urlSupport?: string\n emailSupport?: string\n phoneSupport?: string\n phoneFax?: string\n txtTaxID?: string\n txtVATID?: string\n txtRegistrationID?: string\n txtLegalInfos?: string\n txtDefaultTransmissionDriver?: string\n txtDefaultTransmissionAddress?: string\n accounts?: PracticeAccount[]\n configs?: HydratedPracticeConfigs\n}\n\nexport interface Sync {\n id?: number\n status?: SyncStatus\n descriptionStep: string\n dateStarted?: Date\n dateFinished?: Date\n}\n\nexport interface PracticeEmail {\n id?: number\n uuidPractice: string\n kind: PracticeEmailKind\n idMailgunTemplate: string\n isoLanguage: string\n tags: string\n}\n\nexport interface PracticeSubscription {\n id?: number\n uuidPractice: string\n idMailChimpAudience: string\n isoLanguage: string\n}\n\nexport interface PracticeInvoice {\n id: string //Stripe invoice ID\n customerEmail: string\n total: number\n subtotal: number\n currency: string\n discount: number\n}\n\n/**\n * This interface represents a practice secret\n * It is used to generate a symetric key to encrypt\n * practice related data\n */\nexport interface PracticeSecret {\n practiceUuid: string\n /**\n * The payload is the actual base64 encoded bytes that can\n * be used as the practice secret. In the db,\n * this field is base64 encoded nonce+encrypted-payload.\n * It's decrypted on the fly when returned by the api.\n */\n payload: string\n}\n","import { Uuid, Base64String, Metadata } from './shared'\nimport { MetadataCategory } from './workflow'\n\nexport interface LockboxCreateResponse {\n lockboxUuid: Uuid\n}\n\nexport interface SharedSecretResponse {\n sharedSecret: Base64String\n}\n\nexport interface LockboxGrantRequest {\n granteeUuid: Uuid\n encryptedSecret: Base64String\n}\n\nexport interface LockboxDataRequest {\n publicMetadata?: Metadata\n privateMetadata?: Base64String\n data: Base64String\n}\n\nexport type LockboxManifest = ManifestEntry[]\n\nexport interface ManifestEntry {\n dataUuid: Uuid\n metadata: Metadata\n}\n\nexport interface GrantedLockboxes {\n grants: Grant[]\n}\n\nexport interface Grant {\n lockboxOwnerUuid?: Uuid\n encryptedLockbox?: Base64String\n lockboxUuid?: Uuid\n}\n\nexport interface DataCreateResponse {\n dataUuid: Uuid\n}\n\nexport interface DataResponse {\n data: Base64String\n}\n\nexport interface IndexEntry {\n uuid?: Uuid\n uniqueHash?: Base64String\n timestamp?: Date\n}\n\nexport interface IndexConsultLockbox extends IndexEntry {\n consultationId: Uuid\n grant: Grant\n}\n\nexport interface VaultIndex extends IndexEntry {\n [IndexKey.ConsultationLockbox]?: IndexConsultLockbox[] // only one should ever exist at a time\n [IndexKey.Consultation]?: IndexConsultLockbox[] // DEPRECATED REMOVE ME\n}\n\nexport interface EncryptedVaultIndex {\n [IndexKey.Consultation]?: EncryptedIndexEntry[]\n [IndexKey.ConsultationLockbox]?: EncryptedIndexEntry[]\n [IndexKey.IndexSnapshot]?: EncryptedIndexEntry[]\n}\n\nexport interface EncryptedIndexEntry extends IndexEntry {\n encryptedIndexEntry: Base64String\n}\n\nexport enum IndexKey {\n Consultation = 'Consultation', //DEPRECATED REMOVE ME\n IndexSnapshot = 'IndexSnapshot', //DEPRECATED REMOVE ME\n ConsultationLockbox = 'ConsultationLockbox'\n}\n\nexport interface Document extends ManifestEntry {\n lockboxOwnerUuid?: Uuid\n lockboxUuid: Uuid\n}\n\nexport interface Meta {\n documentType?: DocumentType\n category: MetadataCategory\n contentType?: string\n}\n\nexport interface PreferenceMeta extends Meta {\n category: MetadataCategory.Preference\n contentType: 'application/json'\n}\n\nexport interface RecoveryMeta extends Meta {\n category: MetadataCategory.Recovery\n contentType: 'application/json'\n}\n\nexport interface RawConsultationMeta extends Meta {\n category: MetadataCategory.Raw\n contentType: 'application/json'\n consultationId?: Uuid\n}\n\nexport interface ConsultationMeta extends Meta {\n documentType: DocumentType\n category: MetadataCategory.Consultation\n consultationId?: Uuid\n}\n\nexport interface ConsultationImageMeta extends ConsultationMeta {\n idbId: Uuid\n}\n\nexport interface MedicalMeta extends Meta {\n documentType:\n | DocumentType.PopulatedWorkflowData\n | DocumentType.Result\n | DocumentType.Prescription\n | DocumentType.DoctorsNote\n category: MetadataCategory.Medical\n consultationIds?: Uuid[]\n}\n\nexport interface PersonalMeta {\n documentType: DocumentType.PopulatedWorkflowData | DocumentType.Note\n category:\n | MetadataCategory.Personal\n | MetadataCategory.ChildPersonal\n | MetadataCategory.OtherPersonal\n consultationIds?: Uuid[]\n}\n\nexport enum DocumentType {\n Message = 'Message',\n Note = 'Note',\n DoctorsNote = 'DoctorsNote',\n Prescription = 'Prescription',\n ExamRequest = 'ExamRequest',\n Result = 'Result',\n Attachment = 'Attachment',\n BigFile = 'BigFile',\n MeetingRequest = 'MeetingRequest',\n AudioNote = 'AudioNote',\n VideoNote = 'VideoNote',\n PopulatedWorkflowData = 'PopulatedWorkflowData',\n TreatmentPlan = 'TreatmentPlan',\n ImageAlias = 'ImageAlias',\n}\n\nexport interface LocalizedData<T = any> {\n lockboxOwnerUuid?: string\n lockboxUuid: string\n dataUuid: string\n data: T\n}\n","/**\n * This type represents all the patient profile kind\n */\nexport type ProfileKind = 'myself' | 'child' | 'other'\n/**\n * this type is done as an example on how to add another data kind\n */\nexport type OtherKind = 'otherKindOfType'\n\n/**\n * This type represents all the kind a data that can define `ChoiceInputData` (`OtherKind` is here only as an example on how to add a new kind)\n */\nexport type AllChoiceInputDataKind = ProfileKind | OtherKind\n\n/**\n * This interface represents a `StateTrigger` on selected profile kind\n */\nexport interface ProfileTrigger {\n kind: 'profileTrigger'\n value: ProfileKind\n}\n\n/**\n * This interface is meant as an example of another kind of `StateTrigger`\n */\nexport interface OtherTrigger {\n kind: 'otherTrigger'\n field1: number\n field2: string\n}\n\n/**\n * This type represents all the state triggers that are defined.\n *\n * A state trigger is triggered onto app states. In other words, it is for triggers that cannot be defined thanks to pure workflow answers.\n */\nexport type StateTrigger = ProfileTrigger | OtherTrigger\n\nexport interface IndexedData<T> {\n [key: string]: T\n}\n\nexport type SelectedAnswerData = string | string[]\nexport type SelectedAnswersData = IndexedData<SelectedAnswerData>[]\n\nexport interface ChoiceInputData {\n text: string\n className?: string\n order?: number\n /** If defined, the choice input contains a kind that can be used into app. For instance, to check if a specific `kind` of answer has been selected */\n kind?: AllChoiceInputDataKind\n}\n\nexport interface RadioInputIconOptionsData {\n variant: 'icon'\n icon: string\n}\n\nexport interface RadioInputData extends ChoiceInputData {\n options?: RadioInputIconOptionsData\n}\n\nexport interface RadioCardInputData extends RadioInputData {\n bodyText: string\n}\n\nexport interface LanguagePickerData extends ChoiceInputData {\n flag: string // iso3166-1\n locale: string\n}\n\nexport interface TileRadioData extends ChoiceInputData {\n fullText?: string\n image?: string\n description?: string\n}\n\nexport interface EntryData {\n id?: number\n label?: string\n hideLabel?: boolean\n minorLabel?: string\n summaryLabel?: string\n summaryHidden?: boolean\n className?: string\n /**\n * This field represents a list of `selectedAnswers` that must be set for this entry to be displayed using the followng logical combination of rules:\n *\n * #### Single string\n *\n * ```\n * // Required: rule1\n * rules: rule1\n * ```\n *\n * #### Array of strings (AND is applied between statements):\n *\n * ```\n * // Required: rule1 AND rule2\n * rules: [ rule1, rule2 ]\n * ```\n *\n * #### Array of arrays of strings (OR is applied between inner arrays. AND is applied between inner arrays statements)\n *\n * ```\n * // Required: rule1 OR rule2\n * rules: [\n * [ rule1 ],\n * [ rule2 ]\n * ]\n *\n * // Required: rule1 OR (rule2 AND rule3)\n * rules: [\n * [ rule1 ],\n * [ rule2, rule3 ]\n * ]\n *\n * // THIS IS FORBIDDEN\n * rules: [\n * rule1, // <-- THIS IS FORBIDDEN. Instead use [ rule1 ]\n * [ rule2, rule3 ]\n * ]\n * ```\n */\n triggers?: string[][] | string[] | string\n /**\n * This field represents a list of `StateTrigger` that must be fulfilled for this entry to be displayed.\n */\n stateTriggers?: StateTrigger[]\n // represents the modal that it will be rendered as\n componentKind?: string\n message?: string\n}\n\nexport interface SlideData {\n header: string\n body: string\n image?: {\n src: string\n alt: string\n }\n icon?: string\n}\n\nexport enum MetadataCategory { //these are generic metadata categories\n ChildPersonal = 'ChildPersonal',\n Consultation = 'Consultation',\n Refill = 'Refill',\n DataRetrieval = 'DataRetrieval',\n Followup = 'Followup',\n Recovery = 'Recovery',\n Medical = 'Medical',\n OtherPersonal = 'OtherPersonal',\n Personal = 'Personal',\n Preference = 'Preference',\n Prescription = 'Prescription',\n Raw = 'Raw',\n}\n\n/**\n * This interface describes all images-alias question kind options\n */\nexport interface ImagesAliasQuestionOptions {\n /**\n * Comma separated list of accepted formats. Will be given to the input html element.\n * Use same format as described [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#accept)\n */\n accept?: string\n /**\n * Should allow multiple uploads or not\n */\n multiple?: boolean\n /**\n * Should display photo guide instructions or not\n */\n photoGuide?: boolean\n}\n\nexport interface GenericQuestionData<T, A = IndexedData<ChoiceInputData>, O = undefined> extends EntryData {\n kind: T\n metaCategory: MetadataCategory\n answers?: A\n formValidation?: any[] // use yup-ast expressions\n placeholder?: string\n defaultValue?: any\n value?: string\n /**\n * Options to forward to the workflow component\n */\n options?: O\n messages?: string\n}\n\nexport interface GroupedGenericQuestionData<T, A = IndexedData<ChoiceInputData>> extends GenericQuestionData<T, A> {\n inline?: boolean\n inlineLabel?: boolean\n order?: number\n}\n\nexport declare type QuestionData =\n | GenericQuestionData<'title' | 'paragraph' | 'checkbox', void>\n | GenericQuestionData<\n | 'text'\n | 'text-area'\n | 'date'\n | 'number'\n | 'images'\n | 'body-parts'\n | 'pharmacy-picker'\n | 'online-pharmacy-picker'\n | 'place-address'\n >\n | GenericQuestionData<'images-alias', IndexedData<ChoiceInputData>, ImagesAliasQuestionOptions>\n | GenericQuestionData<\n 'checkbox-group' | 'hair-loss-frontal' | 'select' | 'multiple' | 'text-select-group',\n IndexedData<ChoiceInputData>\n >\n | GroupedGenericQuestionData<\n 'radio' | 'hair-selector-women' | 'hair-selector-men' | 'hair-loss-stage' | 'hair-loss-other',\n IndexedData<RadioInputData>\n >\n | GroupedGenericQuestionData<'radio-card' | 'profile-selector', IndexedData<RadioCardInputData>>\n | GroupedGenericQuestionData<'language-picker', IndexedData<LanguagePickerData>>\n | GroupedGenericQuestionData<'tile-radio', IndexedData<TileRadioData>>\n\nexport interface FieldData {\n type: 'field'\n className?: string\n id: string\n}\n\nexport interface FieldGroupData {\n type: 'field-group'\n className?: string\n fieldsAndGroups: (FieldData | FieldGroupData)[]\n name?: string\n inline?: boolean\n fullWidth?: boolean\n}\n\nexport interface WorkflowPageData {\n className?: string\n groups?: FieldGroupData[]\n highlightMsg?: string\n questions: IndexedData<QuestionData>\n title?: string\n triggers?: string[]\n /**\n * This field represents a list of `ids` which will be spliced from the workflow groups and inserted into a designated location\n */\n prioritizeIds?: string[]\n}\n\nexport interface WorkflowData {\n createdAt: string\n culDeSacs: EntryData[]\n id: string\n locale?: string\n pages: WorkflowPageData[]\n summaryImageFieldName?: string // this field is used to show the consult summary image\n summarySymptomsFieldName?: string // this field is used to show the consult summary symptoms\n selectedAnswers?: SelectedAnswersData\n walkthroughSlides?: SlideData[]\n /**\n * (optional) the service name this workflow provides\n */\n serviceName?: string\n /**\n * (optional) the description of the service this workflow provides\n */\n serviceDescription?: string\n /**\n * (optional) rules to hide certain payment plans depending on the workflow answers\n */\n hidePlanRules?: HidePlanRule[]\n}\n\nexport interface HidePlanRule {\n /**\n * the stripe plan id from the practice service\n */\n idPlan: string\n /**\n * Questions to apply yup rules on in, if rules are met then hide the plan\n */\n rules: QuestionHidePlanRule[] | QuestionHidePlanRule[][]\n}\n\nexport interface QuestionHidePlanRule {\n /**\n * the id of the question to check the rule on\n */\n questionId: string\n /**\n * a collection of yup validated rules (same exact syntax we used for the workflow formValidation field, please reuse same functions)\n */\n yupRuleValueToHide: any\n}\n\n/**\n * This interface describes an upload of an image (could be a picture, a pdf, a text file, etc.)\n */\nexport interface WorkflowUploadedImage {\n /**\n * Depending on the driver used by WorkflowInput:\n * - 'indexdb': will fetch the image in IndexDB with this id\n * - 'vault': will fetch the image in the vault with this id\n */\n idbId?: string\n /**\n * The name of the image\n */\n name: string\n /**\n * the image data (could be a picture, a pdf, a text file, etc.)\n */\n imageData?: string\n}\n\n/**\n * This interface describes a workflow prepared and ready to be sent to vault\n */\nexport interface PopulatedWorkflowField {\n answer: SelectedAnswerData | WorkflowUploadedImage[] // Actual answer from the workflow\n displayedAnswer?: any // This answer is to be used only when it's impossible to get data from workflow\n kind: string // If we don't store question. We will need that field to at least know the field type\n}\n\nexport interface PopulatedWorkflowData {\n workflowId: string // The workflow id to refer\n workflowCreatedAt: string // The workflow version\n locale?: string\n fields: Record<string, PopulatedWorkflowField> // key corresponds to the QuestionData key in the workflow\n}","export interface SearchRequest {\n terms: Terms\n}\n\nexport interface SearchResponse {\n results: SearchResult[]\n}\n\nexport interface SearchResult {\n consultUuid: string\n kind: string\n score: number\n}\n\nexport interface IndexRequest {\n consultUUID: string\n terms: Terms\n}\n\nexport type Terms = Term[]\nexport interface Term {\n kind?: string\n value: string\n}\n\n\nexport enum IndexKind {\n consultUuid,\n consultShortid,\n firstName,\n lastName,\n healthId,\n dob,\n}\n","import { APIService } from './api'\nimport {\n Uuid,\n Consult,\n ConsultRequest,\n MedicalStatus,\n ConsultTransmission,\n ClosedReasonType,\n TransmissionKind,\n TransmissionStatus,\n} from '../models'\n\nexport class ConsultService {\n constructor(private api: APIService, private baseURL: string) {}\n\n public consultCreate(c: ConsultRequest): Promise<Consult> {\n return this.api.post<Consult>(`${this.baseURL}/v1/consults`, c)\n }\n\n /**\n * This function returns the number of consults using parameters\n * @param uuidPractice the practice uuid\n * @param uuidRequester the requester uuid\n * @param statusesMedical an array containing MedicalStatus to include\n * @param statusesExclude an array containing MedicalStatus to exclude\n * @param shortId a shortId matcher (will match all consult with a shortId starting with this `shortId`)\n * @param columnToSortTo the list of columns separated by commas, to sort to (in order of sorting)\n * @param orderToSortTo the type of sorting to do ('asc' for ascending or 'desc' for descending)\n * @param perPage the number of item to retrieve per \"page\"\n * @param indexPage the actual index of the page to retrieve (0 based: 0 is the first items)\n * @param filterAssignedDoctor the uuid of the doctor for which to filter with\n * @param filterCurrentPractitioner the uuid of the current assistant assigned to filter with\n * @param filterIsoLocality the of isoLocality to filter with\n * @param filterAssignee array of practitioner uuids with which you want to filter the consultations\n * @returns a number of consult\n */\n public countConsults(\n uuidPractice?: Uuid,\n uuidRequester?: Uuid,\n statusesMedical?: MedicalStatus[],\n statusesExclude?: MedicalStatus[],\n shortId?: string,\n columnToSortTo?: string[],\n orderToSortTo?: string[],\n perPage?: number,\n indexPage?: number,\n filterAssignedDoctor?: string,\n filterCurrentPractitioner?: string,\n filterIsoLocality?: string[],\n filterAssignee?: string[]\n ): Promise<number> {\n return this.api\n .head<any>(\n `${this.baseURL}/v1/consults`,\n {\n params: {\n uuidPractice,\n uuidRequester,\n statusesMedical,\n statusesExclude,\n shortId,\n perPage,\n page: indexPage,\n sortColumns: columnToSortTo,\n orderColumns: orderToSortTo,\n filterAssignedDoctor,\n filterCurrentPractitioner,\n filterIsoLocality,\n filterAssignee,\n },\n },\n 'Content-Range'\n )\n .then((resContentRange) => {\n if (!resContentRange || (typeof resContentRange !== 'string' && typeof resContentRange !== 'number')) {\n return 0\n }\n\n if (typeof resContentRange === 'number') {\n return resContentRange\n }\n\n return parseInt(resContentRange)\n })\n }\n\n /**\n * This function get consults using parameters\n * @param uuidPractice the practice uuid\n * @param uuidRequester the requester uuid\n * @param statusesMedical an array containing MedicalStatus to include\n * @param statusesExclude an array containing MedicalStatus to exclude\n * @param shortId a shortId matcher (will match all consult with a shortId starting with this `shortId`)\n * @param columnToSortTo the list of columns separated by commas, to sort to (in order of sorting)\n * @param orderToSortTo the type of sorting to do ('asc' for ascending or 'desc' for descending)\n * @param perPage the number of item to retrieve per \"page\"\n * @param indexPage the actual index of the page to retrieve (0 based: 0 is the first items)\n * @param filterAssignedDoctor the uuid of the doctor for which to filter with\n * @param filterCurrentPractitioner the uuid of the current assistant assigned to filter with\n * @param filterIsoLocality the of isoLocality to filter with\n * @returns a list of consult\n */\n public getConsults(\n uuidPractice?: Uuid,\n uuidRequester?: Uuid,\n statusesMedical?: MedicalStatus[],\n statusesExclude?: MedicalStatus[],\n shortId?: string,\n columnToSortTo?: string[],\n orderToSortTo?: string[],\n perPage?: number,\n indexPage?: number,\n filterAssignedDoctor?: string,\n filterCurrentPractitioner?: string,\n filterIsoLocality?: string[],\n filterAssignee?: string[]\n ): Promise<Consult[]> {\n return this.api.get<Consult[]>(`${this.baseURL}/v1/consults`, {\n params: {\n uuidPractice,\n uuidRequester,\n statusesMedical,\n statusesExclude,\n shortId,\n perPage,\n page: indexPage,\n sortColumns: columnToSortTo,\n orderColumns: orderToSortTo,\n filterAssignedDoctor,\n filterCurrentPractitioner,\n filterIsoLocality,\n filterAssignee,\n },\n })\n }\n\n public getConsultByUUID(uuidConsult: Uuid, uuidPractice?: Uuid): Promise<Consult> {\n return this.api.get<Consult>(`${this.baseURL}/v1/consults/${uuidConsult}`, { params: { uuidPractice } })\n }\n\n public updateConsultByUUID(\n uuidConsult: Uuid,\n consult: {\n statusMedical?: MedicalStatus\n closedReasonType?: ClosedReasonType\n closedReasonDescription?: string\n uuidAssignedDoctor?: Uuid\n neverExpires?: boolean\n },\n uuidPractice?: Uuid,\n uuidRequester?: Uuid\n ): Promise<Consult> {\n return this.api.put<Consult>(`${this.baseURL}/v1/consults/${uuidConsult}`, consult, {\n params: {\n uuidPractice,\n uuidRequester,\n },\n })\n }\n\n public getConsultFaxStatuses(uuidConsult: string): Promise<ConsultTransmission[]> {\n return this.api.get<ConsultTransmission[]>(`${this.baseURL}/v1/consults/${uuidConsult}/transmissions`, {\n params: {\n kind: TransmissionKind.Fax,\n },\n })\n }\n\n public postConsultTransmission(\n uuidConsult: string,\n nameDriver: string = 'Documo',\n addressOrPhoneToSendTo?: string,\n file?: File,\n nameReceiver?: string,\n txtTransmissionTitle?: string,\n txtTransmissionNotes?: string\n // numTry ?: number,\n // delay ?: number,\n ): Promise<ConsultTransmission> {\n let data = new FormData()\n\n data.append('nameDriverReceiver', nameDriver)\n if (addressOrPhoneToSendTo) {\n data.append('addressReceiver', addressOrPhoneToSendTo)\n }\n if (file) {\n data.append('file', file)\n }\n if (nameReceiver) {\n data.append('nameReceiver', nameReceiver)\n }\n if (txtTransmissionTitle) {\n data.append('txtTransmissionTitle', txtTransmissionTitle)\n }\n if (txtTransmissionNotes) {\n data.append('txtTransmissionNotes', txtTransmissionNotes)\n }\n\n return this.api.post<ConsultTransmission>(`${this.baseURL}/v1/consults/${uuidConsult}/transmissions`, data, {\n headers: { 'Content-Type': 'multipart/form-data;' },\n })\n }\n\n public postConsultFax(uuidConsult: string, addressReceiver: string, file: File): Promise<ConsultTransmission> {\n return this.postConsultTransmission(uuidConsult, 'Documo', addressReceiver, file)\n }\n\n public postConsultEmail(uuidConsult: string, file: File): Promise<ConsultTransmission> {\n return this.postConsultTransmission(uuidConsult, 'Pharmacierge', undefined, file)\n }\n\n public retryConsultFax(uuidConsult: string, transmissionId: string): Promise<ConsultTransmission> {\n return this.api.put<ConsultTransmission>(\n `${this.baseURL}/v1/consults/${uuidConsult}/transmissions/${transmissionId}`,\n { status: TransmissionStatus.Retrying }\n )\n }\n\n public updateConsultTransmissionStatus(\n transmissionId: string,\n uuidConsult: string,\n newStatus: TransmissionStatus\n ): Promise<ConsultTransmission> {\n return this.api.put<ConsultTransmission>(\n `${this.baseURL}/v1/consults/${uuidConsult}/transmissions/${transmissionId}`,\n { status: newStatus }\n )\n }\n}\n","import {\n Drug,\n TreatmentPlan,\n TreatmentPlans,\n TreatmentPlansRequest,\n TreatmentPlansResponse,\n TreatmentPlanUpdateRequest,\n Uuid,\n} from '..'\nimport {\n Diagnosis,\n Treatment,\n DiagnosisRequest,\n TreatmentAndDrugPrescriptionUpdateRequest,\n TreatmentRequest,\n} from '../models/diagnosis'\nimport { APIService } from './api'\n\nexport class DiagnosisService {\n constructor(private api: APIService, private baseURL: string) {}\n\n public getDiagnoses(): Promise<Diagnosis[]> {\n return this.api.get<Diagnosis[]>(`${this.baseURL}/v1/diagnoses`)\n }\n\n /**\n * Get a diagnosis by uuid that belongs to your practice\n * @param uuidDiagnosis the uuid of the diagnosis\n * @returns a diagnosis\n */\n public getDiagnosisByUuid(uuidDiagnosis: Uuid): Promise<Diagnosis> {\n return this.api.get<Diagnosis>(`${this.baseURL}/v1/diagnoses/${uuidDiagnosis}`)\n }\n\n public createDiagnosis(diagnosis: DiagnosisRequest): Promise<Diagnosis> {\n return this.api.post<Diagnosis>(`${this.baseURL}/v1/diagnoses`, diagnosis)\n }\n\n public updateDiagnosis(uuid: string, diagnosis: DiagnosisRequest): Promise<Diagnosis> {\n return this.api.put<Diagnosis>(`${this.baseURL}/v1/diagnoses/${uuid}`, diagnosis)\n }\n\n public getTreatmentsFromDiagnosisUuid(diagnosisUuid: Uuid): Promise<Treatment[]> {\n return this.api.get<Treatment[]>(`${this.baseURL}/v1/diagnoses/${diagnosisUuid}/treatments`)\n }\n\n /**\n * This function returns treatment plans associated to a consult\n * @param uuidConsult the consult uuid to fetch\n * @returns an array of TreatmentPlan\n */\n public getTreatmentPlansFromConsultUuid(uuidConsult: Uuid): Promise<TreatmentPlan[]> {\n return this.api.get<TreatmentPlan[]>(`${this.baseURL}/v1/treatment-plans/`, { params: { uuidConsult } })\n }\n\n /**\n * creates a new treatment for the specified diagnosis\n * @param diagnosisUuid uuid of the diagnosis that the treatment is linked to\n * @param treatmentRequest the treatment to be inserted\n */\n public createTreatment(diagnosisUuid: string, treatmentRequest: TreatmentRequest) {\n return this.api.post<Treatment>(`${this.baseURL}/v1/diagnoses/${diagnosisUuid}/treatments`, treatmentRequest)\n }\n\n /**\n * This function returns populated treatment plans associated to a consult\n * @param uuidConsult the consult uuid to fetch\n * @returns a TreatmentPlans object\n */\n public getTreatmentPlansPopulatedFromConsultUuid(uuidConsult: Uuid): Promise<TreatmentPlans> {\n return this.api.get<TreatmentPlans>(`${this.baseURL}/v1/treatment-plans/`, {\n params: { uuidConsult, populated: true },\n })\n }\n\n public postPlans(plans: TreatmentPlansRequest): Promise<TreatmentPlansResponse> {\n return this.api.post<TreatmentPlansResponse>(`${this.baseURL}/v1/treatment-plans`, plans)\n }\n\n public updateTreatmentPlan(\n uuidPlan: string,\n uuidConsult: string,\n diagnosisRequest: DiagnosisRequest,\n plan: TreatmentAndDrugPrescriptionUpdateRequest,\n refill?: boolean\n ): Promise<TreatmentPlan> {\n return this.api.put<TreatmentPlan>(`${this.baseURL}/v1/treatment-plans/${uuidPlan}`, <\n TreatmentPlanUpdateRequest\n >{\n uuidConsult,\n diagnosis: diagnosisRequest,\n plan,\n refill,\n })\n }\n\n public acceptTreatmentPlan(uuidPlan: string, uuidConsult: string): Promise<TreatmentPlan> {\n return this.api.put<TreatmentPlan>(`${this.baseURL}/v1/treatment-plans/${uuidPlan}/accept`, { uuidConsult })\n }\n\n /**\n * retrieves all the drugs of the specified practice\n * @param uuidPractice\n */\n public async getAllDrugs(uuidPractice: string): Promise<Drug[] | undefined> {\n const res = await this.api.get<{ foundDrugs: Drug[] }>(`${this.baseURL}/v1/drugs/practice/${uuidPractice}`)\n if (res && res.foundDrugs) return res.foundDrugs\n return undefined\n }\n}\n","import { AxiosError } from 'axios'\nimport type { AxiosAuthRefreshRequestConfig } from 'axios-auth-refresh'\nimport {\n AuthenticationBadRequest,\n AuthenticationFailed,\n AuthenticationServerError,\n AuthenticationUnconfirmedEmail,\n AuthRecoverRequest,\n AuthTokenRequest,\n AuthTokenResponse,\n Base64String,\n IdentityCreateRequest,\n IdentityCreationBadRequest,\n IdentityCreationConflict,\n IdentityCreationFailed,\n IdentityResendConfirmEmailRequest,\n IdentityResponse,\n IdentityUpdateRequest,\n M2MTokenRequest,\n QRCodeRequest,\n QRCodeResponse,\n Tokens,\n Uuid,\n WhoAmIResponse,\n} from '../models'\nimport { APIService } from './api'\n\nexport interface GuardRequestConfig extends AxiosAuthRefreshRequestConfig {\n useRefreshToken: boolean\n}\nexport class GuardService {\n private identityCache: Record<string, IdentityResponse>\n private whoAmICache: Record<string, WhoAmIResponse>\n\n constructor(private api: APIService, private baseURL: string) {\n this.api.setAuthRefreshFn(this.authRefresh.bind(this)) // This is the default behavior for User JWT tokens. If you want other kind of refresh you shall overwrite this call\n this.identityCache = {}\n this.whoAmICache = {}\n }\n\n /**\n * Will replace access and refresh tokens with `tokens`\n *\n * Note:\n * ```typescript\n * setTokens({accessToken: undefined, refreshToken: 'aTokenValue'}) // will erase accessToken and set refreshToken with 'aTokenValue'\n * setTokens({refreshToken: 'aTokenValue'}) // will keep actual value of accessToken and set refreshToken with 'aTokenValue'\n *\n * ```\n * @param tokens\n */\n public setTokens(tokens: Tokens) {\n this.api.setTokens({ ...this.api.getTokens(), ...tokens })\n }\n\n /**\n * Allow to retrieve a M2M token for a service\n *\n * @param req The credentials required to get an access token\n * @returns AuthTokenResponse\n */\n public async m2mToken(req: M2MTokenRequest): Promise<AuthTokenResponse> {\n let resp: AuthTokenResponse | undefined\n\n try {\n let config: AxiosAuthRefreshRequestConfig = {\n skipAuthRefresh: true,\n }\n\n resp = await this.api.post<AuthTokenResponse>(`${this.baseURL}/v1/m2m/token`, req, config)\n\n this.api.setTokens({\n accessToken: resp.accessToken,\n })\n } catch (e) {\n console.error('Error while posting m2m token:', e)\n\n if ((e as any).isAxiosError) {\n const code = (e as AxiosError).response?.status\n switch (code) {\n case 400:\n throw new AuthenticationBadRequest()\n case 500:\n throw new AuthenticationServerError()\n case 401:\n default:\n throw new AuthenticationFailed()\n }\n }\n throw new AuthenticationFailed()\n }\n\n return resp\n }\n\n /**\n * Allow to retrieve an access token and a refresh token in order\n * to do authenticated request afterward\n *\n * @param req The credentials required to get an access token\n * @returns AuthTokenResponse\n */\n public async authToken(req: AuthTokenRequest): Promise<AuthTokenResponse> {\n let resp: AuthTokenResponse\n\n try {\n let config: AxiosAuthRefreshRequestConfig = {\n skipAuthRefresh: true,\n }\n\n resp = await this.api.post<AuthTokenResponse>(`${this.baseURL}/v1/auth/token`, req, config)\n\n this.api.setTokens({\n accessToken: resp.accessToken,\n refreshToken: resp.refreshToken,\n })\n } catch (e) {\n console.error('Error while posting auth token:', e)\n\n if ((e as any).isAxiosError) {\n const code = (e as AxiosError).response?.status\n switch (code) {\n case 400:\n throw new AuthenticationBadRequest()\n case 424:\n throw new AuthenticationUnconfirmedEmail()\n case 500:\n throw new AuthenticationServerError()\n case 401:\n default:\n throw new AuthenticationFailed()\n }\n }\n throw new AuthenticationFailed()\n }\n return resp\n }\n\n /**\n * Get new access and refresh token\n *\n * @returns AuthTokenResponse\n */\n public async authRefresh(refreshToken?: string): Promise<AuthTokenResponse> {\n let config: GuardRequestConfig = {\n skipAuthRefresh: true,\n useRefreshToken: true,\n }\n return this.api.put<AuthTokenResponse>(`${this.baseURL}/v1/auth/token`, null, config)\n }\n\n /**\n * Call guard to overwrite existing refresh token cookie\n *\n * @returns void\n */\n public async authLogout(): Promise<void> {\n return this.api.get<void>(`${this.baseURL}/v1/auth/logout`)\n }\n\n /**\n * Call guard to attempt account recovery\n *\n * @param req The email address / practice of the account to recover\n * @returns void\n */\n public async authRecover(req: AuthRecoverRequest): Promise<void> {\n return this.api.post<void>(`${this.baseURL}/v1/auth/recover`, req)\n }\n\n /**\n * Allow to create a new identity. The identity will then need to be confirmed\n * via an email link\n *\n * @param req the information about the new identity to create\n * @returns IdentityResponse\n */\n public async identityCreate(req: IdentityCreateRequest): Promise<IdentityResponse> {\n let resp: IdentityResponse\n\n try {\n resp = await this.api.post<IdentityResponse>(`${this.baseURL}/v1/identities`, req)\n this.api.setTokens({\n refreshToken: resp.refreshToken,\n })\n } catch (e) {\n if ((e as any).isAxiosError) {\n const code = (e as AxiosError).response?.status\n switch (code) {\n case 400:\n throw new IdentityCreationBadRequest()\n case 409:\n throw new IdentityCreationConflict()\n case 500:\n default:\n throw new IdentityCreationFailed()\n }\n }\n throw new IdentityCreationFailed()\n }\n return resp\n }\n\n /**\n * Retrieve an identity. Will return public fields only when requested\n * without authentication\n *\n * @param identityID Unique id of the identity to retrieve\n * @param skipCache (default: false) will skip identity cache (not even update it)\n * @returns IdentityResponse\n */\n public async identityGet(identityID: Uuid, skipCache = false): Promise<IdentityResponse> {\n const tokens = this.api.getTokens()\n const cacheKey = (tokens.accessToken ?? '') + (tokens.refreshToken ?? '') + identityID\n\n if (skipCache || !tokens.accessToken || !this.identityCache[cacheKey]) {\n const identity = await this.api.get<IdentityResponse>(`${this.baseURL}/v1/identities/${identityID}`)\n\n if (skipCache) return identity\n\n this.identityCache[cacheKey] = identity\n }\n return this.identityCache[cacheKey]\n }\n\n /**\n * Get information about the current authenticated user\n *\n * @param refreshCache if true it will refresh the whoAmI cache (default: false)\n * @returns WhoAmIResponse\n */\n public async whoAmI(refreshCache: boolean = false): Promise<WhoAmIResponse> {\n const cacheKey = this.api.getTokens().accessToken ?? ''\n if (!this.whoAmICache[cacheKey] || refreshCache) {\n this.whoAmICache[cacheKey] = await this.api.get<WhoAmIResponse>(`${this.baseURL}/v1/auth/whoami`)\n }\n return this.whoAmICache[cacheKey]\n }\n\n /**\n * Update an existing identity\n *\n * @param identityID unique id of identity to update\n * @param req update request\n * @returns IdentityResponse\n */\n public async identityUpdate(identityID: Uuid, req: IdentityUpdateRequest): Promise<IdentityResponse> {\n return this.api.put<IdentityResponse>(`${this.baseURL}/v1/identities/${identityID}`, req)\n }\n\n /**\n * Return base64 data representing a QR code that the\n * current identity need in order to use MFA\n *\n * @param identityID unique id of the identity\n * @param password the identity password (already hashed and in base64)\n * @returns QRCodeResponse\n */\n public async identityMFAQRCode(identityID: Uuid, password: Base64String): Promise<QRCodeResponse> {\n const req: QRCodeRequest = { password }\n return this.api.post<QRCodeResponse>(`${this.baseURL}/v1/identities/${identityID}/mfa`, req, {\n headers: { Accept: 'application/json' },\n })\n }\n\n /**\n * Attempt to resend the email confirmation email\n *\n * @param req IdentityResendConfirmEmailRequest\n * @return void\n */\n public async identitySendConfirmEmail(req: IdentityResendConfirmEmailRequest): Promise<void> {\n return this.api.post<void>(`${this.baseURL}/v1/identity/confirm`, req)\n }\n\n /**\n * Get an identity using a customer email (format: customer+[b64Hash]@orohealth.me)\n *\n * @param email the customer email\n * @returns IdentityResponse\n */\n public async identityGetByCustomerEmail(email: string): Promise<IdentityResponse> {\n return this.identityGetByHash(email.substring(email.indexOf('+') + 1, email.indexOf('@')))\n }\n\n /**\n * Get an identity using a base64 hash\n *\n * @param b64Hash base64 hash of the identity\n * @returns IdentityResponse\n */\n public async identityGetByHash(b64Hash: string): Promise<IdentityResponse> {\n //TODO: Right now this maps directly to the IdentityGet call.\n //Eventually, with the mapping table method, this would lead to another\n //call (ie: /v1/mapping/[b64Hash]) which would return a blob to decrypt\n //which would contain the real identityID to call IdentityGet with.\n\n //The hash comes in base64 format but it isn't URL safe soe we have to convert\n //to base64URL (see https://en.wikipedia.org/wiki/Base64#The_URL_applications)\n return this.identityGet(b64Hash.replace(/\\+/g, '-').replace(/\\//g, '_'))\n }\n}\n","import {APIService} from \"./api\";\nimport {IndexRequest, SearchRequest, SearchResponse, Terms} from \"../models/search\";\n\nexport class SearchService {\n constructor(private api: APIService, private baseURL: string) {}\n\n /**\n * Creates search indexes for the terms passed in order to be able to search for it in the future\n * @param consultUUID\n * @param terms the search terms to be indexed\n */\n public index(\n consultUUID: string,\n terms: Terms\n ): Promise<any> {\n return this.api.post<IndexRequest>(\n `${this.baseURL}/v1/index`,\n <IndexRequest> {\n consultUUID,\n terms\n }\n )\n }\n\n /**\n * Searches for the consultations corresponding to the search terms entered in the query\n * @param terms array of search terms\n */\n public search(\n terms: Terms\n ): Promise<SearchResponse> {\n return this.api.post<SearchResponse>(\n `${this.baseURL}/v1/search`,\n <SearchRequest> {\n terms\n }\n )\n }\n}","import { hashToBase64String } from '../helpers'\nimport {PaymentStatus, PracticeAccount, Uuid} from '../models'\nimport {\n Assignment,\n AssignmentRequest,\n PaymentIntentRequestMetadata,\n PlanType,\n Practice,\n PracticeConfigKind,\n PracticeConfigs,\n PracticeInvoice,\n PracticePayment,\n PracticePaymentIntent,\n PracticePlan,\n PracticePlanPrices,\n PracticeWorkflow,\n PracticeWorkflowWithTagSpecialty,\n Practitioner,\n PractitionerLicense,\n PractitionerPreference,\n PractitionerQuota,\n PractitionerRole,\n WorkflowType,\n} from '../models/practice'\nimport { APIService } from './api'\n\nexport class PracticeService {\n constructor(private api: APIService, private baseURL: string) {}\n\n /**\n * This function get the practice from the URL of a practice\n * It is the entry point of our web apps\n * @param practiceURL URL of the practice to search\n * @param hydratePracticeConfigs (optional) if set true it the Practice field configs will be set\n * @param accounts (optional) if set true it the Practice field accounts will be set\n * @returns the found practice or undefined\n */\n public practiceGetFromURL(\n practiceURL: string,\n params?: {\n hydratePracticeConfigs?: boolean\n accounts?: boolean\n }\n ): Promise<Practice | undefined> {\n return this.api.get<Practice | undefined>(`${this.baseURL}/v1/practices`, {\n params: {\n url_practice: practiceURL,\n ...params,\n },\n })\n }\n\n public practiceGetFromUuid(practiceUuid: Uuid, locale?: string, withAccounts?: boolean): Promise<Practice> {\n return this.api.get<Practice>(`${this.baseURL}/v1/practices/${practiceUuid}`, {\n params: { locale, accounts: withAccounts },\n })\n }\n\n /// Practice Configs\n\n /**\n * This function retrieves all configs of a specific practice\n * @param practiceUuid uuid of the practice\n * @returns the practice configs\n */\n public practiceConfigGetFromPracticeUuid(practiceUuid: Uuid): Promise<PracticeConfigs[]> {\n return this.api.get<PracticeConfigs[]>(`${this.baseURL}/v1/practices/${practiceUuid}/configs`)\n }\n\n /**\n * This function retrieves a specific config of a practice\n * @param practiceUuid uuid of the practice\n * @param kind of the config\n * @returns the practice config\n */\n public practiceConfigGetByKindForPracticeUuid(\n practiceUuid: Uuid,\n kind: PracticeConfigKind\n ): Promise<PracticeConfigs> {\n return this.api.get<PracticeConfigs>(`${this.baseURL}/v1/practices/${practiceUuid}/configs/${kind}`)\n }\n\n /**\n * This function creates a config for a specific practice\n * @param practiceUuid uuid of the practice\n * @param config the config to add to the practice\n * @returns the created practice config\n */\n public practiceConfigCreateForPracticeUuid(practiceUuid: Uuid, config: PracticeConfigs): Promise<PracticeConfigs> {\n return this.api.post<PracticeConfigs>(`${this.baseURL}/v1/practices/${practiceUuid}/configs`, config)\n }\n\n /**\n * This function updates a specific config of a practice\n * @param practiceUuid uuid of the practice\n * @param config the config to update\n * @returns the practice config\n */\n public practiceConfigUpdate(config: PracticeConfigs): Promise<PracticeConfigs> {\n return this.api.put<PracticeConfigs>(\n `${this.baseURL}/v1/practices/${config.uuidPractice}/configs/${config.kind}`,\n config\n )\n }\n\n /// Accounts\n public practiceGetAccounts(practiceUuid: Uuid): Promise<PracticeAccount[]> {\n return this.api.get<PracticeAccount[]>(`${this.baseURL}/v1/practices/${practiceUuid}/accounts`)\n }\n\n public practiceGetAccount(practiceUuid: Uuid, accountUuid: Uuid): Promise<PracticeAccount> {\n return this.api.get<PracticeAccount>(`${this.baseURL}/v1/practices/${practiceUuid}/accounts/${accountUuid}`)\n }\n\n /**\n * Get the PracticeWorkflows of a specific practice\n * @param practiceUuid the uuid of the practice\n * @param kind (optional) the kind of WorkflowType to filter in\n * @returns a list of PracticeWorkflow\n */\n public practiceGetWorkflows(practiceUuid: Uuid, kind?: WorkflowType): Promise<PracticeWorkflow[]> {\n return this.api.get<PracticeWorkflow[]>(`${this.baseURL}/v1/practices/${practiceUuid}/workflows`, {\n params: { kind },\n })\n }\n\n public practiceGetWorkflow(\n practiceUuid: Uuid,\n workflowType: WorkflowType\n ): Promise<PracticeWorkflowWithTagSpecialty> {\n return this.api.get<PracticeWorkflowWithTagSpecialty>(\n `${this.baseURL}/v1/practices/${practiceUuid}/workflows/${workflowType}`\n )\n }\n\n /// Plans\n public practiceGetPlans(practiceUuid: Uuid, planType?: PlanType): Promise<PracticePlan[]> {\n return this.api.get<PracticePlan[]>(`${this.baseURL}/v1/practices/${practiceUuid}/plans`, {\n params: { kind: planType },\n })\n }\n\n public practiceGetPlan(practiceUuid: Uuid, planId: number): Promise<PracticePlan> {\n return this.api.get<PracticePlan>(`${this.baseURL}/v1/practices/${practiceUuid}/plans/${planId}`)\n }\n\n public practiceGetPlanPrices(practiceUuid: Uuid, planId: number): Promise<PracticePlanPrices> {\n return this.api.get<PracticePlanPrices>(`${this.baseURL}/v1/practices/${practiceUuid}/plans/${planId}/prices`)\n }\n\n // Payments\n public practiceGetPayments(\n practiceUuid: Uuid,\n statusPayment?: PaymentStatus,\n withConsultUUIDNULL?: boolean,\n perPage?: number,\n indexPage?: number,\n ): Promise<PracticePayment[]> {\n return this.api.get<PracticePayment[]>(`${this.baseURL}/v1/practices/${practiceUuid}/payments`, {\n params: {\n status: statusPayment,\n withConsultUUIDNULL,\n perPage,\n indexPage\n },\n })\n }\n\n public practiceGetPayment(practiceUuid: Uuid, idStripeInvoiceOrPaymentIntent: string): Promise<PracticePayment> {\n return this.api.get<PracticePayment>(\n `${this.baseURL}/v1/practices/${practiceUuid}/payments/${idStripeInvoiceOrPaymentIntent}`\n )\n }\n\n public practiceGetPaymentForStripePaymentIntentWithID(\n practiceUuid: Uuid,\n stripePaymentIntentId: number\n ): Promise<PracticePayment> {\n return this.api.get<PracticePayment>(\n `${this.baseURL}/v1/practices/${practiceUuid}/payments/${stripePaymentIntentId}`\n )\n }\n\n // Payments Intent\n public practiceGetPaymentsIntents(practiceUuid: Uuid, planType?: PlanType): Promise<PracticePaymentIntent[]> {\n return this.api.get<PracticePaymentIntent[]>(`${this.baseURL}/v1/practices/${practiceUuid}/payments/intents`, {\n params: { kind: planType },\n })\n }\n\n /**\n * This function return the user hased email to be use for creating payment intent\n * @param email the email to hash\n * @returns a hashed email\n */\n public getPaymentIntentHashedEmail(email: string): string {\n return hashToBase64String(email.toLowerCase())\n }\n\n /**\n * Creates a PracticePaymentIntent\n * @param practiceUuid the uuid of the practice\n * @param planId the plan id to use\n * @param userEmail the email address of the user\n * @param isoLocality (optional) the desired locality\n * @param url_subdomain (optional) the url of the sub domain (@bruno-morel need you to document that)\n * @param promotionCode (optional) promotion code to apply\n * @param requestMetadata (optional) the request metadata to use. If defined, when payment service call our hooks in practice, it will use it to do required action (create a consult, refill a consult, etc.).\n * @returns\n */\n public practiceCreatePaymentsIntent(\n practiceUuid: Uuid,\n planId: number,\n userEmail: string,\n isoLocality?: string,\n url_subdomain?: string,\n requestMetadata?: PaymentIntentRequestMetadata\n ): Promise<PracticePaymentIntent> {\n return this.api.post<PracticePaymentIntent>(\n `${this.baseURL}/v1/practices/${practiceUuid}/payments/intents/`,\n {\n idPlan: planId,\n hashUserEmail: userEmail ? this.getPaymentIntentHashedEmail(userEmail) : undefined,\n isoLocality,\n requestMetadata,\n },\n { params: { url_subdomain } }\n )\n }\n\n public practiceGetPaymentsIntent(practiceUuid: Uuid, paymentIntentId: number): Promise<PracticePaymentIntent> {\n return this.api.get<PracticePaymentIntent>(\n `${this.baseURL}/v1/practices/${practiceUuid}/payments/intents/${paymentIntentId}`\n )\n }\n\n /**\n * Updates a PracticePaymentIntent\n * @param practiceUuid the practice uuid\n * @param idPraticePaymentIntent the id of the PracticePaymentIntent to update\n * @param practicePaymentIntent the desired PracticePaymentIntent\n * @param userEmail the email of the user\n * @param promotionCode (optional) promotional code to apply\n * @param finalize (optional) if true will finalize the PracticePaymentIntent and related Stripe.Invoice. Once, finalized you cannot modify the PracticePaymentIntent anymore.\n * @returns the updated PracticePaymentIntent\n */\n public practiceUpdatePaymentsIntent(\n practiceUuid: string,\n idPraticePaymentIntent: number,\n practicePaymentIntent: PracticePaymentIntent,\n userEmail: string,\n promotionCode?: string,\n finalize?: boolean\n ) {\n return this.api.put<PracticePaymentIntent>(\n `${this.baseURL}/v1/practices/${practiceUuid}/payments/intents/${idPraticePaymentIntent}`,\n {\n ...practicePaymentIntent,\n hashUserEmail: userEmail ? this.getPaymentIntentHashedEmail(userEmail) : undefined,\n },\n { params: { promotionCode, finalize } }\n )\n }\n\n /**\n * Invoice\n * @param practiceUuid UUID of the practice to get the invoice from\n * @param invoiceId ID of the invoice in stripe\n */\n public getInvoice(practiceUuid: Uuid, invoiceId: string): Promise<PracticeInvoice> {\n return this.api.get<PracticeInvoice>(\n `${this.baseURL}/v1/practices/${practiceUuid}/payments/invoices/${invoiceId}`\n )\n }\n\n // Practitioner\n public practiceGetPractitioners(practiceUuid: Uuid): Promise<Practitioner[]> {\n return this.api.get<Practitioner[]>(`${this.baseURL}/v1/practices/${practiceUuid}/practitioners`)\n }\n\n public practiceUpdatePractitioner(\n practiceUuid: Uuid,\n practitionerUuid: Uuid,\n requestBody: Practitioner\n ): Promise<Practitioner> {\n return this.api.put<Practitioner>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}`,\n requestBody\n )\n }\n\n public practiceGetPractitioner(practiceUuid: Uuid, practitionerUuid: Uuid): Promise<Practitioner> {\n return this.api.get<Practitioner>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}`\n )\n }\n\n // Practitioner Licenses\n public practiceGetPractitionerLicenses(practiceUuid: Uuid, practitionerUuid: Uuid): Promise<PractitionerLicense[]> {\n return this.api.get<PractitionerLicense[]>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/licenses`\n )\n }\n\n public practiceCreatePractitionerLicense(\n practiceUuid: Uuid,\n practitionerUuid: Uuid,\n requestBody: PractitionerLicense\n ): Promise<PractitionerLicense> {\n return this.api.post<PractitionerLicense>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/licenses`,\n requestBody\n )\n }\n\n public practiceUpdatePractitionerLicense(\n practiceUuid: Uuid,\n practitionerUuid: Uuid,\n licenseId: number,\n requestBody: PractitionerLicense\n ): Promise<PractitionerLicense> {\n return this.api.put<PractitionerLicense>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/licenses/${licenseId}`,\n requestBody\n )\n }\n\n public practiceGetPractitionerLicense(\n practiceUuid: Uuid,\n practitionerUuid: Uuid,\n licenseId: number\n ): Promise<PractitionerLicense> {\n return this.api.get<PractitionerLicense>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/licenses/${licenseId}`\n )\n }\n\n // Practitioner Preferences\n public practiceGetPractitionerPreferences(\n practiceUuid: Uuid,\n practitionerUuid: Uuid\n ): Promise<PractitionerPreference[]> {\n return this.api.get<PractitionerPreference[]>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/preferences`\n )\n }\n\n public practiceCreatePractitionerPreference(\n practiceUuid: Uuid,\n practitionerUuid: Uuid,\n requestBody: PractitionerPreference\n ): Promise<PractitionerPreference> {\n return this.api.post<PractitionerPreference>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/preferences`,\n requestBody\n )\n }\n\n public practiceUpdatePractitionerPreference(\n practiceUuid: Uuid,\n practitionerUuid: Uuid,\n preferenceId: number,\n requestBody: PractitionerPreference\n ): Promise<PractitionerPreference> {\n return this.api.put<PractitionerPreference>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/preferences/${preferenceId}`,\n requestBody\n )\n }\n\n public practiceGetPractitionerPreference(\n practiceUuid: Uuid,\n practitionerUuid: Uuid,\n preferenceId: number\n ): Promise<PractitionerPreference> {\n return this.api.get<PractitionerPreference>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/preferences/${preferenceId}`\n )\n }\n\n // Practitioner Roles\n public practiceGetPractitionerRoles(practiceUuid: Uuid, practitionerUuid: Uuid): Promise<PractitionerRole[]> {\n return this.api.get<PractitionerRole[]>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/roles`\n )\n }\n\n public practiceCreatePractitionerRole(\n practiceUuid: Uuid,\n practitionerUuid: Uuid,\n requestBody: PractitionerRole\n ): Promise<PractitionerRole> {\n return this.api.post<PractitionerRole>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/roles`,\n requestBody\n )\n }\n\n public practiceDeletePractitionerRoles(practiceUuid: Uuid, practitionerUuid: Uuid): Promise<PractitionerRole> {\n return this.api.deleteRequest<PractitionerRole>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/roles`\n )\n }\n\n public practiceUpdatePractitionerRole(\n practiceUuid: Uuid,\n practitionerUuid: Uuid,\n roleId: number,\n requestBody: PractitionerRole\n ): Promise<PractitionerRole> {\n return this.api.put<PractitionerRole>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/roles/${roleId}`,\n requestBody\n )\n }\n\n public practiceGetPractitionerRole(\n practiceUuid: Uuid,\n practitionerUuid: Uuid,\n roleId: number\n ): Promise<PractitionerRole> {\n return this.api.get<PractitionerRole>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/roles/${roleId}`\n )\n }\n\n public practiceDeletePractitionerRole(\n practiceUuid: Uuid,\n practitionerUuid: Uuid,\n roleId: number\n ): Promise<PractitionerRole> {\n return this.api.deleteRequest<PractitionerRole>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/roles/${roleId}`\n )\n }\n\n // Practitioner signature\n\n /**\n * This function returns the practitioner's signature as a Blob\n * @param practiceUuid the practice uuid of the practitioner\n * @param practitionerUuid the practitioner uuid\n * @returns a blob representing the signature\n */\n public practiceGetPractitionerSignature(practiceUuid: Uuid, practitionerUuid: Uuid): Promise<Blob> {\n return this.api.get<Blob>(\n `${this.baseURL}/v1/practices/${practiceUuid}/practitioners/${practitionerUuid}/signature`,\n { responseType: 'blob' }\n )\n }\n\n // Assignments\n public practiceGetAssignments(practiceUuid: Uuid): Promise<Assignment[]> {\n return this.api.get<Assignment[]>(`${this.baseURL}/v1/practices/${practiceUuid}/assignments`)\n }\n\n public practiceCreateAssignment(practiceUuid: Uuid, requestBody: AssignmentRequest): Promise<Assignment> {\n return this.api.post<Assignment>(`${this.baseURL}/v1/practices/${practiceUuid}/assignments`, requestBody)\n }\n\n public practiceUpdateAssignment(\n practiceUuid: Uuid,\n assignmentId: number,\n requestBody: Assignment\n ): Promise<Assignment> {\n return this.api.put<Assignment>(\n `${this.baseURL}/v1/practices/${practiceUuid}/assignments/${assignmentId}`,\n requestBody\n )\n }\n\n public practiceGetAssignment(practiceUuid: Uuid, assignmentId: number): Promise<Assignment> {\n return this.api.get<Assignment>(`${this.baseURL}/v1/practices/${practiceUuid}/assignments/${assignmentId}`)\n }\n\n // Quotas\n public practiceGetQuotas(practiceUuid: Uuid): Promise<PractitionerQuota[]> {\n return this.api.get<PractitionerQuota[]>(`${this.baseURL}/v1/practices/${practiceUuid}/quotas`)\n }\n\n public practiceGetQuota(practiceUuid: Uuid, quotaId: number): Promise<PractitionerQuota> {\n return this.api.get<PractitionerQuota>(`${this.baseURL}/v1/practices/${practiceUuid}/quotas/${quotaId}`)\n }\n}\n","import { APIService } from './api'\nimport {\n ClosedReasonType,\n Consult,\n DataCreateResponse,\n LockboxDataRequest,\n MedicalStatus,\n ResumeConsultEmailRequest,\n Uuid,\n} from '../models'\nexport class TellerService {\n constructor(private api: APIService, private baseURL: string) {}\n\n public async lockboxDataStore(\n lockboxUuid: Uuid,\n req: LockboxDataRequest,\n lockboxOwnerUuid?: Uuid,\n previousDataUuid?: Uuid\n ): Promise<DataCreateResponse> {\n return this.api.post<DataCreateResponse>(`${this.baseURL}/v1/lockboxes/${lockboxUuid}/data`, req, {\n params: {\n lockbox_owner_uuid: lockboxOwnerUuid,\n data_uuid: previousDataUuid,\n },\n })\n }\n\n public updateConsultByUUID(\n patientUuid: Uuid,\n uuidConsult: Uuid,\n statusMedical: MedicalStatus,\n closedReasonType?: ClosedReasonType,\n closedReasonDescription?: string,\n neverExpires?: boolean\n ): Promise<Consult> {\n return this.api.put<Consult>(`${this.baseURL}/v1/consults/${uuidConsult}`, {\n patientUuid,\n statusMedical,\n closedReasonType,\n closedReasonDescription,\n neverExpires,\n })\n }\n\n /**\n * This function notifies teller that the fax sent for a specific consult did not get through\n * @todo - Make service only exposed route\n * @param practiceUuid the practice uuid linked to the consult\n * @param consultationUuid the consultation uuid\n * @param consultationShortId the consultation short id\n * @param fax the address where to send the fax\n * @returns void\n */\n public notifyFaxFailed(practiceUuid: Uuid, consultationUuid: Uuid, consultationShortId: string, fax: string) {\n return this.api.post<void>(\n `${this.baseURL}/v1/fax-failed`,\n {\n consultationUuid,\n consultationShortId,\n fax,\n },\n {\n params: { practice_uuid: practiceUuid },\n }\n )\n }\n\n /**\n * This function let's you reassign a practictioner to a consult and send a notification email\n * @todo - Make service only exposed route\n * @param uuidConsult the uuid of the consult to reassign\n * @param newPractitionerUuid the uuid of the practitioner that will get reassigned\n */\n public reassignmentEmail(uuidConsult: Uuid, newPractitionerUuid: Uuid) {\n return this.api.post<void>(`${this.baseURL}/v1/consult/${uuidConsult}/reassignment-email`, {\n newPractitionerUuid,\n })\n }\n\n /**\n * This function will send an email to the patientUuid, saying that the online practice has been sent a fax successfully\n * @todo - Make service only exposed route\n * @param consult\n * @param patientUuid\n * @returns void\n */\n public sendOnlineFaxSuccessfulEmail(consult: Consult, patientUuid: Uuid): Promise<void> {\n return this.api.post(`${this.baseURL}/v1/online-fax-notify`, { consult, patientUuid })\n }\n\n /**\n * This function will send an email to patient to allow them to resume the consult.\n * @param req the body of the resume consult request\n * @returns void\n */\n public sendResumeConsultEmail(req: ResumeConsultEmailRequest): Promise<void> {\n return this.api.post(`${this.baseURL}/v1/resume-consult-email`, req)\n }\n}\n","import { APIService } from './api'\nimport {\n DataCreateResponse,\n DataResponse,\n GrantedLockboxes,\n LockboxCreateResponse,\n LockboxDataRequest,\n LockboxGrantRequest,\n LockboxManifest,\n SharedSecretResponse,\n Uuid,\n EncryptedVaultIndex,\n IndexKey,\n EncryptedIndexEntry\n} from '../models'\n\nexport class VaultService {\n constructor(private api: APIService, private baseURL: string) { }\n\n public async lockboxCreate(lockboxMetadata?: Object): Promise<LockboxCreateResponse> {\n return this.api.post<LockboxCreateResponse>(\n `${this.baseURL}/v1/lockbox`,\n lockboxMetadata\n )\n }\n\n public async lockboxMetadataAdd(\n lockboxUuid: Uuid,\n lockboxMetadata: Object,\n lockboxOwnerUuid?: Uuid\n ): Promise<LockboxCreateResponse> {\n return this.api.put<LockboxCreateResponse>(\n `${this.baseURL}/v1/lockbox/${lockboxUuid}`,\n lockboxMetadata,\n { params: { lockbox_owner_uuid: lockboxOwnerUuid } }\n )\n }\n\n public async lockboxSecretGet(\n lockboxUuid: Uuid,\n lockboxOwnerUuid?: Uuid\n ): Promise<SharedSecretResponse> {\n return this.api.get<SharedSecretResponse>(\n `${this.baseURL}/v1/lockboxes/${lockboxUuid}/secret`,\n { params: { lockbox_owner_uuid: lockboxOwnerUuid } }\n )\n }\n\n public async lockboxGrant(\n lockboxUuid: Uuid,\n req: LockboxGrantRequest,\n lockboxOwnerUuid?: Uuid\n ): Promise<void> {\n return this.api.post<void>(\n `${this.baseURL}/v1/lockboxes/${lockboxUuid}/grant`,\n req,\n { params: { lockbox_owner_uuid: lockboxOwnerUuid } }\n )\n }\n\n /**\n * Get all lockboxes granted to user\n * @param filter filter of lockbox metadata\n * @returns decrypted lockboxes granted to user\n */\n public async grantsGet(): Promise<GrantedLockboxes> {\n return this.api.get<GrantedLockboxes>(`${this.baseURL}/v1/grants`)\n }\n\n /**\n * This function create or update a data into the vault.\n * @note At creation it is necessary to have all `req` filled\n * @note When setting `previousDataUuid` you are updating the data. `req` metadata fields are optional.\n * @param lockboxUuid The lockbox uuid the data will be stored in\n * @param req The request (please see notes)\n * @param lockboxOwnerUuid The uuid of the owner of the lockbox (@deprecated)\n * @param previousDataUuid The data uuid of the data you want to update\n * @returns \n */\n public async lockboxDataStore(\n lockboxUuid: Uuid,\n req: LockboxDataRequest,\n lockboxOwnerUuid?: Uuid,\n previousDataUuid?: Uuid\n ): Promise<DataCreateResponse> {\n return this.api.post<DataCreateResponse>(\n `${this.baseURL}/v1/lockboxes/${lockboxUuid}/data`,\n req,\n {\n params: {\n lockbox_owner_uuid: lockboxOwnerUuid,\n data_uuid: previousDataUuid,\n },\n }\n )\n }\n\n public async lockboxDataGet(\n lockboxUuid: Uuid,\n dataUuid: Uuid,\n lockboxOwnerUuid?: Uuid,\n stream: boolean = true\n ): Promise<DataResponse> {\n let data = await this.api.get(\n `${this.baseURL}/v1/lockboxes/${lockboxUuid}/data/${dataUuid}`,\n { params: { lockbox_owner_uuid: lockboxOwnerUuid, stream } }\n )\n\n // returned as stream, we need to put inside a DataResponse object\n if (stream)\n return { data }\n\n return data\n }\n\n public async lockboxManifestGet(\n lockboxUuid: Uuid,\n filter?: Object,\n lockboxOwnerUuid?: Uuid\n ): Promise<LockboxManifest> {\n return this.api.get(`${this.baseURL}/v1/lockboxes/${lockboxUuid}`, {\n params: { lockbox_owner_uuid: lockboxOwnerUuid, filter },\n })\n }\n\n public async lockboxMetadataGet(\n lockboxUuid: Uuid,\n fields: string[],\n groupby: string[],\n filter?: Object,\n lockboxOwnerUuid?: Uuid\n ): Promise<any[]> {\n return this.api.get(`${this.baseURL}/v1/lockboxes/${lockboxUuid}/metadata`, {\n params: { lockbox_owner_uuid: lockboxOwnerUuid, fields, groupby, filter },\n })\n }\n\n /**\n * inserts or updates encrypted index entries\n * @note if the index data is being inserted for a user other than the requester, use `indexOwnerUuid`\n * @note if a uuid for an entry is provided, the service will perform an update\n * @param entries the encrypted index data\n * @param indexOwnerUuid\n */\n public async vaultIndexPut(entries: EncryptedVaultIndex, indexOwnerUuid?: Uuid): Promise<void> {\n return this.api.put(`${this.baseURL}/v1/index`,\n entries,\n {\n params: {\n index_owner_uuid: indexOwnerUuid,\n },\n }\n )\n }\n\n /**\n * inserts or updates index snapshot for the provided index owner\n * @note if the index data is being inserted for a user other than the requester, use `indexOwnerUuid`\n * @param entry the encrypted index snapshot\n */\n public async vaultIndexSnapshotPut(entry: EncryptedIndexEntry): Promise<void> {\n return this.api.put(`${this.baseURL}/v1/index-snapshot`, entry)\n }\n\n /**\n * Retrieves the encrypted index from the vault for the requesting user\n * @note index keys can be specified to narrow the scope of index being requested\n * @param indexKeys accepted index fields determined by vault\n * @param identifiers: an array of unique_hashes or consultation uuids used to identify an index entry\n * @param timestamp the minimum timestamp that index entries were created\n * @returns the encrypted index\n */\n public async vaultIndexGet(indexKeys: IndexKey[], identifiers?: string[], timestamp?: Date): Promise<EncryptedVaultIndex> {\n return this.api.get<EncryptedVaultIndex>(`${this.baseURL}/v1/index`, {\n params: { index_keys: indexKeys, identifiers, timestamp },\n })\n }\n}\n","import { WorkflowData } from '../models/workflow'\nimport { APIService } from './api'\n\nexport class WorkflowService {\n private v1Url: string\n\n constructor(private api: APIService, url: string) {\n this.v1Url = `${url}/v1`\n }\n\n /**\n * This function returns all workflows\n * @returns desired workflow\n */\n public getWorkflows(): Promise<WorkflowData[]> {\n return this.api.get<WorkflowData[]>(`${this.v1Url}/workflows`)\n }\n\n /**\n * This function retrieves a workflow. If `locale` is not found, it will try to find 'en' version of it.\n * By default, will return most recent workflow of a specific `id`. `createdAt` can be used to select older version.\n * @param id The uuid of the workflow\n * @param locale (optional) The desired locale of the workflow (default: 'en')\n * @param createdAt (optional) The creation date of the workflow (also used for versionning)\n * @returns desired workflow\n */\n public getWorkflow(\n id: string,\n locale?: string,\n createdAt?: string\n ): Promise<WorkflowData> {\n return this.api.get<WorkflowData>(`${this.v1Url}/workflows/${id}`, {\n params: { locale, createdAt },\n })\n }\n}\n","import { ServiceCollection, ServiceCollectionRequest } from '../models'\nimport {\n APIService,\n ConsultService,\n DiagnosisService,\n GuardService,\n PracticeService,\n SearchService,\n TellerService,\n VaultService,\n WorkflowService,\n} from '../services'\n\n/**\n * This function is used to initialize services with a provided url\n * @param services an object containing the url of the services to init\n * @param authenticationCallback (optional) the authentification callback. Called when the token were not able to be refreshed.\n * @param useLocalStorage (default: true) if true store tokens into local storage (only for browsers)\n * @returns an instance of each services with a provided url\n */\nexport const init = (\n services: ServiceCollectionRequest,\n authenticationCallback?: (err: Error, practiceUuid?: string) => void,\n useLocalStorage = true\n): ServiceCollection => {\n const {\n tellerBaseURL,\n practiceBaseURL,\n consultBaseURL,\n vaultBaseURL,\n guardBaseURL,\n searchBaseURL,\n workflowBaseURL,\n diagnosisBaseURL,\n } = services\n\n const apiService = new APIService(useLocalStorage, undefined, authenticationCallback)\n\n return {\n apiService,\n tellerService: tellerBaseURL ? new TellerService(apiService, tellerBaseURL) : undefined,\n practiceService: practiceBaseURL ? new PracticeService(apiService, practiceBaseURL) : undefined,\n consultService: consultBaseURL ? new ConsultService(apiService, consultBaseURL) : undefined,\n vaultService: vaultBaseURL ? new VaultService(apiService, vaultBaseURL) : undefined,\n guardService: guardBaseURL ? new GuardService(apiService, guardBaseURL) : undefined,\n searchService: searchBaseURL ? new SearchService(apiService, searchBaseURL) : undefined,\n workflowService: workflowBaseURL ? new WorkflowService(apiService, workflowBaseURL) : undefined,\n diagnosisService: diagnosisBaseURL ? new DiagnosisService(apiService, diagnosisBaseURL) : undefined,\n }\n}\n"],"names":["hashToBase64String","value","Buffer","from","sha256","update","digest","toString","AxiosService","config","axios","create","apiRequest","url","data","headers","then","res","apiRequestHeader","headerToRetrieve","toLowerCase","get","method","deleteRequest","post","put","patch","head","APIService","useLocalStorage","tokenRefreshFailureCallback","self","interceptors","request","use","token","useRefreshToken","getTokens","refreshToken","accessToken","Authorization","error","Promise","reject","createAuthRefreshInterceptor","failedRequest","authRefreshFn","tokenResp","setTokens","response","resolve","console","statusCodes","setAuthRefreshFn","fn","tokens","localStorage","setItem","JSON","stringify","item","getItem","parse","ApisPracticeManager","serviceCollReq","getAuthTokenCbk","Map","practiceUuid","practiceInstance","practiceInstances","newPracticeInstance","init","undefined","authTokenFunc","guardService","log","Error","apiService","set","AssistantType","TransmissionKind","TransmissionStatus","ConsultType","FeeStatus","MedicalStatus","TaskStatus","ClosedReasonType","VisibilityType","DrugType","PrescriptionStatus","PlanStatus","AuthenticationFailed","AuthenticationBadRequest","AuthenticationServerError","AuthenticationUnconfirmedEmail","IdentityCreationFailed","IdentityCreationBadRequest","IdentityCreationConflict","VaultDataMissing","WorkflowType","RateDimension","PlanType","PaymentStatus","PractitionerStatus","AssignmentStatus","PractitionnerRoleType","OtherRoleType","LicenseStatus","PeriodType","SyncStatus","PracticeEmailKind","PracticeConfigKind","StripePriceType","PaymentIntentRequestMetadataKind","IndexKey","DocumentType","MetadataCategory","IndexKind","ConsultService","api","baseURL","consultCreate","c","countConsults","uuidPractice","uuidRequester","statusesMedical","statusesExclude","shortId","columnToSortTo","orderToSortTo","perPage","indexPage","filterAssignedDoctor","filterCurrentPractitioner","filterIsoLocality","filterAssignee","params","page","sortColumns","orderColumns","resContentRange","parseInt","getConsults","getConsultByUUID","uuidConsult","updateConsultByUUID","consult","getConsultFaxStatuses","kind","Fax","postConsultTransmission","nameDriver","addressOrPhoneToSendTo","file","nameReceiver","txtTransmissionTitle","txtTransmissionNotes","FormData","append","postConsultFax","addressReceiver","postConsultEmail","retryConsultFax","transmissionId","status","Retrying","updateConsultTransmissionStatus","newStatus","DiagnosisService","getDiagnoses","getDiagnosisByUuid","uuidDiagnosis","createDiagnosis","diagnosis","updateDiagnosis","uuid","getTreatmentsFromDiagnosisUuid","diagnosisUuid","getTreatmentPlansFromConsultUuid","createTreatment","treatmentRequest","getTreatmentPlansPopulatedFromConsultUuid","populated","postPlans","plans","updateTreatmentPlan","uuidPlan","diagnosisRequest","plan","refill","acceptTreatmentPlan","getAllDrugs","foundDrugs","GuardService","authRefresh","bind","identityCache","whoAmICache","m2mToken","req","skipAuthRefresh","resp","isAxiosError","code","authToken","authLogout","authRecover","identityCreate","identityGet","identityID","skipCache","cacheKey","identity","whoAmI","refreshCache","identityUpdate","identityMFAQRCode","password","Accept","identitySendConfirmEmail","identityGetByCustomerEmail","email","identityGetByHash","substring","indexOf","b64Hash","replace","SearchService","index","consultUUID","terms","search","PracticeService","practiceGetFromURL","practiceURL","url_practice","practiceGetFromUuid","locale","withAccounts","accounts","practiceConfigGetFromPracticeUuid","practiceConfigGetByKindForPracticeUuid","practiceConfigCreateForPracticeUuid","practiceConfigUpdate","practiceGetAccounts","practiceGetAccount","accountUuid","practiceGetWorkflows","practiceGetWorkflow","workflowType","practiceGetPlans","planType","practiceGetPlan","planId","practiceGetPlanPrices","practiceGetPayments","statusPayment","withConsultUUIDNULL","practiceGetPayment","idStripeInvoiceOrPaymentIntent","practiceGetPaymentForStripePaymentIntentWithID","stripePaymentIntentId","practiceGetPaymentsIntents","getPaymentIntentHashedEmail","practiceCreatePaymentsIntent","userEmail","isoLocality","url_subdomain","requestMetadata","idPlan","hashUserEmail","practiceGetPaymentsIntent","paymentIntentId","practiceUpdatePaymentsIntent","idPraticePaymentIntent","practicePaymentIntent","promotionCode","finalize","getInvoice","invoiceId","practiceGetPractitioners","practiceUpdatePractitioner","practitionerUuid","requestBody","practiceGetPractitioner","practiceGetPractitionerLicenses","practiceCreatePractitionerLicense","practiceUpdatePractitionerLicense","licenseId","practiceGetPractitionerLicense","practiceGetPractitionerPreferences","practiceCreatePractitionerPreference","practiceUpdatePractitionerPreference","preferenceId","practiceGetPractitionerPreference","practiceGetPractitionerRoles","practiceCreatePractitionerRole","practiceDeletePractitionerRoles","practiceUpdatePractitionerRole","roleId","practiceGetPractitionerRole","practiceDeletePractitionerRole","practiceGetPractitionerSignature","responseType","practiceGetAssignments","practiceCreateAssignment","practiceUpdateAssignment","assignmentId","practiceGetAssignment","practiceGetQuotas","practiceGetQuota","quotaId","TellerService","lockboxDataStore","lockboxUuid","lockboxOwnerUuid","previousDataUuid","lockbox_owner_uuid","data_uuid","patientUuid","statusMedical","closedReasonType","closedReasonDescription","neverExpires","notifyFaxFailed","consultationUuid","consultationShortId","fax","practice_uuid","reassignmentEmail","newPractitionerUuid","sendOnlineFaxSuccessfulEmail","sendResumeConsultEmail","VaultService","lockboxCreate","lockboxMetadata","lockboxMetadataAdd","lockboxSecretGet","lockboxGrant","grantsGet","lockboxDataGet","dataUuid","stream","lockboxManifestGet","filter","lockboxMetadataGet","fields","groupby","vaultIndexPut","entries","indexOwnerUuid","index_owner_uuid","vaultIndexSnapshotPut","entry","vaultIndexGet","indexKeys","identifiers","timestamp","index_keys","WorkflowService","v1Url","getWorkflows","getWorkflow","id","createdAt","services","authenticationCallback","tellerBaseURL","practiceBaseURL","consultBaseURL","vaultBaseURL","guardBaseURL","searchBaseURL","workflowBaseURL","diagnosisBaseURL","tellerService","practiceService","consultService","vaultService","searchService","workflowService","diagnosisService"],"mappings":";;;;;;;;;;;AAGA;;;;;SAKgBA,kBAAkB,CAACC,KAAa;EAC5C,OAAOC,QAAM,CAACC,IAAI,CAACC,cAAM,EAAE,CAACC,MAAM,CAACJ,KAAK,C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