import { PaymentStatus, PracticeAccount, Uuid } from '../models'; import { Assignment, AssignmentRequest, PaymentIntentRequestMetadata, PlanType, Practice, PracticeConfigKind, PracticeConfigs, PracticeInvoice, PracticePayment, PracticePaymentIntent, PracticePlan, PracticePlanPrices, PracticeWorkflow, PracticeWorkflowWithTagSpecialty, Practitioner, PractitionerLicense, PractitionerPreference, PractitionerQuota, PractitionerRole, WorkflowType } from '../models/practice'; import { APIService } from './api'; export declare class PracticeService { private api; private baseURL; constructor(api: APIService, baseURL: string); /** * This function will only work if the service is initialized with * an M2M with the scope `practice.practices.get` * @returns an array of practices */ practiceGetAll(): Promise; /** * This function get the practice from the URL of a practice * It is the entry point of our web apps * @param practiceURL URL of the practice to search * @param hydratePracticeConfigs (optional) if set true it the Practice field configs will be set * @param accounts (optional) if set true it the Practice field accounts will be set * @returns the found practice or undefined */ practiceGetFromURL(practiceURL: string, params?: { hydratePracticeConfigs?: boolean; accounts?: boolean; }): Promise; practiceGetFromUuid(practiceUuid: Uuid, locale?: string, withAccounts?: boolean): Promise; /** * This function retrieves all configs of a specific practice * @param practiceUuid uuid of the practice * @returns the practice configs */ practiceConfigGetFromPracticeUuid(practiceUuid: Uuid): Promise; /** * This function retrieves a specific config of a practice * @param practiceUuid uuid of the practice * @param kind of the config * @returns the practice config */ practiceConfigGetByKindForPracticeUuid(practiceUuid: Uuid, kind: PracticeConfigKind): Promise; /** * This function creates a config for a specific practice * @param practiceUuid uuid of the practice * @param config the config to add to the practice * @returns the created practice config */ practiceConfigCreateForPracticeUuid(practiceUuid: Uuid, config: PracticeConfigs): Promise; /** * This function updates a specific config of a practice * @param practiceUuid uuid of the practice * @param config the config to update * @returns the practice config */ practiceConfigUpdate(config: PracticeConfigs): Promise; practiceGetAccounts(practiceUuid: Uuid): Promise; practiceGetAccount(practiceUuid: Uuid, accountUuid: Uuid): Promise; /** * Get the PracticeWorkflows of a specific practice * @param practiceUuid the uuid of the practice * @param kind (optional) the kind of WorkflowType to filter in * @returns a list of PracticeWorkflow */ practiceGetWorkflows(practiceUuid: Uuid, kind?: WorkflowType): Promise; practiceGetWorkflow(practiceUuid: Uuid, workflowType: WorkflowType): Promise; practiceGetPlans(practiceUuid: Uuid, planType?: PlanType): Promise; practiceGetPlan(practiceUuid: Uuid, planId: number): Promise; practiceGetPlanPrices(practiceUuid: Uuid, planId: number): Promise; practiceGetPayments(practiceUuid: Uuid, statusPayment?: PaymentStatus, withConsultUUIDNULL?: boolean, perPage?: number, indexPage?: number): Promise; practiceGetPayment(practiceUuid: Uuid, idStripeInvoiceOrPaymentIntent: string): Promise; practiceGetPaymentForStripePaymentIntentWithID(practiceUuid: Uuid, stripePaymentIntentId: number): Promise; practiceGetPaymentsIntents(practiceUuid: Uuid, planType?: PlanType): Promise; /** * This function return the user hased email to be use for creating payment intent * @param email the email to hash * @returns a hashed email */ getPaymentIntentHashedEmail(email: string): string; /** * Creates a PracticePaymentIntent * @param practiceUuid the uuid of the practice * @param planId the plan id to use * @param userEmail the email address of the user * @param isoLocality (optional) the desired locality * @param url_subdomain (optional) the url of the sub domain (@bruno-morel need you to document that) * @param promotionCode (optional) promotion code to apply * @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.). * @returns */ practiceCreatePaymentsIntent(practiceUuid: Uuid, planId: number, userEmail: string, isoLocality?: string, url_subdomain?: string, requestMetadata?: PaymentIntentRequestMetadata): Promise; practiceGetPaymentsIntent(practiceUuid: Uuid, paymentIntentId: number): Promise; /** * Updates a PracticePaymentIntent * @param practiceUuid the practice uuid * @param idPraticePaymentIntent the id of the PracticePaymentIntent to update * @param practicePaymentIntent the desired PracticePaymentIntent * @param userEmail the email of the user * @param promotionCode (optional) promotional code to apply * @param finalize (optional) if true will finalize the PracticePaymentIntent and related Stripe.Invoice. Once, finalized you cannot modify the PracticePaymentIntent anymore. * @returns the updated PracticePaymentIntent */ practiceUpdatePaymentsIntent(practiceUuid: string, idPraticePaymentIntent: number, practicePaymentIntent: PracticePaymentIntent, userEmail: string, promotionCode?: string, finalize?: boolean): Promise; /** * Invoice * @param practiceUuid UUID of the practice to get the invoice from * @param invoiceId ID of the invoice in stripe */ getInvoice(practiceUuid: Uuid, invoiceId: string): Promise; practiceGetPractitioners(practiceUuid: Uuid): Promise; practiceUpdatePractitioner(practiceUuid: Uuid, practitionerUuid: Uuid, requestBody: Practitioner): Promise; practiceGetPractitioner(practiceUuid: Uuid, practitionerUuid: Uuid): Promise; practiceGetPractitionerLicenses(practiceUuid: Uuid, practitionerUuid: Uuid): Promise; practiceCreatePractitionerLicense(practiceUuid: Uuid, practitionerUuid: Uuid, requestBody: PractitionerLicense): Promise; practiceUpdatePractitionerLicense(practiceUuid: Uuid, practitionerUuid: Uuid, licenseId: number, requestBody: PractitionerLicense): Promise; practiceGetPractitionerLicense(practiceUuid: Uuid, practitionerUuid: Uuid, licenseId: number): Promise; practiceGetPractitionerPreferences(practiceUuid: Uuid, practitionerUuid: Uuid): Promise; practiceCreatePractitionerPreference(practiceUuid: Uuid, practitionerUuid: Uuid, requestBody: PractitionerPreference): Promise; practiceUpdatePractitionerPreference(practiceUuid: Uuid, practitionerUuid: Uuid, preferenceId: number, requestBody: PractitionerPreference): Promise; practiceGetPractitionerPreference(practiceUuid: Uuid, practitionerUuid: Uuid, preferenceId: number): Promise; practiceGetPractitionerRoles(practiceUuid: Uuid, practitionerUuid: Uuid): Promise; practiceCreatePractitionerRole(practiceUuid: Uuid, practitionerUuid: Uuid, requestBody: PractitionerRole): Promise; practiceDeletePractitionerRoles(practiceUuid: Uuid, practitionerUuid: Uuid): Promise; practiceUpdatePractitionerRole(practiceUuid: Uuid, practitionerUuid: Uuid, roleId: number, requestBody: PractitionerRole): Promise; practiceGetPractitionerRole(practiceUuid: Uuid, practitionerUuid: Uuid, roleId: number): Promise; practiceDeletePractitionerRole(practiceUuid: Uuid, practitionerUuid: Uuid, roleId: number): Promise; /** * This function returns the practitioner's signature as a Blob * @param practiceUuid the practice uuid of the practitioner * @param practitionerUuid the practitioner uuid * @returns a blob representing the signature */ practiceGetPractitionerSignature(practiceUuid: Uuid, practitionerUuid: Uuid): Promise; practiceGetAssignments(practiceUuid: Uuid): Promise; practiceCreateAssignment(practiceUuid: Uuid, requestBody: AssignmentRequest): Promise; practiceUpdateAssignment(practiceUuid: Uuid, assignmentId: number, requestBody: Assignment): Promise; practiceGetAssignment(practiceUuid: Uuid, assignmentId: number): Promise; practiceGetQuotas(practiceUuid: Uuid): Promise; practiceGetQuota(practiceUuid: Uuid, quotaId: number): Promise; }