oro-sdk-apis 5.17.0 → 6.0.1

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'\nimport { v4 as uuidv4 } from 'uuid'\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 const sessionId = uuidv4()\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 'X-Session-Id': sessionId,\n 'X-Request-Id': uuidv4(),\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 cacheKey = practiceUuid ?? 'none'\n const practiceInstance = this.practiceInstances.get(cacheKey)\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(cacheKey, 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 Assigning = 'Assigning',\n Assigned = 'Assigned',\n New = 'New',\n ToAnswer = 'ToAnswer',\n Answered = 'Answered',\n Closing = 'Closing',\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\n// Type defined to store all consult related data linked to a given treatment\nexport interface TreatmentAssociatedConsultData {\n uuidConsult: string\n consultKind: string\n}\n\nexport interface TreatmentRequest {\n uuid?: string\n uuidDiagnosis?: string\n uuidParentTreatment?: string\n uuidPreviousRevision?: string\n name: string\n description: string\n refillable?: boolean\n noteToPharmacy?: string\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 arrAssociatedConsults?: TreatmentAssociatedConsultData[]\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 PreviouslyAccepted = 'PreviouslyAccepted',\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 treatmentRevisions: 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}\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}\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> {}\n\nexport interface TreatmentAssociatedConsultDataResponse extends Array<TreatmentAssociatedConsultData> {}\n","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 SuccessAndDelivered = 'SuccessAndDelivered',\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 PracticeInfoLetterDiscount = 'PracticeInfoLetterDiscount',\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 * If true, it enables the Prescription Refill feature\n */\n enableRefill?: boolean\n }\n>\n\n/**\n * This config is used to set a discount code in case the info letter is accepted by the patient\n */\nexport type PracticeConfigPracticeInfoLetterDiscount = PracticeConfig<\n PracticeConfigKind.PracticeInfoLetterDiscount,\n {\n /**\n * The discount code to be applied when the info letter is accepted\n */\n discountCode?: string\n\n /**\n * The text to display for the discount code\n */\n discountText?: string\n\n /**\n * Show the info letter subscription without a Discount code before the patient confirms his email,\n * if he confirms his email but still didn't check the subscription, then display a discount code for subscribing\n */\n promptInfoLetterBeforeEmailConfirmed?: 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 | PracticeConfigPracticeInfoLetterDiscount\n\nexport interface PracticeWorkflow {\n id?: number ///optional for insertion\n uuidPractice: string\n uuidWorkflow: string\n typeWorkflow: WorkflowType\n tagSpecialty?: string\n associatedWorkflowUuid?: 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 activateFollowUp: boolean\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 [PracticeConfigKind.PracticeInfoLetterDiscount]?: PracticeConfigPracticeInfoLetterDiscount\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 enum InputApplyFunctions { //these are generic metadata categories\n AllUpperCase = 'AllUpperCase',\n AllLowerCase = 'AllLowerCase',\n AllAlphabetical = 'AllAlphabetical',\n AllAlphanumeric = 'AllAlphanumeric',\n NoSpaces = 'NoSpaces',\n}\n\nexport interface EntryData {\n id?: number\n label?: string\n inputApply?: InputApplyFunctions | InputApplyFunctions[]\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 * Overrides the read only ability of the question's answer\n * populated by extended workflow feature\n */\n readOnly?: boolean\n /**\n * Overrides the fillable default of the question's answer\n * populated by extended workflow feature\n */\n defaultEmpty?: boolean\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 serviceImage?: string\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 /**\n * (optional) extension of another workflow referenced by uuid\n */\n extendingWorkflow?: string\n\n /**\n * (optional) rules for the extension of another workflow \n */\n extendingRules?: IndexedData<WorkflowExtendingRules>\n}\n\nexport interface WorkflowExtendingRules {\n /**\n * Whether the field becomes read only in the extended workflow\n */\n readOnly?: boolean,\n /**\n * Whether the field becomes deselected/empty by default in the extended workflow\n */\n defaultEmpty?: boolean,\n /**\n * Whether the field should be removed altogether in the extended workflow\n */\n remove?: boolean,\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}\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 ConsultType,\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 typesConsult?: ConsultType[],\n uuidParent?: Uuid\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 typesConsult,\n uuidParent,\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 uuidParent?: Uuid,\n typesConsult?: ConsultType[]\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 typesConsult,\n uuidParent,\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 getConsultByPracticePaymentID(idPracticePayment: Number, uuidPractice?: Uuid): Promise<Consult> {\n return this.api.get<Consult>(`${this.baseURL}/v1/consults/payment-${idPracticePayment}`, {\n params: { uuidPractice },\n })\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 uuidPatient?: string\n // numTry ?: number,\n // delay ?: number,\n ): Promise<ConsultTransmission> {\n let data = new FormData()\n\n data.append('nameDriverReceiver', nameDriver)\n if (uuidPatient) {\n data.append('uuidPatient', uuidPatient)\n }\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(\n uuidConsult: string,\n addressReceiver: string,\n file: File,\n uuidPatient?: string\n ): Promise<ConsultTransmission> {\n return this.postConsultTransmission(\n uuidConsult,\n 'Documo',\n addressReceiver,\n file,\n undefined,\n undefined,\n undefined,\n uuidPatient\n )\n }\n\n public postConsultEmail(uuidConsult: string, file: File, uuidPatient?: string): Promise<ConsultTransmission> {\n return this.postConsultTransmission(\n uuidConsult,\n 'Pharmacierge',\n undefined,\n file,\n undefined,\n undefined,\n undefined,\n uuidPatient\n )\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 Consult,\n Drug,\n TreatmentAssociatedConsultData,\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 getTreatmentByUuid(uuidDiagnosis: Uuid, uuidTreatment: Uuid): Promise<Treatment> {\n return this.api.get<Treatment>(`${this.baseURL}/v1/diagnoses/${uuidDiagnosis}/treatments/${uuidTreatment}`)\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 setAssociatedConsultsToTreatment(\n diagnosisUuid: string,\n treatmentUuid: string,\n arrAssociatedConsults: TreatmentAssociatedConsultData[]\n ): Promise<TreatmentAssociatedConsultData[]> {\n return this.api.post<TreatmentAssociatedConsultData[]>(\n `${this.baseURL}/v1/diagnoses/${diagnosisUuid}/treatments/${treatmentUuid}/associated-consults`,\n arrAssociatedConsults\n )\n }\n\n public updateAssociatedConsultsToTreatment(\n diagnosisUuid: string,\n treatmentUuid: string,\n arrAssociatedConsults: TreatmentAssociatedConsultData[]\n ): Promise<TreatmentAssociatedConsultData[]> {\n return this.api.put<TreatmentAssociatedConsultData[]>(\n `${this.baseURL}/v1/diagnoses/${diagnosisUuid}/treatments/${treatmentUuid}/associated-consults`,\n arrAssociatedConsults\n )\n }\n\n public getAssociatedConsultsOfTreatment(\n diagnosisUuid: string,\n treatmentUuid: string\n ): Promise<TreatmentAssociatedConsultData[]> {\n return this.api.get<TreatmentAssociatedConsultData[]>(\n `${this.baseURL}/v1/diagnoses/${diagnosisUuid}/treatments/${treatmentUuid}/associated-consults`\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 will only work if the service is initialized with\n * an M2M with the scope `practice.practices.get`\n * @returns an array of practices\n */\n public practiceGetAll(): Promise<Practice[]> {\n return this.api.get<Practice[]>(`${this.baseURL}/v1/practices`)\n }\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 options: {\n updateMedicalStatus: boolean\n } = { updateMedicalStatus: true },\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 update_medical_status: options.updateMedicalStatus,\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 the patientUuid, saying that the refill has been completed successfully\n * @todo - Make service only exposed route\n * @param consult\n * @param patientUuid\n * @returns void\n */\n public sendRefillFaxSucceededEmail(consult: Consult, patientUuid: Uuid): Promise<void> {\n return this.api.post(`${this.baseURL}/v1/refill-confirm-email`, { 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","_proto","prototype","apiRequest","_apiRequest","_asyncToGenerator","_regeneratorRuntime","mark","_callee","url","data","wrap","_callee$","_context","prev","next","headers","abrupt","_extends","then","res","stop","_x","_x2","_x3","apply","arguments","apiRequestHeader","_apiRequestHeader","_callee2","headerToRetrieve","_callee2$","_context2","_res$headers$headerTo","toLowerCase","_x4","_x5","_x6","_x7","get","method","deleteRequest","post","put","patch","head","APIService","_AxiosService","_inheritsLoose","useLocalStorage","tokenRefreshFailureCallback","_this","call","self","_assertThisInitialized","sessionId","uuidv4","interceptors","request","use","token","useRefreshToken","getTokens","refreshToken","accessToken","Authorization","error","Promise","reject","createAuthRefreshInterceptor","_ref","failedRequest","tokenResp","authRefreshFn","sent","setTokens","response","resolve","t0","console","statusCodes","setAuthRefreshFn","fn","tokens","localStorage","setItem","JSON","stringify","item","getItem","parse","ApisPracticeManager","serviceCollReq","getAuthTokenCbk","Map","_get","practiceUuid","cacheKey","practiceInstance","newPracticeInstance","authTokenFunc","practiceInstances","init","undefined","guardService","log","Error","apiService","set","AssistantType","TransmissionKind","TransmissionStatus","ConsultType","FeeStatus","MedicalStatus","TaskStatus","ClosedReasonType","VisibilityType","DrugType","PrescriptionStatus","PlanStatus","AuthenticationFailed","_Error","_wrapNativeSuper","AuthenticationBadRequest","_Error2","AuthenticationServerError","_Error3","AuthenticationUnconfirmedEmail","_Error4","IdentityCreationFailed","_Error5","IdentityCreationBadRequest","_Error6","IdentityCreationConflict","_Error7","VaultDataMissing","_Error8","WorkflowType","RateDimension","PlanType","PaymentStatus","PractitionerStatus","AssignmentStatus","PractitionnerRoleType","OtherRoleType","LicenseStatus","PeriodType","SyncStatus","PracticeEmailKind","PracticeConfigKind","StripePriceType","PaymentIntentRequestMetadataKind","IndexKey","DocumentType","InputApplyFunctions","MetadataCategory","IndexKind","ConsultService","api","baseURL","consultCreate","c","countConsults","uuidPractice","uuidRequester","statusesMedical","statusesExclude","shortId","columnToSortTo","orderToSortTo","perPage","indexPage","filterAssignedDoctor","filterCurrentPractitioner","filterIsoLocality","filterAssignee","typesConsult","uuidParent","params","page","sortColumns","orderColumns","resContentRange","parseInt","getConsults","getConsultByUUID","uuidConsult","getConsultByPracticePaymentID","idPracticePayment","updateConsultByUUID","consult","getConsultFaxStatuses","kind","Fax","postConsultTransmission","nameDriver","addressOrPhoneToSendTo","file","nameReceiver","txtTransmissionTitle","txtTransmissionNotes","uuidPatient","FormData","append","postConsultFax","addressReceiver","postConsultEmail","retryConsultFax","transmissionId","status","Retrying","updateConsultTransmissionStatus","newStatus","DiagnosisService","getDiagnoses","getDiagnosisByUuid","uuidDiagnosis","createDiagnosis","diagnosis","updateDiagnosis","uuid","getTreatmentByUuid","uuidTreatment","getTreatmentsFromDiagnosisUuid","diagnosisUuid","getTreatmentPlansFromConsultUuid","createTreatment","treatmentRequest","getTreatmentPlansPopulatedFromConsultUuid","populated","postPlans","plans","updateTreatmentPlan","uuidPlan","diagnosisRequest","plan","refill","setAssociatedConsultsToTreatment","treatmentUuid","arrAssociatedConsults","updateAssociatedConsultsToTreatment","getAssociatedConsultsOfTreatment","acceptTreatmentPlan","getAllDrugs","_getAllDrugs","foundDrugs","GuardService","authRefresh","bind","identityCache","whoAmICache","m2mToken","_m2mToken","req","resp","_e$response","code","skipAuthRefresh","isAxiosError","t1","authToken","_authToken","_e$response2","_authRefresh","_callee3","_callee3$","_context3","authLogout","_authLogout","_callee4","_callee4$","_context4","authRecover","_authRecover","_callee5","_callee5$","_context5","identityCreate","_identityCreate","_callee6","_e$response3","_callee6$","_context6","identityGet","_identityGet","_callee7","identityID","skipCache","_tokens$accessToken","_tokens$refreshToken","identity","_callee7$","_context7","whoAmI","_whoAmI","_callee8","refreshCache","_this$api$getTokens$a","_context8","_x8","identityUpdate","_identityUpdate","_callee9","_callee9$","_context9","_x9","_x10","identityMFAQRCode","_identityMFAQRCode","_callee10","password","_callee10$","_context10","Accept","_x11","_x12","identitySendConfirmEmail","_identitySendConfirmEmail","_callee11","_callee11$","_context11","_x13","identityGetByCustomerEmail","_identityGetByCustomerEmail","_callee12","email","_callee12$","_context12","identityGetByHash","substring","indexOf","_x14","_identityGetByHash","_callee13","b64Hash","_callee13$","_context13","replace","_x15","SearchService","index","consultUUID","terms","search","PracticeService","practiceGetAll","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","_lockboxDataStore","lockboxUuid","lockboxOwnerUuid","previousDataUuid","options","updateMedicalStatus","lockbox_owner_uuid","data_uuid","update_medical_status","patientUuid","statusMedical","closedReasonType","closedReasonDescription","neverExpires","notifyFaxFailed","consultationUuid","consultationShortId","fax","practice_uuid","reassignmentEmail","newPractitionerUuid","sendOnlineFaxSuccessfulEmail","sendRefillFaxSucceededEmail","sendResumeConsultEmail","VaultService","lockboxCreate","_lockboxCreate","lockboxMetadata","lockboxMetadataAdd","_lockboxMetadataAdd","lockboxSecretGet","_lockboxSecretGet","lockboxGrant","_lockboxGrant","grantsGet","_grantsGet","lockboxDataGet","_lockboxDataGet","dataUuid","stream","_x16","_x17","lockboxManifestGet","_lockboxManifestGet","filter","_callee8$","_x18","_x19","_x20","lockboxMetadataGet","_lockboxMetadataGet","fields","groupby","_x21","_x22","_x23","_x24","_x25","vaultIndexPut","_vaultIndexPut","entries","indexOwnerUuid","index_owner_uuid","_x26","_x27","vaultIndexSnapshotPut","_vaultIndexSnapshotPut","entry","_x28","vaultIndexGet","_vaultIndexGet","indexKeys","identifiers","timestamp","index_keys","_x29","_x30","_x31","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,kBAAkBA,CAACC,KAAa;EAC5C,OAAOC,QAAM,CAACC,IAAI,CAACC,cAAM,EAAE,CAACC,MAAM,CAACJ,KAAK,CAAC,CAACK,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAACC,QAAQ,CAAC,QAAQ,CAAC;AACtF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAU,CAACG,eAAe,EAAEsD,SAAS,EAAE0Z,sBAAsB,CAAC;EAErF,OAAO;IACHtZ,UAAU,EAAVA,UAAU;IACV+Z,aAAa,EAAER,aAAa,GAAG,IAAIxF,aAAa,CAAC/T,UAAU,EAAEuZ,aAAa,CAAC,GAAG3Z,SAAS;IACvFoa,eAAe,EAAER,eAAe,GAAG,IAAI1K,eAAe,CAAC9O,UAAU,EAAEwZ,eAAe,CAAC,GAAG5Z,SAAS;IAC/Fqa,cAAc,EAAER,cAAc,GAAG,IAAItW,cAAc,CAACnD,UAAU,EAAEyZ,cAAc,CAAC,GAAG7Z,SAAS;IAC3Fsa,YAAY,EAAER,YAAY,GAAG,IAAIjE,YAAY,CAACzV,UAAU,EAAE0Z,YAAY,CAAC,GAAG9Z,SAAS;IACnFC,YAAY,EAAE8Z,YAAY,GAAG,IAAI/Q,YAAY,CAAC5I,UAAU,EAAE2Z,YAAY,CAAC,GAAG/Z,SAAS;IACnFua,aAAa,EAAEP,aAAa,GAAG,IAAInL,aAAa,CAACzO,UAAU,EAAE4Z,aAAa,CAAC,GAAGha,SAAS;IACvFwa,eAAe,EAAEP,eAAe,GAAG,IAAId,eAAe,CAAC/Y,UAAU,EAAE6Z,eAAe,CAAC,GAAGja,SAAS;IAC/Fya,gBAAgB,EAAEP,gBAAgB,GAAG,IAAInT,gBAAgB,CAAC3G,UAAU,EAAE8Z,gBAAgB,CAAC,GAAGla;GAC7F;AACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;"}
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'\nimport { v4 as uuidv4 } from 'uuid'\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 const sessionId = uuidv4()\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 'X-Session-Id': sessionId,\n 'X-Request-Id': uuidv4(),\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 // The refreshInstance will be a single instance that is used to refresh the tokens of others this way it will not interfere with requests made by other services \n const newPracticeInstance = init(this.serviceCollReq, undefined, this.useLocalStorage)\n this.practiceInstances.set('refreshInstance', newPracticeInstance)\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 cacheKey = practiceUuid ?? 'none'\n const practiceInstance = this.practiceInstances.get(cacheKey)\n if (practiceInstance) return practiceInstance\n\n const newPracticeInstance = init(this.serviceCollReq, undefined, this.useLocalStorage)\n newPracticeInstance.apiService.setAuthRefreshFn(() => this.authTokenFunc(practiceUuid))\n this.practiceInstances.set(cacheKey, newPracticeInstance)\n\n return newPracticeInstance\n }\n\n /**\n * Uses the refresh intance to fetch a new auth token for the given practice\n * @param practiceUuid the uuid of the practice or key of a specific instance\n * @returns a new authentication token\n */\n public async authTokenFunc(practiceUuidOrInstanceName?: string): Promise<AuthTokenResponse> {\n // fetch the refresh intance and refresh the token for another practice\n const newPracticeInstance = await this.get('refreshInstance');\n if (newPracticeInstance.guardService) {\n console.log(`\\x1b[36m[Auth] Refresh auth called (practiceUuid: ${practiceUuidOrInstanceName})\\x1b[36m`)\n return await this.getAuthTokenCbk(newPracticeInstance.guardService, practiceUuidOrInstanceName)\n } else {\n throw Error('[Auth] Unable to refresh token guard service is undefined')\n }\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 Assigning = 'Assigning',\n Assigned = 'Assigned',\n New = 'New',\n ToAnswer = 'ToAnswer',\n Answered = 'Answered',\n Closing = 'Closing',\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\n// Type defined to store all consult related data linked to a given treatment\nexport interface TreatmentAssociatedConsultData {\n uuidConsult: string\n consultKind: string\n}\n\nexport interface TreatmentRequest {\n uuid?: string\n uuidDiagnosis?: string\n uuidParentTreatment?: string\n uuidPreviousRevision?: string\n name: string\n description: string\n refillable?: boolean\n noteToPharmacy?: string\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 arrAssociatedConsults?: TreatmentAssociatedConsultData[]\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 PreviouslyAccepted = 'PreviouslyAccepted',\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 treatmentRevisions: 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}\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}\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> {}\n\nexport interface TreatmentAssociatedConsultDataResponse extends Array<TreatmentAssociatedConsultData> {}\n","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 SuccessAndDelivered = 'SuccessAndDelivered',\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 PracticeInfoLetterDiscount = 'PracticeInfoLetterDiscount',\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 * If true, it enables the Prescription Refill feature\n */\n enableRefill?: boolean\n }\n>\n\n/**\n * This config is used to set a discount code in case the info letter is accepted by the patient\n */\nexport type PracticeConfigPracticeInfoLetterDiscount = PracticeConfig<\n PracticeConfigKind.PracticeInfoLetterDiscount,\n {\n /**\n * The discount code to be applied when the info letter is accepted\n */\n discountCode?: string\n\n /**\n * The text to display for the discount code\n */\n discountText?: string\n\n /**\n * Show the info letter subscription without a Discount code before the patient confirms his email,\n * if he confirms his email but still didn't check the subscription, then display a discount code for subscribing\n */\n promptInfoLetterBeforeEmailConfirmed?: 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 | PracticeConfigPracticeInfoLetterDiscount\n\nexport interface PracticeWorkflow {\n id?: number ///optional for insertion\n uuidPractice: string\n uuidWorkflow: string\n typeWorkflow: WorkflowType\n tagSpecialty?: string\n associatedWorkflowUuid?: 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 activateFollowUp: boolean\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 [PracticeConfigKind.PracticeInfoLetterDiscount]?: PracticeConfigPracticeInfoLetterDiscount\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 enum InputApplyFunctions { //these are generic metadata categories\n AllUpperCase = 'AllUpperCase',\n AllLowerCase = 'AllLowerCase',\n AllAlphabetical = 'AllAlphabetical',\n AllAlphanumeric = 'AllAlphanumeric',\n NoSpaces = 'NoSpaces',\n}\n\nexport interface EntryData {\n id?: number\n label?: string\n inputApply?: InputApplyFunctions | InputApplyFunctions[]\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 * Overrides the read only ability of the question's answer\n * populated by extended workflow feature\n */\n readOnly?: boolean\n /**\n * Overrides the fillable default of the question's answer\n * populated by extended workflow feature\n */\n defaultEmpty?: boolean\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 serviceImage?: string\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 /**\n * (optional) extension of another workflow referenced by uuid\n */\n extendingWorkflow?: string\n\n /**\n * (optional) rules for the extension of another workflow \n */\n extendingRules?: IndexedData<WorkflowExtendingRules>\n}\n\nexport interface WorkflowExtendingRules {\n /**\n * Whether the field becomes read only in the extended workflow\n */\n readOnly?: boolean,\n /**\n * Whether the field becomes deselected/empty by default in the extended workflow\n */\n defaultEmpty?: boolean,\n /**\n * Whether the field should be removed altogether in the extended workflow\n */\n remove?: boolean,\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}\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 ConsultType,\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 typesConsult?: ConsultType[],\n uuidParent?: Uuid\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 typesConsult,\n uuidParent,\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 uuidParent?: Uuid,\n typesConsult?: ConsultType[]\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 typesConsult,\n uuidParent,\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 getConsultByPracticePaymentID(idPracticePayment: Number, uuidPractice?: Uuid): Promise<Consult> {\n return this.api.get<Consult>(`${this.baseURL}/v1/consults/payment-${idPracticePayment}`, {\n params: { uuidPractice },\n })\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 uuidPatient?: string\n // numTry ?: number,\n // delay ?: number,\n ): Promise<ConsultTransmission> {\n let data = new FormData()\n\n data.append('nameDriverReceiver', nameDriver)\n if (uuidPatient) {\n data.append('uuidPatient', uuidPatient)\n }\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(\n uuidConsult: string,\n addressReceiver: string,\n file: File,\n uuidPatient?: string\n ): Promise<ConsultTransmission> {\n return this.postConsultTransmission(\n uuidConsult,\n 'Documo',\n addressReceiver,\n file,\n undefined,\n undefined,\n undefined,\n uuidPatient\n )\n }\n\n public postConsultEmail(uuidConsult: string, file: File, uuidPatient?: string): Promise<ConsultTransmission> {\n return this.postConsultTransmission(\n uuidConsult,\n 'Pharmacierge',\n undefined,\n file,\n undefined,\n undefined,\n undefined,\n uuidPatient\n )\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 Consult,\n Drug,\n TreatmentAssociatedConsultData,\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 getTreatmentByUuid(uuidDiagnosis: Uuid, uuidTreatment: Uuid): Promise<Treatment> {\n return this.api.get<Treatment>(`${this.baseURL}/v1/diagnoses/${uuidDiagnosis}/treatments/${uuidTreatment}`)\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 setAssociatedConsultsToTreatment(\n diagnosisUuid: string,\n treatmentUuid: string,\n arrAssociatedConsults: TreatmentAssociatedConsultData[]\n ): Promise<TreatmentAssociatedConsultData[]> {\n return this.api.post<TreatmentAssociatedConsultData[]>(\n `${this.baseURL}/v1/diagnoses/${diagnosisUuid}/treatments/${treatmentUuid}/associated-consults`,\n arrAssociatedConsults\n )\n }\n\n public updateAssociatedConsultsToTreatment(\n diagnosisUuid: string,\n treatmentUuid: string,\n arrAssociatedConsults: TreatmentAssociatedConsultData[]\n ): Promise<TreatmentAssociatedConsultData[]> {\n return this.api.put<TreatmentAssociatedConsultData[]>(\n `${this.baseURL}/v1/diagnoses/${diagnosisUuid}/treatments/${treatmentUuid}/associated-consults`,\n arrAssociatedConsults\n )\n }\n\n public getAssociatedConsultsOfTreatment(\n diagnosisUuid: string,\n treatmentUuid: string\n ): Promise<TreatmentAssociatedConsultData[]> {\n return this.api.get<TreatmentAssociatedConsultData[]>(\n `${this.baseURL}/v1/diagnoses/${diagnosisUuid}/treatments/${treatmentUuid}/associated-consults`\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 * Notifies the guard and confirms the phishing attempt\n * @param attemptUuid the guard logged attempt id\n * @returns void\n */\n public async authConfirmPhishingAttempts(attemptUuid: Uuid): Promise<void> {\n return this.api.put<void>(`${this.baseURL}/v1/auth/attempts/${attemptUuid}`, {})\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 will only work if the service is initialized with\n * an M2M with the scope `practice.practices.get`\n * @returns an array of practices\n */\n public practiceGetAll(): Promise<Practice[]> {\n return this.api.get<Practice[]>(`${this.baseURL}/v1/practices`)\n }\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 options: {\n updateMedicalStatus: boolean\n } = { updateMedicalStatus: true },\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 update_medical_status: options.updateMedicalStatus,\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 the patientUuid, saying that the refill has been completed successfully\n * @todo - Make service only exposed route\n * @param consult\n * @param patientUuid\n * @returns void\n */\n public sendRefillFaxSucceededEmail(consult: Consult, patientUuid: Uuid): Promise<void> {\n return this.api.post(`${this.baseURL}/v1/refill-confirm-email`, { 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","_proto","prototype","apiRequest","_apiRequest","_asyncToGenerator","_regeneratorRuntime","mark","_callee","url","data","wrap","_callee$","_context","prev","next","headers","abrupt","_extends","then","res","stop","_x","_x2","_x3","apply","arguments","apiRequestHeader","_apiRequestHeader","_callee2","headerToRetrieve","_callee2$","_context2","_res$headers$headerTo","toLowerCase","_x4","_x5","_x6","_x7","get","method","deleteRequest","post","put","patch","head","APIService","_AxiosService","_inheritsLoose","useLocalStorage","tokenRefreshFailureCallback","_this","call","self","_assertThisInitialized","sessionId","uuidv4","interceptors","request","use","token","useRefreshToken","getTokens","refreshToken","accessToken","Authorization","error","Promise","reject","createAuthRefreshInterceptor","_ref","failedRequest","tokenResp","authRefreshFn","sent","setTokens","response","resolve","t0","console","statusCodes","setAuthRefreshFn","fn","tokens","localStorage","setItem","JSON","stringify","item","getItem","parse","ApisPracticeManager","serviceCollReq","getAuthTokenCbk","Map","newPracticeInstance","init","undefined","practiceInstances","set","_get","practiceUuid","cacheKey","practiceInstance","apiService","authTokenFunc","_authTokenFunc","practiceUuidOrInstanceName","guardService","log","Error","AssistantType","TransmissionKind","TransmissionStatus","ConsultType","FeeStatus","MedicalStatus","TaskStatus","ClosedReasonType","VisibilityType","DrugType","PrescriptionStatus","PlanStatus","AuthenticationFailed","_Error","_wrapNativeSuper","AuthenticationBadRequest","_Error2","AuthenticationServerError","_Error3","AuthenticationUnconfirmedEmail","_Error4","IdentityCreationFailed","_Error5","IdentityCreationBadRequest","_Error6","IdentityCreationConflict","_Error7","VaultDataMissing","_Error8","WorkflowType","RateDimension","PlanType","PaymentStatus","PractitionerStatus","AssignmentStatus","PractitionnerRoleType","OtherRoleType","LicenseStatus","PeriodType","SyncStatus","PracticeEmailKind","PracticeConfigKind","StripePriceType","PaymentIntentRequestMetadataKind","IndexKey","DocumentType","InputApplyFunctions","MetadataCategory","IndexKind","ConsultService","api","baseURL","consultCreate","c","countConsults","uuidPractice","uuidRequester","statusesMedical","statusesExclude","shortId","columnToSortTo","orderToSortTo","perPage","indexPage","filterAssignedDoctor","filterCurrentPractitioner","filterIsoLocality","filterAssignee","typesConsult","uuidParent","params","page","sortColumns","orderColumns","resContentRange","parseInt","getConsults","getConsultByUUID","uuidConsult","getConsultByPracticePaymentID","idPracticePayment","updateConsultByUUID","consult","getConsultFaxStatuses","kind","Fax","postConsultTransmission","nameDriver","addressOrPhoneToSendTo","file","nameReceiver","txtTransmissionTitle","txtTransmissionNotes","uuidPatient","FormData","append","postConsultFax","addressReceiver","postConsultEmail","retryConsultFax","transmissionId","status","Retrying","updateConsultTransmissionStatus","newStatus","DiagnosisService","getDiagnoses","getDiagnosisByUuid","uuidDiagnosis","createDiagnosis","diagnosis","updateDiagnosis","uuid","getTreatmentByUuid","uuidTreatment","getTreatmentsFromDiagnosisUuid","diagnosisUuid","getTreatmentPlansFromConsultUuid","createTreatment","treatmentRequest","getTreatmentPlansPopulatedFromConsultUuid","populated","postPlans","plans","updateTreatmentPlan","uuidPlan","diagnosisRequest","plan","refill","setAssociatedConsultsToTreatment","treatmentUuid","arrAssociatedConsults","updateAssociatedConsultsToTreatment","getAssociatedConsultsOfTreatment","acceptTreatmentPlan","getAllDrugs","_getAllDrugs","foundDrugs","GuardService","authRefresh","bind","identityCache","whoAmICache","m2mToken","_m2mToken","req","resp","_e$response","code","skipAuthRefresh","isAxiosError","t1","authToken","_authToken","_e$response2","_authRefresh","_callee3","_callee3$","_context3","authLogout","_authLogout","_callee4","_callee4$","_context4","authRecover","_authRecover","_callee5","_callee5$","_context5","identityCreate","_identityCreate","_callee6","_e$response3","_callee6$","_context6","identityGet","_identityGet","_callee7","identityID","skipCache","_tokens$accessToken","_tokens$refreshToken","identity","_callee7$","_context7","whoAmI","_whoAmI","_callee8","refreshCache","_this$api$getTokens$a","_context8","_x8","identityUpdate","_identityUpdate","_callee9","_callee9$","_context9","_x9","_x10","identityMFAQRCode","_identityMFAQRCode","_callee10","password","_callee10$","_context10","Accept","_x11","_x12","identitySendConfirmEmail","_identitySendConfirmEmail","_callee11","_callee11$","_context11","_x13","authConfirmPhishingAttempts","_authConfirmPhishingAttempts","_callee12","attemptUuid","_callee12$","_context12","_x14","identityGetByCustomerEmail","_identityGetByCustomerEmail","_callee13","email","_callee13$","_context13","identityGetByHash","substring","indexOf","_x15","_identityGetByHash","_callee14","b64Hash","_callee14$","_context14","replace","_x16","SearchService","index","consultUUID","terms","search","PracticeService","practiceGetAll","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","_lockboxDataStore","lockboxUuid","lockboxOwnerUuid","previousDataUuid","options","updateMedicalStatus","lockbox_owner_uuid","data_uuid","update_medical_status","patientUuid","statusMedical","closedReasonType","closedReasonDescription","neverExpires","notifyFaxFailed","consultationUuid","consultationShortId","fax","practice_uuid","reassignmentEmail","newPractitionerUuid","sendOnlineFaxSuccessfulEmail","sendRefillFaxSucceededEmail","sendResumeConsultEmail","VaultService","lockboxCreate","_lockboxCreate","lockboxMetadata","lockboxMetadataAdd","_lockboxMetadataAdd","lockboxSecretGet","_lockboxSecretGet","lockboxGrant","_lockboxGrant","grantsGet","_grantsGet","lockboxDataGet","_lockboxDataGet","dataUuid","stream","_x17","lockboxManifestGet","_lockboxManifestGet","filter","_callee8$","_x18","_x19","_x20","lockboxMetadataGet","_lockboxMetadataGet","fields","groupby","_x21","_x22","_x23","_x24","_x25","vaultIndexPut","_vaultIndexPut","entries","indexOwnerUuid","index_owner_uuid","_x26","_x27","vaultIndexSnapshotPut","_vaultIndexSnapshotPut","entry","_x28","vaultIndexGet","_vaultIndexGet","indexKeys","identifiers","timestamp","index_keys","_x29","_x30","_x31","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,kBAAkBA,CAACC,KAAa;EAC5C,OAAOC,QAAM,CAACC,IAAI,CAACC,cAAM,EAAE,CAACC,MAAM,CAACJ,KAAK,CAAC,CAACK,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAACC,QAAQ,CAAC,QAAQ,CAAC;AACtF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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