import { BaseResource } from './BaseResource.js'; import type { RequestOptions } from '../types/common.js'; import type { RxAffiliateTerms, RxBrandConfigResult, RxCaseDetail, RxConfigureBrandClinicalInput, RxConfigureBrandClinicalResult, RxConfirmSetupFeePaidInput, RxConfirmSetupFeeResult, RxIntegrationStatus, RxListCasesParams, RxListCasesResult, RxListNetworksResult, RxProductOffering, RxRequestActivationInput, RxRequestRefillInput, RxRequestRefillResult, RxActivationResult, RxSetAffiliateTermsInput, RxSetProductOfferingInput, RxSubmitCaseInput, RxSubmitCaseResult } from '../types/rx.js'; /** * Tagada Rx — telehealth/clinical case integration. * * Tagada Rx is an opt-in, paid add-on (setup fee) that lets a brand * connect a clinical network (MDI today; Wheel/SteadyMD later) and * submit Rx cases from the storefront after payment. The integration * must be activated and the setup fee paid before this resource * accepts case submissions. * * @example Activate the integration for a store * ```ts * await tagada.rx.requestActivation({ * storeId: 'store_xxx', * clinicalNetworkSlug: 'mdi', * operatingMode: 'affiliate', * }); * // …merchant pays the setup-fee invoice (out-of-band)… * await tagada.rx.confirmSetupFeePaid({ storeId: 'store_xxx' }); * await tagada.rx.configureBrandClinical({ * storeId: 'store_xxx', * credentials: { * clientId: '…', * clientSecret: '…', * webhookSecret: '…', * externalEnvironmentId: '', * }, * }); * ``` * * @example Submit a case after order payment * ```ts * const result = await tagada.rx.cases.submit({ * orderId: 'order_xxx', * productId: 'prod_xxx', * patient: { … }, * intakeAnswers: [{ questionId: 'allergies', value: 'none' }], * }); * console.log(result.rxCaseId, result.externalCaseId); * ``` */ export declare class RxCases extends BaseResource { /** List clinical cases for the current account. */ list(params?: RxListCasesParams, opts?: RequestOptions): Promise; /** Retrieve a single case plus its full event timeline. */ retrieve(caseId: string, opts?: RequestOptions): Promise; /** Submit a fresh case after order payment. */ submit(input: RxSubmitCaseInput, opts?: RequestOptions): Promise; /** Request a refill on an existing case (ship-day rebill). */ requestRefill(input: RxRequestRefillInput, opts?: RequestOptions): Promise; } export declare class Rx extends BaseResource { readonly cases: RxCases; constructor(client: ConstructorParameters[0]); /** Get the current Rx integration state for a store. */ integrationStatus(storeId: string, opts?: RequestOptions): Promise; /** * Activate the Tagada Rx integration for a store. Creates the * `integrations(provider='tagada_rx', enabled=false)` row plus a * draft `rx_brand_clinical_config`. The merchant must then pay the * setup-fee invoice and call `confirmSetupFeePaid`. */ requestActivation(input: RxRequestActivationInput, opts?: RequestOptions): Promise; /** * Mark the setup fee as paid → integration enabled=true. In * production this is invoked by the billing layer after the * payment succeeds; exposed here for admin / sandbox cases. */ confirmSetupFeePaid(input: RxConfirmSetupFeePaidInput, opts?: RequestOptions): Promise; /** * Wire the merchant's clinical network credentials and (optionally) * activate the brand config so cases can flow. */ configureBrandClinical(input: RxConfigureBrandClinicalInput, opts?: RequestOptions): Promise; /** List clinical networks available to this account. */ listNetworks(opts?: RequestOptions): Promise; /** Read the brand clinical config for a store. */ getBrandConfig(storeId: string, opts?: RequestOptions): Promise; /** Set (and version) the affiliate commission terms for a store. */ setAffiliateTerms(input: RxSetAffiliateTermsInput, opts?: RequestOptions): Promise; /** Map a Tagada product to a clinical-network offering (the "this product requires Rx" signal). */ setProductOffering(input: RxSetProductOfferingInput, opts?: RequestOptions): Promise; } //# sourceMappingURL=Rx.d.ts.map