@medipass/web-sdk 11.38.0 → 11.38.1-feature-typescript-claudia.1
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/.eslintrc.cjs +95 -0
- package/babel.config.js +2 -1
- package/lib/index.d.ts +262 -0
- package/lib/index.js +83 -3
- package/lib/{regions-ed54f163.js → regions-a0a28864.js} +2 -2
- package/lib/resources/accounts.d.ts +215 -0
- package/lib/resources/accounts.js +3 -3
- package/lib/resources/actions.d.ts +13 -0
- package/lib/resources/actions.js +3 -3
- package/lib/resources/api-keys.d.ts +24 -0
- package/lib/resources/api-keys.js +3 -3
- package/lib/resources/applications.d.ts +31 -0
- package/lib/resources/applications.js +3 -3
- package/lib/resources/attachments.d.ts +32 -0
- package/lib/resources/attachments.js +3 -3
- package/lib/resources/auth.d.ts +59 -0
- package/lib/resources/auth.js +3 -3
- package/lib/resources/bulk-submits.d.ts +17 -0
- package/lib/resources/bulk-submits.js +3 -3
- package/lib/resources/bulk-uploads.d.ts +26 -0
- package/lib/resources/bulk-uploads.js +3 -3
- package/lib/resources/business-profiles.d.ts +18 -0
- package/lib/resources/business-profiles.js +3 -3
- package/lib/resources/businesses.d.ts +132 -0
- package/lib/resources/businesses.js +3 -3
- package/lib/resources/claim-items.d.ts +31 -0
- package/lib/resources/claim-items.js +3 -3
- package/lib/resources/devices.d.ts +11 -0
- package/lib/resources/devices.js +3 -3
- package/lib/resources/doc-accounts.d.ts +32 -0
- package/lib/resources/doc-accounts.js +3 -3
- package/lib/resources/documents.d.ts +90 -0
- package/lib/resources/documents.js +3 -3
- package/lib/resources/emails.d.ts +14 -0
- package/lib/resources/emails.js +3 -3
- package/lib/resources/form-application-templates.d.ts +20 -0
- package/lib/resources/form-application-templates.js +3 -3
- package/lib/resources/form-applications.d.ts +27 -0
- package/lib/resources/form-applications.js +3 -3
- package/lib/resources/forms.d.ts +100 -0
- package/lib/resources/forms.js +3 -3
- package/lib/resources/funder-services.d.ts +8 -0
- package/lib/resources/funder-services.js +3 -3
- package/lib/resources/funder-settings.d.ts +8 -0
- package/lib/resources/funder-settings.js +3 -3
- package/lib/resources/funders.d.ts +5 -0
- package/lib/resources/funders.js +3 -3
- package/lib/resources/futures.d.ts +85 -0
- package/lib/resources/futures.js +3 -3
- package/lib/resources/health-fund-accounts.d.ts +78 -0
- package/lib/resources/health-fund-accounts.js +3 -3
- package/lib/resources/health-fund-settings.d.ts +39 -0
- package/lib/resources/health-fund-settings.js +3 -3
- package/lib/resources/healthfunds.d.ts +64 -0
- package/lib/resources/healthfunds.js +3 -3
- package/lib/resources/icditems.d.ts +14 -0
- package/lib/resources/icditems.js +3 -3
- package/lib/resources/invoice-scans.d.ts +26 -0
- package/lib/resources/invoice-scans.js +3 -3
- package/lib/resources/jhcs.d.ts +7 -0
- package/lib/resources/jhcs.js +3 -3
- package/lib/resources/kyc.d.ts +109 -0
- package/lib/resources/kyc.js +3 -3
- package/lib/resources/logs.d.ts +16 -0
- package/lib/resources/logs.js +3 -3
- package/lib/resources/members.d.ts +92 -0
- package/lib/resources/members.js +3 -3
- package/lib/resources/message-mappings.d.ts +9 -0
- package/lib/resources/message-mappings.js +3 -3
- package/lib/resources/minions.d.ts +40 -0
- package/lib/resources/minions.js +3 -3
- package/lib/resources/modalities.d.ts +19 -0
- package/lib/resources/modalities.js +3 -3
- package/lib/resources/notes.d.ts +17 -0
- package/lib/resources/notes.js +3 -3
- package/lib/resources/onboarding-applications.d.ts +52 -0
- package/lib/resources/onboarding-applications.js +3 -3
- package/lib/resources/onboarding-requests.d.ts +39 -0
- package/lib/resources/onboarding-requests.js +3 -3
- package/lib/resources/ops.d.ts +60 -0
- package/lib/resources/ops.js +3 -3
- package/lib/resources/organisations.d.ts +7 -0
- package/lib/resources/organisations.js +3 -3
- package/lib/resources/partners.d.ts +50 -0
- package/lib/resources/partners.js +3 -3
- package/lib/resources/patients.d.ts +44 -0
- package/lib/resources/patients.js +3 -3
- package/lib/resources/payments.d.ts +155 -0
- package/lib/resources/payments.js +3 -3
- package/lib/resources/pms.d.ts +43 -0
- package/lib/resources/pms.js +3 -3
- package/lib/resources/practice-profiles.d.ts +20 -0
- package/lib/resources/practice-profiles.js +3 -3
- package/lib/resources/practice-types.d.ts +6 -0
- package/lib/resources/practice-types.js +3 -3
- package/lib/resources/practices.d.ts +137 -0
- package/lib/resources/practices.js +3 -3
- package/lib/resources/products.d.ts +23 -0
- package/lib/resources/products.js +3 -3
- package/lib/resources/professional-categories.d.ts +23 -0
- package/lib/resources/professional-categories.js +3 -3
- package/lib/resources/provider-number-types.d.ts +16 -0
- package/lib/resources/provider-number-types.js +3 -3
- package/lib/resources/provider-registration-types.d.ts +15 -0
- package/lib/resources/provider-registration-types.js +3 -3
- package/lib/resources/provider-requests.d.ts +17 -0
- package/lib/resources/provider-requests.js +3 -3
- package/lib/resources/provider-types.d.ts +6 -0
- package/lib/resources/provider-types.js +3 -3
- package/lib/resources/ref-sources.d.ts +6 -0
- package/lib/resources/ref-sources.js +3 -3
- package/lib/resources/risk.d.ts +13 -0
- package/lib/resources/risk.js +3 -3
- package/lib/resources/rnas.d.ts +43 -0
- package/lib/resources/rnas.js +3 -3
- package/lib/resources/roles.d.ts +7 -0
- package/lib/resources/roles.js +3 -3
- package/lib/resources/self-checkout-sessions.d.ts +134 -0
- package/lib/resources/self-checkout-sessions.js +3 -3
- package/lib/resources/services.d.ts +88 -0
- package/lib/resources/services.js +3 -3
- package/lib/resources/settlements.d.ts +37 -0
- package/lib/resources/settlements.js +3 -3
- package/lib/resources/sign-up.d.ts +5 -0
- package/lib/resources/sign-up.js +3 -3
- package/lib/resources/specialties.d.ts +23 -0
- package/lib/resources/specialties.js +3 -3
- package/lib/resources/staff-profiles.d.ts +20 -0
- package/lib/resources/staff-profiles.js +3 -3
- package/lib/resources/staff.d.ts +242 -0
- package/lib/resources/staff.js +3 -3
- package/lib/resources/statistics.d.ts +56 -0
- package/lib/resources/statistics.js +3 -3
- package/lib/resources/subscriptions.d.ts +32 -0
- package/lib/resources/subscriptions.js +3 -3
- package/lib/resources/terminals.d.ts +71 -0
- package/lib/resources/terminals.js +3 -3
- package/lib/resources/transaction-export.d.ts +18 -0
- package/lib/resources/transaction-export.js +3 -3
- package/lib/resources/transactions.d.ts +466 -0
- package/lib/resources/transactions.js +3 -3
- package/lib/resources/triggers.d.ts +20 -0
- package/lib/resources/triggers.js +3 -3
- package/lib/resources/vendors.d.ts +9 -0
- package/lib/resources/vendors.js +3 -3
- package/lib/resources/verify.d.ts +9 -0
- package/lib/resources/verify.js +3 -3
- package/lib/resources/workers.d.ts +3 -0
- package/lib/resources/workers.js +3 -3
- package/lib/resources/workflow-exceptions.d.ts +5 -0
- package/lib/resources/workflow-exceptions.js +3 -3
- package/lib/services/aws.d.ts +54 -0
- package/lib/services/aws.js +3 -3
- package/lib/services/storage.d.ts +28 -0
- package/lib/services/storage.js +126 -18
- package/lib/services/version.d.ts +21 -0
- package/lib/services/version.js +3 -3
- package/lib/{staff-f19eb168.js → staff-96febcd8.js} +188 -581
- package/lib/types/documents.d.ts +115 -0
- package/lib/types/documents.js +2 -0
- package/lib/types/forms.d.ts +67 -0
- package/lib/types/forms.js +2 -0
- package/lib/types/index.d.ts +42 -0
- package/lib/types/index.js +2 -0
- package/lib/types/message-mappings.d.ts +18 -0
- package/lib/types/message-mappings.js +2 -0
- package/lib/types/notes.d.ts +5 -0
- package/lib/types/notes.js +2 -0
- package/lib/types/products.d.ts +34 -0
- package/lib/types/products.js +2 -0
- package/lib/types/professional-categories.d.ts +20 -0
- package/lib/types/professional-categories.js +2 -0
- package/lib/types/specialties.d.ts +22 -0
- package/lib/types/specialties.js +2 -0
- package/lib/types/subscriptions.d.ts +52 -0
- package/lib/types/subscriptions.js +2 -0
- package/lib/utils/application.d.ts +1 -0
- package/lib/utils/application.js +3 -3
- package/lib/utils/base-urls/core.d.ts +19 -0
- package/lib/utils/base-urls/index.d.ts +37 -0
- package/lib/utils/base-urls/risk.d.ts +17 -0
- package/lib/utils/does-param-exist.d.ts +2 -0
- package/lib/utils/get-axios-error.d.ts +2 -0
- package/lib/utils/param-error.d.ts +3 -0
- package/lib/utils/professions.d.ts +3 -0
- package/lib/utils/professions.js +3 -3
- package/lib/utils/regions.d.ts +1 -0
- package/lib/utils/regions.js +2 -2
- package/lib/utils/request.d.ts +3 -0
- package/lib/utils/request.js +3 -3
- package/lib/utils/staff.d.ts +8 -0
- package/lib/utils/staff.js +3 -3
- package/package.json +19 -9
- package/tsconfig.json +33 -0
- package/types/globals.d.ts +7 -0
- package/types/index.d.ts +1 -0
- package/.eslintrc +0 -3
- package/lib/_types/documents.js.flow +0 -118
- package/lib/_types/forms.js.flow +0 -57
- package/lib/_types/index.js.flow +0 -47
- package/lib/_types/message-mappings.js.flow +0 -22
- package/lib/_types/notes.js.flow +0 -7
- package/lib/_types/products.js.flow +0 -40
- package/lib/_types/professional-categories.js.flow +0 -25
- package/lib/_types/specialties.js.flow +0 -27
- package/lib/_types/subscriptions.js.flow +0 -58
- package/lib/index.js.flow +0 -438
- package/lib/resources/accounts.js.flow +0 -445
- package/lib/resources/actions.js.flow +0 -25
- package/lib/resources/api-keys.js.flow +0 -54
- package/lib/resources/applications.js.flow +0 -60
- package/lib/resources/attachments.js.flow +0 -75
- package/lib/resources/auth.js.flow +0 -185
- package/lib/resources/bulk-submits.js.flow +0 -43
- package/lib/resources/bulk-uploads.js.flow +0 -56
- package/lib/resources/business-profiles.js.flow +0 -45
- package/lib/resources/businesses.js.flow +0 -267
- package/lib/resources/claim-items.js.flow +0 -76
- package/lib/resources/devices.js.flow +0 -64
- package/lib/resources/doc-accounts.js.flow +0 -61
- package/lib/resources/documents.js.flow +0 -216
- package/lib/resources/emails.js.flow +0 -96
- package/lib/resources/form-application-templates.js.flow +0 -52
- package/lib/resources/form-applications.js.flow +0 -62
- package/lib/resources/forms.js.flow +0 -222
- package/lib/resources/funder-services.js.flow +0 -17
- package/lib/resources/funder-settings.js.flow +0 -58
- package/lib/resources/funders.js.flow +0 -15
- package/lib/resources/futures.js.flow +0 -154
- package/lib/resources/health-fund-accounts.js.flow +0 -198
- package/lib/resources/health-fund-settings.js.flow +0 -104
- package/lib/resources/healthfunds.js.flow +0 -139
- package/lib/resources/icditems.js.flow +0 -36
- package/lib/resources/invoice-scans.js.flow +0 -56
- package/lib/resources/jhcs.js.flow +0 -20
- package/lib/resources/kyc.js.flow +0 -216
- package/lib/resources/logs.js.flow +0 -32
- package/lib/resources/members.js.flow +0 -196
- package/lib/resources/message-mappings.js.flow +0 -25
- package/lib/resources/minions.js.flow +0 -96
- package/lib/resources/modalities.js.flow +0 -46
- package/lib/resources/notes.js.flow +0 -112
- package/lib/resources/onboarding-applications.js.flow +0 -142
- package/lib/resources/onboarding-requests.js.flow +0 -97
- package/lib/resources/ops.js.flow +0 -116
- package/lib/resources/organisations.js.flow +0 -15
- package/lib/resources/partners.js.flow +0 -118
- package/lib/resources/patients.js.flow +0 -102
- package/lib/resources/payments.js.flow +0 -523
- package/lib/resources/pms.js.flow +0 -102
- package/lib/resources/practice-profiles.js.flow +0 -51
- package/lib/resources/practice-types.js.flow +0 -14
- package/lib/resources/practices.js.flow +0 -314
- package/lib/resources/products.js.flow +0 -48
- package/lib/resources/professional-categories.js.flow +0 -56
- package/lib/resources/provider-number-types.js.flow +0 -32
- package/lib/resources/provider-registration-types.js.flow +0 -32
- package/lib/resources/provider-requests.js.flow +0 -46
- package/lib/resources/provider-types.js.flow +0 -14
- package/lib/resources/ref-sources.js.flow +0 -16
- package/lib/resources/risk.js.flow +0 -29
- package/lib/resources/rnas.js.flow +0 -108
- package/lib/resources/roles.js.flow +0 -12
- package/lib/resources/self-checkout-sessions.js.flow +0 -382
- package/lib/resources/services.js.flow +0 -219
- package/lib/resources/settlements.js.flow +0 -97
- package/lib/resources/sign-up.js.flow +0 -15
- package/lib/resources/specialties.js.flow +0 -46
- package/lib/resources/staff-profiles.js.flow +0 -51
- package/lib/resources/staff.js.flow +0 -583
- package/lib/resources/statistics.js.flow +0 -147
- package/lib/resources/subscriptions.js.flow +0 -81
- package/lib/resources/terminals.js.flow +0 -161
- package/lib/resources/transaction-export.js.flow +0 -48
- package/lib/resources/transactions.js.flow +0 -1097
- package/lib/resources/triggers.js.flow +0 -36
- package/lib/resources/vendors.js.flow +0 -28
- package/lib/resources/verify.js.flow +0 -14
- package/lib/resources/workers.js.flow +0 -10
- package/lib/resources/workflow-exceptions.js.flow +0 -17
- package/lib/services/__mocks__/storage.js.flow +0 -30
- package/lib/services/aws.js.flow +0 -339
- package/lib/services/storage.js.flow +0 -92
- package/lib/services/version.js.flow +0 -73
- package/lib/storage-16fd26f8.js +0 -1268
- package/lib/utils/application.js.flow +0 -23
- package/lib/utils/base-urls/core.js.flow +0 -18
- package/lib/utils/base-urls/index.js.flow +0 -7
- package/lib/utils/base-urls/risk.js.flow +0 -16
- package/lib/utils/does-param-exist.js.flow +0 -23
- package/lib/utils/get-axios-error.js.flow +0 -8
- package/lib/utils/param-error.js.flow +0 -8
- package/lib/utils/professions.js.flow +0 -66
- package/lib/utils/regions.js.flow +0 -21
- package/lib/utils/request.js.flow +0 -36
- package/lib/utils/staff.js.flow +0 -81
|
@@ -1,314 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
import request from '../utils/request';
|
|
4
|
-
import doesParamExist from '../utils/does-param-exist';
|
|
5
|
-
import type { MedipassRequestOpts } from '../_types';
|
|
6
|
-
|
|
7
|
-
const pathBusinessFormPractices = (businessId, formId) => `/businesses/${businessId}/forms/${formId}/practices`;
|
|
8
|
-
const pathBusinessPractices = businessId => `/businesses/${businessId}/practices`;
|
|
9
|
-
const pathBusinessPractice = (businessId, practiceId) => `/businesses/${businessId}/practices/${practiceId}`;
|
|
10
|
-
const pathBusinessPracticeUploadUrl = (businessId, practiceId) =>
|
|
11
|
-
`/businesses/${businessId}/practices/${practiceId}/uploadurlv2`;
|
|
12
|
-
const pathOnboardingPractices = () => '/practices/onboarding/search';
|
|
13
|
-
const pathOrganisationPractices = organisationId => `/organisations/${organisationId}/practices`;
|
|
14
|
-
const pathOrganisationPractice = (organisationId, practiceId) =>
|
|
15
|
-
`/organisations/${organisationId}/practices/${practiceId}`;
|
|
16
|
-
const pathPractice = practiceId => `/practices/${practiceId}`;
|
|
17
|
-
const pathGetPracticesWithApprovedApplications = (businessId, formId) =>
|
|
18
|
-
`/businesses/${businessId}/forms/${formId}/practices/approved`;
|
|
19
|
-
const pathBusinessStaffPractices = (businessId, staffId) => `/businesses/${businessId}/staff/${staffId}/practices`;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Create business practice
|
|
23
|
-
* @param {String} businessId - Business ID
|
|
24
|
-
* @param {Object} body - Request body
|
|
25
|
-
* @param {Object} opts - Additional options
|
|
26
|
-
*/
|
|
27
|
-
export const createBusinessPractice = async (
|
|
28
|
-
businessId: string,
|
|
29
|
-
body: Object,
|
|
30
|
-
opts?: MedipassRequestOpts = {}
|
|
31
|
-
): Promise<Object> => {
|
|
32
|
-
doesParamExist({ businessId }, opts.hyperMediaEndpoint);
|
|
33
|
-
return request({ ...opts, path: pathBusinessPractices(businessId) }, { method: 'post', data: body });
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Create organisation practice
|
|
38
|
-
* @param {String} organisationId - Organisation ID
|
|
39
|
-
* @param {Object} body - Request body
|
|
40
|
-
* @param {Object} opts - Additional options
|
|
41
|
-
*/
|
|
42
|
-
export const createOrganisationPractice = async (
|
|
43
|
-
organisationId: string,
|
|
44
|
-
body: Object,
|
|
45
|
-
opts?: MedipassRequestOpts = {}
|
|
46
|
-
): Promise<Object> => {
|
|
47
|
-
doesParamExist({ organisationId }, opts.hyperMediaEndpoint);
|
|
48
|
-
return request({ ...opts, path: pathOrganisationPractices(organisationId) }, { method: 'post', data: body });
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Delete business practice
|
|
53
|
-
* @param {String} businessId - Business ID
|
|
54
|
-
* @param {String} practiceId - Practice ID
|
|
55
|
-
* @param {Object} opts - Additional options
|
|
56
|
-
*/
|
|
57
|
-
export const deleteBusinessPractice = async (
|
|
58
|
-
businessId: string,
|
|
59
|
-
practiceId: string,
|
|
60
|
-
opts?: MedipassRequestOpts = {}
|
|
61
|
-
): Promise<Object> => {
|
|
62
|
-
doesParamExist({ businessId, practiceId }, opts.hyperMediaEndpoint);
|
|
63
|
-
return request({ ...opts, path: pathBusinessPractice(businessId, practiceId) }, { method: 'delete' });
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Delete organisation practice
|
|
68
|
-
* @param {String} organisationId - Organisation ID
|
|
69
|
-
* @param {String} practiceId - Practice ID
|
|
70
|
-
* @param {Object} opts - Additional options
|
|
71
|
-
*/
|
|
72
|
-
export const deleteOrganisationPractice = async (
|
|
73
|
-
organisationId: string,
|
|
74
|
-
practiceId: string,
|
|
75
|
-
opts?: MedipassRequestOpts = {}
|
|
76
|
-
): Promise<Object> => {
|
|
77
|
-
doesParamExist({ organisationId, practiceId }, opts.hyperMediaEndpoint);
|
|
78
|
-
return request({ ...opts, path: pathOrganisationPractice(organisationId, practiceId) }, { method: 'delete' });
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Get business practice
|
|
83
|
-
* @param {String} businessId - Business ID
|
|
84
|
-
* @param {String} practiceId - Practice ID
|
|
85
|
-
* @param {Object} opts - Additional options
|
|
86
|
-
*/
|
|
87
|
-
export const getBusinessPractice = async (
|
|
88
|
-
businessId: string,
|
|
89
|
-
practiceId: string,
|
|
90
|
-
opts?: MedipassRequestOpts = {}
|
|
91
|
-
): Promise<Object> => {
|
|
92
|
-
doesParamExist({ businessId, practiceId }, opts.hyperMediaEndpoint);
|
|
93
|
-
return request({ ...opts, path: pathBusinessPractice(businessId, practiceId) }, { method: 'get' });
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Get business practices
|
|
98
|
-
* @param {String} businessId - Business ID
|
|
99
|
-
* @param {Object} query - Query parameters
|
|
100
|
-
* @param {Object} opts - Additional options
|
|
101
|
-
*/
|
|
102
|
-
export const getBusinessPractices = async (
|
|
103
|
-
businessId: string,
|
|
104
|
-
query?: Object = {},
|
|
105
|
-
opts?: MedipassRequestOpts = {}
|
|
106
|
-
): Promise<Object> => {
|
|
107
|
-
doesParamExist({ businessId }, opts.hyperMediaEndpoint);
|
|
108
|
-
return request({ ...opts, path: pathBusinessPractices(businessId) }, { method: 'get', params: query });
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Get business form practices
|
|
113
|
-
* @param {String} businessId - Business ID
|
|
114
|
-
* @param {String} formId - Form ID
|
|
115
|
-
* @param {Object} query - Query parameters
|
|
116
|
-
* @param {Object} opts - Additional options
|
|
117
|
-
*/
|
|
118
|
-
export const getBusinessFormPractices = async (
|
|
119
|
-
businessId: string,
|
|
120
|
-
formId: string,
|
|
121
|
-
query?: Object = {},
|
|
122
|
-
opts?: MedipassRequestOpts = {}
|
|
123
|
-
): Promise<Object> => {
|
|
124
|
-
doesParamExist({ businessId, formId }, opts.hyperMediaEndpoint);
|
|
125
|
-
return request({ ...opts, path: pathBusinessFormPractices(businessId, formId) }, { method: 'get', params: query });
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Get business practice upload urls
|
|
130
|
-
* @param {String} businessId - Business ID
|
|
131
|
-
* @param {String} practiceId - Practice ID
|
|
132
|
-
* @param {String} contentType - Mime type
|
|
133
|
-
* @param {Object} opts - Additional options
|
|
134
|
-
*/
|
|
135
|
-
export const getBusinessPracticeUploadUrl = async (
|
|
136
|
-
businessId: string,
|
|
137
|
-
practiceId: string,
|
|
138
|
-
query: Object,
|
|
139
|
-
opts?: MedipassRequestOpts = {}
|
|
140
|
-
): Promise<Object> => {
|
|
141
|
-
doesParamExist({ businessId, practiceId, query }, opts.hyperMediaEndpoint);
|
|
142
|
-
return request(
|
|
143
|
-
{ ...opts, path: pathBusinessPracticeUploadUrl(businessId, practiceId) },
|
|
144
|
-
{ method: 'get', params: query }
|
|
145
|
-
);
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Get business staff practices
|
|
150
|
-
* @param {String} businessId - Business ID
|
|
151
|
-
* @param {String} staffId - Staff ID
|
|
152
|
-
* @param {Object} opts - Additional options
|
|
153
|
-
*/
|
|
154
|
-
export const getBusinessStaffPractices = async (
|
|
155
|
-
businessId: string,
|
|
156
|
-
staffId: string,
|
|
157
|
-
query?: Object = {},
|
|
158
|
-
opts?: MedipassRequestOpts = {}
|
|
159
|
-
): Promise<Object> => {
|
|
160
|
-
doesParamExist({ businessId, staffId }, opts.hyperMediaEndpoint);
|
|
161
|
-
return request({ ...opts, path: pathBusinessStaffPractices(businessId, staffId) }, { method: 'get', params: query });
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Get organisation practices
|
|
166
|
-
* @param {String} organisationId - Organisation ID
|
|
167
|
-
* @param {Object} query - Query parameters
|
|
168
|
-
* @param {Object} opts - Additional options
|
|
169
|
-
*/
|
|
170
|
-
export const getOrganisationPractices = async (
|
|
171
|
-
organisationId: string,
|
|
172
|
-
query?: Object = {},
|
|
173
|
-
opts?: MedipassRequestOpts = {}
|
|
174
|
-
): Promise<Object> => {
|
|
175
|
-
doesParamExist({ organisationId }, opts.hyperMediaEndpoint);
|
|
176
|
-
return request({ ...opts, path: pathOrganisationPractices(organisationId) }, { method: 'get', params: query });
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
// DEPRECATED: Use getBusinessPractice instead.
|
|
180
|
-
/**
|
|
181
|
-
* Get practice
|
|
182
|
-
* @param {String} practiceId - Practice ID
|
|
183
|
-
* @param {Object} opts - Additional options
|
|
184
|
-
*/
|
|
185
|
-
export const getPractice = async (practiceId: string, opts?: MedipassRequestOpts = {}): Promise<Object> => {
|
|
186
|
-
doesParamExist({ practiceId }, opts.hyperMediaEndpoint);
|
|
187
|
-
return request({ ...opts, path: pathPractice(practiceId) }, { method: 'get' });
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* Request to claim a practice
|
|
192
|
-
* @param {String} practiceId - Practice ID
|
|
193
|
-
* @param {Object} opts - Additional options
|
|
194
|
-
*/
|
|
195
|
-
export const requestClaimPractice = (practiceId: string, opts?: MedipassRequestOpts = {}): Promise<Object> => {
|
|
196
|
-
return request({ ...opts, path: `${pathPractice(practiceId)}/verify/request` }, { method: 'post' });
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* Request to add provider to practice
|
|
201
|
-
* @param {String} practiceId - Practice ID
|
|
202
|
-
* @param {String} providerNumber - Provider number
|
|
203
|
-
* @param {Object} opts - Additional options
|
|
204
|
-
*/
|
|
205
|
-
export const requestToAddProviderToPractice = (
|
|
206
|
-
practiceId: string,
|
|
207
|
-
providerNumber: string,
|
|
208
|
-
opts?: MedipassRequestOpts = {}
|
|
209
|
-
): Promise<Object> => {
|
|
210
|
-
return request(
|
|
211
|
-
{ ...opts, path: `${pathPractice(practiceId)}/access/request` },
|
|
212
|
-
{ method: 'post', data: { providerNumber } }
|
|
213
|
-
);
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* Search practices for onboarding
|
|
218
|
-
* @param {Object} query - Query parameters
|
|
219
|
-
* @param {Object} opts - Additional options
|
|
220
|
-
*/
|
|
221
|
-
export const searchOnboardingPractices = (query?: Object = {}, opts?: MedipassRequestOpts = {}): Promise<Object> => {
|
|
222
|
-
return request({ ...opts, path: pathOnboardingPractices() }, { method: 'get', params: query });
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Update business practice
|
|
227
|
-
* @param {String} businessId - Business ID
|
|
228
|
-
* @param {String} practiceId - Practice ID
|
|
229
|
-
* @param {Object} body - Request body
|
|
230
|
-
* @param {Object} opts - Additional options
|
|
231
|
-
*/
|
|
232
|
-
export const updateBusinessPractice = async (
|
|
233
|
-
businessId: string,
|
|
234
|
-
practiceId: string,
|
|
235
|
-
body: Object,
|
|
236
|
-
opts?: MedipassRequestOpts = {}
|
|
237
|
-
): Promise<Object> => {
|
|
238
|
-
doesParamExist({ businessId, practiceId }, opts.hyperMediaEndpoint);
|
|
239
|
-
return request({ ...opts, path: pathBusinessPractice(businessId, practiceId) }, { method: 'put', data: body });
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* Update organisation practice
|
|
244
|
-
* @param {String} organisationId - Organisation ID
|
|
245
|
-
* @param {String} practiceId - Practice ID
|
|
246
|
-
* @param {Object} body - Request body
|
|
247
|
-
* @param {Object} opts - Additional options
|
|
248
|
-
*/
|
|
249
|
-
export const updateOrganisationPractice = async (
|
|
250
|
-
organisationId: string,
|
|
251
|
-
practiceId: string,
|
|
252
|
-
body: Object,
|
|
253
|
-
opts?: MedipassRequestOpts = {}
|
|
254
|
-
): Promise<Object> => {
|
|
255
|
-
doesParamExist({ organisationId, practiceId }, opts.hyperMediaEndpoint);
|
|
256
|
-
return request(
|
|
257
|
-
{ ...opts, path: pathOrganisationPractice(organisationId, practiceId) },
|
|
258
|
-
{ method: 'put', data: body }
|
|
259
|
-
);
|
|
260
|
-
};
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* Verify a claim to a practice
|
|
264
|
-
* @param {String} practiceId - Practice ID
|
|
265
|
-
* @param {String} otkCode - One time token
|
|
266
|
-
* @param {Object} body - Request body
|
|
267
|
-
* @param {Object} opts - Additional options
|
|
268
|
-
*/
|
|
269
|
-
export const verifyClaimPractice = (
|
|
270
|
-
practiceId: string,
|
|
271
|
-
otkCode: string,
|
|
272
|
-
body?: Object,
|
|
273
|
-
opts?: MedipassRequestOpts = {}
|
|
274
|
-
): Promise<Object> => {
|
|
275
|
-
return request(
|
|
276
|
-
{ ...opts, path: `${pathPractice(practiceId)}/verify` },
|
|
277
|
-
{ method: 'post', data: { ...body, otkCode } }
|
|
278
|
-
);
|
|
279
|
-
};
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* Clone practice into another business
|
|
283
|
-
* @param {String} practiceId - Practice ID
|
|
284
|
-
* @param {Object} body - Request body
|
|
285
|
-
* @param {Object} opts - Additional options
|
|
286
|
-
*/
|
|
287
|
-
export const clonePracticeIntoBusiness = async (
|
|
288
|
-
practiceId: string,
|
|
289
|
-
body?: Object,
|
|
290
|
-
opts?: MedipassRequestOpts = {}
|
|
291
|
-
): Promise<Object> => {
|
|
292
|
-
doesParamExist({ practiceId }, opts.hyperMediaEndpoint);
|
|
293
|
-
return request({ ...opts, path: `${pathPractice(practiceId)}/clone` }, { method: 'post', data: body });
|
|
294
|
-
};
|
|
295
|
-
|
|
296
|
-
/**
|
|
297
|
-
* Get practices with approved applications
|
|
298
|
-
* @param {String} businessId - business ID
|
|
299
|
-
* @param {String} formId - Form ID
|
|
300
|
-
* @param {Object} query - Query parameters
|
|
301
|
-
* @param {Object} opts - Additional options
|
|
302
|
-
*/
|
|
303
|
-
export const getPracticesWithApprovedApplications = async (
|
|
304
|
-
businessId: string,
|
|
305
|
-
formId: string,
|
|
306
|
-
query?: Object = {},
|
|
307
|
-
opts?: MedipassRequestOpts = {}
|
|
308
|
-
): Promise<Object> => {
|
|
309
|
-
doesParamExist({ businessId, formId }, opts.hyperMediaEndpoint);
|
|
310
|
-
return request(
|
|
311
|
-
{ ...opts, path: pathGetPracticesWithApprovedApplications(businessId, formId) },
|
|
312
|
-
{ method: 'get', params: query }
|
|
313
|
-
);
|
|
314
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
import doesParamExist from '../utils/does-param-exist';
|
|
4
|
-
import request from '../utils/request';
|
|
5
|
-
import type { MedipassRequestOpts, GetBusinessProductsQuery, ProductResponse, ProductsResponse } from '../_types';
|
|
6
|
-
|
|
7
|
-
export const pathBusinessProducts = (businessId: string) => `/businesses/${businessId}/products`;
|
|
8
|
-
export const pathBusinessProduct = (businessId: string, productId: string) =>
|
|
9
|
-
`/businesses/${businessId}/products/${productId}`;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Get products
|
|
13
|
-
* @param {Object} query - Query parameters
|
|
14
|
-
* @param {Object} opts - Additional options
|
|
15
|
-
*/
|
|
16
|
-
export const getProducts = (query?: Object, opts?: MedipassRequestOpts = {}): Promise<ProductsResponse> => {
|
|
17
|
-
return request({ ...opts, path: '/products' }, { method: 'get', params: query });
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Get business products
|
|
22
|
-
* @param {String} businessId - Business ID
|
|
23
|
-
* @param {Object} query - Query parameters
|
|
24
|
-
* @param {Object} opts - Additional options
|
|
25
|
-
*/
|
|
26
|
-
export const getBusinessProducts = (
|
|
27
|
-
businessId: string,
|
|
28
|
-
query?: GetBusinessProductsQuery,
|
|
29
|
-
opts?: MedipassRequestOpts = {}
|
|
30
|
-
): Promise<ProductsResponse> => {
|
|
31
|
-
doesParamExist({ businessId });
|
|
32
|
-
return request({ ...opts, path: pathBusinessProducts(businessId) }, { method: 'get', params: query });
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Get business product
|
|
37
|
-
* @param {String} businessId - Business ID
|
|
38
|
-
* @param {String} productId - Product ID
|
|
39
|
-
* @param {Object} opts - Additional options
|
|
40
|
-
*/
|
|
41
|
-
export const getBusinessProduct = (
|
|
42
|
-
businessId: string,
|
|
43
|
-
productId: string,
|
|
44
|
-
opts?: MedipassRequestOpts = {}
|
|
45
|
-
): Promise<ProductResponse> => {
|
|
46
|
-
doesParamExist({ businessId, productId });
|
|
47
|
-
return request({ ...opts, path: pathBusinessProduct(businessId, productId) }, { method: 'get' });
|
|
48
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
import doesParamExist from '../utils/does-param-exist';
|
|
4
|
-
import request from '../utils/request';
|
|
5
|
-
import type {
|
|
6
|
-
MedipassRequestOpts,
|
|
7
|
-
GetProfessionalCategoriesQuery,
|
|
8
|
-
ProfessionalCategoryResponse,
|
|
9
|
-
ProfessionalCategoriesResponse
|
|
10
|
-
} from '../_types';
|
|
11
|
-
|
|
12
|
-
export const pathBusinessProfessionalCategories = (businessId: string) =>
|
|
13
|
-
`/businesses/${businessId}/professionalcategories`;
|
|
14
|
-
export const pathProfessionalCategories = '/professionalcategories';
|
|
15
|
-
export const pathProfessionalCategory = (professionalCategoryId: string) =>
|
|
16
|
-
`/professionalcategories/${professionalCategoryId}`;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Get professional categories
|
|
20
|
-
* @param {Object} opts - Query parameters
|
|
21
|
-
* @param {Object} opts - Additional options
|
|
22
|
-
*/
|
|
23
|
-
export const getProfessionalCategories = (
|
|
24
|
-
query?: GetProfessionalCategoriesQuery,
|
|
25
|
-
opts?: MedipassRequestOpts = {}
|
|
26
|
-
): Promise<ProfessionalCategoriesResponse> => {
|
|
27
|
-
return request({ ...opts, path: pathProfessionalCategories }, { method: 'get', params: query });
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Get business professional categories
|
|
32
|
-
* @param {Object} businessId - Business ID
|
|
33
|
-
* @param {Object} opts - Query parameters
|
|
34
|
-
* @param {Object} opts - Additional options
|
|
35
|
-
*/
|
|
36
|
-
export const getBusinessProfessionalCategories = (
|
|
37
|
-
businessId: string,
|
|
38
|
-
query?: GetProfessionalCategoriesQuery,
|
|
39
|
-
opts?: MedipassRequestOpts = {}
|
|
40
|
-
): Promise<ProfessionalCategoriesResponse> => {
|
|
41
|
-
doesParamExist({ businessId });
|
|
42
|
-
return request({ ...opts, path: pathBusinessProfessionalCategories(businessId) }, { method: 'get', params: query });
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Get professional category
|
|
47
|
-
* @param {Object} professionalCategoryId - Professional category ID
|
|
48
|
-
* @param {Object} opts - Additional options
|
|
49
|
-
*/
|
|
50
|
-
export const getProfessionalCategory = (
|
|
51
|
-
professionalCategoryId: string,
|
|
52
|
-
opts?: MedipassRequestOpts = {}
|
|
53
|
-
): Promise<ProfessionalCategoryResponse> => {
|
|
54
|
-
doesParamExist({ professionalCategoryId });
|
|
55
|
-
return request({ ...opts, path: pathProfessionalCategory(professionalCategoryId) }, { method: 'get' });
|
|
56
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
import doesParamExist from '../utils/does-param-exist';
|
|
4
|
-
import request from '../utils/request';
|
|
5
|
-
import type { MedipassRequestOpts } from '../_types';
|
|
6
|
-
|
|
7
|
-
export const pathProviderNumberTypes = () => `/providernumbertypes`;
|
|
8
|
-
export const pathProviderNumberType = (providerNumberTypeId: string) => `/providernumbertypes/${providerNumberTypeId}`;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Get provider number types
|
|
12
|
-
* @param {Object} query - Query parameters
|
|
13
|
-
* @param {Object} opts - Additional options
|
|
14
|
-
*/
|
|
15
|
-
export const getProviderNumberTypes = async (query?: Object = {}, opts?: MedipassRequestOpts = {}): Promise<Object> => {
|
|
16
|
-
return request({ ...opts, path: pathProviderNumberTypes() }, { method: 'get', params: query });
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Get provider number type
|
|
21
|
-
* @param {String} providerNumberTypeId - Provider number type ID
|
|
22
|
-
* @param {Object} query - Query parameters
|
|
23
|
-
* @param {Object} opts - Additional options
|
|
24
|
-
*/
|
|
25
|
-
export const getProviderNumberType = (
|
|
26
|
-
providerNumberTypeId: string,
|
|
27
|
-
query?: Object = {},
|
|
28
|
-
opts?: MedipassRequestOpts = {}
|
|
29
|
-
): Promise<Object> => {
|
|
30
|
-
doesParamExist({ providerNumberTypeId }, opts.hyperMediaEndpoint);
|
|
31
|
-
return request({ ...opts, path: pathProviderNumberType(providerNumberTypeId) }, { method: 'get', params: query });
|
|
32
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
import request from '../utils/request';
|
|
4
|
-
import type { MedipassRequestOpts, PaginatedQuery } from '../_types';
|
|
5
|
-
|
|
6
|
-
export const pathGetProviderRegistrationTypes = '/providerregistrationtypes';
|
|
7
|
-
export const pathGetProviderRegistrationType = (providerRegistrationTypeId: string) =>
|
|
8
|
-
`/providerregistrationtypes/${providerRegistrationTypeId}`;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Get provider registration types
|
|
12
|
-
* @param {Object} query - Query parameters
|
|
13
|
-
* @param {Object} opts - Additional options
|
|
14
|
-
*/
|
|
15
|
-
export const getProviderRegistrationTypes = async (
|
|
16
|
-
query?: PaginatedQuery,
|
|
17
|
-
opts?: MedipassRequestOpts = {}
|
|
18
|
-
): Promise<Object> => {
|
|
19
|
-
return request({ ...opts, path: pathGetProviderRegistrationTypes }, { method: 'get', params: query });
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Get a provider registration type
|
|
24
|
-
* @param {String} providerRegistrationTypeId - Provider registration type ID
|
|
25
|
-
* @param {Object} opts - Additional options
|
|
26
|
-
*/
|
|
27
|
-
export const getProviderRegistrationType = async (
|
|
28
|
-
providerRegistrationTypeId: string,
|
|
29
|
-
opts?: MedipassRequestOpts = {}
|
|
30
|
-
): Promise<Object> => {
|
|
31
|
-
return request({ ...opts, path: pathGetProviderRegistrationType(providerRegistrationTypeId) }, { method: 'get' });
|
|
32
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
import request from '../utils/request';
|
|
4
|
-
import doesParamExist from '../utils/does-param-exist';
|
|
5
|
-
import type { MedipassRequestOpts } from '../_types';
|
|
6
|
-
|
|
7
|
-
const pathBusinessProviderRequests = businessId => `/businesses/${businessId}/providerrequests`;
|
|
8
|
-
const pathBusinessPracticeStaffMemberProviderRequest = (businessId, practiceId, staffId) =>
|
|
9
|
-
`/businesses/${businessId}/practices/${practiceId}/staff/${staffId}/providerrequests`;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Create providerRequest
|
|
13
|
-
* @param {string} businessId - Business ID
|
|
14
|
-
* @param {Object} body - Request body
|
|
15
|
-
* @param {Object} opts - Additional options
|
|
16
|
-
*/
|
|
17
|
-
export const createProviderRequest = async (
|
|
18
|
-
businessId: string,
|
|
19
|
-
body: Object,
|
|
20
|
-
opts?: MedipassRequestOpts = {}
|
|
21
|
-
): Promise<Object> => {
|
|
22
|
-
doesParamExist({ businessId }, opts.hyperMediaEndpoint);
|
|
23
|
-
return request({ ...opts, path: pathBusinessProviderRequests(businessId) }, { method: 'post', data: body });
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Request a staff member provider number to be enabled
|
|
28
|
-
* @param {string} businessId - Business ID
|
|
29
|
-
* @param {string} practiceId - Practice ID
|
|
30
|
-
* @param {string} staffId - Staff ID
|
|
31
|
-
* @param {string} providerNumber - ProviderNumber
|
|
32
|
-
* @param {Object} opts - Additional options
|
|
33
|
-
*/
|
|
34
|
-
export const requestBusinessPracticeStaffMemberProviderNumberToBeEnabled = async (
|
|
35
|
-
businessId: string,
|
|
36
|
-
practiceId: string,
|
|
37
|
-
staffId: string,
|
|
38
|
-
providerNumber: string,
|
|
39
|
-
opts?: MedipassRequestOpts = {}
|
|
40
|
-
): Promise<Object> => {
|
|
41
|
-
doesParamExist({ businessId }, opts.hyperMediaEndpoint);
|
|
42
|
-
return request(
|
|
43
|
-
{ ...opts, path: pathBusinessPracticeStaffMemberProviderRequest(businessId, practiceId, staffId) },
|
|
44
|
-
{ method: 'post', data: { providerNumber } }
|
|
45
|
-
);
|
|
46
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
import request from '../utils/request';
|
|
4
|
-
import type { MedipassRequestOpts } from '../_types';
|
|
5
|
-
|
|
6
|
-
const PATH__PROVIDER_TYPES = '/providertypes';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Get provider types
|
|
10
|
-
* @param {Object} opts - Additional options
|
|
11
|
-
*/
|
|
12
|
-
export const getProviderTypes = async (opts?: MedipassRequestOpts = {}): Promise<Object> => {
|
|
13
|
-
return request({ ...opts, path: PATH__PROVIDER_TYPES }, { method: 'get' });
|
|
14
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
import request from '../utils/request';
|
|
4
|
-
import type { MedipassRequestOpts } from '../_types';
|
|
5
|
-
|
|
6
|
-
export const PATH__REF_SOURCES = '/refsources';
|
|
7
|
-
|
|
8
|
-
export const getRefSources = (
|
|
9
|
-
query?: {
|
|
10
|
-
page?: number,
|
|
11
|
-
limit?: number
|
|
12
|
-
},
|
|
13
|
-
opts?: MedipassRequestOpts = {}
|
|
14
|
-
): Promise<Object> => {
|
|
15
|
-
return request({ ...opts, path: PATH__REF_SOURCES }, { method: 'get', params: query });
|
|
16
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
import request from '../utils/request';
|
|
4
|
-
import doesParamExist from '../utils/does-param-exist';
|
|
5
|
-
import type { MedipassRequestOpts } from '../_types';
|
|
6
|
-
|
|
7
|
-
const PATH__TRANSACTIONS = '/transaction';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Get risk score
|
|
11
|
-
* @param {String} transactionId - Get a transaction risk score
|
|
12
|
-
* @param {Object} opts - Additional options
|
|
13
|
-
*/
|
|
14
|
-
export const getTransactionRiskScore = async (
|
|
15
|
-
transactionId: string,
|
|
16
|
-
opts?: MedipassRequestOpts = {}
|
|
17
|
-
): Promise<Object> => {
|
|
18
|
-
doesParamExist({ transactionId }, opts.hyperMediaEndpoint);
|
|
19
|
-
return request({ ...opts, apiName: 'risk', path: `${PATH__TRANSACTIONS}/risk/${transactionId}` }, { method: 'get' });
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Score and save a transaction
|
|
24
|
-
* @param {String} body - Request body
|
|
25
|
-
* @param {Object} opts - Additional options
|
|
26
|
-
*/
|
|
27
|
-
export const scoreAndSaveTransaction = async (body: Object, opts?: MedipassRequestOpts = {}): Promise<Object> => {
|
|
28
|
-
return request({ ...opts, apiName: 'risk', path: PATH__TRANSACTIONS }, { method: 'post', data: body });
|
|
29
|
-
};
|