@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,196 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
import _get from 'lodash/get';
|
|
3
|
-
|
|
4
|
-
import doesParamExist from '../utils/does-param-exist';
|
|
5
|
-
import request from '../utils/request';
|
|
6
|
-
import type { MedipassRequestOpts } from '../_types';
|
|
7
|
-
import sdk from '../index';
|
|
8
|
-
|
|
9
|
-
const PATH__MEMBERS = '/members';
|
|
10
|
-
const PATH__DISCOVER_MEMBERS = '/discovery/members';
|
|
11
|
-
const pathAccountMembers = accountId => `/accounts/${accountId}/members`;
|
|
12
|
-
const pathBusinessMember = (businessId, memberId) => `/businesses/${businessId}/members/${memberId}`;
|
|
13
|
-
const pathBusinessMembers = businessId => `/businesses/${businessId}/members`;
|
|
14
|
-
const pathMember = memberId => `/members/${memberId}`;
|
|
15
|
-
const pathMembersForHealthFund = healthFundId => `/healthfunds/${healthFundId}/members`;
|
|
16
|
-
const pathHealthFundMemberByMemberId = (healthFundId, memberId) => `/healthfunds/${healthFundId}/members/${memberId}`;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Check for duplicate member
|
|
20
|
-
* @param {Object} body - Request body
|
|
21
|
-
* @param {Object} opts - Additional options
|
|
22
|
-
*/
|
|
23
|
-
export const checkDupe = async (body: Object, opts?: MedipassRequestOpts = {}): Promise<Object> => {
|
|
24
|
-
return request({ ...opts, path: `${PATH__MEMBERS}/checkdupe` }, { method: 'post', data: body });
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Create member for an account
|
|
29
|
-
* @param {string} accountId - Account ID
|
|
30
|
-
* @param {Object} body - Request body
|
|
31
|
-
* @param {Object} opts - Additional options
|
|
32
|
-
*/
|
|
33
|
-
export const createAccountMember = async (
|
|
34
|
-
accountId: string,
|
|
35
|
-
body: Object,
|
|
36
|
-
opts?: MedipassRequestOpts = {}
|
|
37
|
-
): Promise<Object> => {
|
|
38
|
-
return request({ ...opts, path: pathAccountMembers(accountId) }, { method: 'post', data: body });
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Delete a members
|
|
43
|
-
* @param {Object} memberId - Member ID
|
|
44
|
-
* @param {Object} body - Request body
|
|
45
|
-
* @param {Object} opts - Additional options
|
|
46
|
-
*/
|
|
47
|
-
export const deleteMember = async (memberId: string, opts?: MedipassRequestOpts = {}): Promise<Object> => {
|
|
48
|
-
doesParamExist({ memberId }, opts.hyperMediaEndpoint);
|
|
49
|
-
return request({ ...opts, path: pathMember(memberId) }, { method: 'delete' });
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Discover a member
|
|
54
|
-
* @param {Object} query - Query parameters
|
|
55
|
-
* @param {Object} opts - Additional options
|
|
56
|
-
*/
|
|
57
|
-
export const discoverMember = async (query: Object, opts?: MedipassRequestOpts = {}): Promise<Object> => {
|
|
58
|
-
return request({ ...opts, path: PATH__DISCOVER_MEMBERS }, { method: 'get', params: query });
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Invite someone to become a Medipass member
|
|
63
|
-
* @param {String} businessId - Member ID
|
|
64
|
-
* @param {Object} body - Request body
|
|
65
|
-
* @param {Object} opts - Additional options
|
|
66
|
-
*/
|
|
67
|
-
export const inviteAnyone = async (
|
|
68
|
-
businessId: string,
|
|
69
|
-
body: Object,
|
|
70
|
-
opts?: MedipassRequestOpts = {}
|
|
71
|
-
): Promise<Object> => {
|
|
72
|
-
doesParamExist({ businessId }, opts.hyperMediaEndpoint);
|
|
73
|
-
return request({ ...opts, path: `${pathBusinessMembers(businessId)}/invites` }, { method: 'post', data: body });
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Send an SMS to member with link to download app
|
|
78
|
-
* @param {String} memberId - Member ID
|
|
79
|
-
* @param {Object} opts - Additional options
|
|
80
|
-
*/
|
|
81
|
-
export const inviteMember = async (memberId: string, opts?: MedipassRequestOpts = {}): Promise<Object> => {
|
|
82
|
-
doesParamExist({ memberId }, opts.hyperMediaEndpoint);
|
|
83
|
-
return request({ ...opts, path: `${pathMember(memberId)}/invites` }, { method: 'post' });
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Get members for an account
|
|
88
|
-
* @param {string} accountId - Account ID
|
|
89
|
-
* @param {Object} query - Query parameters
|
|
90
|
-
* @param {Object} opts - Additional options
|
|
91
|
-
*/
|
|
92
|
-
export const getAccountMembers = async (
|
|
93
|
-
accountId: string,
|
|
94
|
-
query?: Object = {},
|
|
95
|
-
opts?: MedipassRequestOpts = {}
|
|
96
|
-
): Promise<Object> => {
|
|
97
|
-
return request({ ...opts, path: pathAccountMembers(accountId) }, { method: 'get', params: query });
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Get members by health fund
|
|
102
|
-
* @param {String} healthFundId - Health fund ID
|
|
103
|
-
* @param {Object} opts - Additional options
|
|
104
|
-
*/
|
|
105
|
-
export const getMembersForHealthFund = async (
|
|
106
|
-
healthFundId: string,
|
|
107
|
-
query?: Object = {},
|
|
108
|
-
opts?: MedipassRequestOpts = {}
|
|
109
|
-
): Promise<Object> => {
|
|
110
|
-
return request({ ...opts, path: pathMembersForHealthFund(healthFundId) }, { method: 'get', params: query });
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Get health fund member by member ID.
|
|
115
|
-
* @param {String} healthFundId - Health Fund ID
|
|
116
|
-
* @param {String} memberId - Member ID
|
|
117
|
-
* @param {Object} opts - Additional options
|
|
118
|
-
*/
|
|
119
|
-
export const getHealthFundMemberByMemberId = async (
|
|
120
|
-
healthFundId: string,
|
|
121
|
-
memberId: string,
|
|
122
|
-
opts?: MedipassRequestOpts = {}
|
|
123
|
-
): Promise<Object> => {
|
|
124
|
-
return request({ ...opts, path: pathHealthFundMemberByMemberId(healthFundId, memberId) }, { method: 'get' });
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Get business members
|
|
129
|
-
* @param {String} businessId - Business ID
|
|
130
|
-
* @param {Object} query - Query parameters
|
|
131
|
-
* @param {Object} opts - Additional options
|
|
132
|
-
*/
|
|
133
|
-
export const getBusinessMembers = async (
|
|
134
|
-
businessId: string,
|
|
135
|
-
query?: Object = {},
|
|
136
|
-
opts?: MedipassRequestOpts = {}
|
|
137
|
-
): Promise<Object> => {
|
|
138
|
-
doesParamExist({ businessId }, opts.hyperMediaEndpoint);
|
|
139
|
-
return request({ ...opts, path: pathBusinessMembers(businessId) }, { method: 'get', params: query });
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Get business member
|
|
144
|
-
* @param {String} businessId - Business ID
|
|
145
|
-
* @param {String} memberId - Member ID
|
|
146
|
-
* @param {Object} opts - Additional options
|
|
147
|
-
*/
|
|
148
|
-
export const getBusinessMember = async (
|
|
149
|
-
businessId: string,
|
|
150
|
-
memberId: string,
|
|
151
|
-
opts?: MedipassRequestOpts = {}
|
|
152
|
-
): Promise<Object> => {
|
|
153
|
-
doesParamExist({ businessId }, opts.hyperMediaEndpoint);
|
|
154
|
-
return request({ ...opts, path: pathBusinessMember(businessId, memberId) }, { method: 'get' });
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Get members
|
|
159
|
-
* @param {Object} opts - Additional options
|
|
160
|
-
*/
|
|
161
|
-
export const getMembers = async (query?: Object = {}, opts?: MedipassRequestOpts = {}): Promise<Object> => {
|
|
162
|
-
return request({ ...opts, path: PATH__MEMBERS }, { method: 'get', params: query });
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Get member
|
|
167
|
-
* @param {String} memberId - Member ID
|
|
168
|
-
* @param {Object} opts - Additional options
|
|
169
|
-
*/
|
|
170
|
-
export const getMember = async (memberId: string, opts?: MedipassRequestOpts = {}): Promise<Object> => {
|
|
171
|
-
doesParamExist({ memberId }, opts.hyperMediaEndpoint);
|
|
172
|
-
const member = await request({ ...opts, path: pathMember(memberId) }, { method: 'get' });
|
|
173
|
-
if (memberId === _get(sdk, 'member._id')) {
|
|
174
|
-
sdk.setMember(member);
|
|
175
|
-
}
|
|
176
|
-
return member;
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Update a members
|
|
181
|
-
* @param {Object} memberId - Member ID
|
|
182
|
-
* @param {Object} body - Request body
|
|
183
|
-
* @param {Object} opts - Additional options
|
|
184
|
-
*/
|
|
185
|
-
export const updateMember = async (
|
|
186
|
-
memberId: string,
|
|
187
|
-
body: Object,
|
|
188
|
-
opts?: MedipassRequestOpts = {}
|
|
189
|
-
): Promise<Object> => {
|
|
190
|
-
doesParamExist({ memberId }, opts.hyperMediaEndpoint);
|
|
191
|
-
const member = await request({ ...opts, path: pathMember(memberId) }, { method: 'put', data: body });
|
|
192
|
-
if (memberId === _get(sdk, 'member._id')) {
|
|
193
|
-
sdk.setMember(member);
|
|
194
|
-
}
|
|
195
|
-
return member;
|
|
196
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
import doesParamExist from '../utils/does-param-exist';
|
|
3
|
-
import request from '../utils/request';
|
|
4
|
-
import type {
|
|
5
|
-
GetBusinessMessageMappingsQuery,
|
|
6
|
-
GetBusinessMessageMappingsResponse,
|
|
7
|
-
MedipassRequestOpts
|
|
8
|
-
} from '../_types';
|
|
9
|
-
|
|
10
|
-
export const pathBusinessMessageMappings = (businessId: string) => `/businesses/${businessId}/messagemappings`;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Get business message mappings
|
|
14
|
-
* @param {String} businessId - Health fund ID
|
|
15
|
-
* @param {Object} query - Query parameters
|
|
16
|
-
* @param {Object} opts - Additional options
|
|
17
|
-
*/
|
|
18
|
-
export const getBusinessMessageMappings = (
|
|
19
|
-
businessId: string,
|
|
20
|
-
query: GetBusinessMessageMappingsQuery,
|
|
21
|
-
opts?: MedipassRequestOpts = {}
|
|
22
|
-
): Promise<GetBusinessMessageMappingsResponse> => {
|
|
23
|
-
doesParamExist({ businessId }, opts.hyperMediaEndpoint);
|
|
24
|
-
return request({ ...opts, path: pathBusinessMessageMappings(businessId) }, { method: 'get', params: query });
|
|
25
|
-
};
|
|
@@ -1,96 +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 pathMinionsForHealthFund = healthFundId => `/healthfunds/${healthFundId}/minions`;
|
|
8
|
-
const pathMinionForHealthFund = (healthFundId, minionId) => `${pathMinionsForHealthFund(healthFundId)}/${minionId}`;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Create minion for health fund
|
|
12
|
-
* @param {String} healthFundId - Health fund ID
|
|
13
|
-
* @param {String} name - Minion name
|
|
14
|
-
* @param {String} triggerId - Minion trigger ID
|
|
15
|
-
* @param {String} actionId - Minion action ID
|
|
16
|
-
* @param {Object} body - Additional body
|
|
17
|
-
* @param {Object} opts - Additional options
|
|
18
|
-
*/
|
|
19
|
-
export const createMinionForHealthFund = async (
|
|
20
|
-
healthFundId: string,
|
|
21
|
-
name: string,
|
|
22
|
-
triggerId: string,
|
|
23
|
-
actionId: string,
|
|
24
|
-
body: Object,
|
|
25
|
-
opts?: MedipassRequestOpts = {}
|
|
26
|
-
): Promise<Object> => {
|
|
27
|
-
doesParamExist({ healthFundId, name, triggerId, actionId }, opts.hyperMediaEndpoint);
|
|
28
|
-
const data = {
|
|
29
|
-
name,
|
|
30
|
-
triggerId,
|
|
31
|
-
actionId,
|
|
32
|
-
...body
|
|
33
|
-
};
|
|
34
|
-
return request({ ...opts, path: pathMinionsForHealthFund(healthFundId) }, { method: 'post', data });
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Get minions for health fund
|
|
39
|
-
* @param {String} healthFundId - Health fund ID
|
|
40
|
-
* @param {Object} query - Query parameters
|
|
41
|
-
* @param {Object} opts - Additional options
|
|
42
|
-
*/
|
|
43
|
-
export const getMinionsForHealthFund = async (
|
|
44
|
-
healthFundId: string,
|
|
45
|
-
query?: Object = {},
|
|
46
|
-
opts?: MedipassRequestOpts = {}
|
|
47
|
-
): Promise<Object> => {
|
|
48
|
-
return request({ ...opts, path: pathMinionsForHealthFund(healthFundId) }, { method: 'get', params: query });
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Get minion for health fund
|
|
53
|
-
* @param {String} healthFundId - Health fund ID
|
|
54
|
-
* @param {String} minionId - Minion ID
|
|
55
|
-
* @param {Object} opts - Additional options
|
|
56
|
-
*/
|
|
57
|
-
export const getMinionForHealthFund = async (
|
|
58
|
-
healthFundId: string,
|
|
59
|
-
minionId: string,
|
|
60
|
-
opts?: MedipassRequestOpts = {}
|
|
61
|
-
): Promise<Object> => {
|
|
62
|
-
doesParamExist({ healthFundId, minionId }, opts.hyperMediaEndpoint);
|
|
63
|
-
return request({ ...opts, path: pathMinionForHealthFund(healthFundId, minionId) }, { method: 'get' });
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Update minion for health fund
|
|
68
|
-
* @param {String} healthFundId - Health fund ID
|
|
69
|
-
* @param {String} minionId - Minion ID
|
|
70
|
-
* @param {String} body
|
|
71
|
-
* @param {Object} opts - Additional options
|
|
72
|
-
*/
|
|
73
|
-
export const updateMinionForHealthFund = async (
|
|
74
|
-
healthFundId: string,
|
|
75
|
-
minionId: string,
|
|
76
|
-
body: Object,
|
|
77
|
-
opts?: MedipassRequestOpts = {}
|
|
78
|
-
): Promise<Object> => {
|
|
79
|
-
doesParamExist({ healthFundId, minionId }, opts.hyperMediaEndpoint);
|
|
80
|
-
return request({ ...opts, path: pathMinionForHealthFund(healthFundId, minionId) }, { method: 'put', data: body });
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Delete a health fund's minionId
|
|
85
|
-
* @param {String} healthFundId - Health fund ID
|
|
86
|
-
* @param {String} minionId - Minion ID
|
|
87
|
-
* @param {Object} opts - Additional options
|
|
88
|
-
*/
|
|
89
|
-
export const deleteMinionForHealthFund = async (
|
|
90
|
-
healthFundId: string,
|
|
91
|
-
minionId: string,
|
|
92
|
-
opts?: MedipassRequestOpts = {}
|
|
93
|
-
): Promise<Object> => {
|
|
94
|
-
doesParamExist({ healthFundId, minionId }, opts.hyperMediaEndpoint);
|
|
95
|
-
return request({ ...opts, path: pathMinionForHealthFund(healthFundId, minionId) }, { method: 'delete' });
|
|
96
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
import medipassWebSdk from '../index';
|
|
3
|
-
import doesParamExist from '../utils/does-param-exist';
|
|
4
|
-
import request from '../utils/request';
|
|
5
|
-
import type { MedipassRequestOpts } from '../_types';
|
|
6
|
-
|
|
7
|
-
const PATH__MODALITIES = '/modalities';
|
|
8
|
-
const pathModality = modalityId => `/modalities/${modalityId}`;
|
|
9
|
-
const pathBusinessModalities = businessId => `/businesses/${businessId}/modalities`;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Get business's available modalities
|
|
13
|
-
* @param {Object} businessId - Business ID
|
|
14
|
-
* @param {Object} opts - Additional options
|
|
15
|
-
*/
|
|
16
|
-
export const getBusinessModalities = async (
|
|
17
|
-
businessId: string,
|
|
18
|
-
opts?: MedipassRequestOpts = { ver: medipassWebSdk.defaultVersion }
|
|
19
|
-
): Promise<Object> => {
|
|
20
|
-
doesParamExist({ businessId }, opts.hyperMediaEndpoint);
|
|
21
|
-
return request({ ...opts, path: pathBusinessModalities(businessId) }, { method: 'get' });
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Get modalities
|
|
26
|
-
* @param {Object} query - Query parameters
|
|
27
|
-
* @param {Object} opts - Additional options
|
|
28
|
-
*/
|
|
29
|
-
export const getModalities = async (
|
|
30
|
-
query?: Object = {},
|
|
31
|
-
opts?: MedipassRequestOpts = { ver: medipassWebSdk.defaultVersion }
|
|
32
|
-
): Promise<Object | Array<Object>> => {
|
|
33
|
-
return request({ ...opts, path: PATH__MODALITIES }, { method: 'get', params: query });
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Get modality
|
|
38
|
-
* @param {String} modalityId - Modality ID
|
|
39
|
-
* @param {Object} opts - Additional options
|
|
40
|
-
*/
|
|
41
|
-
export const getModality = async (
|
|
42
|
-
modalityId: string,
|
|
43
|
-
opts?: MedipassRequestOpts = { ver: medipassWebSdk.defaultVersion }
|
|
44
|
-
): Promise<Object> => {
|
|
45
|
-
return request({ ...opts, path: pathModality(modalityId) }, { method: 'get' });
|
|
46
|
-
};
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
import doesParamExist from '../utils/does-param-exist';
|
|
4
|
-
import request from '../utils/request';
|
|
5
|
-
import type { CreateNoteRequestBody, MedipassRequestOpts, PaginatedQuery } from '../_types';
|
|
6
|
-
|
|
7
|
-
export const pathHealthFundDocumentNotes = (healthFundId: string, documentId: string) =>
|
|
8
|
-
`/healthfunds/${healthFundId}/documents/${documentId}/notes`;
|
|
9
|
-
export const pathHealthFundTransactionNote = (healthFundId: string, transactionId: string) =>
|
|
10
|
-
`/healthfunds/${healthFundId}/transactions/${transactionId}/notes`;
|
|
11
|
-
export const pathHealthFundNote = (healthFundId: string, noteId: string) =>
|
|
12
|
-
`/healthfunds/${healthFundId}/notes/${noteId}`;
|
|
13
|
-
export const pathTransactionNotes = (transactionId: string) => `/transactions/${transactionId}/notes`;
|
|
14
|
-
export const pathTransactionNote = (transactionId: string, transactionNoteId: string) =>
|
|
15
|
-
`/transactions/${transactionId}/notes/${transactionNoteId}`;
|
|
16
|
-
export const pathGetTransactionNote = (businessId: string, transactionId: string) =>
|
|
17
|
-
`/businesses/${businessId}/transactions/${transactionId}/notes`;
|
|
18
|
-
|
|
19
|
-
export const createHealthFundDocumentNote = (
|
|
20
|
-
healthFundId: string,
|
|
21
|
-
documentId: string,
|
|
22
|
-
body: CreateNoteRequestBody,
|
|
23
|
-
opts?: MedipassRequestOpts = {}
|
|
24
|
-
): Promise<Object> => {
|
|
25
|
-
doesParamExist({ healthFundId, documentId }, opts.hyperMediaEndpoint);
|
|
26
|
-
return request(
|
|
27
|
-
{ ...opts, path: pathHealthFundDocumentNotes(healthFundId, documentId) },
|
|
28
|
-
{ method: 'post', data: body }
|
|
29
|
-
);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export const getHealthFundDocumentNotes = (
|
|
33
|
-
healthFundId: string,
|
|
34
|
-
documentId: string,
|
|
35
|
-
opts?: MedipassRequestOpts = {}
|
|
36
|
-
): Promise<Object> => {
|
|
37
|
-
doesParamExist({ healthFundId, documentId }, opts.hyperMediaEndpoint);
|
|
38
|
-
return request({ ...opts, path: pathHealthFundDocumentNotes(healthFundId, documentId) }, { method: 'get' });
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export const getHealthFundTransactionNote = (
|
|
42
|
-
healthFundId: string,
|
|
43
|
-
transactionId: string,
|
|
44
|
-
opts?: MedipassRequestOpts = {}
|
|
45
|
-
): Promise<Object> => {
|
|
46
|
-
doesParamExist({ healthFundId, transactionId }, opts.hyperMediaEndpoint);
|
|
47
|
-
return request({ ...opts, path: pathHealthFundTransactionNote(healthFundId, transactionId) }, { method: 'get' });
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export const getHealthFundNote = (
|
|
51
|
-
healthFundId: string,
|
|
52
|
-
noteId: string,
|
|
53
|
-
opts?: MedipassRequestOpts = {}
|
|
54
|
-
): Promise<Object> => {
|
|
55
|
-
doesParamExist({ healthFundId, noteId }, opts.hyperMediaEndpoint);
|
|
56
|
-
return request({ ...opts, path: pathHealthFundNote(healthFundId, noteId) }, { method: 'get' });
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export const getTransactionNotes = (
|
|
60
|
-
transactionId: string,
|
|
61
|
-
query?: ?PaginatedQuery,
|
|
62
|
-
opts?: MedipassRequestOpts = {}
|
|
63
|
-
): Promise<Object> => {
|
|
64
|
-
doesParamExist({ transactionId }, opts.hyperMediaEndpoint);
|
|
65
|
-
return request({ ...opts, path: pathTransactionNotes(transactionId) }, { method: 'get', params: query });
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
export const getTransactionNote = (
|
|
69
|
-
businessId: string,
|
|
70
|
-
transactionId: string,
|
|
71
|
-
opts?: MedipassRequestOpts = {}
|
|
72
|
-
): Promise<Object> => {
|
|
73
|
-
doesParamExist({ businessId, transactionId }, opts.hyperMediaEndpoint);
|
|
74
|
-
return request({ ...opts, path: pathGetTransactionNote(businessId, transactionId) }, { method: 'get' });
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export const addTransactionNote = (
|
|
78
|
-
transactionId: string,
|
|
79
|
-
body: Object,
|
|
80
|
-
opts?: MedipassRequestOpts = {}
|
|
81
|
-
): Promise<Object> => {
|
|
82
|
-
doesParamExist({ transactionId }, opts.hyperMediaEndpoint);
|
|
83
|
-
return request({ ...opts, path: pathTransactionNotes(transactionId) }, { method: 'post', data: body });
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
export const deleteTransactionNote = (
|
|
87
|
-
transactionId: string,
|
|
88
|
-
transactionNoteId: string,
|
|
89
|
-
opts?: MedipassRequestOpts = {}
|
|
90
|
-
): Promise<Object> => {
|
|
91
|
-
doesParamExist({ transactionId, transactionNoteId }, opts.hyperMediaEndpoint);
|
|
92
|
-
return request({ ...opts, path: pathTransactionNote(transactionId, transactionNoteId) }, { method: 'delete' });
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
export const updateHealthFundNote = (
|
|
96
|
-
healthFundId: string,
|
|
97
|
-
noteId: string,
|
|
98
|
-
body: CreateNoteRequestBody,
|
|
99
|
-
opts?: MedipassRequestOpts = {}
|
|
100
|
-
): Promise<Object> => {
|
|
101
|
-
doesParamExist({ healthFundId, noteId }, opts.hyperMediaEndpoint);
|
|
102
|
-
return request({ ...opts, path: pathHealthFundNote(healthFundId, noteId) }, { method: 'put', data: body });
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
export const deleteHealthFundNote = (
|
|
106
|
-
healthFundId: string,
|
|
107
|
-
noteId: string,
|
|
108
|
-
opts?: MedipassRequestOpts = {}
|
|
109
|
-
): Promise<Object> => {
|
|
110
|
-
doesParamExist({ healthFundId, noteId }, opts.hyperMediaEndpoint);
|
|
111
|
-
return request({ ...opts, path: pathHealthFundNote(healthFundId, noteId) }, { method: 'delete' });
|
|
112
|
-
};
|
|
@@ -1,142 +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 pathPracticeOnboardingApplications = (practiceId: string) =>
|
|
8
|
-
`/practices/${practiceId}/onboardingapplications`;
|
|
9
|
-
|
|
10
|
-
export const pathBusinessPracticeOnboardingApplications = (businessId: string, practiceId: string) =>
|
|
11
|
-
`/businesses/${businessId}/practices/${practiceId}/onboardingapplications`;
|
|
12
|
-
|
|
13
|
-
export const pathBusinessOnboardingApplications = (businessId: string) =>
|
|
14
|
-
`/businesses/${businessId}/onboardingapplications`;
|
|
15
|
-
|
|
16
|
-
export const pathProviderSetItemOnboardingApplications = (
|
|
17
|
-
businessId: string,
|
|
18
|
-
staffId: string,
|
|
19
|
-
providerSetItemId: string
|
|
20
|
-
) => `/businesses/${businessId}/staff/${staffId}/providersetitems/${providerSetItemId}/onboardingapplications`;
|
|
21
|
-
|
|
22
|
-
export const pathProviderSetItemOnboardingApplication = (
|
|
23
|
-
businessId: string,
|
|
24
|
-
staffId: string,
|
|
25
|
-
providerSetItemId: string
|
|
26
|
-
) => `/businesses/${businessId}/staff/${staffId}/providersetitems/${providerSetItemId}/onboardingapplication`;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Get submitPracticeOnboardingApplication
|
|
30
|
-
* @param {string} practiceId - Practice ID
|
|
31
|
-
* @param {Object} body - Request body
|
|
32
|
-
* @param {Object} opts - Additional options
|
|
33
|
-
*/
|
|
34
|
-
export const submitPracticeOnboardingApplication = (
|
|
35
|
-
practiceId: string,
|
|
36
|
-
body?: Object,
|
|
37
|
-
opts?: MedipassRequestOpts = {}
|
|
38
|
-
): Promise<Object> => {
|
|
39
|
-
doesParamExist({ practiceId });
|
|
40
|
-
return request({ ...opts, path: pathPracticeOnboardingApplications(practiceId) }, { method: 'post', data: body });
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Get a list of practice's onboarding applications
|
|
45
|
-
* @param {String} businessId - Business ID
|
|
46
|
-
* @param {string} practiceId - Practice ID
|
|
47
|
-
* @param {Object} query - Query parameters
|
|
48
|
-
* @param {Object} opts - Additional options
|
|
49
|
-
*/
|
|
50
|
-
export const getBusinessPracticeOnboardingApplications = async (
|
|
51
|
-
businessId: string,
|
|
52
|
-
practiceId: string,
|
|
53
|
-
query?: Object = {},
|
|
54
|
-
opts?: MedipassRequestOpts = {}
|
|
55
|
-
): Promise<Object> => {
|
|
56
|
-
doesParamExist({ businessId, practiceId }, opts.hyperMediaEndpoint);
|
|
57
|
-
return request(
|
|
58
|
-
{ ...opts, path: pathBusinessPracticeOnboardingApplications(businessId, practiceId) },
|
|
59
|
-
{ method: 'get', params: query }
|
|
60
|
-
);
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Get onboarding applications for business
|
|
65
|
-
* @param {string} businessId - Business ID
|
|
66
|
-
* @param {Object} query - Query parameters
|
|
67
|
-
* @param {Object} opts - Additional options
|
|
68
|
-
*/
|
|
69
|
-
export const getBusinessOnboardingApplications = (
|
|
70
|
-
businessId: string,
|
|
71
|
-
query?: Object,
|
|
72
|
-
opts?: MedipassRequestOpts = {}
|
|
73
|
-
): Promise<Object> => {
|
|
74
|
-
doesParamExist({ businessId });
|
|
75
|
-
return request({ ...opts, path: pathBusinessOnboardingApplications(businessId) }, { method: 'get', params: query });
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Create onboarding application for business
|
|
80
|
-
* @param {String} businessId - Business ID
|
|
81
|
-
*/
|
|
82
|
-
export const createBusinessOnboardingApplication = (
|
|
83
|
-
businessId: string,
|
|
84
|
-
body?: Object,
|
|
85
|
-
opts?: MedipassRequestOpts = {}
|
|
86
|
-
): Promise<Object> => {
|
|
87
|
-
doesParamExist({ businessId });
|
|
88
|
-
return request({ ...opts, path: pathBusinessOnboardingApplications(businessId) }, { method: 'post', data: body });
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Update onboarding application for business
|
|
93
|
-
* @param {String} businessId - Business ID
|
|
94
|
-
*/
|
|
95
|
-
export const updateBusinessOnboardingApplication = (
|
|
96
|
-
businessId: string,
|
|
97
|
-
body?: Object,
|
|
98
|
-
opts?: MedipassRequestOpts = {}
|
|
99
|
-
): Promise<Object> => {
|
|
100
|
-
doesParamExist({ businessId });
|
|
101
|
-
return request({ ...opts, path: pathBusinessOnboardingApplications(businessId) }, { method: 'put', data: body });
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Create onboarding application for provider set item
|
|
106
|
-
* @param {String} businessId - Business ID
|
|
107
|
-
* @param {String} staffID - Staff ID
|
|
108
|
-
* @param {String} providerSetItemId - Provider set item ID
|
|
109
|
-
*/
|
|
110
|
-
export const createProviderSetItemOnboardingApplication = (
|
|
111
|
-
businessId: string,
|
|
112
|
-
staffId: string,
|
|
113
|
-
providerSetItemId: string,
|
|
114
|
-
body?: Object,
|
|
115
|
-
opts?: MedipassRequestOpts = {}
|
|
116
|
-
): Promise<Object> => {
|
|
117
|
-
doesParamExist({ businessId, staffId, providerSetItemId });
|
|
118
|
-
return request(
|
|
119
|
-
{ ...opts, path: pathProviderSetItemOnboardingApplications(businessId, staffId, providerSetItemId) },
|
|
120
|
-
{ method: 'post', data: body }
|
|
121
|
-
);
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Get onboarding applications for provider set item
|
|
126
|
-
* @param {string} businessId - Business ID
|
|
127
|
-
* @param {Object} query - Query parameters
|
|
128
|
-
* @param {Object} opts - Additional options
|
|
129
|
-
*/
|
|
130
|
-
export const getProviderSetItemOnboardingApplication = (
|
|
131
|
-
businessId: string,
|
|
132
|
-
staffId: string,
|
|
133
|
-
providerSetItemId: string,
|
|
134
|
-
query?: Object,
|
|
135
|
-
opts?: MedipassRequestOpts = {}
|
|
136
|
-
): Promise<Object> => {
|
|
137
|
-
doesParamExist({ businessId });
|
|
138
|
-
return request(
|
|
139
|
-
{ ...opts, path: pathProviderSetItemOnboardingApplication(businessId, staffId, providerSetItemId) },
|
|
140
|
-
{ method: 'get', params: query }
|
|
141
|
-
);
|
|
142
|
-
};
|