@medipass/web-sdk 13.0.6 → 13.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +4 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/resources/sales.d.ts +18 -0
- package/dist/resources/sales.js +38 -0
- package/dist/resources/sales.js.map +1 -0
- package/dist/resources/transactions.d.ts +1 -1
- package/dist/resources/transactions.js +1 -1
- package/dist/resources/transactions.js.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/sales.d.ts +41 -0
- package/dist/types/sales.js +0 -0
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ import { Account, CreateOrganisationSupportAccountBody } from "./types/account.j
|
|
|
33
33
|
import { TerminalPin } from "./types/terminal-pin.js";
|
|
34
34
|
import { SettlementSummariesByPeriodItem, SettlementSummariesByPeriodQuery, SettlementSummariesByPeriodResponse, SettlementSummariesItem, SettlementSummariesQuery, SettlementSummariesResponse, SettlementSummaryResponse } from "./types/settlement-summaries.js";
|
|
35
35
|
import { GetSettlementsItem, GetSettlementsQuery, GetSettlementsResponse, InitiateBusinessSettlementExportRequestBody } from "./types/settlements.js";
|
|
36
|
+
import { InitiateBrowserPaymentBody, InitiateBrowserPaymentResponse, PayPalPaymentBody, PayPalPaymentToken, PayPalSalesOptions, SalesOptionsResponse } from "./types/sales.js";
|
|
36
37
|
import { ErrorResponse, MedipassRequestOpts, PaginatedQuery, PaginatedResponse, PaginationMeta, SetupOpts } from "./types/index.js";
|
|
37
38
|
import { abr_d_exports } from "./resources/abr.js";
|
|
38
39
|
import { aged_care_d_exports } from "./resources/aged-care.js";
|
|
@@ -101,6 +102,7 @@ import { risk_d_exports } from "./resources/risk.js";
|
|
|
101
102
|
import { rnas_d_exports } from "./resources/rnas.js";
|
|
102
103
|
import { roles_d_exports } from "./resources/roles.js";
|
|
103
104
|
import { s3_files_d_exports } from "./resources/s3-files.js";
|
|
105
|
+
import { sales_d_exports } from "./resources/sales.js";
|
|
104
106
|
import { self_checkout_sessions_d_exports } from "./resources/self-checkout-sessions.js";
|
|
105
107
|
import { services_d_exports } from "./resources/services.js";
|
|
106
108
|
import { settlements_d_exports } from "./resources/settlements.js";
|
|
@@ -214,6 +216,7 @@ type SdkClientResourceModules = {
|
|
|
214
216
|
rnas: MutableModule<typeof rnas_d_exports>;
|
|
215
217
|
roles: MutableModule<typeof roles_d_exports>;
|
|
216
218
|
s3Files: MutableModule<typeof s3_files_d_exports>;
|
|
219
|
+
sales: MutableModule<typeof sales_d_exports>;
|
|
217
220
|
selfCheckoutSessions: MutableModule<typeof self_checkout_sessions_d_exports>;
|
|
218
221
|
services: MutableModule<typeof services_d_exports>;
|
|
219
222
|
settlements: MutableModule<typeof settlements_d_exports>;
|
|
@@ -285,5 +288,5 @@ type SdkClient = SdkClientResourceModules & {
|
|
|
285
288
|
};
|
|
286
289
|
declare const sdkClient: SdkClient;
|
|
287
290
|
//#endregion
|
|
288
|
-
export { API_VER, API_VERSIONS, APP_ID, Abr, Account, ActivateHealthPointDigitalClaimingBody, Application, ApplyForBusinessFormRequestBody, BeneficialOwner, BlacklistedBankAccount, Business, BusinessContactInformation, BusinessDocumentResponse, BusinessDocumentsQuery, BusinessDocumentsResponse, BusinessEmailLog, BusinessEmailLogQuery, BusinessKycPinResponse, CONTENT_TYPE, CeaseHealthFundDocumentBody, ConvertInvoicesRequestBody, ConvertInvoicesResponse, CreateBusinessSubscriptionBody, CreateHealthFundFormRequestBody, CreateNoteRequestBody, CreateOrganisationSupportAccountBody, DEFAULT_ENV, DEFAULT_REGION, DEFAULT_VERSION, DeclineHealthFundDocumentBody, Device, ErrorResponse, File, FilterGroup, FilterOption, Funder, FunderValue, GetBusinessMessageMappingsQuery, GetBusinessMessageMappingsResponse, GetBusinessProductsQuery, GetBusinessSubscriptionsQuery, GetHealthFundFormUploadUrlQuery, GetHealthFundFormsQuery, GetKeyAccountsQuery, GetKeyAccountsResponse, GetProfessionalCategoriesQuery, GetSettlementsItem, GetSettlementsQuery, GetSettlementsResponse, GetSpecialtiesQuery, HEADER__API_VER, HEADER__APP_ID, HEADER__APP_VERSION, HEADER__DEVICE_ID, HEADER__INTERCOM_HASH, HEADER__SDK_VERSION, HEADER__TOKEN, HealthFundDocumentResponse, HealthFundDocumentsQuery, HealthFundDocumentsResponse, HealthPointApplicationStatus, HealthPointAssociationAttributes, HealthPointAttributes, HealthPointRegistrationApplicationResponse, HealthPointSettlementAttributes, HicapsProviderSetAttributes, HttpClient, HttpClientConfig, HttpClientError, HttpClientResponse, InitiateBusinessSettlementExportRequestBody, KeyAccount, Kyc, MedipassRequestOpts, MfaUser, Organisation, PaginatedQuery, PaginatedResponse, PaginationMeta, ParkHealthFundDocumentBody, ParsedProviderRegistration, ParsedProviderSetItem, Practice, ProductResponse, ProductsResponse, ProfessionalCategory, ProviderNumberType, ProviderRegistration, ProviderRegistrationType, ProviderSetItem, ProviderSetItemRequestBody, S3FileExportStatus, SettlementSummariesByPeriodItem, SettlementSummariesByPeriodQuery, SettlementSummariesByPeriodResponse, SettlementSummariesItem, SettlementSummariesQuery, SettlementSummariesResponse, SettlementSummaryResponse, SetupOpts, ShortBusinessResponse, ShortPracticeResponse, Specialty, StaffMember, SubscriptionResponse, SubscriptionsResponse, SupportEmail, TerminalPin, Transaction, UpdateBusinessBody, UpdateBusinessKycBody, UpdateBusinessSubscriptionBody, UpdateHealthFundFormRequestBody, UpdateHealthPointRegistrationApplicationBody, UpdateStaffMemberEmailResponse, VerificationDocument, VirusScan, _isTokenExpired, abr_d_exports as abr, accounts_d_exports as accounts, actions_d_exports as actions, api_keys_d_exports as apiKeys, applePay_d_exports as applePay, application_d_exports as applicationUtils, applications_d_exports as applications, attachments_d_exports as attachments, auth_d_exports as auth, aws_d_exports as aws, blacklist_d_exports as blacklist, bulk_submits_d_exports as bulkSubmits, bulk_uploads_d_exports as bulkUploads, business_profiles_d_exports as businessProfiles, businesses_d_exports as businesses, claim_items_d_exports as claimItems, createHttpClient, sdkClient as default, sdkClient, devices_d_exports as devices, doc_accounts_d_exports as docAccounts, documents_d_exports as documents, business_email_log_d_exports as emailLogs, emails_d_exports as emails, filter_options_d_exports as filterOptions, form_application_templates_d_exports as formApplicationTemplates, form_applications_d_exports as formApplications, forms_d_exports as forms, funder_services_d_exports as funderServices, funder_settings_d_exports as funderSettings, funder_values_d_exports as funderValues, funders_d_exports as funders, futures_d_exports as futures, health_fund_accounts_d_exports as healthFundAccounts, health_fund_settings_d_exports as healthFundSettings, healthfunds_d_exports as healthfunds, icditems_d_exports as icdItems, invoice_scans_d_exports as invoiceScans, jhcs_d_exports as jhcs, key_accounts_d_exports as keyAccounts, kyc_d_exports as kyc, logs_d_exports as logs, members_d_exports as members, message_mappings_d_exports as messageMappings, minions_d_exports as minions, modalities_d_exports as modalities, notes_d_exports as notes, onboarding_applications_d_exports as onboardingApplications, onboarding_requests_d_exports as onboardingRequests, ops_d_exports as ops, organisations_d_exports as organisations, partners_d_exports as partners, patients_d_exports as patients, payments_d_exports as payments, pms_d_exports as pms, practice_profiles_d_exports as practiceProfiles, practice_types_d_exports as practiceTypes, practices_d_exports as practices, products_d_exports as products, professional_categories_d_exports as professionalCategories, professions_d_exports as professionsUtils, provider_number_types_d_exports as providerNumberTypes, provider_registration_types_d_exports as providerRegistrationTypes, provider_requests_d_exports as providerRequests, provider_types_d_exports as providerTypes, ref_sources_d_exports as refSources, risk_d_exports as risk, rnas_d_exports as rnas, roles_d_exports as roles, self_checkout_sessions_d_exports as selfCheckoutSessions, services_d_exports as services, settlements_d_exports as settlements, sign_up_d_exports as signUp, specialties_d_exports as specialties, staff_d_exports as staff, staff_profiles_d_exports as staffProfiles, staff_d_exports$1 as staffUtils, statistics_d_exports as statistics, subscriptions_d_exports as subscriptions, terminals_d_exports as terminals, transaction_export_d_exports as transactionExport, transactions_d_exports as transactions, triggers_d_exports as triggers, vendors_d_exports as vendors, verify_d_exports as verify, version_d_exports as versions, workers_d_exports as workers, workflow_exceptions_d_exports as workflowExceptions };
|
|
291
|
+
export { API_VER, API_VERSIONS, APP_ID, Abr, Account, ActivateHealthPointDigitalClaimingBody, Application, ApplyForBusinessFormRequestBody, BeneficialOwner, BlacklistedBankAccount, Business, BusinessContactInformation, BusinessDocumentResponse, BusinessDocumentsQuery, BusinessDocumentsResponse, BusinessEmailLog, BusinessEmailLogQuery, BusinessKycPinResponse, CONTENT_TYPE, CeaseHealthFundDocumentBody, ConvertInvoicesRequestBody, ConvertInvoicesResponse, CreateBusinessSubscriptionBody, CreateHealthFundFormRequestBody, CreateNoteRequestBody, CreateOrganisationSupportAccountBody, DEFAULT_ENV, DEFAULT_REGION, DEFAULT_VERSION, DeclineHealthFundDocumentBody, Device, ErrorResponse, File, FilterGroup, FilterOption, Funder, FunderValue, GetBusinessMessageMappingsQuery, GetBusinessMessageMappingsResponse, GetBusinessProductsQuery, GetBusinessSubscriptionsQuery, GetHealthFundFormUploadUrlQuery, GetHealthFundFormsQuery, GetKeyAccountsQuery, GetKeyAccountsResponse, GetProfessionalCategoriesQuery, GetSettlementsItem, GetSettlementsQuery, GetSettlementsResponse, GetSpecialtiesQuery, HEADER__API_VER, HEADER__APP_ID, HEADER__APP_VERSION, HEADER__DEVICE_ID, HEADER__INTERCOM_HASH, HEADER__SDK_VERSION, HEADER__TOKEN, HealthFundDocumentResponse, HealthFundDocumentsQuery, HealthFundDocumentsResponse, HealthPointApplicationStatus, HealthPointAssociationAttributes, HealthPointAttributes, HealthPointRegistrationApplicationResponse, HealthPointSettlementAttributes, HicapsProviderSetAttributes, HttpClient, HttpClientConfig, HttpClientError, HttpClientResponse, InitiateBrowserPaymentBody, InitiateBrowserPaymentResponse, InitiateBusinessSettlementExportRequestBody, KeyAccount, Kyc, MedipassRequestOpts, MfaUser, Organisation, PaginatedQuery, PaginatedResponse, PaginationMeta, ParkHealthFundDocumentBody, ParsedProviderRegistration, ParsedProviderSetItem, PayPalPaymentBody, PayPalPaymentToken, PayPalSalesOptions, Practice, ProductResponse, ProductsResponse, ProfessionalCategory, ProviderNumberType, ProviderRegistration, ProviderRegistrationType, ProviderSetItem, ProviderSetItemRequestBody, S3FileExportStatus, SalesOptionsResponse, SettlementSummariesByPeriodItem, SettlementSummariesByPeriodQuery, SettlementSummariesByPeriodResponse, SettlementSummariesItem, SettlementSummariesQuery, SettlementSummariesResponse, SettlementSummaryResponse, SetupOpts, ShortBusinessResponse, ShortPracticeResponse, Specialty, StaffMember, SubscriptionResponse, SubscriptionsResponse, SupportEmail, TerminalPin, Transaction, UpdateBusinessBody, UpdateBusinessKycBody, UpdateBusinessSubscriptionBody, UpdateHealthFundFormRequestBody, UpdateHealthPointRegistrationApplicationBody, UpdateStaffMemberEmailResponse, VerificationDocument, VirusScan, _isTokenExpired, abr_d_exports as abr, accounts_d_exports as accounts, actions_d_exports as actions, api_keys_d_exports as apiKeys, applePay_d_exports as applePay, application_d_exports as applicationUtils, applications_d_exports as applications, attachments_d_exports as attachments, auth_d_exports as auth, aws_d_exports as aws, blacklist_d_exports as blacklist, bulk_submits_d_exports as bulkSubmits, bulk_uploads_d_exports as bulkUploads, business_profiles_d_exports as businessProfiles, businesses_d_exports as businesses, claim_items_d_exports as claimItems, createHttpClient, sdkClient as default, sdkClient, devices_d_exports as devices, doc_accounts_d_exports as docAccounts, documents_d_exports as documents, business_email_log_d_exports as emailLogs, emails_d_exports as emails, filter_options_d_exports as filterOptions, form_application_templates_d_exports as formApplicationTemplates, form_applications_d_exports as formApplications, forms_d_exports as forms, funder_services_d_exports as funderServices, funder_settings_d_exports as funderSettings, funder_values_d_exports as funderValues, funders_d_exports as funders, futures_d_exports as futures, health_fund_accounts_d_exports as healthFundAccounts, health_fund_settings_d_exports as healthFundSettings, healthfunds_d_exports as healthfunds, icditems_d_exports as icdItems, invoice_scans_d_exports as invoiceScans, jhcs_d_exports as jhcs, key_accounts_d_exports as keyAccounts, kyc_d_exports as kyc, logs_d_exports as logs, members_d_exports as members, message_mappings_d_exports as messageMappings, minions_d_exports as minions, modalities_d_exports as modalities, notes_d_exports as notes, onboarding_applications_d_exports as onboardingApplications, onboarding_requests_d_exports as onboardingRequests, ops_d_exports as ops, organisations_d_exports as organisations, partners_d_exports as partners, patients_d_exports as patients, payments_d_exports as payments, pms_d_exports as pms, practice_profiles_d_exports as practiceProfiles, practice_types_d_exports as practiceTypes, practices_d_exports as practices, products_d_exports as products, professional_categories_d_exports as professionalCategories, professions_d_exports as professionsUtils, provider_number_types_d_exports as providerNumberTypes, provider_registration_types_d_exports as providerRegistrationTypes, provider_requests_d_exports as providerRequests, provider_types_d_exports as providerTypes, ref_sources_d_exports as refSources, risk_d_exports as risk, rnas_d_exports as rnas, roles_d_exports as roles, sales_d_exports as sales, self_checkout_sessions_d_exports as selfCheckoutSessions, services_d_exports as services, settlements_d_exports as settlements, sign_up_d_exports as signUp, specialties_d_exports as specialties, staff_d_exports as staff, staff_profiles_d_exports as staffProfiles, staff_d_exports$1 as staffUtils, statistics_d_exports as statistics, subscriptions_d_exports as subscriptions, terminals_d_exports as terminals, transaction_export_d_exports as transactionExport, transactions_d_exports as transactions, triggers_d_exports as triggers, vendors_d_exports as vendors, verify_d_exports as verify, version_d_exports as versions, workers_d_exports as workers, workflow_exceptions_d_exports as workflowExceptions };
|
|
289
292
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -69,6 +69,7 @@ import { HealthPointApplicationStatus } from "./types/documents.js";
|
|
|
69
69
|
import { FilterGroup } from "./types/filter-option.js";
|
|
70
70
|
import { roles_exports } from "./resources/roles.js";
|
|
71
71
|
import { s3_files_exports } from "./resources/s3-files.js";
|
|
72
|
+
import { sales_exports } from "./resources/sales.js";
|
|
72
73
|
import { self_checkout_sessions_exports } from "./resources/self-checkout-sessions.js";
|
|
73
74
|
import { services_exports } from "./resources/services.js";
|
|
74
75
|
import { settlements_exports } from "./resources/settlements.js";
|
|
@@ -224,6 +225,7 @@ const sdkClient = {
|
|
|
224
225
|
rnas: { ...rnas_exports },
|
|
225
226
|
roles: { ...roles_exports },
|
|
226
227
|
s3Files: { ...s3_files_exports },
|
|
228
|
+
sales: { ...sales_exports },
|
|
227
229
|
selfCheckoutSessions: { ...self_checkout_sessions_exports },
|
|
228
230
|
settlements: { ...settlements_exports },
|
|
229
231
|
services: { ...services_exports },
|
|
@@ -378,5 +380,5 @@ const sdkClient = {
|
|
|
378
380
|
var src_default = sdkClient;
|
|
379
381
|
|
|
380
382
|
//#endregion
|
|
381
|
-
export { API_VER, API_VERSIONS, APP_ID, CONTENT_TYPE, DEFAULT_ENV, DEFAULT_REGION, DEFAULT_VERSION, FilterGroup, HEADER__API_VER, HEADER__APP_ID, HEADER__APP_VERSION, HEADER__DEVICE_ID, HEADER__INTERCOM_HASH, HEADER__SDK_VERSION, HEADER__TOKEN, HealthPointApplicationStatus, _isTokenExpired, abr_exports as abr, accounts_exports as accounts, actions_exports as actions, api_keys_exports as apiKeys, applePay_exports as applePay, application_exports as applicationUtils, applications_exports as applications, attachments_exports as attachments, auth_exports as auth, aws_exports as aws, blacklist_exports as blacklist, bulk_submits_exports as bulkSubmits, bulk_uploads_exports as bulkUploads, business_profiles_exports as businessProfiles, businesses_exports as businesses, claim_items_exports as claimItems, createHttpClient, src_default as default, devices_exports as devices, doc_accounts_exports as docAccounts, documents_exports as documents, business_email_log_exports as emailLogs, emails_exports as emails, filter_options_exports as filterOptions, form_application_templates_exports as formApplicationTemplates, form_applications_exports as formApplications, forms_exports as forms, funder_services_exports as funderServices, funder_settings_exports as funderSettings, funder_values_exports as funderValues, funders_exports as funders, futures_exports as futures, health_fund_accounts_exports as healthFundAccounts, health_fund_settings_exports as healthFundSettings, healthfunds_exports as healthfunds, icditems_exports as icdItems, invoice_scans_exports as invoiceScans, jhcs_exports as jhcs, key_accounts_exports as keyAccounts, kyc_exports as kyc, logs_exports as logs, members_exports as members, message_mappings_exports as messageMappings, minions_exports as minions, modalities_exports as modalities, notes_exports as notes, onboarding_applications_exports as onboardingApplications, onboarding_requests_exports as onboardingRequests, ops_exports as ops, organisations_exports as organisations, partners_exports as partners, patients_exports as patients, payments_exports as payments, pms_exports as pms, practice_profiles_exports as practiceProfiles, practice_types_exports as practiceTypes, practices_exports as practices, products_exports as products, professional_categories_exports as professionalCategories, professions_exports as professionsUtils, provider_number_types_exports as providerNumberTypes, provider_registration_types_exports as providerRegistrationTypes, provider_requests_exports as providerRequests, provider_types_exports as providerTypes, ref_sources_exports as refSources, risk_exports as risk, rnas_exports as rnas, roles_exports as roles, sdkClient, self_checkout_sessions_exports as selfCheckoutSessions, services_exports as services, settlements_exports as settlements, sign_up_exports as signUp, specialties_exports as specialties, staff_exports as staff, staff_profiles_exports as staffProfiles, staff_exports$1 as staffUtils, statistics_exports as statistics, subscriptions_exports as subscriptions, terminals_exports as terminals, transaction_export_exports as transactionExport, transactions_exports as transactions, triggers_exports as triggers, vendors_exports as vendors, verify_exports as verify, version_exports as versions, workers_exports as workers, workflow_exceptions_exports as workflowExceptions };
|
|
383
|
+
export { API_VER, API_VERSIONS, APP_ID, CONTENT_TYPE, DEFAULT_ENV, DEFAULT_REGION, DEFAULT_VERSION, FilterGroup, HEADER__API_VER, HEADER__APP_ID, HEADER__APP_VERSION, HEADER__DEVICE_ID, HEADER__INTERCOM_HASH, HEADER__SDK_VERSION, HEADER__TOKEN, HealthPointApplicationStatus, _isTokenExpired, abr_exports as abr, accounts_exports as accounts, actions_exports as actions, api_keys_exports as apiKeys, applePay_exports as applePay, application_exports as applicationUtils, applications_exports as applications, attachments_exports as attachments, auth_exports as auth, aws_exports as aws, blacklist_exports as blacklist, bulk_submits_exports as bulkSubmits, bulk_uploads_exports as bulkUploads, business_profiles_exports as businessProfiles, businesses_exports as businesses, claim_items_exports as claimItems, createHttpClient, src_default as default, devices_exports as devices, doc_accounts_exports as docAccounts, documents_exports as documents, business_email_log_exports as emailLogs, emails_exports as emails, filter_options_exports as filterOptions, form_application_templates_exports as formApplicationTemplates, form_applications_exports as formApplications, forms_exports as forms, funder_services_exports as funderServices, funder_settings_exports as funderSettings, funder_values_exports as funderValues, funders_exports as funders, futures_exports as futures, health_fund_accounts_exports as healthFundAccounts, health_fund_settings_exports as healthFundSettings, healthfunds_exports as healthfunds, icditems_exports as icdItems, invoice_scans_exports as invoiceScans, jhcs_exports as jhcs, key_accounts_exports as keyAccounts, kyc_exports as kyc, logs_exports as logs, members_exports as members, message_mappings_exports as messageMappings, minions_exports as minions, modalities_exports as modalities, notes_exports as notes, onboarding_applications_exports as onboardingApplications, onboarding_requests_exports as onboardingRequests, ops_exports as ops, organisations_exports as organisations, partners_exports as partners, patients_exports as patients, payments_exports as payments, pms_exports as pms, practice_profiles_exports as practiceProfiles, practice_types_exports as practiceTypes, practices_exports as practices, products_exports as products, professional_categories_exports as professionalCategories, professions_exports as professionsUtils, provider_number_types_exports as providerNumberTypes, provider_registration_types_exports as providerRegistrationTypes, provider_requests_exports as providerRequests, provider_types_exports as providerTypes, ref_sources_exports as refSources, risk_exports as risk, rnas_exports as rnas, roles_exports as roles, sales_exports as sales, sdkClient, self_checkout_sessions_exports as selfCheckoutSessions, services_exports as services, settlements_exports as settlements, sign_up_exports as signUp, specialties_exports as specialties, staff_exports as staff, staff_profiles_exports as staffProfiles, staff_exports$1 as staffUtils, statistics_exports as statistics, subscriptions_exports as subscriptions, terminals_exports as terminals, transaction_export_exports as transactionExport, transactions_exports as transactions, triggers_exports as triggers, vendors_exports as vendors, verify_exports as verify, version_exports as versions, workers_exports as workers, workflow_exceptions_exports as workflowExceptions };
|
|
382
384
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["sdkClient: SdkClient","storage","abr","agedCare","applePay","accounts","actions","apiKeys","attachments","auth","applications","blacklist","bulkUploads","bulkSubmits","businessProfiles","businesses","claimItems","devices","docAccounts","documents","emailLogs","emails","filterOptions","formApplicationTemplates","formApplications","forms","funders","funderServices","funderSettings","funderValues","futures","healthFundAccounts","healthFundSettings","healthfunds","icare","icdItems","invoiceScans","jhcs","keyAccounts","kyc","logs","members","messageMappings","minions","modalities","notes","onboardingApplications","onboardingRequests","ops","organisations","partners","patients","payments","pms","practiceProfiles","practices","practiceTypes","products","professionalCategories","providerRequests","providerRegistrationTypes","providerNumberTypes","providerTypes","qbe","refSources","risk","rnas","roles","s3Files","selfCheckoutSessions","settlements","services","signUp","specialties","staffProfiles","staff","statistics","subscriptions","terminals","transactionExport","transactionReports","transactions","triggers","vendors","verify","workflowExceptions","workers","aws","versions","professionsUtils","staffUtils","applicationUtils","requestHeaders: Record<string, string>","devices.getDeviceId","baseUrls"],"sources":["../src/index.ts"],"sourcesContent":["import type { HttpClient, HttpClientConfig, HttpClientResponse } from './utils/http-client';\nimport { createHttpClient } from './utils/http-client';\nimport type { JwtPayload } from 'jwt-decode';\nimport { jwtDecode } from 'jwt-decode';\nimport _forOwn from 'lodash/forOwn.js';\nimport _get from 'lodash/get.js';\nimport type { SetupOpts } from './types';\n\nimport * as abr from './resources/abr';\nimport * as agedCare from './resources/aged-care';\nimport * as applePay from './resources/applePay';\nimport * as accounts from './resources/accounts';\nimport * as actions from './resources/actions';\nimport * as apiKeys from './resources/api-keys';\nimport * as attachments from './resources/attachments';\nimport * as auth from './resources/auth';\nimport * as applications from './resources/applications';\nimport * as blacklist from './resources/blacklist';\nimport * as bulkUploads from './resources/bulk-uploads';\nimport * as bulkSubmits from './resources/bulk-submits';\nimport * as businessProfiles from './resources/business-profiles';\nimport * as businesses from './resources/businesses';\nimport * as claimItems from './resources/claim-items';\nimport * as devices from './resources/devices';\nimport * as docAccounts from './resources/doc-accounts';\nimport * as documents from './resources/documents';\nimport * as emailLogs from './resources/business-email-log';\nimport * as emails from './resources/emails';\nimport * as filterOptions from './resources/filter-options';\nimport * as formApplicationTemplates from './resources/form-application-templates';\nimport * as formApplications from './resources/form-applications';\nimport * as forms from './resources/forms';\nimport * as funders from './resources/funders';\nimport * as funderServices from './resources/funder-services';\nimport * as funderSettings from './resources/funder-settings';\nimport * as funderValues from './resources/funder-values';\nimport * as futures from './resources/futures';\nimport * as healthFundAccounts from './resources/health-fund-accounts';\nimport * as healthFundSettings from './resources/health-fund-settings';\nimport * as healthfunds from './resources/healthfunds';\nimport * as icare from './resources/icare';\nimport * as icdItems from './resources/icditems';\nimport * as invoiceScans from './resources/invoice-scans';\nimport * as jhcs from './resources/jhcs';\nimport * as keyAccounts from './resources/key-accounts';\nimport * as kyc from './resources/kyc';\nimport * as logs from './resources/logs';\nimport * as members from './resources/members';\nimport * as messageMappings from './resources/message-mappings';\nimport * as minions from './resources/minions';\nimport * as modalities from './resources/modalities';\nimport * as notes from './resources/notes';\nimport * as onboardingApplications from './resources/onboarding-applications';\nimport * as onboardingRequests from './resources/onboarding-requests';\nimport * as ops from './resources/ops';\nimport * as organisations from './resources/organisations';\nimport * as partners from './resources/partners';\nimport * as patients from './resources/patients';\nimport * as payments from './resources/payments';\nimport * as pms from './resources/pms';\nimport * as practiceProfiles from './resources/practice-profiles';\nimport * as practices from './resources/practices';\nimport * as practiceTypes from './resources/practice-types';\nimport * as products from './resources/products';\nimport * as professionalCategories from './resources/professional-categories';\nimport * as providerRequests from './resources/provider-requests';\nimport * as providerRegistrationTypes from './resources/provider-registration-types';\nimport * as providerNumberTypes from './resources/provider-number-types';\nimport * as providerTypes from './resources/provider-types';\nimport * as qbe from './resources/qbe';\nimport * as refSources from './resources/ref-sources';\nimport * as risk from './resources/risk';\nimport * as rnas from './resources/rnas';\nimport * as roles from './resources/roles';\nimport * as s3Files from './resources/s3-files';\nimport * as selfCheckoutSessions from './resources/self-checkout-sessions';\nimport * as services from './resources/services';\nimport * as settlements from './resources/settlements';\nimport * as signUp from './resources/sign-up';\nimport * as specialties from './resources/specialties';\nimport * as staffProfiles from './resources/staff-profiles';\nimport * as staff from './resources/staff';\nimport * as statistics from './resources/statistics';\nimport * as subscriptions from './resources/subscriptions';\nimport * as terminals from './resources/terminals';\nimport * as transactionExport from './resources/transaction-export';\nimport * as transactionReports from './resources/transaction-reports';\nimport * as transactions from './resources/transactions';\nimport * as triggers from './resources/triggers';\nimport * as vendors from './resources/vendors';\nimport * as verify from './resources/verify';\nimport * as workers from './resources/workers';\nimport * as workflowExceptions from './resources/workflow-exceptions';\nimport * as aws from './services/aws';\nimport storage from './services/storage';\nimport * as versions from './services/version';\nimport * as applicationUtils from './utils/application';\nimport baseUrls from './utils/base-urls';\nimport * as professionsUtils from './utils/professions';\nimport * as staffUtils from './utils/staff';\n\ninterface MedipassJwtPayload extends JwtPayload {\n imp?: boolean;\n}\n\nexport const APP_ID = 'web-application';\nexport const API_VER = '0.82.0';\nexport const API_VERSIONS = {\n core: 'v3',\n risk: 'v1'\n};\nexport const CONTENT_TYPE = 'application/json';\nexport const DEFAULT_ENV = 'prod';\nexport const DEFAULT_REGION = 'au';\nexport const DEFAULT_VERSION = 'v1';\nexport const HEADER__APP_ID = 'x-appid';\nexport const HEADER__APP_VERSION = 'x-appver';\nexport const HEADER__API_VER = 'x-apiver';\nexport const HEADER__DEVICE_ID = 'x-deviceid';\nexport const HEADER__INTERCOM_HASH = 'x-intercom-hash';\nexport const HEADER__SDK_VERSION = 'x-sdkver';\nexport const HEADER__TOKEN = 'x-token';\n\nexport const _isTokenExpired = (token: string) => {\n try {\n const decodedToken = jwtDecode<MedipassJwtPayload>(token);\n return (decodedToken?.exp ?? 0) * 1000 < Date.now();\n } catch (err) {\n return true;\n }\n};\n\nconst _getEnvBaseUrls = (envBaseUrls: Record<string, any>, { env }: { env: string }) =>\n Object.keys(envBaseUrls).reduce((baseUrls, apiName) => ({ ...baseUrls, [apiName]: envBaseUrls[apiName][env] }), {});\n\ntype MutableModule<T extends object> = {\n -readonly [K in keyof T]: T[K];\n};\n\ntype SdkClientResourceModules = {\n abr: MutableModule<typeof abr>;\n agedCare: MutableModule<typeof agedCare>;\n applePay: MutableModule<typeof applePay>;\n accounts: MutableModule<typeof accounts>;\n actions: MutableModule<typeof actions>;\n apiKeys: MutableModule<typeof apiKeys>;\n attachments: MutableModule<typeof attachments>;\n auth: MutableModule<typeof auth>;\n applications: MutableModule<typeof applications>;\n blacklist: MutableModule<typeof blacklist>;\n bulkUploads: MutableModule<typeof bulkUploads>;\n bulkSubmits: MutableModule<typeof bulkSubmits>;\n businessProfiles: MutableModule<typeof businessProfiles>;\n businesses: MutableModule<typeof businesses>;\n claimItems: MutableModule<typeof claimItems>;\n devices: MutableModule<typeof devices>;\n docAccounts: MutableModule<typeof docAccounts>;\n documents: MutableModule<typeof documents>;\n emailLogs: MutableModule<typeof emailLogs>;\n emails: MutableModule<typeof emails>;\n filterOptions: MutableModule<typeof filterOptions>;\n formApplicationTemplates: MutableModule<typeof formApplicationTemplates>;\n formApplications: MutableModule<typeof formApplications>;\n forms: MutableModule<typeof forms>;\n funders: MutableModule<typeof funders>;\n funderServices: MutableModule<typeof funderServices>;\n funderSettings: MutableModule<typeof funderSettings>;\n funderValues: MutableModule<typeof funderValues>;\n futures: MutableModule<typeof futures>;\n healthFundAccounts: MutableModule<typeof healthFundAccounts>;\n healthFundSettings: MutableModule<typeof healthFundSettings>;\n healthfunds: MutableModule<typeof healthfunds>;\n icare: MutableModule<typeof icare>;\n icdItems: MutableModule<typeof icdItems>;\n invoiceScans: MutableModule<typeof invoiceScans>;\n jhcs: MutableModule<typeof jhcs>;\n keyAccounts: MutableModule<typeof keyAccounts>;\n kyc: MutableModule<typeof kyc>;\n logs: MutableModule<typeof logs>;\n members: MutableModule<typeof members>;\n messageMappings: MutableModule<typeof messageMappings>;\n minions: MutableModule<typeof minions>;\n modalities: MutableModule<typeof modalities>;\n notes: MutableModule<typeof notes>;\n onboardingApplications: MutableModule<typeof onboardingApplications>;\n onboardingRequests: MutableModule<typeof onboardingRequests>;\n ops: MutableModule<typeof ops>;\n organisations: MutableModule<typeof organisations>;\n partners: MutableModule<typeof partners>;\n patients: MutableModule<typeof patients>;\n payments: MutableModule<typeof payments>;\n pms: MutableModule<typeof pms>;\n practiceProfiles: MutableModule<typeof practiceProfiles>;\n practices: MutableModule<typeof practices>;\n practiceTypes: MutableModule<typeof practiceTypes>;\n products: MutableModule<typeof products>;\n professionalCategories: MutableModule<typeof professionalCategories>;\n providerRequests: MutableModule<typeof providerRequests>;\n providerRegistrationTypes: MutableModule<typeof providerRegistrationTypes>;\n providerNumberTypes: MutableModule<typeof providerNumberTypes>;\n providerTypes: MutableModule<typeof providerTypes>;\n qbe: MutableModule<typeof qbe>;\n refSources: MutableModule<typeof refSources>;\n risk: MutableModule<typeof risk>;\n rnas: MutableModule<typeof rnas>;\n roles: MutableModule<typeof roles>;\n s3Files: MutableModule<typeof s3Files>;\n selfCheckoutSessions: MutableModule<typeof selfCheckoutSessions>;\n services: MutableModule<typeof services>;\n settlements: MutableModule<typeof settlements>;\n signUp: MutableModule<typeof signUp>;\n specialties: MutableModule<typeof specialties>;\n staffProfiles: MutableModule<typeof staffProfiles>;\n staff: MutableModule<typeof staff>;\n statistics: MutableModule<typeof statistics>;\n subscriptions: MutableModule<typeof subscriptions>;\n terminals: MutableModule<typeof terminals>;\n transactionExport: MutableModule<typeof transactionExport>;\n transactionReports: MutableModule<typeof transactionReports>;\n transactions: MutableModule<typeof transactions>;\n triggers: MutableModule<typeof triggers>;\n vendors: MutableModule<typeof vendors>;\n verify: MutableModule<typeof verify>;\n workers: MutableModule<typeof workers>;\n workflowExceptions: MutableModule<typeof workflowExceptions>;\n};\n\ntype SdkClient = SdkClientResourceModules & {\n account: any;\n accountId: any;\n apiVersions: Record<string, string>;\n appId: string;\n appVersion: any;\n apiVer: string;\n httpClient: HttpClient;\n readonly axios: HttpClient;\n baseUrls: Record<string, string> | undefined;\n defaultVersion: string;\n device: any;\n env: string;\n hasInit: boolean;\n intercomHash: any;\n isSuperAdmin: any;\n isReadOnlyAdmin: any;\n isAnalyticsInitialised: boolean;\n member: any;\n requestInterceptor: number | undefined;\n requestInterceptorSuccess: ((config: HttpClientConfig) => void) | undefined;\n responseInterceptor: number | undefined;\n responseInterceptorSuccess: ((response: HttpClientResponse) => void) | undefined;\n responseInterceptorFailure: ((error: any) => void) | undefined;\n sdkVersion: any;\n tokens: Record<string, any>;\n aws: MutableModule<typeof aws>;\n versions: MutableModule<typeof versions>;\n professionsUtils: MutableModule<typeof professionsUtils>;\n staffUtils: MutableModule<typeof staffUtils>;\n applicationUtils: MutableModule<typeof applicationUtils>;\n storage: typeof storage;\n setup(env?: string, opts?: SetupOpts): void;\n setConfig(opts: SetupOpts): void;\n setSDKAppVersion(version: string): void;\n hasValidSession(tokenType?: string): boolean;\n hasSessionExpired(tokenType?: string): boolean;\n setRequestInterceptor(headers: Record<string, any>): void;\n setResponseInterceptor(): void;\n clearTokens(): void;\n isImpersonating(): boolean;\n getTokenExpiry(tokenType?: string): number | undefined;\n setToken(token: string, tokenType?: string): void;\n setAccount(account: Record<string, any>): void;\n setMember(member: Record<string, any>): void;\n setRegion(region: string): void;\n stop(): void;\n removeStorage(): void;\n setIsAnalyticsInitialised(isInitialised: boolean): void;\n};\n\nconst sdkClient: SdkClient = {\n account: storage.get('account'),\n accountId: storage.get('accountId'),\n apiVersions: API_VERSIONS as Record<string, string>,\n appId: APP_ID,\n appVersion: storage.get('appVersion'),\n apiVer: API_VER,\n httpClient: createHttpClient() as HttpClient,\n // Backwards compatibility alias\n get axios() {\n return this.httpClient;\n },\n baseUrls: undefined as Record<string, string> | undefined,\n defaultVersion: DEFAULT_VERSION,\n device: storage.get('device'),\n env: DEFAULT_ENV,\n hasInit: false,\n intercomHash: storage.get('intercomHash'),\n isSuperAdmin: storage.get('isSuperAdmin'),\n isReadOnlyAdmin: storage.get('isReadOnlyAdmin'),\n isAnalyticsInitialised: false,\n member: storage.get('member'),\n requestInterceptor: undefined as number | undefined,\n requestInterceptorSuccess: undefined as ((config: HttpClientConfig) => void) | undefined,\n responseInterceptor: undefined as number | undefined,\n responseInterceptorSuccess: undefined as ((response: HttpClientResponse) => void) | undefined,\n responseInterceptorFailure: undefined as ((error: any) => void) | undefined,\n sdkVersion: storage.get('sdkVersion'),\n tokens: storage.get('tokens', {\n storeType: 'session'\n }) || {\n account: null,\n session: null\n },\n\n // Attach resource getters/setters\n abr: { ...abr },\n agedCare: { ...agedCare },\n applePay: { ...applePay },\n accounts: { ...accounts },\n actions: { ...actions },\n apiKeys: { ...apiKeys },\n attachments: { ...attachments },\n auth: { ...auth },\n applications: { ...applications },\n blacklist: { ...blacklist },\n bulkUploads: { ...bulkUploads },\n bulkSubmits: { ...bulkSubmits },\n businessProfiles: { ...businessProfiles },\n businesses: { ...businesses },\n claimItems: { ...claimItems },\n devices: { ...devices },\n docAccounts: { ...docAccounts },\n documents: { ...documents },\n emailLogs: { ...emailLogs },\n emails: { ...emails },\n filterOptions: { ...filterOptions },\n formApplicationTemplates: { ...formApplicationTemplates },\n formApplications: { ...formApplications },\n forms: { ...forms },\n funders: { ...funders },\n funderServices: { ...funderServices },\n funderSettings: { ...funderSettings },\n funderValues: { ...funderValues },\n futures: { ...futures },\n healthFundAccounts: { ...healthFundAccounts },\n healthFundSettings: { ...healthFundSettings },\n healthfunds: { ...healthfunds },\n icare: { ...icare },\n icdItems: { ...icdItems },\n invoiceScans: { ...invoiceScans },\n jhcs: { ...jhcs },\n keyAccounts: { ...keyAccounts },\n kyc: { ...kyc },\n logs: { ...logs },\n members: { ...members },\n messageMappings: { ...messageMappings },\n minions: { ...minions },\n modalities: { ...modalities },\n notes: { ...notes },\n onboardingApplications: { ...onboardingApplications },\n onboardingRequests: { ...onboardingRequests },\n ops: { ...ops },\n organisations: { ...organisations },\n partners: { ...partners },\n patients: { ...patients },\n payments: { ...payments },\n pms: { ...pms },\n practiceProfiles: { ...practiceProfiles },\n practices: { ...practices },\n practiceTypes: { ...practiceTypes },\n products: { ...products },\n professionalCategories: { ...professionalCategories },\n providerRequests: { ...providerRequests },\n providerRegistrationTypes: { ...providerRegistrationTypes },\n providerNumberTypes: { ...providerNumberTypes },\n providerTypes: { ...providerTypes },\n qbe: { ...qbe },\n refSources: { ...refSources },\n risk: { ...risk },\n rnas: { ...rnas },\n roles: { ...roles },\n s3Files: { ...s3Files },\n selfCheckoutSessions: { ...selfCheckoutSessions },\n settlements: { ...settlements },\n services: { ...services },\n signUp: { ...signUp },\n specialties: { ...specialties },\n staffProfiles: { ...staffProfiles },\n staff: { ...staff },\n statistics: { ...statistics },\n subscriptions: { ...subscriptions },\n terminals: { ...terminals },\n transactionExport: { ...transactionExport },\n transactionReports: { ...transactionReports },\n transactions: { ...transactions },\n triggers: { ...triggers },\n vendors: { ...vendors },\n verify: { ...verify },\n workflowExceptions: { ...workflowExceptions },\n workers: { ...workers },\n\n // Attach services\n aws: { ...aws },\n versions: { ...versions },\n\n // Attach utils\n professionsUtils: { ...professionsUtils },\n staffUtils: { ...staffUtils },\n applicationUtils: { ...applicationUtils },\n storage,\n\n /**\n * Setup the Tyro Health SDK\n * @param env - The environment that the SDK will point to\n * @param opts - Additional setup options\n */\n setup(env?: string, opts: SetupOpts = {}): void {\n // Setup http client instance\n this.httpClient = createHttpClient();\n\n if (this.httpClient) {\n this.httpClient.defaults.headers.post['Content-Type'] = CONTENT_TYPE;\n this.httpClient.defaults.headers.post.Accept = CONTENT_TYPE;\n }\n\n this.setConfig({ ...opts, env });\n this.hasInit = true;\n // Setup request/response interceptors\n this.setRequestInterceptor({});\n this.setResponseInterceptor();\n },\n\n setConfig(opts: SetupOpts): void {\n // Setup initial SDK properties\n this.appId = _get(opts, 'appId', this.appId);\n this.appVersion = _get(opts, 'appVersion', this.appVersion);\n this.apiVer = _get(opts, 'apiVer', this.apiVer);\n this.apiVersions = _get(opts, 'apiVersions', this.apiVersions);\n this.defaultVersion = _get(opts, 'defaultVersion', this.defaultVersion);\n this.env = _get(opts, 'env', this.env);\n this.sdkVersion = _get(opts, 'sdkVersion', this.sdkVersion);\n this.baseUrls = _get(opts, 'baseUrls');\n this.setRegion(DEFAULT_REGION);\n },\n\n setSDKAppVersion(version: string): void {\n this.sdkVersion = this.appVersion;\n this.appVersion = version;\n },\n\n /**\n * Check if the token is valid and the client is logged in\n */\n hasValidSession(tokenType: string = 'account'): boolean {\n return this.tokens[tokenType] && !_isTokenExpired(this.tokens[tokenType]);\n },\n\n /**\n * Check if the token has expired\n */\n hasSessionExpired(tokenType: string = 'account'): boolean {\n return this.tokens[tokenType] && _isTokenExpired(this.tokens[tokenType]);\n },\n\n /**\n * Set the HTTP request interceptor - will intercept every HTTP request that the Tyro Health SDK uses.\n * @param headers - Headers to be included in every request\n */\n setRequestInterceptor(headers: Record<string, any>): void {\n this.requestInterceptor = this.httpClient.interceptors.request.use(\n async config => {\n const requestHeaders: Record<string, string> = { ...config.headers };\n\n _forOwn(headers, (val, key) => {\n requestHeaders[key] = val;\n });\n\n requestHeaders[HEADER__APP_ID] = this.appId;\n requestHeaders[HEADER__APP_VERSION] = this.appVersion;\n requestHeaders[HEADER__API_VER] = this.apiVer;\n\n if (this.sdkVersion) {\n requestHeaders[HEADER__SDK_VERSION] = this.sdkVersion;\n }\n\n if (config.tokenType === 'session' && this.tokens.session) {\n requestHeaders.Authorization = this.tokens.session;\n } else if (this.tokens.account) {\n requestHeaders.Authorization = this.tokens.account;\n }\n\n if (!config.skipDeviceCheck) {\n const deviceId = await devices.getDeviceId();\n if (deviceId) {\n requestHeaders[HEADER__DEVICE_ID] = deviceId;\n }\n }\n\n if (this.requestInterceptorSuccess) {\n this.requestInterceptorSuccess(config);\n }\n\n return { ...config, headers: requestHeaders };\n },\n error => Promise.reject(error)\n );\n },\n\n /**\n * Set the HTTP response interceptor - will intercept every HTTP response that the Tyro Health SDK uses.\n */\n setResponseInterceptor(): void {\n this.responseInterceptor = this.httpClient.interceptors.response.use(\n response => {\n if (\n response.headers &&\n response.headers[HEADER__TOKEN] &&\n !_get(response, 'config.url', '').includes('/auth/impersonate')\n ) {\n const authToken = response.headers[HEADER__TOKEN];\n this.setToken(authToken);\n }\n\n if (response.headers && response.headers[HEADER__INTERCOM_HASH]) {\n this.intercomHash = response.headers[HEADER__INTERCOM_HASH];\n storage.set('intercomHash', this.intercomHash);\n }\n\n if (this.responseInterceptorSuccess) {\n this.responseInterceptorSuccess(response);\n }\n\n return response;\n },\n err => {\n if (this.responseInterceptorFailure) {\n this.responseInterceptorFailure(_get(err, 'response', err));\n }\n\n return Promise.reject(err);\n }\n );\n },\n\n clearTokens(): void {\n this.tokens = {\n account: null,\n session: null\n };\n storage.remove('tokens');\n },\n\n isImpersonating(): boolean {\n const { imp } = jwtDecode<MedipassJwtPayload>(this.tokens.account);\n return Boolean(imp);\n },\n\n getTokenExpiry(tokenType: string = 'account'): number | undefined {\n return jwtDecode<MedipassJwtPayload>(this.tokens[tokenType]).exp;\n },\n\n setToken(token: string, tokenType: string = 'account'): void {\n this.tokens[tokenType] = token;\n storage.set(\n 'tokens',\n Object.assign({}, this.tokens, {\n [tokenType]: token\n }),\n {\n storeType: 'session'\n }\n );\n },\n\n setAccount(account: Record<string, any>): void {\n storage.set('accountId', account._id);\n this.accountId = account._id;\n storage.set('account', account);\n this.account = account;\n },\n\n setMember(member: Record<string, any>): void {\n storage.set('member', member);\n this.member = member;\n },\n\n setRegion(region: string): void {\n console.log(`Current region is set to ${region}`);\n\n if (this.env) {\n this.baseUrls =\n this.baseUrls ||\n (_getEnvBaseUrls(baseUrls, {\n env: this.env\n }) as Record<string, string>);\n }\n\n storage.set('region', region);\n },\n\n /**\n * Kill the SDK - stop interceptors, clear class properties, clear local storage\n */\n stop(): void {\n if (this.requestInterceptor !== undefined) {\n this.httpClient.interceptors.request.eject(this.requestInterceptor);\n }\n if (this.responseInterceptor !== undefined) {\n this.httpClient.interceptors.response.eject(this.responseInterceptor);\n }\n this.removeStorage();\n },\n\n removeStorage(): void {\n this.clearTokens();\n this.account = null;\n this.accountId = null;\n this.intercomHash = null;\n this.isSuperAdmin = null;\n this.isReadOnlyAdmin = null;\n this.member = null;\n storage.clearAll();\n },\n\n setIsAnalyticsInitialised(isInitialised: boolean) {\n this.isAnalyticsInitialised = isInitialised;\n }\n};\n\nexport default sdkClient;\n\nexport * from './types';\n\nexport {\n // Include sdk client as named export\n sdkClient,\n abr,\n applePay,\n accounts,\n actions,\n apiKeys,\n attachments,\n auth,\n applications,\n blacklist,\n bulkUploads,\n bulkSubmits,\n businessProfiles,\n businesses,\n claimItems,\n devices,\n docAccounts,\n documents,\n emailLogs,\n emails,\n filterOptions,\n formApplicationTemplates,\n formApplications,\n forms,\n funders,\n funderServices,\n funderSettings,\n funderValues,\n futures,\n healthFundAccounts,\n healthFundSettings,\n healthfunds,\n icdItems,\n invoiceScans,\n jhcs,\n keyAccounts,\n kyc,\n logs,\n members,\n messageMappings,\n minions,\n modalities,\n notes,\n onboardingApplications,\n onboardingRequests,\n ops,\n organisations,\n partners,\n patients,\n payments,\n pms,\n practiceProfiles,\n practices,\n practiceTypes,\n products,\n professionalCategories,\n providerRequests,\n providerRegistrationTypes,\n providerNumberTypes,\n providerTypes,\n refSources,\n risk,\n rnas,\n roles,\n selfCheckoutSessions,\n services,\n settlements,\n signUp,\n specialties,\n staffProfiles,\n staff,\n statistics,\n subscriptions,\n terminals,\n transactionExport,\n transactions,\n triggers,\n vendors,\n verify,\n workers,\n workflowExceptions,\n // Attach services\n aws,\n versions,\n // Attach utils\n professionsUtils,\n staffUtils,\n applicationUtils\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyGA,MAAa,SAAS;AACtB,MAAa,UAAU;AACvB,MAAa,eAAe;CAC1B,MAAM;CACN,MAAM;CACP;AACD,MAAa,eAAe;AAC5B,MAAa,cAAc;AAC3B,MAAa,iBAAiB;AAC9B,MAAa,kBAAkB;AAC/B,MAAa,iBAAiB;AAC9B,MAAa,sBAAsB;AACnC,MAAa,kBAAkB;AAC/B,MAAa,oBAAoB;AACjC,MAAa,wBAAwB;AACrC,MAAa,sBAAsB;AACnC,MAAa,gBAAgB;AAE7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|
+
{"version":3,"file":"index.js","names":["sdkClient: SdkClient","storage","abr","agedCare","applePay","accounts","actions","apiKeys","attachments","auth","applications","blacklist","bulkUploads","bulkSubmits","businessProfiles","businesses","claimItems","devices","docAccounts","documents","emailLogs","emails","filterOptions","formApplicationTemplates","formApplications","forms","funders","funderServices","funderSettings","funderValues","futures","healthFundAccounts","healthFundSettings","healthfunds","icare","icdItems","invoiceScans","jhcs","keyAccounts","kyc","logs","members","messageMappings","minions","modalities","notes","onboardingApplications","onboardingRequests","ops","organisations","partners","patients","payments","pms","practiceProfiles","practices","practiceTypes","products","professionalCategories","providerRequests","providerRegistrationTypes","providerNumberTypes","providerTypes","qbe","refSources","risk","rnas","roles","s3Files","sales","selfCheckoutSessions","settlements","services","signUp","specialties","staffProfiles","staff","statistics","subscriptions","terminals","transactionExport","transactionReports","transactions","triggers","vendors","verify","workflowExceptions","workers","aws","versions","professionsUtils","staffUtils","applicationUtils","requestHeaders: Record<string, string>","devices.getDeviceId","baseUrls"],"sources":["../src/index.ts"],"sourcesContent":["import type { HttpClient, HttpClientConfig, HttpClientResponse } from './utils/http-client';\nimport { createHttpClient } from './utils/http-client';\nimport type { JwtPayload } from 'jwt-decode';\nimport { jwtDecode } from 'jwt-decode';\nimport _forOwn from 'lodash/forOwn.js';\nimport _get from 'lodash/get.js';\nimport type { SetupOpts } from './types';\n\nimport * as abr from './resources/abr';\nimport * as agedCare from './resources/aged-care';\nimport * as applePay from './resources/applePay';\nimport * as accounts from './resources/accounts';\nimport * as actions from './resources/actions';\nimport * as apiKeys from './resources/api-keys';\nimport * as attachments from './resources/attachments';\nimport * as auth from './resources/auth';\nimport * as applications from './resources/applications';\nimport * as blacklist from './resources/blacklist';\nimport * as bulkUploads from './resources/bulk-uploads';\nimport * as bulkSubmits from './resources/bulk-submits';\nimport * as businessProfiles from './resources/business-profiles';\nimport * as businesses from './resources/businesses';\nimport * as claimItems from './resources/claim-items';\nimport * as devices from './resources/devices';\nimport * as docAccounts from './resources/doc-accounts';\nimport * as documents from './resources/documents';\nimport * as emailLogs from './resources/business-email-log';\nimport * as emails from './resources/emails';\nimport * as filterOptions from './resources/filter-options';\nimport * as formApplicationTemplates from './resources/form-application-templates';\nimport * as formApplications from './resources/form-applications';\nimport * as forms from './resources/forms';\nimport * as funders from './resources/funders';\nimport * as funderServices from './resources/funder-services';\nimport * as funderSettings from './resources/funder-settings';\nimport * as funderValues from './resources/funder-values';\nimport * as futures from './resources/futures';\nimport * as healthFundAccounts from './resources/health-fund-accounts';\nimport * as healthFundSettings from './resources/health-fund-settings';\nimport * as healthfunds from './resources/healthfunds';\nimport * as icare from './resources/icare';\nimport * as icdItems from './resources/icditems';\nimport * as invoiceScans from './resources/invoice-scans';\nimport * as jhcs from './resources/jhcs';\nimport * as keyAccounts from './resources/key-accounts';\nimport * as kyc from './resources/kyc';\nimport * as logs from './resources/logs';\nimport * as members from './resources/members';\nimport * as messageMappings from './resources/message-mappings';\nimport * as minions from './resources/minions';\nimport * as modalities from './resources/modalities';\nimport * as notes from './resources/notes';\nimport * as onboardingApplications from './resources/onboarding-applications';\nimport * as onboardingRequests from './resources/onboarding-requests';\nimport * as ops from './resources/ops';\nimport * as organisations from './resources/organisations';\nimport * as partners from './resources/partners';\nimport * as patients from './resources/patients';\nimport * as payments from './resources/payments';\nimport * as pms from './resources/pms';\nimport * as practiceProfiles from './resources/practice-profiles';\nimport * as practices from './resources/practices';\nimport * as practiceTypes from './resources/practice-types';\nimport * as products from './resources/products';\nimport * as professionalCategories from './resources/professional-categories';\nimport * as providerRequests from './resources/provider-requests';\nimport * as providerRegistrationTypes from './resources/provider-registration-types';\nimport * as providerNumberTypes from './resources/provider-number-types';\nimport * as providerTypes from './resources/provider-types';\nimport * as qbe from './resources/qbe';\nimport * as refSources from './resources/ref-sources';\nimport * as risk from './resources/risk';\nimport * as rnas from './resources/rnas';\nimport * as roles from './resources/roles';\nimport * as s3Files from './resources/s3-files';\nimport * as sales from './resources/sales';\nimport * as selfCheckoutSessions from './resources/self-checkout-sessions';\nimport * as services from './resources/services';\nimport * as settlements from './resources/settlements';\nimport * as signUp from './resources/sign-up';\nimport * as specialties from './resources/specialties';\nimport * as staffProfiles from './resources/staff-profiles';\nimport * as staff from './resources/staff';\nimport * as statistics from './resources/statistics';\nimport * as subscriptions from './resources/subscriptions';\nimport * as terminals from './resources/terminals';\nimport * as transactionExport from './resources/transaction-export';\nimport * as transactionReports from './resources/transaction-reports';\nimport * as transactions from './resources/transactions';\nimport * as triggers from './resources/triggers';\nimport * as vendors from './resources/vendors';\nimport * as verify from './resources/verify';\nimport * as workers from './resources/workers';\nimport * as workflowExceptions from './resources/workflow-exceptions';\nimport * as aws from './services/aws';\nimport storage from './services/storage';\nimport * as versions from './services/version';\nimport * as applicationUtils from './utils/application';\nimport baseUrls from './utils/base-urls';\nimport * as professionsUtils from './utils/professions';\nimport * as staffUtils from './utils/staff';\n\ninterface MedipassJwtPayload extends JwtPayload {\n imp?: boolean;\n}\n\nexport const APP_ID = 'web-application';\nexport const API_VER = '0.82.0';\nexport const API_VERSIONS = {\n core: 'v3',\n risk: 'v1'\n};\nexport const CONTENT_TYPE = 'application/json';\nexport const DEFAULT_ENV = 'prod';\nexport const DEFAULT_REGION = 'au';\nexport const DEFAULT_VERSION = 'v1';\nexport const HEADER__APP_ID = 'x-appid';\nexport const HEADER__APP_VERSION = 'x-appver';\nexport const HEADER__API_VER = 'x-apiver';\nexport const HEADER__DEVICE_ID = 'x-deviceid';\nexport const HEADER__INTERCOM_HASH = 'x-intercom-hash';\nexport const HEADER__SDK_VERSION = 'x-sdkver';\nexport const HEADER__TOKEN = 'x-token';\n\nexport const _isTokenExpired = (token: string) => {\n try {\n const decodedToken = jwtDecode<MedipassJwtPayload>(token);\n return (decodedToken?.exp ?? 0) * 1000 < Date.now();\n } catch (err) {\n return true;\n }\n};\n\nconst _getEnvBaseUrls = (envBaseUrls: Record<string, any>, { env }: { env: string }) =>\n Object.keys(envBaseUrls).reduce((baseUrls, apiName) => ({ ...baseUrls, [apiName]: envBaseUrls[apiName][env] }), {});\n\ntype MutableModule<T extends object> = {\n -readonly [K in keyof T]: T[K];\n};\n\ntype SdkClientResourceModules = {\n abr: MutableModule<typeof abr>;\n agedCare: MutableModule<typeof agedCare>;\n applePay: MutableModule<typeof applePay>;\n accounts: MutableModule<typeof accounts>;\n actions: MutableModule<typeof actions>;\n apiKeys: MutableModule<typeof apiKeys>;\n attachments: MutableModule<typeof attachments>;\n auth: MutableModule<typeof auth>;\n applications: MutableModule<typeof applications>;\n blacklist: MutableModule<typeof blacklist>;\n bulkUploads: MutableModule<typeof bulkUploads>;\n bulkSubmits: MutableModule<typeof bulkSubmits>;\n businessProfiles: MutableModule<typeof businessProfiles>;\n businesses: MutableModule<typeof businesses>;\n claimItems: MutableModule<typeof claimItems>;\n devices: MutableModule<typeof devices>;\n docAccounts: MutableModule<typeof docAccounts>;\n documents: MutableModule<typeof documents>;\n emailLogs: MutableModule<typeof emailLogs>;\n emails: MutableModule<typeof emails>;\n filterOptions: MutableModule<typeof filterOptions>;\n formApplicationTemplates: MutableModule<typeof formApplicationTemplates>;\n formApplications: MutableModule<typeof formApplications>;\n forms: MutableModule<typeof forms>;\n funders: MutableModule<typeof funders>;\n funderServices: MutableModule<typeof funderServices>;\n funderSettings: MutableModule<typeof funderSettings>;\n funderValues: MutableModule<typeof funderValues>;\n futures: MutableModule<typeof futures>;\n healthFundAccounts: MutableModule<typeof healthFundAccounts>;\n healthFundSettings: MutableModule<typeof healthFundSettings>;\n healthfunds: MutableModule<typeof healthfunds>;\n icare: MutableModule<typeof icare>;\n icdItems: MutableModule<typeof icdItems>;\n invoiceScans: MutableModule<typeof invoiceScans>;\n jhcs: MutableModule<typeof jhcs>;\n keyAccounts: MutableModule<typeof keyAccounts>;\n kyc: MutableModule<typeof kyc>;\n logs: MutableModule<typeof logs>;\n members: MutableModule<typeof members>;\n messageMappings: MutableModule<typeof messageMappings>;\n minions: MutableModule<typeof minions>;\n modalities: MutableModule<typeof modalities>;\n notes: MutableModule<typeof notes>;\n onboardingApplications: MutableModule<typeof onboardingApplications>;\n onboardingRequests: MutableModule<typeof onboardingRequests>;\n ops: MutableModule<typeof ops>;\n organisations: MutableModule<typeof organisations>;\n partners: MutableModule<typeof partners>;\n patients: MutableModule<typeof patients>;\n payments: MutableModule<typeof payments>;\n pms: MutableModule<typeof pms>;\n practiceProfiles: MutableModule<typeof practiceProfiles>;\n practices: MutableModule<typeof practices>;\n practiceTypes: MutableModule<typeof practiceTypes>;\n products: MutableModule<typeof products>;\n professionalCategories: MutableModule<typeof professionalCategories>;\n providerRequests: MutableModule<typeof providerRequests>;\n providerRegistrationTypes: MutableModule<typeof providerRegistrationTypes>;\n providerNumberTypes: MutableModule<typeof providerNumberTypes>;\n providerTypes: MutableModule<typeof providerTypes>;\n qbe: MutableModule<typeof qbe>;\n refSources: MutableModule<typeof refSources>;\n risk: MutableModule<typeof risk>;\n rnas: MutableModule<typeof rnas>;\n roles: MutableModule<typeof roles>;\n s3Files: MutableModule<typeof s3Files>;\n sales: MutableModule<typeof sales>;\n selfCheckoutSessions: MutableModule<typeof selfCheckoutSessions>;\n services: MutableModule<typeof services>;\n settlements: MutableModule<typeof settlements>;\n signUp: MutableModule<typeof signUp>;\n specialties: MutableModule<typeof specialties>;\n staffProfiles: MutableModule<typeof staffProfiles>;\n staff: MutableModule<typeof staff>;\n statistics: MutableModule<typeof statistics>;\n subscriptions: MutableModule<typeof subscriptions>;\n terminals: MutableModule<typeof terminals>;\n transactionExport: MutableModule<typeof transactionExport>;\n transactionReports: MutableModule<typeof transactionReports>;\n transactions: MutableModule<typeof transactions>;\n triggers: MutableModule<typeof triggers>;\n vendors: MutableModule<typeof vendors>;\n verify: MutableModule<typeof verify>;\n workers: MutableModule<typeof workers>;\n workflowExceptions: MutableModule<typeof workflowExceptions>;\n};\n\ntype SdkClient = SdkClientResourceModules & {\n account: any;\n accountId: any;\n apiVersions: Record<string, string>;\n appId: string;\n appVersion: any;\n apiVer: string;\n httpClient: HttpClient;\n readonly axios: HttpClient;\n baseUrls: Record<string, string> | undefined;\n defaultVersion: string;\n device: any;\n env: string;\n hasInit: boolean;\n intercomHash: any;\n isSuperAdmin: any;\n isReadOnlyAdmin: any;\n isAnalyticsInitialised: boolean;\n member: any;\n requestInterceptor: number | undefined;\n requestInterceptorSuccess: ((config: HttpClientConfig) => void) | undefined;\n responseInterceptor: number | undefined;\n responseInterceptorSuccess: ((response: HttpClientResponse) => void) | undefined;\n responseInterceptorFailure: ((error: any) => void) | undefined;\n sdkVersion: any;\n tokens: Record<string, any>;\n aws: MutableModule<typeof aws>;\n versions: MutableModule<typeof versions>;\n professionsUtils: MutableModule<typeof professionsUtils>;\n staffUtils: MutableModule<typeof staffUtils>;\n applicationUtils: MutableModule<typeof applicationUtils>;\n storage: typeof storage;\n setup(env?: string, opts?: SetupOpts): void;\n setConfig(opts: SetupOpts): void;\n setSDKAppVersion(version: string): void;\n hasValidSession(tokenType?: string): boolean;\n hasSessionExpired(tokenType?: string): boolean;\n setRequestInterceptor(headers: Record<string, any>): void;\n setResponseInterceptor(): void;\n clearTokens(): void;\n isImpersonating(): boolean;\n getTokenExpiry(tokenType?: string): number | undefined;\n setToken(token: string, tokenType?: string): void;\n setAccount(account: Record<string, any>): void;\n setMember(member: Record<string, any>): void;\n setRegion(region: string): void;\n stop(): void;\n removeStorage(): void;\n setIsAnalyticsInitialised(isInitialised: boolean): void;\n};\n\nconst sdkClient: SdkClient = {\n account: storage.get('account'),\n accountId: storage.get('accountId'),\n apiVersions: API_VERSIONS as Record<string, string>,\n appId: APP_ID,\n appVersion: storage.get('appVersion'),\n apiVer: API_VER,\n httpClient: createHttpClient() as HttpClient,\n // Backwards compatibility alias\n get axios() {\n return this.httpClient;\n },\n baseUrls: undefined as Record<string, string> | undefined,\n defaultVersion: DEFAULT_VERSION,\n device: storage.get('device'),\n env: DEFAULT_ENV,\n hasInit: false,\n intercomHash: storage.get('intercomHash'),\n isSuperAdmin: storage.get('isSuperAdmin'),\n isReadOnlyAdmin: storage.get('isReadOnlyAdmin'),\n isAnalyticsInitialised: false,\n member: storage.get('member'),\n requestInterceptor: undefined as number | undefined,\n requestInterceptorSuccess: undefined as ((config: HttpClientConfig) => void) | undefined,\n responseInterceptor: undefined as number | undefined,\n responseInterceptorSuccess: undefined as ((response: HttpClientResponse) => void) | undefined,\n responseInterceptorFailure: undefined as ((error: any) => void) | undefined,\n sdkVersion: storage.get('sdkVersion'),\n tokens: storage.get('tokens', {\n storeType: 'session'\n }) || {\n account: null,\n session: null\n },\n\n // Attach resource getters/setters\n abr: { ...abr },\n agedCare: { ...agedCare },\n applePay: { ...applePay },\n accounts: { ...accounts },\n actions: { ...actions },\n apiKeys: { ...apiKeys },\n attachments: { ...attachments },\n auth: { ...auth },\n applications: { ...applications },\n blacklist: { ...blacklist },\n bulkUploads: { ...bulkUploads },\n bulkSubmits: { ...bulkSubmits },\n businessProfiles: { ...businessProfiles },\n businesses: { ...businesses },\n claimItems: { ...claimItems },\n devices: { ...devices },\n docAccounts: { ...docAccounts },\n documents: { ...documents },\n emailLogs: { ...emailLogs },\n emails: { ...emails },\n filterOptions: { ...filterOptions },\n formApplicationTemplates: { ...formApplicationTemplates },\n formApplications: { ...formApplications },\n forms: { ...forms },\n funders: { ...funders },\n funderServices: { ...funderServices },\n funderSettings: { ...funderSettings },\n funderValues: { ...funderValues },\n futures: { ...futures },\n healthFundAccounts: { ...healthFundAccounts },\n healthFundSettings: { ...healthFundSettings },\n healthfunds: { ...healthfunds },\n icare: { ...icare },\n icdItems: { ...icdItems },\n invoiceScans: { ...invoiceScans },\n jhcs: { ...jhcs },\n keyAccounts: { ...keyAccounts },\n kyc: { ...kyc },\n logs: { ...logs },\n members: { ...members },\n messageMappings: { ...messageMappings },\n minions: { ...minions },\n modalities: { ...modalities },\n notes: { ...notes },\n onboardingApplications: { ...onboardingApplications },\n onboardingRequests: { ...onboardingRequests },\n ops: { ...ops },\n organisations: { ...organisations },\n partners: { ...partners },\n patients: { ...patients },\n payments: { ...payments },\n pms: { ...pms },\n practiceProfiles: { ...practiceProfiles },\n practices: { ...practices },\n practiceTypes: { ...practiceTypes },\n products: { ...products },\n professionalCategories: { ...professionalCategories },\n providerRequests: { ...providerRequests },\n providerRegistrationTypes: { ...providerRegistrationTypes },\n providerNumberTypes: { ...providerNumberTypes },\n providerTypes: { ...providerTypes },\n qbe: { ...qbe },\n refSources: { ...refSources },\n risk: { ...risk },\n rnas: { ...rnas },\n roles: { ...roles },\n s3Files: { ...s3Files },\n sales: { ...sales },\n selfCheckoutSessions: { ...selfCheckoutSessions },\n settlements: { ...settlements },\n services: { ...services },\n signUp: { ...signUp },\n specialties: { ...specialties },\n staffProfiles: { ...staffProfiles },\n staff: { ...staff },\n statistics: { ...statistics },\n subscriptions: { ...subscriptions },\n terminals: { ...terminals },\n transactionExport: { ...transactionExport },\n transactionReports: { ...transactionReports },\n transactions: { ...transactions },\n triggers: { ...triggers },\n vendors: { ...vendors },\n verify: { ...verify },\n workflowExceptions: { ...workflowExceptions },\n workers: { ...workers },\n\n // Attach services\n aws: { ...aws },\n versions: { ...versions },\n\n // Attach utils\n professionsUtils: { ...professionsUtils },\n staffUtils: { ...staffUtils },\n applicationUtils: { ...applicationUtils },\n storage,\n\n /**\n * Setup the Tyro Health SDK\n * @param env - The environment that the SDK will point to\n * @param opts - Additional setup options\n */\n setup(env?: string, opts: SetupOpts = {}): void {\n // Setup http client instance\n this.httpClient = createHttpClient();\n\n if (this.httpClient) {\n this.httpClient.defaults.headers.post['Content-Type'] = CONTENT_TYPE;\n this.httpClient.defaults.headers.post.Accept = CONTENT_TYPE;\n }\n\n this.setConfig({ ...opts, env });\n this.hasInit = true;\n // Setup request/response interceptors\n this.setRequestInterceptor({});\n this.setResponseInterceptor();\n },\n\n setConfig(opts: SetupOpts): void {\n // Setup initial SDK properties\n this.appId = _get(opts, 'appId', this.appId);\n this.appVersion = _get(opts, 'appVersion', this.appVersion);\n this.apiVer = _get(opts, 'apiVer', this.apiVer);\n this.apiVersions = _get(opts, 'apiVersions', this.apiVersions);\n this.defaultVersion = _get(opts, 'defaultVersion', this.defaultVersion);\n this.env = _get(opts, 'env', this.env);\n this.sdkVersion = _get(opts, 'sdkVersion', this.sdkVersion);\n this.baseUrls = _get(opts, 'baseUrls');\n this.setRegion(DEFAULT_REGION);\n },\n\n setSDKAppVersion(version: string): void {\n this.sdkVersion = this.appVersion;\n this.appVersion = version;\n },\n\n /**\n * Check if the token is valid and the client is logged in\n */\n hasValidSession(tokenType: string = 'account'): boolean {\n return this.tokens[tokenType] && !_isTokenExpired(this.tokens[tokenType]);\n },\n\n /**\n * Check if the token has expired\n */\n hasSessionExpired(tokenType: string = 'account'): boolean {\n return this.tokens[tokenType] && _isTokenExpired(this.tokens[tokenType]);\n },\n\n /**\n * Set the HTTP request interceptor - will intercept every HTTP request that the Tyro Health SDK uses.\n * @param headers - Headers to be included in every request\n */\n setRequestInterceptor(headers: Record<string, any>): void {\n this.requestInterceptor = this.httpClient.interceptors.request.use(\n async config => {\n const requestHeaders: Record<string, string> = { ...config.headers };\n\n _forOwn(headers, (val, key) => {\n requestHeaders[key] = val;\n });\n\n requestHeaders[HEADER__APP_ID] = this.appId;\n requestHeaders[HEADER__APP_VERSION] = this.appVersion;\n requestHeaders[HEADER__API_VER] = this.apiVer;\n\n if (this.sdkVersion) {\n requestHeaders[HEADER__SDK_VERSION] = this.sdkVersion;\n }\n\n if (config.tokenType === 'session' && this.tokens.session) {\n requestHeaders.Authorization = this.tokens.session;\n } else if (this.tokens.account) {\n requestHeaders.Authorization = this.tokens.account;\n }\n\n if (!config.skipDeviceCheck) {\n const deviceId = await devices.getDeviceId();\n if (deviceId) {\n requestHeaders[HEADER__DEVICE_ID] = deviceId;\n }\n }\n\n if (this.requestInterceptorSuccess) {\n this.requestInterceptorSuccess(config);\n }\n\n return { ...config, headers: requestHeaders };\n },\n error => Promise.reject(error)\n );\n },\n\n /**\n * Set the HTTP response interceptor - will intercept every HTTP response that the Tyro Health SDK uses.\n */\n setResponseInterceptor(): void {\n this.responseInterceptor = this.httpClient.interceptors.response.use(\n response => {\n if (\n response.headers &&\n response.headers[HEADER__TOKEN] &&\n !_get(response, 'config.url', '').includes('/auth/impersonate')\n ) {\n const authToken = response.headers[HEADER__TOKEN];\n this.setToken(authToken);\n }\n\n if (response.headers && response.headers[HEADER__INTERCOM_HASH]) {\n this.intercomHash = response.headers[HEADER__INTERCOM_HASH];\n storage.set('intercomHash', this.intercomHash);\n }\n\n if (this.responseInterceptorSuccess) {\n this.responseInterceptorSuccess(response);\n }\n\n return response;\n },\n err => {\n if (this.responseInterceptorFailure) {\n this.responseInterceptorFailure(_get(err, 'response', err));\n }\n\n return Promise.reject(err);\n }\n );\n },\n\n clearTokens(): void {\n this.tokens = {\n account: null,\n session: null\n };\n storage.remove('tokens');\n },\n\n isImpersonating(): boolean {\n const { imp } = jwtDecode<MedipassJwtPayload>(this.tokens.account);\n return Boolean(imp);\n },\n\n getTokenExpiry(tokenType: string = 'account'): number | undefined {\n return jwtDecode<MedipassJwtPayload>(this.tokens[tokenType]).exp;\n },\n\n setToken(token: string, tokenType: string = 'account'): void {\n this.tokens[tokenType] = token;\n storage.set(\n 'tokens',\n Object.assign({}, this.tokens, {\n [tokenType]: token\n }),\n {\n storeType: 'session'\n }\n );\n },\n\n setAccount(account: Record<string, any>): void {\n storage.set('accountId', account._id);\n this.accountId = account._id;\n storage.set('account', account);\n this.account = account;\n },\n\n setMember(member: Record<string, any>): void {\n storage.set('member', member);\n this.member = member;\n },\n\n setRegion(region: string): void {\n console.log(`Current region is set to ${region}`);\n\n if (this.env) {\n this.baseUrls =\n this.baseUrls ||\n (_getEnvBaseUrls(baseUrls, {\n env: this.env\n }) as Record<string, string>);\n }\n\n storage.set('region', region);\n },\n\n /**\n * Kill the SDK - stop interceptors, clear class properties, clear local storage\n */\n stop(): void {\n if (this.requestInterceptor !== undefined) {\n this.httpClient.interceptors.request.eject(this.requestInterceptor);\n }\n if (this.responseInterceptor !== undefined) {\n this.httpClient.interceptors.response.eject(this.responseInterceptor);\n }\n this.removeStorage();\n },\n\n removeStorage(): void {\n this.clearTokens();\n this.account = null;\n this.accountId = null;\n this.intercomHash = null;\n this.isSuperAdmin = null;\n this.isReadOnlyAdmin = null;\n this.member = null;\n storage.clearAll();\n },\n\n setIsAnalyticsInitialised(isInitialised: boolean) {\n this.isAnalyticsInitialised = isInitialised;\n }\n};\n\nexport default sdkClient;\n\nexport * from './types';\n\nexport {\n // Include sdk client as named export\n sdkClient,\n abr,\n applePay,\n accounts,\n actions,\n apiKeys,\n attachments,\n auth,\n applications,\n blacklist,\n bulkUploads,\n bulkSubmits,\n businessProfiles,\n businesses,\n claimItems,\n devices,\n docAccounts,\n documents,\n emailLogs,\n emails,\n filterOptions,\n formApplicationTemplates,\n formApplications,\n forms,\n funders,\n funderServices,\n funderSettings,\n funderValues,\n futures,\n healthFundAccounts,\n healthFundSettings,\n healthfunds,\n icdItems,\n invoiceScans,\n jhcs,\n keyAccounts,\n kyc,\n logs,\n members,\n messageMappings,\n minions,\n modalities,\n notes,\n onboardingApplications,\n onboardingRequests,\n ops,\n organisations,\n partners,\n patients,\n payments,\n pms,\n practiceProfiles,\n practices,\n practiceTypes,\n products,\n professionalCategories,\n providerRequests,\n providerRegistrationTypes,\n providerNumberTypes,\n providerTypes,\n refSources,\n risk,\n rnas,\n roles,\n sales,\n selfCheckoutSessions,\n services,\n settlements,\n signUp,\n specialties,\n staffProfiles,\n staff,\n statistics,\n subscriptions,\n terminals,\n transactionExport,\n transactions,\n triggers,\n vendors,\n verify,\n workers,\n workflowExceptions,\n // Attach services\n aws,\n versions,\n // Attach utils\n professionsUtils,\n staffUtils,\n applicationUtils\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0GA,MAAa,SAAS;AACtB,MAAa,UAAU;AACvB,MAA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AK,WAAW,aAAa,SAAS,MAAM,KAAK,oBAAoB;AAEvE,OAAK,eAAe;;CAGtB,gBAAsB;AACpB,OAAK,aAAa;AAClB,OAAK,UAAU;AACf,OAAK,YAAY;AACjB,OAAK,eAAe;AACpB,OAAK,eAAe;AACpB,OAAK,kBAAkB;AACvB,OAAK,SAAS;AACd,kBAAQ,UAAU;;CAGpB,0BAA0B,eAAwB;AAChD,OAAK,yBAAyB;;CAEjC;AAED,kBAAe"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { InitiateBrowserPaymentBody, InitiateBrowserPaymentResponse, SalesOptionsResponse } from "../types/sales.js";
|
|
2
|
+
import { MedipassRequestOpts } from "../types/index.js";
|
|
3
|
+
|
|
4
|
+
//#region src/resources/sales.d.ts
|
|
5
|
+
declare namespace sales_d_exports {
|
|
6
|
+
export { getOptions, initiateBrowserPayment };
|
|
7
|
+
}
|
|
8
|
+
/** Pass requestConfig.tokenType = 'session' when requesting options from self-checkout. */
|
|
9
|
+
declare const getOptions: (businessId: string, opts?: MedipassRequestOpts) => Promise<SalesOptionsResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Initiate a browser payment from the PayPal SDK createOrder callback.
|
|
12
|
+
* Self-checkout callers must pass requestConfig.tokenType = 'session'.
|
|
13
|
+
* Keep the response identifiers for approval and instrument-declined retries.
|
|
14
|
+
*/
|
|
15
|
+
declare const initiateBrowserPayment: (businessId: string, body: InitiateBrowserPaymentBody, opts?: MedipassRequestOpts) => Promise<InitiateBrowserPaymentResponse>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { getOptions, initiateBrowserPayment, sales_d_exports };
|
|
18
|
+
//# sourceMappingURL=sales.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { __export } from "../_virtual/rolldown_runtime.js";
|
|
2
|
+
import request_default from "../utils/request.js";
|
|
3
|
+
import does_param_exist_default from "../utils/does-param-exist.js";
|
|
4
|
+
|
|
5
|
+
//#region src/resources/sales.ts
|
|
6
|
+
var sales_exports = /* @__PURE__ */ __export({
|
|
7
|
+
getOptions: () => getOptions,
|
|
8
|
+
initiateBrowserPayment: () => initiateBrowserPayment
|
|
9
|
+
});
|
|
10
|
+
/** Pass requestConfig.tokenType = 'session' when requesting options from self-checkout. */
|
|
11
|
+
const getOptions = async (businessId, opts = {}) => {
|
|
12
|
+
does_param_exist_default({ businessId }, opts.hyperMediaEndpoint);
|
|
13
|
+
return request_default({
|
|
14
|
+
ver: "v3",
|
|
15
|
+
...opts,
|
|
16
|
+
path: `/businesses/${businessId}/sales/options`
|
|
17
|
+
}, { method: "get" });
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Initiate a browser payment from the PayPal SDK createOrder callback.
|
|
21
|
+
* Self-checkout callers must pass requestConfig.tokenType = 'session'.
|
|
22
|
+
* Keep the response identifiers for approval and instrument-declined retries.
|
|
23
|
+
*/
|
|
24
|
+
const initiateBrowserPayment = async (businessId, body, opts = {}) => {
|
|
25
|
+
does_param_exist_default({ businessId }, opts.hyperMediaEndpoint);
|
|
26
|
+
return request_default({
|
|
27
|
+
ver: "v3",
|
|
28
|
+
...opts,
|
|
29
|
+
path: `/businesses/${businessId}/sales/browser/initiate`
|
|
30
|
+
}, {
|
|
31
|
+
method: "post",
|
|
32
|
+
data: body
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { getOptions, initiateBrowserPayment, sales_exports };
|
|
38
|
+
//# sourceMappingURL=sales.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sales.js","names":["request"],"sources":["../../src/resources/sales.ts"],"sourcesContent":["import type {\n InitiateBrowserPaymentBody,\n InitiateBrowserPaymentResponse,\n MedipassRequestOpts,\n SalesOptionsResponse\n} from '../types';\nimport doesParamExist from '../utils/does-param-exist';\nimport request from '../utils/request';\n\n/** Pass requestConfig.tokenType = 'session' when requesting options from self-checkout. */\nexport const getOptions = async (businessId: string, opts: MedipassRequestOpts = {}): Promise<SalesOptionsResponse> => {\n doesParamExist({ businessId }, opts.hyperMediaEndpoint);\n return request({ ver: 'v3', ...opts, path: `/businesses/${businessId}/sales/options` }, { method: 'get' });\n};\n\n/**\n * Initiate a browser payment from the PayPal SDK createOrder callback.\n * Self-checkout callers must pass requestConfig.tokenType = 'session'.\n * Keep the response identifiers for approval and instrument-declined retries.\n */\nexport const initiateBrowserPayment = async (\n businessId: string,\n body: InitiateBrowserPaymentBody,\n opts: MedipassRequestOpts = {}\n): Promise<InitiateBrowserPaymentResponse> => {\n doesParamExist({ businessId }, opts.hyperMediaEndpoint);\n return request(\n {\n ver: 'v3',\n ...opts,\n path: `/businesses/${businessId}/sales/browser/initiate`\n },\n { method: 'post', data: body }\n );\n};\n"],"mappings":";;;;;;;;;;AAUA,MAAa,aAAa,OAAO,YAAoB,OAA4B,EAAE,KAAoC;AACrH,0BAAe,EAAE,YAAY,EAAE,KAAK,mBAAmB;AACvD,QAAOA,gBAAQ;EAAE,KAAK;EAAM,GAAG;EAAM,MAAM,eAAe,WAAW;EAAiB,EAAE,EAAE,QAAQ,OAAO,CAAC;;;;;;;AAQ5G,MAAa,yBAAyB,OACpC,YACA,MACA,OAA4B,EAAE,KACc;AAC5C,0BAAe,EAAE,YAAY,EAAE,KAAK,mBAAmB;AACvD,QAAOA,gBACL;EACE,KAAK;EACL,GAAG;EACH,MAAM,eAAe,WAAW;EACjC,EACD;EAAE,QAAQ;EAAQ,MAAM;EAAM,CAC/B"}
|
|
@@ -348,7 +348,7 @@ declare const submitClaim: (transactionId: string, claimId: string, body?: Recor
|
|
|
348
348
|
declare const saveClaimDetails: (transactionId: string, claimId: string, opts?: MedipassRequestOpts) => Promise<Record<string, any>>;
|
|
349
349
|
/**
|
|
350
350
|
* Create payment
|
|
351
|
-
* @param {String} transactionId -
|
|
351
|
+
* @param {String} transactionId - Internal Mongo invoice transaction ID, not a browser-payment identifier
|
|
352
352
|
* @param {Object} body - Request body
|
|
353
353
|
* @param {Object} opts - Additional options
|
|
354
354
|
*/
|
|
@@ -924,7 +924,7 @@ const saveClaimDetails = async (transactionId, claimId, opts = {}) => {
|
|
|
924
924
|
};
|
|
925
925
|
/**
|
|
926
926
|
* Create payment
|
|
927
|
-
* @param {String} transactionId -
|
|
927
|
+
* @param {String} transactionId - Internal Mongo invoice transaction ID, not a browser-payment identifier
|
|
928
928
|
* @param {Object} body - Request body
|
|
929
929
|
* @param {Object} opts - Additional options
|
|
930
930
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.js","names":["request"],"sources":["../../src/resources/transactions.ts"],"sourcesContent":["import request from '../utils/request';\nimport doesParamExist from '../utils/does-param-exist';\nimport type { MedipassRequestOpts, Transaction, ConvertInvoicesRequestBody, ConvertInvoicesResponse } from '../types';\n\nexport { ConvertInvoicesRequestBody, ConvertInvoicesResponse };\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathBusinessTransactions = businessId => `/businesses/${businessId}/transactions`;\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathBusinessTransaction = (businessId, transactionId) =>\n `/businesses/${businessId}/transactions/${transactionId}`;\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathBusinessTransactionRefund = (businessId, transactionId) =>\n `/businesses/${businessId}/transactions/${transactionId}/refunds`;\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathBusinessPracticeTransactions = (businessId, practiceId) =>\n `/businesses/${businessId}/practices/${practiceId}/transactions`;\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathBusinessPracticeStaffInvoices = (businessId, practiceId, staffId) =>\n `/businesses/${businessId}/practices/${practiceId}/staff/${staffId}/invoices`;\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathBusinessPracticeInvoices = (businessId, practiceId) =>\n `/businesses/${businessId}/practices/${practiceId}/invoices`;\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathBusinessTransactionQuotes = businessId => `/businesses/${businessId}/transactions/quotes`;\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathBusinessPracticeStaffQuotes = (businessId, practiceId, staffId) =>\n `/businesses/${businessId}/practices/${practiceId}/staff/${staffId}/quotes`;\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathBusinessPracticeStaffTransactions = (businessId, practiceId, staffId) =>\n `/businesses/${businessId}/practices/${practiceId}/staff/${staffId}/transactions`;\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathBusinessTransactionsInvoiceReference = (businessId, invoiceReference) =>\n `/businesses/${businessId}/transactions/invoicereference/${invoiceReference}`;\n\n// @ts-expect-error TS(7006): Parameter 'healthFundId' implicitly has an 'any' t... Remove this comment to see the full error message\nconst pathHealthFundTransaction = (healthFundId, transactionId) =>\n `/healthfunds/${healthFundId}/transactions/${transactionId}`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathReplyQuote = transactionId => `/transactions/${transactionId}/replyquote`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionApprove = transactionId => `/transactions/${transactionId}/approve`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionSendReceipt = transactionId => `/transactions/${transactionId}/sendreceipt`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionByTransactionId = transactionId => `/transactions/${transactionId}`;\n\n// @ts-expect-error TS(7006): Parameter 'healthFundId' implicitly has an 'any' t... Remove this comment to see the full error message\nconst pathTransactionsForHealthFund = healthFundId => `/healthfunds/${healthFundId}/transactions`;\n\n// @ts-expect-error TS(7006): Parameter 'healthFundId' implicitly has an 'any' t... Remove this comment to see the full error message\nconst pathHealthFundMemberTransactions = (healthFundId, memberId) =>\n `/healthfunds/${healthFundId}/members/${memberId}/transactions`;\n\n// @ts-expect-error TS(7006): Parameter 'healthFundId' implicitly has an 'any' t... Remove this comment to see the full error message\nconst pathHealthFundTransactionsAssign = healthFundId => `/healthfunds/${healthFundId}/transactions/assign`;\n\n// @ts-expect-error TS(7006): Parameter 'memberId' implicitly has an 'any' type.\nconst pathTransactionsByMember = memberId => `/members/${memberId}/transactions`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionTag = (transactionId, tagId) => `/transactions/${transactionId}/tags/${tagId}`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathValidateTransaction = transactionId => `/transactions/${transactionId}/validate`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionSubmitBridgeClaim = transactionId => `/transactions/${transactionId}/submitbridgeclaim`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionSubmitBridgePayment = transactionId => `/transactions/${transactionId}/submitbridgepayment`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionTriggerBridge = transactionId => `/transactions/${transactionId}/triggerbridge`;\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathCreateInvoice = businessId => `/businesses/${businessId}/transactions/invoices`;\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathCreateDraft = businessId => `/businesses/${businessId}/transactions/drafts`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathConvertDraft = transactionId => `/transactions/${transactionId}/convertdrafts`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathCreateSendClaim = transactionId => `/transactions/${transactionId}/claims`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathCompleteTransaction = transactionId => `/transactions/${transactionId}/completes`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathClaim = (transactionId, claimId) => `/transactions/${transactionId}/claims/${claimId}`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathApproveClaim = (transactionId, claimId) => `/transactions/${transactionId}/claims/${claimId}/approves`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathCancelClaim = (transactionId, claimId) => `/transactions/${transactionId}/claims/${claimId}/cancels`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathSaveClaim = (transactionId, claimId) => `/transactions/${transactionId}/claims/${claimId}/savedetails`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathSubmitClaim = (transactionId, claimId) => `/transactions/${transactionId}/claims/${claimId}/submits`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionClaimPdf = (transactionId, claimId) => `/transactions/${transactionId}/claims/${claimId}/pdf`;\n\nconst pathTransactionClaimPdfV2 = '/transactions/pdfs';\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionPays = transactionId => `/transactions/${transactionId}/pays`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionProcessingRequests = transactionId => `/transactions/${transactionId}/processingrequests`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionCancel = transactionId => `/transactions/${transactionId}/cancels`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionPaymentLink = transactionId => `/transactions/${transactionId}/paymentlink`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionRefund = transactionId => `/transactions/${transactionId}/refunds`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionArchives = transactionId => `/transactions/${transactionId}/archives`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionUnarchives = transactionId => `/transactions/${transactionId}/unarchives`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionTerminalInput = transactionId => `/transactions/${transactionId}/terminalinput`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionTerminalCancel = transactionId => `/transactions/${transactionId}/terminalcancel`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionPaymentRefund = (transactionId, paymentId) =>\n `/transactions/${transactionId}/payments/${paymentId}/refunds`;\n\nconst pathTransactionStandaloneRefund = (transactionId: string, paymentId: string) =>\n `/transactions/${transactionId}/payments/${paymentId}/standalonerefunds`;\n\nconst pathTransactionPaymentVoid = (transactionId: string, paymentId: string) =>\n `/transactions/${transactionId}/payments/${paymentId}/voids`;\n\nconst pathCreateEclipseInPatientInvoice = () => `/transactions/invoices/eclipse/imcw`;\n\nconst pathCreateEclipseOverseasInvoice = () => `/transactions/invoices/eclipse/ovsw`;\n\nconst pathCreateEclipseOnlineEligibilityCheckInvoice = () => `/transactions/invoices/eclipse/oecw`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathReconcileClaim = (transactionId, claimId) => `/transactions/${transactionId}/claims/${claimId}/reconciles`;\n\nconst pathSaveDraftEclipseInPatientInvoice = () => `/transactions/drafts/eclipse/imcw`;\n\nconst pathSaveDraftEclipseOverseasInvoice = () => `/transactions/drafts/eclipse/ovsw`;\n\nconst pathCreateManualInvoice = () => '/transactions/invoices';\n\nconst pathPhiInvoice = () => '/transactions/invoices/phi';\n\nconst pathPhiQuote = () => `/transactions/quotes/phi`;\n\nconst pathEmailInvoice = (transactionId: string) => `/transactions/${transactionId}/email`;\n\nexport const pathConvertInvoices = (transactionId: string) => `/transactions/${transactionId}/convertinvoices`;\n\n/**\n * Approve a transaction\n * @param {String} transactionId - Transaction ID\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const approveTransaction = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionApprove(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Assign health fund transactions\n * @param {String} healthFundId - Health fund ID\n * @param {Object} opts - Additional options\n */\nexport const assignHealthFundTransactions = async (\n healthFundId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n healthFundId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathHealthFundTransactionsAssign(healthFundId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Assign health fund transaction to self\n * @param {String} healthFundId - Health fund ID\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const assignHealthFundTransactionToSelf = async (\n healthFundId: string,\n transactionId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId,\n healthFundId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathHealthFundTransaction(healthFundId, transactionId)}/assigntome` },\n {\n method: 'put'\n }\n );\n};\n\n/**\n * Assign transaction to self\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const assignTransactionToSelf = async (\n transactionId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathTransactionByTransactionId(transactionId)}/assigntome` },\n {\n method: 'put'\n }\n );\n};\n\n/**\n * Cancel a transaction\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const cancelTransaction = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathTransactionByTransactionId(transactionId)}/cancellations` },\n {\n data: body,\n method: 'post'\n }\n );\n};\n\n/**\n * Cancel a business transaction\n * @param {String} businessId - Business ID\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const cancelBusinessTransaction = async (\n businessId: string,\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId,\n businessId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathBusinessTransaction(businessId, transactionId)}/cancellations` },\n {\n data: body,\n method: 'post'\n }\n );\n};\n\n/**\n * Create an invoice for a business\n * @param {String} businessId - Business ID\n * @param {String} practiceId - Practice ID\n * @param {String} staffId - Staff ID\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createBusinessPracticeStaffMemberInvoice = async (\n businessId: string,\n practiceId: string,\n staffId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n practiceId,\n staffId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathBusinessPracticeStaffInvoices(businessId, practiceId, staffId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create an invoice for a business\n * @param {String} businessId - Business ID\n * @param {String} practiceId - Practice ID\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createBusinessPracticeInvoice = async (\n businessId: string,\n practiceId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n practiceId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathBusinessPracticeInvoices(businessId, practiceId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create a quote for a business\n * @param {String} businessId - Business ID\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createBusinessTransactionQuote = async (\n businessId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathBusinessTransactionQuotes(businessId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create a quote for a staff\n * @param {String} businessId - Business ID\n * @param {String} practiceId - Practice ID\n * @param {String} staffId - Staff ID\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createBusinessPracticeStaffMemberQuote = async (\n businessId: string,\n practiceId: string,\n staffId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n practiceId,\n staffId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathBusinessPracticeStaffQuotes(businessId, practiceId, staffId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create a payment for a transaction\n * @param {String} transactionId - TransactionId\n * @param {String} source - Payment source (e.g. 'mastercard')\n * @param {String} nonce - Nonce (or client token)\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createPayment = async (\n transactionId: string,\n source: string | undefined = undefined,\n nonce: string | undefined = undefined,\n body: Record<string, any> = {},\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n const newBody = { ...body };\n\n if (source && nonce) {\n newBody.payment = {\n source,\n nonce\n };\n }\n\n return request(\n { ...opts, path: `${pathTransactionByTransactionId(transactionId)}/payments` },\n {\n method: 'post',\n data: newBody\n }\n );\n};\n\n/**\n * Create a payment request for a transaction\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createPaymentRequest = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathTransactionByTransactionId(transactionId)}/paymentrequests` },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Complete a quote\n * @param {String} transactionId - Transaction ID\n * @param {Object} memberId - Member ID\n * @param {Object} opts - Additional options\n */\nexport const completeQuote = async (\n transactionId: string,\n memberId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId,\n memberId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathTransactionByTransactionId(transactionId)}/completequote` },\n {\n method: 'post',\n data: {\n memberId\n }\n }\n );\n};\n\n/**\n * Delete a transaction tag\n * @param {String} transactionId - Transaction ID\n * @param {String} tagId - Tag ID\n * @param {Object} opts - Additional options\n */\nexport const deleteTransactionTag = async (\n transactionId: string,\n tagId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId,\n tagId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionTag(transactionId, tagId) },\n {\n method: 'delete'\n }\n );\n};\n\n/**\n * Delete a transaction\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const deleteTransaction = async (\n transactionId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionByTransactionId(transactionId) },\n {\n method: 'delete'\n }\n );\n};\n\n/**\n * Get business transactions\n * @param {String} businessId - Business ID\n * @param {Object} query - query parameters\n * @param {Object} opts - Additional options\n */\nexport const getBusinessTransactions = async (\n businessId: string,\n query: Record<string, any> = {},\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathBusinessTransactions(businessId) },\n {\n method: 'get',\n params: query\n }\n );\n};\n\nexport type GetBusinessTransactionQuery = {\n includeDeleted?: boolean;\n refreshTerminalStatus?: boolean;\n};\n\n/**\n * Get business transaction\n * @param {String} businessId - Business ID\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const getBusinessTransaction = async (\n businessId: string,\n transactionId: string,\n query?: GetBusinessTransactionQuery | null | undefined,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathBusinessTransaction(businessId, transactionId) },\n {\n method: 'get',\n params: query\n }\n );\n};\n\n/**\n * Get business transaction by invoice reference\n * @param {String} businessId - Business ID\n * @param {String} invoiceReference - Invoice reference\n * @param {Object} opts - Additional options\n */\nexport const getBusinessTransactionByInvoiceReference = async (\n businessId: string,\n invoiceReference: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n invoiceReference\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathBusinessTransactionsInvoiceReference(businessId, invoiceReference) },\n {\n method: 'get'\n }\n );\n};\n\n/**\n * Get business transaction payment report\n * @param {String} businessId - Business ID\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const getBusinessTransactionPaymentReport = async (\n businessId: string,\n transactionId: string,\n query: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathBusinessTransaction(businessId, transactionId)}/paymentreport` },\n {\n method: 'get',\n params: query\n }\n );\n};\n\n/**\n * Get business transaction processing report\n * @param {String} businessId - Business ID\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const getBusinessTransactionProcessingReport = async (\n businessId: string,\n transactionId: string,\n query: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathBusinessTransaction(businessId, transactionId)}/processingreport` },\n {\n method: 'get',\n params: query\n }\n );\n};\n\n/**\n * Get business practice transactions\n * @param {String} businessId - Business ID\n * @param {String} practiceId - Practice ID\n * @param {Object} query - query parameters\n * @param {Object} opts - Additional options\n */\nexport const getBusinessPracticeTransactions = async (\n businessId: string,\n practiceId: string,\n query: Record<string, any> = {},\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n practiceId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathBusinessPracticeTransactions(businessId, practiceId) },\n {\n method: 'get',\n params: query\n }\n );\n};\n\n/**\n * Get business staff transactions\n * @param {String} businessId - Business ID\n * @param {String} practiceId - Practice ID\n * @param {String} staffId - Staff ID\n * @param {Object} query - query parameters\n * @param {Object} opts - Additional options\n */\nexport const getBusinessPracticeStaffTransactions = async (\n businessId: string,\n practiceId: string,\n staffId: string,\n query: Record<string, any> = {},\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n practiceId,\n staffId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathBusinessPracticeStaffTransactions(businessId, practiceId, staffId) },\n {\n method: 'get',\n params: query\n }\n );\n};\n\n/**\n * Get transactions by health fund\n * @param {String} healthFundId - Health fund ID\n * @param {Object} query - query parameters\n * @param {Object} opts - Additional options\n */\nexport const getTransactionsForHealthFund = async (\n healthFundId: string,\n query: Record<string, any> = {},\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n healthFundId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionsForHealthFund(healthFundId) },\n {\n method: 'get',\n params: query\n }\n );\n};\n\n/**\n * Get transaction by transaction ID and health fund ID\n * @param {String} healthFundId - Health fund ID\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const getHealthFundTransaction = async (\n healthFundId: string,\n transactionId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n healthFundId,\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathHealthFundTransaction(healthFundId, transactionId) },\n {\n method: 'get'\n }\n );\n};\n\n/**\n * Get transactions by member\n * @param {String} memberId - Health fund ID\n * @param {Object} query - query parameters\n * @param {Object} opts - Additional options\n */\nexport const getTransactionsByMember = async (\n memberId: string,\n query: Record<string, any> = {},\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n memberId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionsByMember(memberId) },\n {\n method: 'get',\n params: query\n }\n );\n};\n\n/**\n * Get health fund member transactions\n * @param {String} healthFundId - Health fund ID\n * @param {String} memberId - Member ID\n * @param {Object} query - query parameters\n * @param {Object} opts - Additional options\n */\nexport const getHealthFundMemberTransactions = async (\n healthFundId: string,\n memberId: string,\n query: Record<string, any> = {},\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n healthFundId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathHealthFundMemberTransactions(healthFundId, memberId) },\n {\n method: 'get',\n params: query\n }\n );\n};\n\nexport type GetTransactionByTransactionIdQuery = {\n includeDeleted?: boolean;\n refreshTerminalStatus?: boolean;\n};\n\n/**\n * Get transaction by transaction ID.\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const getTransactionByTransactionId = async (\n transactionId: string,\n query?: GetTransactionByTransactionIdQuery | null | undefined,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionByTransactionId(transactionId) },\n {\n method: 'get',\n params: query\n }\n );\n};\n\n/**\n * Get transaction PDF\n * @param {String} transactionId - Transaction ID\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const getTransactionPDF = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathTransactionByTransactionId(transactionId)}/pdf` },\n {\n method: 'post',\n data: body,\n responseType: 'arraybuffer'\n }\n );\n};\n\n/**\n * Get transaction claim PDF\n * @param {String} transactionId - Transaction ID\n * @param {String} claimId - Claim ID\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const getTransactionClaimPDF = async (\n transactionId: string,\n claimId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n claimId,\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionClaimPdf(transactionId, claimId) },\n {\n method: 'post',\n data: body,\n responseType: 'arraybuffer'\n }\n );\n};\n\n/**\n * TODO: Use this endpoint for all funder claims, once the funder is supported in the API,\n * replacing the legacy `getTransactionClaimPDF`.\n *\n * Get ECLIPSE transaction claim PDF\n * @param {Object} body - Request body including `transactionId` and `claimId`\n * @param {Object} opts - Additional options\n */\nexport const getTransactionClaimPdfV2 = async (\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n return request(\n { ...opts, path: pathTransactionClaimPdfV2 },\n {\n method: 'post',\n data: body,\n responseType: 'arraybuffer'\n }\n );\n};\n\n/**\n * Reply to a quote\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const replyToQuote = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathReplyQuote(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Send receipt\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const sendReceipt = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionSendReceipt(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Submit an invoice\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const submitInvoice = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathTransactionByTransactionId(transactionId)}/submitinvoice` },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Update transaction\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const updateTransaction = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionByTransactionId(transactionId) },\n {\n method: 'put',\n data: body\n }\n );\n};\n\n/**\n * Validate a transaction\n * @param {String} transactionId - TransactionId\n * @param {Object} opts - Additional options\n */\nexport const validateTransaction = async (\n transactionId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathValidateTransaction(transactionId) },\n {\n method: 'post'\n }\n );\n};\n\n/**\n * Submits a Bridge's claim response to transaction\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const submitTransactionBridgeClaim = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionSubmitBridgeClaim(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Submits a Bridge's payment response to transaction\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const submitTransactionBridgePayment = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionSubmitBridgePayment(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Trigger's a bridge request for a transaction\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const triggerBridge = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionTriggerBridge(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create invoice\n * @param {String} businessId - BusinessId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createInvoice = async (\n businessId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathCreateInvoice(businessId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create or send a claim\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createSendClaim = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathCreateSendClaim(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Update a claim\n * @param {String} transactionId - TransactionId\n * @param {String} claimId - ClaimId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const updateClaim = async (\n transactionId: string,\n claimId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n claimId,\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathClaim(transactionId, claimId) },\n {\n method: 'put',\n data: body\n }\n );\n};\n\n/**\n * Complete a transaction\n * @param {String} transactionId - TransactionId\n * @param {Object} opts - Additional options\n */\nexport const completeTransaction = async (\n transactionId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathCompleteTransaction(transactionId) },\n {\n method: 'post'\n }\n );\n};\n\n/**\n * Approves a claim\n * @param {String} transactionId - TransactionId\n * @param {String} claimId - ClaimId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const approveClaim = async (\n transactionId: string,\n claimId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathApproveClaim(transactionId, claimId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Cancels a claim\n * @param {String} transactionId - Transaction ID\n * @param {String} claimId - Claim ID\n * @param {Object} opts - Additional options\n */\nexport const cancelClaim = async (\n transactionId: string,\n claimId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n claimId,\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathCancelClaim(transactionId, claimId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Submit a claim\n * @param {String} transactionId - TransactionId\n * @param {String} claimId - ClaimId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const submitClaim = async (\n transactionId: string,\n claimId: string,\n body?: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathSubmitClaim(transactionId, claimId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Save claim details\n * @param {String} transactionId - Transaction ID\n * @param {String} claimId - Claim ID\n * @param {Object} opts - Additional options\n */\nexport const saveClaimDetails = async (\n transactionId: string,\n claimId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n claimId,\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathSaveClaim(transactionId, claimId) },\n {\n method: 'post'\n }\n );\n};\n\n/**\n * Create payment\n * @param {String} transactionId - Transaction ID\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const pay = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionPays(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Send a processing request\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const sendProcessingRequest = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionProcessingRequests(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Cancel invoice\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const cancelInvoice = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionCancel(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Get payment link\n * @param {String} transactionId - TransactionId\n * @param {Object} opts - Additional options\n */\nexport const getPaymentLink = async (\n transactionId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionPaymentLink(transactionId) },\n {\n method: 'get'\n }\n );\n};\n\n/**\n * Refund transaction\n * @param {String} businessId - BusinessId\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const refundByBusiness = async (\n businessId: string,\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathBusinessTransactionRefund(businessId, transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Refund transaction\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const refund = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionRefund(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Save invoice as draft\n * @param {String} businessId - BusinessId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const saveDraft = async (\n businessId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathCreateDraft(businessId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Convert draft to an invoice\n * @param {String} transactionId - Transaction ID\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const convertDraft = async (\n transactionId: string,\n body?: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Transaction> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathConvertDraft(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Archive an invoice\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const archive = async (transactionId: string, opts: MedipassRequestOpts = {}): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionArchives(transactionId) },\n {\n method: 'put'\n }\n );\n};\n\n/**\n * Unarchive an invoice\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const unarchive = async (\n transactionId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionUnarchives(transactionId) },\n {\n method: 'put'\n }\n );\n};\n\n/**\n * Send terminal input\n * @param {String} transactionId - Transaction ID\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const terminalInput = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionTerminalInput(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Send terminal cancellation\n * @param {String} transactionId - Transaction ID\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const terminalCancellation = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionTerminalCancel(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\nexport interface RefundPaymentRequestBody {\n refundAmount: string;\n refundReason: string;\n terminal?: {\n terminalId: string;\n merchantId: string;\n };\n}\n\n/**\n * Refund transaction's payment\n * @param {String} transactionId - TransactionId\n * @param {String} paymentId - PaymentId\n * @param {RefundPaymentRequestBody} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const refundPayment = async (\n transactionId: string,\n paymentId: string,\n body: RefundPaymentRequestBody,\n opts: MedipassRequestOpts = {}\n): Promise<Transaction> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionPaymentRefund(transactionId, paymentId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Perform a standalone refund of a transaction's payment\n * @param {String} transactionId - TransactionId\n * @param {String} paymentId - PaymentId\n * @param {RefundPaymentRequestBody} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const standaloneRefund = async (\n transactionId: string,\n paymentId: string,\n body: RefundPaymentRequestBody,\n opts: MedipassRequestOpts = {}\n): Promise<Transaction> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionStandaloneRefund(transactionId, paymentId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Void transaction's payment\n * @param {String} transactionId - TransactionId\n * @param {String} paymentId - PaymentId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const voidPayment = async (\n transactionId: string,\n paymentId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionPaymentVoid(transactionId, paymentId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create ECLIPSE invoice - In Patient\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createEclipseInPatientInvoice = async (\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n return request(\n { ...opts, path: pathCreateEclipseInPatientInvoice() },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create ECLIPSE invoice - Overseas\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createEclipseOverseasInvoice = async (\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n return request(\n { ...opts, path: pathCreateEclipseOverseasInvoice() },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create ECLIPSE invoice - Online Eligibility Check\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createEclipseOnlineEligibilityCheckInvoice = async (\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n return request(\n { ...opts, path: pathCreateEclipseOnlineEligibilityCheckInvoice() },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Get business ECLIPSE transaction payment report\n * @param {String} businessId - Business ID\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const getBusinessEclipseTransactionPaymentReport = async (\n businessId: string,\n transactionId: string,\n query: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathBusinessTransaction(businessId, transactionId)}/paymentreport/eclipse` },\n {\n method: 'get',\n params: query\n }\n );\n};\n\n/**\n * Get business ECLIPSE transaction processing report\n * @param {String} businessId - Business ID\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const getBusinessEclipseTransactionProcessingReport = async (\n businessId: string,\n transactionId: string,\n query: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathBusinessTransaction(businessId, transactionId)}/processingreport/eclipse` },\n {\n method: 'get',\n params: query\n }\n );\n};\n\n/**\n * Reconciles a claim\n * @param {String} transactionId - TransactionId\n * @param {String} claimId - ClaimId\n * @param {Object} opts - Additional options\n */\nexport const reconcileClaim = async (\n transactionId: string,\n claimId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathReconcileClaim(transactionId, claimId) },\n {\n method: 'post'\n }\n );\n};\n\n/**\n * Save draft for ECLIPSE invoice - In Patient\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const saveDraftEclipseInPatientInvoice = async (\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n return request(\n { ...opts, path: pathSaveDraftEclipseInPatientInvoice() },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Save draft ECLIPSE invoice - Overseas\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const saveDraftEclipseOverseasInvoice = async (\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n return request(\n { ...opts, path: pathSaveDraftEclipseOverseasInvoice() },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create PHI invoice\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createPhiInvoice = async (\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n return request(\n { ...opts, path: pathPhiInvoice() },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create a PHI quote\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createPhiQuote = async (\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n return request(\n { ...opts, path: pathPhiQuote() },\n {\n method: 'post',\n data: body\n }\n );\n};\n\nexport interface EmailInvoiceRequestBody {\n emailTo: string[];\n message: string;\n}\n\n/**\n * Email invoice\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const emailInvoice = async (\n transactionId: string,\n body: EmailInvoiceRequestBody,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathEmailInvoice(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create invoices ( Smart Invoice )\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createManualInvoice = async (\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n // Validate required parameters if any (none in this case)\n doesParamExist({}, opts.hyperMediaEndpoint);\n\n return request(\n { ...opts, path: pathCreateManualInvoice() },\n {\n method: 'post',\n data: body\n }\n );\n};\n\nexport const convertInvoices = (\n transactionId: string,\n body: ConvertInvoicesRequestBody,\n opts: MedipassRequestOpts = {}\n): Promise<ConvertInvoicesResponse> => {\n return request({ ...opts, path: pathConvertInvoices(transactionId) }, { method: 'post', data: body });\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,4BAA2B,eAAc,eAAe,WAAW;AAGzE,MAAM,2BAA2B,YAAY,kBAC3C,eAAe,WAAW,gBAAgB;AAG5C,MAAM,iCAAiC,YAAY,kBACjD,eAAe,WAAW,gBAAgB,cAAc;AAG1D,MAAM,oCAAoC,YAAY,eACpD,eAAe,WAAW,aAAa,WAAW;AAGpD,MAAM,qCAAqC,YAAY,YAAY,YACjE,eAAe,WAAW,aAAa,WAAW,SAAS,QAAQ;AAGrE,MAAM,gCAAgC,YAAY,eAChD,eAAe,WAAW,aAAa,WAAW;AAGpD,MAAM,iCAAgC,eAAc,eAAe,WAAW;AAG9E,MAAM,mCAAmC,YAAY,YAAY,YAC/D,eAAe,WAAW,aAAa,WAAW,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AAK,mBAAmB;AAE3C,QAAOA,gBACL;EAAE,GAAG;EAAM,MAAM,yBAAyB;EAAE,EAC5C;EACE,QAAQ;EACR,MAAM;EACP,CACF;;AAGH,MAAa,mBACX,eACA,MACA,OAA4B,EAAE,KACO;AACrC,QAAOA,gBAAQ;EAAE,GAAG;EAAM,MAAM,oBAAoB,cAAc;EAAE,EAAE;EAAE,QAAQ;EAAQ,MAAM;EAAM,CAAC"}
|
|
1
|
+
{"version":3,"file":"transactions.js","names":["request"],"sources":["../../src/resources/transactions.ts"],"sourcesContent":["import request from '../utils/request';\nimport doesParamExist from '../utils/does-param-exist';\nimport type { MedipassRequestOpts, Transaction, ConvertInvoicesRequestBody, ConvertInvoicesResponse } from '../types';\n\nexport { ConvertInvoicesRequestBody, ConvertInvoicesResponse };\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathBusinessTransactions = businessId => `/businesses/${businessId}/transactions`;\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathBusinessTransaction = (businessId, transactionId) =>\n `/businesses/${businessId}/transactions/${transactionId}`;\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathBusinessTransactionRefund = (businessId, transactionId) =>\n `/businesses/${businessId}/transactions/${transactionId}/refunds`;\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathBusinessPracticeTransactions = (businessId, practiceId) =>\n `/businesses/${businessId}/practices/${practiceId}/transactions`;\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathBusinessPracticeStaffInvoices = (businessId, practiceId, staffId) =>\n `/businesses/${businessId}/practices/${practiceId}/staff/${staffId}/invoices`;\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathBusinessPracticeInvoices = (businessId, practiceId) =>\n `/businesses/${businessId}/practices/${practiceId}/invoices`;\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathBusinessTransactionQuotes = businessId => `/businesses/${businessId}/transactions/quotes`;\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathBusinessPracticeStaffQuotes = (businessId, practiceId, staffId) =>\n `/businesses/${businessId}/practices/${practiceId}/staff/${staffId}/quotes`;\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathBusinessPracticeStaffTransactions = (businessId, practiceId, staffId) =>\n `/businesses/${businessId}/practices/${practiceId}/staff/${staffId}/transactions`;\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathBusinessTransactionsInvoiceReference = (businessId, invoiceReference) =>\n `/businesses/${businessId}/transactions/invoicereference/${invoiceReference}`;\n\n// @ts-expect-error TS(7006): Parameter 'healthFundId' implicitly has an 'any' t... Remove this comment to see the full error message\nconst pathHealthFundTransaction = (healthFundId, transactionId) =>\n `/healthfunds/${healthFundId}/transactions/${transactionId}`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathReplyQuote = transactionId => `/transactions/${transactionId}/replyquote`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionApprove = transactionId => `/transactions/${transactionId}/approve`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionSendReceipt = transactionId => `/transactions/${transactionId}/sendreceipt`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionByTransactionId = transactionId => `/transactions/${transactionId}`;\n\n// @ts-expect-error TS(7006): Parameter 'healthFundId' implicitly has an 'any' t... Remove this comment to see the full error message\nconst pathTransactionsForHealthFund = healthFundId => `/healthfunds/${healthFundId}/transactions`;\n\n// @ts-expect-error TS(7006): Parameter 'healthFundId' implicitly has an 'any' t... Remove this comment to see the full error message\nconst pathHealthFundMemberTransactions = (healthFundId, memberId) =>\n `/healthfunds/${healthFundId}/members/${memberId}/transactions`;\n\n// @ts-expect-error TS(7006): Parameter 'healthFundId' implicitly has an 'any' t... Remove this comment to see the full error message\nconst pathHealthFundTransactionsAssign = healthFundId => `/healthfunds/${healthFundId}/transactions/assign`;\n\n// @ts-expect-error TS(7006): Parameter 'memberId' implicitly has an 'any' type.\nconst pathTransactionsByMember = memberId => `/members/${memberId}/transactions`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionTag = (transactionId, tagId) => `/transactions/${transactionId}/tags/${tagId}`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathValidateTransaction = transactionId => `/transactions/${transactionId}/validate`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionSubmitBridgeClaim = transactionId => `/transactions/${transactionId}/submitbridgeclaim`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionSubmitBridgePayment = transactionId => `/transactions/${transactionId}/submitbridgepayment`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionTriggerBridge = transactionId => `/transactions/${transactionId}/triggerbridge`;\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathCreateInvoice = businessId => `/businesses/${businessId}/transactions/invoices`;\n\n// @ts-expect-error TS(7006): Parameter 'businessId' implicitly has an 'any' typ... Remove this comment to see the full error message\nconst pathCreateDraft = businessId => `/businesses/${businessId}/transactions/drafts`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathConvertDraft = transactionId => `/transactions/${transactionId}/convertdrafts`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathCreateSendClaim = transactionId => `/transactions/${transactionId}/claims`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathCompleteTransaction = transactionId => `/transactions/${transactionId}/completes`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathClaim = (transactionId, claimId) => `/transactions/${transactionId}/claims/${claimId}`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathApproveClaim = (transactionId, claimId) => `/transactions/${transactionId}/claims/${claimId}/approves`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathCancelClaim = (transactionId, claimId) => `/transactions/${transactionId}/claims/${claimId}/cancels`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathSaveClaim = (transactionId, claimId) => `/transactions/${transactionId}/claims/${claimId}/savedetails`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathSubmitClaim = (transactionId, claimId) => `/transactions/${transactionId}/claims/${claimId}/submits`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionClaimPdf = (transactionId, claimId) => `/transactions/${transactionId}/claims/${claimId}/pdf`;\n\nconst pathTransactionClaimPdfV2 = '/transactions/pdfs';\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionPays = transactionId => `/transactions/${transactionId}/pays`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionProcessingRequests = transactionId => `/transactions/${transactionId}/processingrequests`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionCancel = transactionId => `/transactions/${transactionId}/cancels`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionPaymentLink = transactionId => `/transactions/${transactionId}/paymentlink`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionRefund = transactionId => `/transactions/${transactionId}/refunds`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionArchives = transactionId => `/transactions/${transactionId}/archives`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionUnarchives = transactionId => `/transactions/${transactionId}/unarchives`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionTerminalInput = transactionId => `/transactions/${transactionId}/terminalinput`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionTerminalCancel = transactionId => `/transactions/${transactionId}/terminalcancel`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathTransactionPaymentRefund = (transactionId, paymentId) =>\n `/transactions/${transactionId}/payments/${paymentId}/refunds`;\n\nconst pathTransactionStandaloneRefund = (transactionId: string, paymentId: string) =>\n `/transactions/${transactionId}/payments/${paymentId}/standalonerefunds`;\n\nconst pathTransactionPaymentVoid = (transactionId: string, paymentId: string) =>\n `/transactions/${transactionId}/payments/${paymentId}/voids`;\n\nconst pathCreateEclipseInPatientInvoice = () => `/transactions/invoices/eclipse/imcw`;\n\nconst pathCreateEclipseOverseasInvoice = () => `/transactions/invoices/eclipse/ovsw`;\n\nconst pathCreateEclipseOnlineEligibilityCheckInvoice = () => `/transactions/invoices/eclipse/oecw`;\n\n// @ts-expect-error TS(7006): Parameter 'transactionId' implicitly has an 'any' ... Remove this comment to see the full error message\nconst pathReconcileClaim = (transactionId, claimId) => `/transactions/${transactionId}/claims/${claimId}/reconciles`;\n\nconst pathSaveDraftEclipseInPatientInvoice = () => `/transactions/drafts/eclipse/imcw`;\n\nconst pathSaveDraftEclipseOverseasInvoice = () => `/transactions/drafts/eclipse/ovsw`;\n\nconst pathCreateManualInvoice = () => '/transactions/invoices';\n\nconst pathPhiInvoice = () => '/transactions/invoices/phi';\n\nconst pathPhiQuote = () => `/transactions/quotes/phi`;\n\nconst pathEmailInvoice = (transactionId: string) => `/transactions/${transactionId}/email`;\n\nexport const pathConvertInvoices = (transactionId: string) => `/transactions/${transactionId}/convertinvoices`;\n\n/**\n * Approve a transaction\n * @param {String} transactionId - Transaction ID\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const approveTransaction = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionApprove(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Assign health fund transactions\n * @param {String} healthFundId - Health fund ID\n * @param {Object} opts - Additional options\n */\nexport const assignHealthFundTransactions = async (\n healthFundId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n healthFundId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathHealthFundTransactionsAssign(healthFundId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Assign health fund transaction to self\n * @param {String} healthFundId - Health fund ID\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const assignHealthFundTransactionToSelf = async (\n healthFundId: string,\n transactionId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId,\n healthFundId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathHealthFundTransaction(healthFundId, transactionId)}/assigntome` },\n {\n method: 'put'\n }\n );\n};\n\n/**\n * Assign transaction to self\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const assignTransactionToSelf = async (\n transactionId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathTransactionByTransactionId(transactionId)}/assigntome` },\n {\n method: 'put'\n }\n );\n};\n\n/**\n * Cancel a transaction\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const cancelTransaction = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathTransactionByTransactionId(transactionId)}/cancellations` },\n {\n data: body,\n method: 'post'\n }\n );\n};\n\n/**\n * Cancel a business transaction\n * @param {String} businessId - Business ID\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const cancelBusinessTransaction = async (\n businessId: string,\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId,\n businessId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathBusinessTransaction(businessId, transactionId)}/cancellations` },\n {\n data: body,\n method: 'post'\n }\n );\n};\n\n/**\n * Create an invoice for a business\n * @param {String} businessId - Business ID\n * @param {String} practiceId - Practice ID\n * @param {String} staffId - Staff ID\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createBusinessPracticeStaffMemberInvoice = async (\n businessId: string,\n practiceId: string,\n staffId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n practiceId,\n staffId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathBusinessPracticeStaffInvoices(businessId, practiceId, staffId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create an invoice for a business\n * @param {String} businessId - Business ID\n * @param {String} practiceId - Practice ID\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createBusinessPracticeInvoice = async (\n businessId: string,\n practiceId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n practiceId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathBusinessPracticeInvoices(businessId, practiceId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create a quote for a business\n * @param {String} businessId - Business ID\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createBusinessTransactionQuote = async (\n businessId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathBusinessTransactionQuotes(businessId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create a quote for a staff\n * @param {String} businessId - Business ID\n * @param {String} practiceId - Practice ID\n * @param {String} staffId - Staff ID\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createBusinessPracticeStaffMemberQuote = async (\n businessId: string,\n practiceId: string,\n staffId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n practiceId,\n staffId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathBusinessPracticeStaffQuotes(businessId, practiceId, staffId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create a payment for a transaction\n * @param {String} transactionId - TransactionId\n * @param {String} source - Payment source (e.g. 'mastercard')\n * @param {String} nonce - Nonce (or client token)\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createPayment = async (\n transactionId: string,\n source: string | undefined = undefined,\n nonce: string | undefined = undefined,\n body: Record<string, any> = {},\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n const newBody = { ...body };\n\n if (source && nonce) {\n newBody.payment = {\n source,\n nonce\n };\n }\n\n return request(\n { ...opts, path: `${pathTransactionByTransactionId(transactionId)}/payments` },\n {\n method: 'post',\n data: newBody\n }\n );\n};\n\n/**\n * Create a payment request for a transaction\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createPaymentRequest = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathTransactionByTransactionId(transactionId)}/paymentrequests` },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Complete a quote\n * @param {String} transactionId - Transaction ID\n * @param {Object} memberId - Member ID\n * @param {Object} opts - Additional options\n */\nexport const completeQuote = async (\n transactionId: string,\n memberId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId,\n memberId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathTransactionByTransactionId(transactionId)}/completequote` },\n {\n method: 'post',\n data: {\n memberId\n }\n }\n );\n};\n\n/**\n * Delete a transaction tag\n * @param {String} transactionId - Transaction ID\n * @param {String} tagId - Tag ID\n * @param {Object} opts - Additional options\n */\nexport const deleteTransactionTag = async (\n transactionId: string,\n tagId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId,\n tagId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionTag(transactionId, tagId) },\n {\n method: 'delete'\n }\n );\n};\n\n/**\n * Delete a transaction\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const deleteTransaction = async (\n transactionId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionByTransactionId(transactionId) },\n {\n method: 'delete'\n }\n );\n};\n\n/**\n * Get business transactions\n * @param {String} businessId - Business ID\n * @param {Object} query - query parameters\n * @param {Object} opts - Additional options\n */\nexport const getBusinessTransactions = async (\n businessId: string,\n query: Record<string, any> = {},\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathBusinessTransactions(businessId) },\n {\n method: 'get',\n params: query\n }\n );\n};\n\nexport type GetBusinessTransactionQuery = {\n includeDeleted?: boolean;\n refreshTerminalStatus?: boolean;\n};\n\n/**\n * Get business transaction\n * @param {String} businessId - Business ID\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const getBusinessTransaction = async (\n businessId: string,\n transactionId: string,\n query?: GetBusinessTransactionQuery | null | undefined,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathBusinessTransaction(businessId, transactionId) },\n {\n method: 'get',\n params: query\n }\n );\n};\n\n/**\n * Get business transaction by invoice reference\n * @param {String} businessId - Business ID\n * @param {String} invoiceReference - Invoice reference\n * @param {Object} opts - Additional options\n */\nexport const getBusinessTransactionByInvoiceReference = async (\n businessId: string,\n invoiceReference: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n invoiceReference\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathBusinessTransactionsInvoiceReference(businessId, invoiceReference) },\n {\n method: 'get'\n }\n );\n};\n\n/**\n * Get business transaction payment report\n * @param {String} businessId - Business ID\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const getBusinessTransactionPaymentReport = async (\n businessId: string,\n transactionId: string,\n query: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathBusinessTransaction(businessId, transactionId)}/paymentreport` },\n {\n method: 'get',\n params: query\n }\n );\n};\n\n/**\n * Get business transaction processing report\n * @param {String} businessId - Business ID\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const getBusinessTransactionProcessingReport = async (\n businessId: string,\n transactionId: string,\n query: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathBusinessTransaction(businessId, transactionId)}/processingreport` },\n {\n method: 'get',\n params: query\n }\n );\n};\n\n/**\n * Get business practice transactions\n * @param {String} businessId - Business ID\n * @param {String} practiceId - Practice ID\n * @param {Object} query - query parameters\n * @param {Object} opts - Additional options\n */\nexport const getBusinessPracticeTransactions = async (\n businessId: string,\n practiceId: string,\n query: Record<string, any> = {},\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n practiceId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathBusinessPracticeTransactions(businessId, practiceId) },\n {\n method: 'get',\n params: query\n }\n );\n};\n\n/**\n * Get business staff transactions\n * @param {String} businessId - Business ID\n * @param {String} practiceId - Practice ID\n * @param {String} staffId - Staff ID\n * @param {Object} query - query parameters\n * @param {Object} opts - Additional options\n */\nexport const getBusinessPracticeStaffTransactions = async (\n businessId: string,\n practiceId: string,\n staffId: string,\n query: Record<string, any> = {},\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n practiceId,\n staffId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathBusinessPracticeStaffTransactions(businessId, practiceId, staffId) },\n {\n method: 'get',\n params: query\n }\n );\n};\n\n/**\n * Get transactions by health fund\n * @param {String} healthFundId - Health fund ID\n * @param {Object} query - query parameters\n * @param {Object} opts - Additional options\n */\nexport const getTransactionsForHealthFund = async (\n healthFundId: string,\n query: Record<string, any> = {},\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n healthFundId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionsForHealthFund(healthFundId) },\n {\n method: 'get',\n params: query\n }\n );\n};\n\n/**\n * Get transaction by transaction ID and health fund ID\n * @param {String} healthFundId - Health fund ID\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const getHealthFundTransaction = async (\n healthFundId: string,\n transactionId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n healthFundId,\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathHealthFundTransaction(healthFundId, transactionId) },\n {\n method: 'get'\n }\n );\n};\n\n/**\n * Get transactions by member\n * @param {String} memberId - Health fund ID\n * @param {Object} query - query parameters\n * @param {Object} opts - Additional options\n */\nexport const getTransactionsByMember = async (\n memberId: string,\n query: Record<string, any> = {},\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n memberId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionsByMember(memberId) },\n {\n method: 'get',\n params: query\n }\n );\n};\n\n/**\n * Get health fund member transactions\n * @param {String} healthFundId - Health fund ID\n * @param {String} memberId - Member ID\n * @param {Object} query - query parameters\n * @param {Object} opts - Additional options\n */\nexport const getHealthFundMemberTransactions = async (\n healthFundId: string,\n memberId: string,\n query: Record<string, any> = {},\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n healthFundId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathHealthFundMemberTransactions(healthFundId, memberId) },\n {\n method: 'get',\n params: query\n }\n );\n};\n\nexport type GetTransactionByTransactionIdQuery = {\n includeDeleted?: boolean;\n refreshTerminalStatus?: boolean;\n};\n\n/**\n * Get transaction by transaction ID.\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const getTransactionByTransactionId = async (\n transactionId: string,\n query?: GetTransactionByTransactionIdQuery | null | undefined,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionByTransactionId(transactionId) },\n {\n method: 'get',\n params: query\n }\n );\n};\n\n/**\n * Get transaction PDF\n * @param {String} transactionId - Transaction ID\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const getTransactionPDF = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathTransactionByTransactionId(transactionId)}/pdf` },\n {\n method: 'post',\n data: body,\n responseType: 'arraybuffer'\n }\n );\n};\n\n/**\n * Get transaction claim PDF\n * @param {String} transactionId - Transaction ID\n * @param {String} claimId - Claim ID\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const getTransactionClaimPDF = async (\n transactionId: string,\n claimId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n claimId,\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionClaimPdf(transactionId, claimId) },\n {\n method: 'post',\n data: body,\n responseType: 'arraybuffer'\n }\n );\n};\n\n/**\n * TODO: Use this endpoint for all funder claims, once the funder is supported in the API,\n * replacing the legacy `getTransactionClaimPDF`.\n *\n * Get ECLIPSE transaction claim PDF\n * @param {Object} body - Request body including `transactionId` and `claimId`\n * @param {Object} opts - Additional options\n */\nexport const getTransactionClaimPdfV2 = async (\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n return request(\n { ...opts, path: pathTransactionClaimPdfV2 },\n {\n method: 'post',\n data: body,\n responseType: 'arraybuffer'\n }\n );\n};\n\n/**\n * Reply to a quote\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const replyToQuote = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathReplyQuote(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Send receipt\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const sendReceipt = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionSendReceipt(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Submit an invoice\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const submitInvoice = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathTransactionByTransactionId(transactionId)}/submitinvoice` },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Update transaction\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const updateTransaction = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionByTransactionId(transactionId) },\n {\n method: 'put',\n data: body\n }\n );\n};\n\n/**\n * Validate a transaction\n * @param {String} transactionId - TransactionId\n * @param {Object} opts - Additional options\n */\nexport const validateTransaction = async (\n transactionId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathValidateTransaction(transactionId) },\n {\n method: 'post'\n }\n );\n};\n\n/**\n * Submits a Bridge's claim response to transaction\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const submitTransactionBridgeClaim = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionSubmitBridgeClaim(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Submits a Bridge's payment response to transaction\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const submitTransactionBridgePayment = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionSubmitBridgePayment(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Trigger's a bridge request for a transaction\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const triggerBridge = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionTriggerBridge(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create invoice\n * @param {String} businessId - BusinessId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createInvoice = async (\n businessId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathCreateInvoice(businessId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create or send a claim\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createSendClaim = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathCreateSendClaim(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Update a claim\n * @param {String} transactionId - TransactionId\n * @param {String} claimId - ClaimId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const updateClaim = async (\n transactionId: string,\n claimId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n claimId,\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathClaim(transactionId, claimId) },\n {\n method: 'put',\n data: body\n }\n );\n};\n\n/**\n * Complete a transaction\n * @param {String} transactionId - TransactionId\n * @param {Object} opts - Additional options\n */\nexport const completeTransaction = async (\n transactionId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathCompleteTransaction(transactionId) },\n {\n method: 'post'\n }\n );\n};\n\n/**\n * Approves a claim\n * @param {String} transactionId - TransactionId\n * @param {String} claimId - ClaimId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const approveClaim = async (\n transactionId: string,\n claimId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathApproveClaim(transactionId, claimId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Cancels a claim\n * @param {String} transactionId - Transaction ID\n * @param {String} claimId - Claim ID\n * @param {Object} opts - Additional options\n */\nexport const cancelClaim = async (\n transactionId: string,\n claimId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n claimId,\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathCancelClaim(transactionId, claimId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Submit a claim\n * @param {String} transactionId - TransactionId\n * @param {String} claimId - ClaimId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const submitClaim = async (\n transactionId: string,\n claimId: string,\n body?: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathSubmitClaim(transactionId, claimId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Save claim details\n * @param {String} transactionId - Transaction ID\n * @param {String} claimId - Claim ID\n * @param {Object} opts - Additional options\n */\nexport const saveClaimDetails = async (\n transactionId: string,\n claimId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n claimId,\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathSaveClaim(transactionId, claimId) },\n {\n method: 'post'\n }\n );\n};\n\n/**\n * Create payment\n * @param {String} transactionId - Internal Mongo invoice transaction ID, not a browser-payment identifier\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const pay = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionPays(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Send a processing request\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const sendProcessingRequest = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionProcessingRequests(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Cancel invoice\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const cancelInvoice = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionCancel(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Get payment link\n * @param {String} transactionId - TransactionId\n * @param {Object} opts - Additional options\n */\nexport const getPaymentLink = async (\n transactionId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionPaymentLink(transactionId) },\n {\n method: 'get'\n }\n );\n};\n\n/**\n * Refund transaction\n * @param {String} businessId - BusinessId\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const refundByBusiness = async (\n businessId: string,\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathBusinessTransactionRefund(businessId, transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Refund transaction\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const refund = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionRefund(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Save invoice as draft\n * @param {String} businessId - BusinessId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const saveDraft = async (\n businessId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathCreateDraft(businessId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Convert draft to an invoice\n * @param {String} transactionId - Transaction ID\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const convertDraft = async (\n transactionId: string,\n body?: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Transaction> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathConvertDraft(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Archive an invoice\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const archive = async (transactionId: string, opts: MedipassRequestOpts = {}): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionArchives(transactionId) },\n {\n method: 'put'\n }\n );\n};\n\n/**\n * Unarchive an invoice\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const unarchive = async (\n transactionId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionUnarchives(transactionId) },\n {\n method: 'put'\n }\n );\n};\n\n/**\n * Send terminal input\n * @param {String} transactionId - Transaction ID\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const terminalInput = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionTerminalInput(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Send terminal cancellation\n * @param {String} transactionId - Transaction ID\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const terminalCancellation = async (\n transactionId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionTerminalCancel(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\nexport interface RefundPaymentRequestBody {\n refundAmount: string;\n refundReason: string;\n terminal?: {\n terminalId: string;\n merchantId: string;\n };\n}\n\n/**\n * Refund transaction's payment\n * @param {String} transactionId - TransactionId\n * @param {String} paymentId - PaymentId\n * @param {RefundPaymentRequestBody} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const refundPayment = async (\n transactionId: string,\n paymentId: string,\n body: RefundPaymentRequestBody,\n opts: MedipassRequestOpts = {}\n): Promise<Transaction> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionPaymentRefund(transactionId, paymentId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Perform a standalone refund of a transaction's payment\n * @param {String} transactionId - TransactionId\n * @param {String} paymentId - PaymentId\n * @param {RefundPaymentRequestBody} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const standaloneRefund = async (\n transactionId: string,\n paymentId: string,\n body: RefundPaymentRequestBody,\n opts: MedipassRequestOpts = {}\n): Promise<Transaction> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionStandaloneRefund(transactionId, paymentId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Void transaction's payment\n * @param {String} transactionId - TransactionId\n * @param {String} paymentId - PaymentId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const voidPayment = async (\n transactionId: string,\n paymentId: string,\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathTransactionPaymentVoid(transactionId, paymentId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create ECLIPSE invoice - In Patient\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createEclipseInPatientInvoice = async (\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n return request(\n { ...opts, path: pathCreateEclipseInPatientInvoice() },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create ECLIPSE invoice - Overseas\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createEclipseOverseasInvoice = async (\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n return request(\n { ...opts, path: pathCreateEclipseOverseasInvoice() },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create ECLIPSE invoice - Online Eligibility Check\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createEclipseOnlineEligibilityCheckInvoice = async (\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n return request(\n { ...opts, path: pathCreateEclipseOnlineEligibilityCheckInvoice() },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Get business ECLIPSE transaction payment report\n * @param {String} businessId - Business ID\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const getBusinessEclipseTransactionPaymentReport = async (\n businessId: string,\n transactionId: string,\n query: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathBusinessTransaction(businessId, transactionId)}/paymentreport/eclipse` },\n {\n method: 'get',\n params: query\n }\n );\n};\n\n/**\n * Get business ECLIPSE transaction processing report\n * @param {String} businessId - Business ID\n * @param {String} transactionId - Transaction ID\n * @param {Object} opts - Additional options\n */\nexport const getBusinessEclipseTransactionProcessingReport = async (\n businessId: string,\n transactionId: string,\n query: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n businessId,\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: `${pathBusinessTransaction(businessId, transactionId)}/processingreport/eclipse` },\n {\n method: 'get',\n params: query\n }\n );\n};\n\n/**\n * Reconciles a claim\n * @param {String} transactionId - TransactionId\n * @param {String} claimId - ClaimId\n * @param {Object} opts - Additional options\n */\nexport const reconcileClaim = async (\n transactionId: string,\n claimId: string,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathReconcileClaim(transactionId, claimId) },\n {\n method: 'post'\n }\n );\n};\n\n/**\n * Save draft for ECLIPSE invoice - In Patient\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const saveDraftEclipseInPatientInvoice = async (\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n return request(\n { ...opts, path: pathSaveDraftEclipseInPatientInvoice() },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Save draft ECLIPSE invoice - Overseas\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const saveDraftEclipseOverseasInvoice = async (\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n return request(\n { ...opts, path: pathSaveDraftEclipseOverseasInvoice() },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create PHI invoice\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createPhiInvoice = async (\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n return request(\n { ...opts, path: pathPhiInvoice() },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create a PHI quote\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createPhiQuote = async (\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n return request(\n { ...opts, path: pathPhiQuote() },\n {\n method: 'post',\n data: body\n }\n );\n};\n\nexport interface EmailInvoiceRequestBody {\n emailTo: string[];\n message: string;\n}\n\n/**\n * Email invoice\n * @param {String} transactionId - TransactionId\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const emailInvoice = async (\n transactionId: string,\n body: EmailInvoiceRequestBody,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n doesParamExist(\n {\n transactionId\n },\n opts.hyperMediaEndpoint\n );\n return request(\n { ...opts, path: pathEmailInvoice(transactionId) },\n {\n method: 'post',\n data: body\n }\n );\n};\n\n/**\n * Create invoices ( Smart Invoice )\n * @param {Object} body - Request body\n * @param {Object} opts - Additional options\n */\nexport const createManualInvoice = async (\n body: Record<string, any>,\n opts: MedipassRequestOpts = {}\n): Promise<Record<string, any>> => {\n // Validate required parameters if any (none in this case)\n doesParamExist({}, opts.hyperMediaEndpoint);\n\n return request(\n { ...opts, path: pathCreateManualInvoice() },\n {\n method: 'post',\n data: body\n }\n );\n};\n\nexport const convertInvoices = (\n transactionId: string,\n body: ConvertInvoicesRequestBody,\n opts: MedipassRequestOpts = {}\n): Promise<ConvertInvoicesResponse> => {\n return request({ ...opts, path: pathConvertInvoices(transactionId) }, { method: 'post', data: body });\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,4BAA2B,eAAc,eAAe,WAAW;AAGzE,MAAM,2BAA2B,YAAY,kBAC3C,eAAe,WAAW,gBAAgB;AAG5C,MAAM,iCAAiC,YAAY,kBACjD,eAAe,WAAW,gBAAgB,cAAc;AAG1D,MAAM,oCAAoC,YAAY,eACpD,eAAe,WAAW,aAAa,WAAW;AAGpD,MAAM,qCAAqC,YAAY,YAAY,YACjE,eAAe,WAAW,aAAa,WAAW,SAAS,QAAQ;AAGrE,MAAM,gCAAgC,YAAY,eAChD,eAAe,WAAW,aAAa,WAAW;AAGpD,MAAM,iCAAgC,eAAc,eAAe,WAAW;AAG9E,MAAM,mCAAmC,YAAY,YAAY,YAC/D,eAAe,WAAW,aAAa,WAAW,SAAS,QAAQ;AAGrE,MAAM,yCAAyC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EAAE,GAAG;EAAM,MAAM,yBAAyB;EAAE,EAC5C;EACE,QAAQ;EACR,MAAM;EACP,CACF;;AAGH,MAAa,mBACX,eACA,MACA,OAA4B,EAAE,KACO;AACrC,QAAOA,gBAAQ;EAAE,GAAG;EAAM,MAAM,oBAAoB,cAAc;EAAE,EAAE;EAAE,QAAQ;EAAQ,MAAM;EAAM,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ import { Account, CreateOrganisationSupportAccountBody } from "./account.js";
|
|
|
33
33
|
import { TerminalPin } from "./terminal-pin.js";
|
|
34
34
|
import { SettlementSummariesByPeriodItem, SettlementSummariesByPeriodQuery, SettlementSummariesByPeriodResponse, SettlementSummariesItem, SettlementSummariesQuery, SettlementSummariesResponse, SettlementSummaryResponse } from "./settlement-summaries.js";
|
|
35
35
|
import { GetSettlementsItem, GetSettlementsQuery, GetSettlementsResponse, InitiateBusinessSettlementExportRequestBody } from "./settlements.js";
|
|
36
|
+
import { InitiateBrowserPaymentBody, InitiateBrowserPaymentResponse, PayPalPaymentBody, PayPalPaymentToken, PayPalSalesOptions, SalesOptionsResponse } from "./sales.js";
|
|
36
37
|
|
|
37
38
|
//#region src/types/index.d.ts
|
|
38
39
|
type MedipassRequestOpts = {
|
|
@@ -86,5 +87,5 @@ interface ErrorResponse {
|
|
|
86
87
|
};
|
|
87
88
|
}
|
|
88
89
|
//#endregion
|
|
89
|
-
export { Abr, Account, ActivateHealthPointDigitalClaimingBody, Application, ApplyForBusinessFormRequestBody, BeneficialOwner, BlacklistedBankAccount, Business, BusinessContactInformation, BusinessDocumentResponse, BusinessDocumentsQuery, BusinessDocumentsResponse, BusinessEmailLog, BusinessEmailLogQuery, BusinessKycPinResponse, CeaseHealthFundDocumentBody, ConvertInvoicesRequestBody, ConvertInvoicesResponse, CreateBusinessSubscriptionBody, CreateHealthFundFormRequestBody, CreateNoteRequestBody, CreateOrganisationSupportAccountBody, DeclineHealthFundDocumentBody, Device, ErrorResponse, File, FilterGroup, FilterOption, Funder, FunderValue, GetBusinessMessageMappingsQuery, GetBusinessMessageMappingsResponse, GetBusinessProductsQuery, GetBusinessSubscriptionsQuery, GetHealthFundFormUploadUrlQuery, GetHealthFundFormsQuery, GetKeyAccountsQuery, GetKeyAccountsResponse, GetProfessionalCategoriesQuery, GetSettlementsItem, GetSettlementsQuery, GetSettlementsResponse, GetSpecialtiesQuery, HealthFundDocumentResponse, HealthFundDocumentsQuery, HealthFundDocumentsResponse, HealthPointApplicationStatus, HealthPointAssociationAttributes, HealthPointAttributes, HealthPointRegistrationApplicationResponse, HealthPointSettlementAttributes, HicapsProviderSetAttributes, HttpClient, HttpClientConfig, HttpClientError, HttpClientResponse, InitiateBusinessSettlementExportRequestBody, KeyAccount, Kyc, MedipassRequestOpts, MfaUser, Organisation, PaginatedQuery, PaginatedResponse, PaginationMeta, ParkHealthFundDocumentBody, ParsedProviderRegistration, ParsedProviderSetItem, Practice, ProductResponse, ProductsResponse, ProfessionalCategory, ProviderNumberType, ProviderRegistration, ProviderRegistrationType, ProviderSetItem, ProviderSetItemRequestBody, S3FileExportStatus, SettlementSummariesByPeriodItem, SettlementSummariesByPeriodQuery, SettlementSummariesByPeriodResponse, SettlementSummariesItem, SettlementSummariesQuery, SettlementSummariesResponse, SettlementSummaryResponse, SetupOpts, ShortBusinessResponse, ShortPracticeResponse, Specialty, StaffMember, SubscriptionResponse, SubscriptionsResponse, SupportEmail, TerminalPin, Transaction, UpdateBusinessBody, UpdateBusinessKycBody, UpdateBusinessSubscriptionBody, UpdateHealthFundFormRequestBody, UpdateHealthPointRegistrationApplicationBody, UpdateStaffMemberEmailResponse, VerificationDocument, VirusScan, createHttpClient };
|
|
90
|
+
export { Abr, Account, ActivateHealthPointDigitalClaimingBody, Application, ApplyForBusinessFormRequestBody, BeneficialOwner, BlacklistedBankAccount, Business, BusinessContactInformation, BusinessDocumentResponse, BusinessDocumentsQuery, BusinessDocumentsResponse, BusinessEmailLog, BusinessEmailLogQuery, BusinessKycPinResponse, CeaseHealthFundDocumentBody, ConvertInvoicesRequestBody, ConvertInvoicesResponse, CreateBusinessSubscriptionBody, CreateHealthFundFormRequestBody, CreateNoteRequestBody, CreateOrganisationSupportAccountBody, DeclineHealthFundDocumentBody, Device, ErrorResponse, File, FilterGroup, FilterOption, Funder, FunderValue, GetBusinessMessageMappingsQuery, GetBusinessMessageMappingsResponse, GetBusinessProductsQuery, GetBusinessSubscriptionsQuery, GetHealthFundFormUploadUrlQuery, GetHealthFundFormsQuery, GetKeyAccountsQuery, GetKeyAccountsResponse, GetProfessionalCategoriesQuery, GetSettlementsItem, GetSettlementsQuery, GetSettlementsResponse, GetSpecialtiesQuery, HealthFundDocumentResponse, HealthFundDocumentsQuery, HealthFundDocumentsResponse, HealthPointApplicationStatus, HealthPointAssociationAttributes, HealthPointAttributes, HealthPointRegistrationApplicationResponse, HealthPointSettlementAttributes, HicapsProviderSetAttributes, HttpClient, HttpClientConfig, HttpClientError, HttpClientResponse, InitiateBrowserPaymentBody, InitiateBrowserPaymentResponse, InitiateBusinessSettlementExportRequestBody, KeyAccount, Kyc, MedipassRequestOpts, MfaUser, Organisation, PaginatedQuery, PaginatedResponse, PaginationMeta, ParkHealthFundDocumentBody, ParsedProviderRegistration, ParsedProviderSetItem, PayPalPaymentBody, PayPalPaymentToken, PayPalSalesOptions, Practice, ProductResponse, ProductsResponse, ProfessionalCategory, ProviderNumberType, ProviderRegistration, ProviderRegistrationType, ProviderSetItem, ProviderSetItemRequestBody, S3FileExportStatus, SalesOptionsResponse, SettlementSummariesByPeriodItem, SettlementSummariesByPeriodQuery, SettlementSummariesByPeriodResponse, SettlementSummariesItem, SettlementSummariesQuery, SettlementSummariesResponse, SettlementSummaryResponse, SetupOpts, ShortBusinessResponse, ShortPracticeResponse, Specialty, StaffMember, SubscriptionResponse, SubscriptionsResponse, SupportEmail, TerminalPin, Transaction, UpdateBusinessBody, UpdateBusinessKycBody, UpdateBusinessSubscriptionBody, UpdateHealthFundFormRequestBody, UpdateHealthPointRegistrationApplicationBody, UpdateStaffMemberEmailResponse, VerificationDocument, VirusScan, createHttpClient };
|
|
90
91
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//#region src/types/sales.d.ts
|
|
2
|
+
interface PayPalSalesOptions {
|
|
3
|
+
clientId: string;
|
|
4
|
+
accountId: string;
|
|
5
|
+
}
|
|
6
|
+
interface SalesOptionsResponse {
|
|
7
|
+
paymentTypes: {
|
|
8
|
+
paypal?: PayPalSalesOptions;
|
|
9
|
+
[paymentType: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
interface InitiateBrowserPaymentBody {
|
|
13
|
+
/** Full payable amount, including shipping, in major currency units (e.g. "85.00"). */
|
|
14
|
+
amount: string;
|
|
15
|
+
currencyCode: string;
|
|
16
|
+
paymentType: 'paypal';
|
|
17
|
+
}
|
|
18
|
+
interface InitiateBrowserPaymentResponse {
|
|
19
|
+
/** Return this value from the PayPal SDK createOrder callback. Do not send it to /pays. */
|
|
20
|
+
interactionId: string;
|
|
21
|
+
/** Send this value as paymentToken.nonce. */
|
|
22
|
+
orderId: string;
|
|
23
|
+
/** Send this value as paymentToken.transactionId, independently of the invoice ID in the /pays URL. */
|
|
24
|
+
transactionId: string;
|
|
25
|
+
}
|
|
26
|
+
interface PayPalPaymentToken {
|
|
27
|
+
methodType: 'paypal';
|
|
28
|
+
/** orderId returned by browser-payment initiation. */
|
|
29
|
+
nonce: string;
|
|
30
|
+
/** transactionId returned by browser-payment initiation. */
|
|
31
|
+
transactionId: string;
|
|
32
|
+
saveOnSuccess?: never;
|
|
33
|
+
}
|
|
34
|
+
interface PayPalPaymentBody {
|
|
35
|
+
paymentToken: PayPalPaymentToken;
|
|
36
|
+
/** Omit for self-checkout; set to true for an authorised assisted payment. */
|
|
37
|
+
cardHolderAuthorisedPayment?: boolean;
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { InitiateBrowserPaymentBody, InitiateBrowserPaymentResponse, PayPalPaymentBody, PayPalPaymentToken, PayPalSalesOptions, SalesOptionsResponse };
|
|
41
|
+
//# sourceMappingURL=sales.d.ts.map
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medipass/web-sdk",
|
|
3
|
-
"version": "13.0
|
|
3
|
+
"version": "13.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"store": "2.0.12"
|
|
117
117
|
},
|
|
118
118
|
"devDependencies": {
|
|
119
|
-
"@medipass/utils": "^12.0
|
|
119
|
+
"@medipass/utils": "^12.1.0",
|
|
120
120
|
"@types/applepayjs": "14.0.8",
|
|
121
121
|
"@types/googlepay": "0.7.6",
|
|
122
122
|
"@types/lodash": "4.17.24",
|
|
@@ -129,5 +129,5 @@
|
|
|
129
129
|
"vite-tsconfig-paths": "6.1.1",
|
|
130
130
|
"vitest": "4.1.5"
|
|
131
131
|
},
|
|
132
|
-
"gitHead": "
|
|
132
|
+
"gitHead": "e9bb19e16346ee0922baec2858dcaf2b813af210"
|
|
133
133
|
}
|