@medipass/web-sdk 11.37.8 → 11.38.1-feature-typescript-claudia.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.
Files changed (295) hide show
  1. package/.eslintrc.cjs +95 -0
  2. package/CHANGELOG.md +11 -0
  3. package/babel.config.js +2 -1
  4. package/lib/index.d.ts +262 -0
  5. package/lib/index.js +83 -3
  6. package/lib/{regions-ed54f163.js → regions-a0a28864.js} +2 -2
  7. package/lib/resources/accounts.d.ts +215 -0
  8. package/lib/resources/accounts.js +3 -3
  9. package/lib/resources/actions.d.ts +13 -0
  10. package/lib/resources/actions.js +3 -3
  11. package/lib/resources/api-keys.d.ts +24 -0
  12. package/lib/resources/api-keys.js +3 -3
  13. package/lib/resources/applications.d.ts +31 -0
  14. package/lib/resources/applications.js +3 -3
  15. package/lib/resources/attachments.d.ts +32 -0
  16. package/lib/resources/attachments.js +3 -3
  17. package/lib/resources/auth.d.ts +59 -0
  18. package/lib/resources/auth.js +3 -3
  19. package/lib/resources/bulk-submits.d.ts +17 -0
  20. package/lib/resources/bulk-submits.js +3 -3
  21. package/lib/resources/bulk-uploads.d.ts +26 -0
  22. package/lib/resources/bulk-uploads.js +3 -3
  23. package/lib/resources/business-profiles.d.ts +18 -0
  24. package/lib/resources/business-profiles.js +3 -3
  25. package/lib/resources/businesses.d.ts +132 -0
  26. package/lib/resources/businesses.js +3 -3
  27. package/lib/resources/claim-items.d.ts +31 -0
  28. package/lib/resources/claim-items.js +3 -3
  29. package/lib/resources/devices.d.ts +11 -0
  30. package/lib/resources/devices.js +3 -3
  31. package/lib/resources/doc-accounts.d.ts +32 -0
  32. package/lib/resources/doc-accounts.js +3 -3
  33. package/lib/resources/documents.d.ts +90 -0
  34. package/lib/resources/documents.js +3 -3
  35. package/lib/resources/emails.d.ts +14 -0
  36. package/lib/resources/emails.js +3 -3
  37. package/lib/resources/form-application-templates.d.ts +20 -0
  38. package/lib/resources/form-application-templates.js +3 -3
  39. package/lib/resources/form-applications.d.ts +27 -0
  40. package/lib/resources/form-applications.js +3 -3
  41. package/lib/resources/forms.d.ts +100 -0
  42. package/lib/resources/forms.js +3 -3
  43. package/lib/resources/funder-services.d.ts +8 -0
  44. package/lib/resources/funder-services.js +3 -3
  45. package/lib/resources/funder-settings.d.ts +8 -0
  46. package/lib/resources/funder-settings.js +3 -3
  47. package/lib/resources/funders.d.ts +5 -0
  48. package/lib/resources/funders.js +3 -3
  49. package/lib/resources/futures.d.ts +85 -0
  50. package/lib/resources/futures.js +3 -3
  51. package/lib/resources/health-fund-accounts.d.ts +78 -0
  52. package/lib/resources/health-fund-accounts.js +3 -3
  53. package/lib/resources/health-fund-settings.d.ts +39 -0
  54. package/lib/resources/health-fund-settings.js +3 -3
  55. package/lib/resources/healthfunds.d.ts +64 -0
  56. package/lib/resources/healthfunds.js +3 -3
  57. package/lib/resources/icditems.d.ts +14 -0
  58. package/lib/resources/icditems.js +3 -3
  59. package/lib/resources/invoice-scans.d.ts +26 -0
  60. package/lib/resources/invoice-scans.js +3 -3
  61. package/lib/resources/jhcs.d.ts +7 -0
  62. package/lib/resources/jhcs.js +3 -3
  63. package/lib/resources/kyc.d.ts +109 -0
  64. package/lib/resources/kyc.js +3 -3
  65. package/lib/resources/logs.d.ts +16 -0
  66. package/lib/resources/logs.js +3 -3
  67. package/lib/resources/members.d.ts +92 -0
  68. package/lib/resources/members.js +3 -3
  69. package/lib/resources/message-mappings.d.ts +9 -0
  70. package/lib/resources/message-mappings.js +3 -3
  71. package/lib/resources/minions.d.ts +40 -0
  72. package/lib/resources/minions.js +3 -3
  73. package/lib/resources/modalities.d.ts +19 -0
  74. package/lib/resources/modalities.js +3 -3
  75. package/lib/resources/notes.d.ts +17 -0
  76. package/lib/resources/notes.js +3 -3
  77. package/lib/resources/onboarding-applications.d.ts +52 -0
  78. package/lib/resources/onboarding-applications.js +3 -3
  79. package/lib/resources/onboarding-requests.d.ts +39 -0
  80. package/lib/resources/onboarding-requests.js +3 -3
  81. package/lib/resources/ops.d.ts +60 -0
  82. package/lib/resources/ops.js +3 -3
  83. package/lib/resources/organisations.d.ts +7 -0
  84. package/lib/resources/organisations.js +3 -3
  85. package/lib/resources/partners.d.ts +50 -0
  86. package/lib/resources/partners.js +3 -3
  87. package/lib/resources/patients.d.ts +44 -0
  88. package/lib/resources/patients.js +3 -3
  89. package/lib/resources/payments.d.ts +155 -0
  90. package/lib/resources/payments.js +3 -3
  91. package/lib/resources/pms.d.ts +43 -0
  92. package/lib/resources/pms.js +3 -3
  93. package/lib/resources/practice-profiles.d.ts +20 -0
  94. package/lib/resources/practice-profiles.js +3 -3
  95. package/lib/resources/practice-types.d.ts +6 -0
  96. package/lib/resources/practice-types.js +3 -3
  97. package/lib/resources/practices.d.ts +137 -0
  98. package/lib/resources/practices.js +3 -3
  99. package/lib/resources/products.d.ts +23 -0
  100. package/lib/resources/products.js +3 -3
  101. package/lib/resources/professional-categories.d.ts +23 -0
  102. package/lib/resources/professional-categories.js +3 -3
  103. package/lib/resources/provider-number-types.d.ts +16 -0
  104. package/lib/resources/provider-number-types.js +3 -3
  105. package/lib/resources/provider-registration-types.d.ts +15 -0
  106. package/lib/resources/provider-registration-types.js +3 -3
  107. package/lib/resources/provider-requests.d.ts +17 -0
  108. package/lib/resources/provider-requests.js +3 -3
  109. package/lib/resources/provider-types.d.ts +6 -0
  110. package/lib/resources/provider-types.js +3 -3
  111. package/lib/resources/ref-sources.d.ts +6 -0
  112. package/lib/resources/ref-sources.js +3 -3
  113. package/lib/resources/risk.d.ts +13 -0
  114. package/lib/resources/risk.js +3 -3
  115. package/lib/resources/rnas.d.ts +43 -0
  116. package/lib/resources/rnas.js +3 -3
  117. package/lib/resources/roles.d.ts +7 -0
  118. package/lib/resources/roles.js +3 -3
  119. package/lib/resources/self-checkout-sessions.d.ts +134 -0
  120. package/lib/resources/self-checkout-sessions.js +3 -3
  121. package/lib/resources/services.d.ts +88 -0
  122. package/lib/resources/services.js +3 -3
  123. package/lib/resources/settlements.d.ts +37 -0
  124. package/lib/resources/settlements.js +4 -3
  125. package/lib/resources/sign-up.d.ts +5 -0
  126. package/lib/resources/sign-up.js +3 -3
  127. package/lib/resources/specialties.d.ts +23 -0
  128. package/lib/resources/specialties.js +3 -3
  129. package/lib/resources/staff-profiles.d.ts +20 -0
  130. package/lib/resources/staff-profiles.js +3 -3
  131. package/lib/resources/staff.d.ts +242 -0
  132. package/lib/resources/staff.js +3 -3
  133. package/lib/resources/statistics.d.ts +56 -0
  134. package/lib/resources/statistics.js +3 -3
  135. package/lib/resources/subscriptions.d.ts +32 -0
  136. package/lib/resources/subscriptions.js +3 -3
  137. package/lib/resources/terminals.d.ts +71 -0
  138. package/lib/resources/terminals.js +3 -3
  139. package/lib/resources/transaction-export.d.ts +18 -0
  140. package/lib/resources/transaction-export.js +3 -3
  141. package/lib/resources/transactions.d.ts +466 -0
  142. package/lib/resources/transactions.js +3 -3
  143. package/lib/resources/triggers.d.ts +20 -0
  144. package/lib/resources/triggers.js +3 -3
  145. package/lib/resources/vendors.d.ts +9 -0
  146. package/lib/resources/vendors.js +3 -3
  147. package/lib/resources/verify.d.ts +9 -0
  148. package/lib/resources/verify.js +3 -3
  149. package/lib/resources/workers.d.ts +3 -0
  150. package/lib/resources/workers.js +3 -3
  151. package/lib/resources/workflow-exceptions.d.ts +5 -0
  152. package/lib/resources/workflow-exceptions.js +3 -3
  153. package/lib/services/aws.d.ts +54 -0
  154. package/lib/services/aws.js +3 -3
  155. package/lib/services/storage.d.ts +28 -0
  156. package/lib/services/storage.js +126 -18
  157. package/lib/services/version.d.ts +21 -0
  158. package/lib/services/version.js +3 -3
  159. package/lib/{staff-df3df93e.js → staff-96febcd8.js} +217 -582
  160. package/lib/types/documents.d.ts +115 -0
  161. package/lib/types/documents.js +2 -0
  162. package/lib/types/forms.d.ts +67 -0
  163. package/lib/types/forms.js +2 -0
  164. package/lib/types/index.d.ts +42 -0
  165. package/lib/types/index.js +2 -0
  166. package/lib/types/message-mappings.d.ts +18 -0
  167. package/lib/types/message-mappings.js +2 -0
  168. package/lib/types/notes.d.ts +5 -0
  169. package/lib/types/notes.js +2 -0
  170. package/lib/types/products.d.ts +34 -0
  171. package/lib/types/products.js +2 -0
  172. package/lib/types/professional-categories.d.ts +20 -0
  173. package/lib/types/professional-categories.js +2 -0
  174. package/lib/types/specialties.d.ts +22 -0
  175. package/lib/types/specialties.js +2 -0
  176. package/lib/types/subscriptions.d.ts +52 -0
  177. package/lib/types/subscriptions.js +2 -0
  178. package/lib/utils/application.d.ts +1 -0
  179. package/lib/utils/application.js +3 -3
  180. package/lib/utils/base-urls/core.d.ts +19 -0
  181. package/lib/utils/base-urls/index.d.ts +37 -0
  182. package/lib/utils/base-urls/risk.d.ts +17 -0
  183. package/lib/utils/does-param-exist.d.ts +2 -0
  184. package/lib/utils/get-axios-error.d.ts +2 -0
  185. package/lib/utils/param-error.d.ts +3 -0
  186. package/lib/utils/professions.d.ts +3 -0
  187. package/lib/utils/professions.js +3 -3
  188. package/lib/utils/regions.d.ts +1 -0
  189. package/lib/utils/regions.js +2 -2
  190. package/lib/utils/request.d.ts +3 -0
  191. package/lib/utils/request.js +3 -3
  192. package/lib/utils/staff.d.ts +8 -0
  193. package/lib/utils/staff.js +3 -3
  194. package/package.json +19 -9
  195. package/tsconfig.json +33 -0
  196. package/.eslintrc +0 -3
  197. package/lib/_types/documents.js.flow +0 -118
  198. package/lib/_types/forms.js.flow +0 -57
  199. package/lib/_types/index.js.flow +0 -47
  200. package/lib/_types/message-mappings.js.flow +0 -22
  201. package/lib/_types/notes.js.flow +0 -7
  202. package/lib/_types/products.js.flow +0 -40
  203. package/lib/_types/professional-categories.js.flow +0 -25
  204. package/lib/_types/specialties.js.flow +0 -27
  205. package/lib/_types/subscriptions.js.flow +0 -58
  206. package/lib/index.js.flow +0 -438
  207. package/lib/resources/accounts.js.flow +0 -445
  208. package/lib/resources/actions.js.flow +0 -25
  209. package/lib/resources/api-keys.js.flow +0 -54
  210. package/lib/resources/applications.js.flow +0 -60
  211. package/lib/resources/attachments.js.flow +0 -75
  212. package/lib/resources/auth.js.flow +0 -185
  213. package/lib/resources/bulk-submits.js.flow +0 -43
  214. package/lib/resources/bulk-uploads.js.flow +0 -56
  215. package/lib/resources/business-profiles.js.flow +0 -45
  216. package/lib/resources/businesses.js.flow +0 -267
  217. package/lib/resources/claim-items.js.flow +0 -76
  218. package/lib/resources/devices.js.flow +0 -64
  219. package/lib/resources/doc-accounts.js.flow +0 -61
  220. package/lib/resources/documents.js.flow +0 -216
  221. package/lib/resources/emails.js.flow +0 -96
  222. package/lib/resources/form-application-templates.js.flow +0 -52
  223. package/lib/resources/form-applications.js.flow +0 -62
  224. package/lib/resources/forms.js.flow +0 -222
  225. package/lib/resources/funder-services.js.flow +0 -17
  226. package/lib/resources/funder-settings.js.flow +0 -58
  227. package/lib/resources/funders.js.flow +0 -15
  228. package/lib/resources/futures.js.flow +0 -154
  229. package/lib/resources/health-fund-accounts.js.flow +0 -198
  230. package/lib/resources/health-fund-settings.js.flow +0 -104
  231. package/lib/resources/healthfunds.js.flow +0 -139
  232. package/lib/resources/icditems.js.flow +0 -36
  233. package/lib/resources/invoice-scans.js.flow +0 -56
  234. package/lib/resources/jhcs.js.flow +0 -20
  235. package/lib/resources/kyc.js.flow +0 -216
  236. package/lib/resources/logs.js.flow +0 -32
  237. package/lib/resources/members.js.flow +0 -196
  238. package/lib/resources/message-mappings.js.flow +0 -25
  239. package/lib/resources/minions.js.flow +0 -96
  240. package/lib/resources/modalities.js.flow +0 -46
  241. package/lib/resources/notes.js.flow +0 -112
  242. package/lib/resources/onboarding-applications.js.flow +0 -142
  243. package/lib/resources/onboarding-requests.js.flow +0 -97
  244. package/lib/resources/ops.js.flow +0 -116
  245. package/lib/resources/organisations.js.flow +0 -15
  246. package/lib/resources/partners.js.flow +0 -118
  247. package/lib/resources/patients.js.flow +0 -102
  248. package/lib/resources/payments.js.flow +0 -523
  249. package/lib/resources/pms.js.flow +0 -102
  250. package/lib/resources/practice-profiles.js.flow +0 -51
  251. package/lib/resources/practice-types.js.flow +0 -14
  252. package/lib/resources/practices.js.flow +0 -314
  253. package/lib/resources/products.js.flow +0 -48
  254. package/lib/resources/professional-categories.js.flow +0 -56
  255. package/lib/resources/provider-number-types.js.flow +0 -32
  256. package/lib/resources/provider-registration-types.js.flow +0 -32
  257. package/lib/resources/provider-requests.js.flow +0 -46
  258. package/lib/resources/provider-types.js.flow +0 -14
  259. package/lib/resources/ref-sources.js.flow +0 -16
  260. package/lib/resources/risk.js.flow +0 -29
  261. package/lib/resources/rnas.js.flow +0 -108
  262. package/lib/resources/roles.js.flow +0 -12
  263. package/lib/resources/self-checkout-sessions.js.flow +0 -382
  264. package/lib/resources/services.js.flow +0 -219
  265. package/lib/resources/settlements.js.flow +0 -79
  266. package/lib/resources/sign-up.js.flow +0 -15
  267. package/lib/resources/specialties.js.flow +0 -46
  268. package/lib/resources/staff-profiles.js.flow +0 -51
  269. package/lib/resources/staff.js.flow +0 -583
  270. package/lib/resources/statistics.js.flow +0 -147
  271. package/lib/resources/subscriptions.js.flow +0 -81
  272. package/lib/resources/terminals.js.flow +0 -161
  273. package/lib/resources/transaction-export.js.flow +0 -48
  274. package/lib/resources/transactions.js.flow +0 -1097
  275. package/lib/resources/triggers.js.flow +0 -36
  276. package/lib/resources/vendors.js.flow +0 -28
  277. package/lib/resources/verify.js.flow +0 -14
  278. package/lib/resources/workers.js.flow +0 -10
  279. package/lib/resources/workflow-exceptions.js.flow +0 -17
  280. package/lib/services/__mocks__/storage.js.flow +0 -30
  281. package/lib/services/aws.js.flow +0 -339
  282. package/lib/services/storage.js.flow +0 -92
  283. package/lib/services/version.js.flow +0 -73
  284. package/lib/storage-16fd26f8.js +0 -1268
  285. package/lib/utils/application.js.flow +0 -23
  286. package/lib/utils/base-urls/core.js.flow +0 -18
  287. package/lib/utils/base-urls/index.js.flow +0 -7
  288. package/lib/utils/base-urls/risk.js.flow +0 -16
  289. package/lib/utils/does-param-exist.js.flow +0 -23
  290. package/lib/utils/get-axios-error.js.flow +0 -8
  291. package/lib/utils/param-error.js.flow +0 -8
  292. package/lib/utils/professions.js.flow +0 -66
  293. package/lib/utils/regions.js.flow +0 -21
  294. package/lib/utils/request.js.flow +0 -36
  295. package/lib/utils/staff.js.flow +0 -81
@@ -1,97 +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 pathOnboardingRequest = (onboardingRequestId: string) => `/onboardingrequests/${onboardingRequestId}`;
8
- export const pathBusinessOnboardingRequests = (businessId: string) => `/businesses/${businessId}/onboardingrequests`;
9
- export const pathOnboardingRequestSubmit = (onboardingRequestId: string) =>
10
- `/onboardingrequests/${onboardingRequestId}/submits`;
11
- export const pathOnboardingRequestOnboardingStep = (onboardingRequestId: string, onboardingStepId: string) =>
12
- `/onboardingrequests/${onboardingRequestId}/onboardingsteps/${onboardingStepId}`;
13
-
14
- /**
15
- * Get a onboarding request by Id
16
- * @param {String} onboardingRequestId - Onboarding Request Id
17
- * @param {Object} opts - Additional options
18
- */
19
- export const getOnboardingRequest = async (
20
- onboardingRequestId: string,
21
- opts?: MedipassRequestOpts = {}
22
- ): Promise<Object> => {
23
- doesParamExist({ onboardingRequestId }, opts.hyperMediaEndpoint);
24
- return request({ ...opts, path: pathOnboardingRequest(onboardingRequestId) }, { method: 'get' });
25
- };
26
-
27
- /**
28
- * Get a list of business' onboarding requests
29
- * @param {String} businessId - Business ID
30
- * @param {Object} query - Query parameters
31
- * @param {Object} opts - Additional options
32
- */
33
- export const getBusinessOnboardingRequests = async (
34
- businessId: string,
35
- query?: Object = {},
36
- opts?: MedipassRequestOpts = {}
37
- ): Promise<Object> => {
38
- doesParamExist({ businessId }, opts.hyperMediaEndpoint);
39
- return request({ ...opts, path: pathBusinessOnboardingRequests(businessId) }, { method: 'get', params: query });
40
- };
41
-
42
- /**
43
- * Create onboarding request
44
- * @param {String} businessId - Business ID
45
- */
46
- export const createBusinessOnboardingRequest = (
47
- businessId: string,
48
- body?: Object,
49
- opts?: MedipassRequestOpts = {}
50
- ): Promise<Object> => {
51
- doesParamExist({ businessId });
52
- return request({ ...opts, path: pathBusinessOnboardingRequests(businessId) }, { method: 'post', data: body });
53
- };
54
-
55
- /**
56
- * Submit onboarding request
57
- * @param {String} onboardingRequestId - Onboarding Request Id
58
- */
59
- export const submitOnboardingRequest = (
60
- onboardingRequestId: string,
61
- body?: Object,
62
- opts?: MedipassRequestOpts = {}
63
- ): Promise<Object> => {
64
- doesParamExist({ onboardingRequestId });
65
- return request({ ...opts, path: pathOnboardingRequestSubmit(onboardingRequestId) }, { method: 'post', data: body });
66
- };
67
-
68
- /**
69
- * Update onboarding request step
70
- * @param {String} onboardingRequestId - Onboarding Request Id
71
- * @param {String} onboardingStepId - Onboarding Step Id
72
- */
73
- export const updateOnboardingRequestStep = (
74
- onboardingRequestId: string,
75
- onboardingStepId: string,
76
- body?: Object,
77
- opts?: MedipassRequestOpts = {}
78
- ): Promise<Object> => {
79
- doesParamExist({ onboardingRequestId });
80
- return request(
81
- { ...opts, path: pathOnboardingRequestOnboardingStep(onboardingRequestId, onboardingStepId) },
82
- { method: 'put', data: body }
83
- );
84
- };
85
-
86
- /**
87
- * Delete onboarding request
88
- * @param {String} onboardingRequestId - Onboarding Request Id
89
- */
90
- export const deleteOnboardingRequest = (
91
- onboardingRequestId: string,
92
- body?: Object,
93
- opts?: MedipassRequestOpts = {}
94
- ): Promise<Object> => {
95
- doesParamExist({ onboardingRequestId });
96
- return request({ ...opts, path: pathOnboardingRequest(onboardingRequestId) }, { method: 'delete', data: body });
97
- };
@@ -1,116 +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__OPS_DEPLOYMENTS = '/ops/deployments';
8
- const PATH__OPS_SERVICES = '/ops/services';
9
- const PATH__OPS_DECRTPT = '/ops/decrypt';
10
- const pathOpsDeployment = deploymentId => `/ops/deployments/${deploymentId}`;
11
- const pathOpsService = serviceId => `/ops/services/${serviceId}`;
12
-
13
- /**
14
- * Create ops service
15
- * @param {String} fullName - Service full name
16
- * @param {String} displayName - Service display name
17
- * @param {String} type - Service type
18
- * @param {Object} body - Request body
19
- * @param {Object} opts - Additional options
20
- */
21
- export const createService = (
22
- fullName: string,
23
- displayName: string,
24
- type: string,
25
- body: Object,
26
- opts?: MedipassRequestOpts = {}
27
- ): Promise<Object> => {
28
- doesParamExist({ fullName, displayName, type }, opts.hyperMediaEndpoint);
29
- const data = {
30
- fullName,
31
- displayName,
32
- type,
33
- ...body
34
- };
35
- return request({ ...opts, path: PATH__OPS_SERVICES }, { method: 'post', data });
36
- };
37
-
38
- /**
39
- * Delete an ops services
40
- * @param {String} serviceId - Service ID
41
- * @param {Object} opts - Additional options
42
- */
43
- export const deleteService = (serviceId: string, opts?: MedipassRequestOpts = {}): Promise<Object> => {
44
- doesParamExist({ serviceId }, opts.hyperMediaEndpoint);
45
- return request({ ...opts, path: pathOpsService(serviceId) }, { method: 'delete' });
46
- };
47
-
48
- /**
49
- * Deploy an ops service
50
- * @param {String} serviceId - Service ID
51
- * @param {Object} opts - Additional options
52
- */
53
- export const deployService = (serviceId: string, opts?: MedipassRequestOpts = {}): Promise<Object> => {
54
- doesParamExist({ serviceId }, opts.hyperMediaEndpoint);
55
- return request({ ...opts, path: PATH__OPS_DEPLOYMENTS }, { method: 'post', data: { opsServiceId: serviceId } });
56
- };
57
-
58
- /**
59
- * Get ops deployments
60
- * @param {Object} query - Query parameters
61
- * @param {Object} opts - Additional options
62
- */
63
- export const getDeployments = (query?: Object = {}, opts?: MedipassRequestOpts = {}): Promise<Object> => {
64
- return request({ ...opts, path: PATH__OPS_DEPLOYMENTS }, { method: 'get', params: query });
65
- };
66
-
67
- /**
68
- * Get ops deployments
69
- * @param {String} deploymentId - Deployment ID
70
- * @param {Object} opts - Additional options
71
- */
72
- export const getDeployment = (deploymentId: string, opts?: MedipassRequestOpts = {}): Promise<Object> => {
73
- doesParamExist({ deploymentId }, opts.hyperMediaEndpoint);
74
- return request({ ...opts, path: pathOpsDeployment(deploymentId) }, { method: 'get' });
75
- };
76
-
77
- /**
78
- * Get ops services
79
- * @param {Object} query - Query parameters
80
- * @param {Object} opts - Additional options
81
- */
82
- export const getServices = (query?: Object = {}, opts?: MedipassRequestOpts = {}): Promise<Object> => {
83
- return request({ ...opts, path: PATH__OPS_SERVICES }, { method: 'get', params: query });
84
- };
85
-
86
- /**
87
- * Get an ops service
88
- * @param {String} serviceId - Service ID
89
- * @param {Object} opts - Additional options
90
- */
91
- export const getService = (serviceId: string, opts?: MedipassRequestOpts = {}): Promise<Object> => {
92
- doesParamExist({ serviceId }, opts.hyperMediaEndpoint);
93
- return request({ ...opts, path: pathOpsService(serviceId) }, { method: 'get' });
94
- };
95
-
96
- /**
97
- * Update an ops service
98
- * @param {String} serviceId - Service ID
99
- * @param {Object} body - Request body
100
- * @param {Object} opts - Additional options
101
- */
102
- export const updateService = (serviceId: string, body: Object, opts?: MedipassRequestOpts = {}): Promise<Object> => {
103
- doesParamExist({ serviceId }, opts.hyperMediaEndpoint);
104
- return request({ ...opts, path: pathOpsService(serviceId) }, { method: 'put', data: body });
105
- };
106
-
107
- /**
108
- * Decrypt Service
109
- * @param {String} serviceId - Service ID
110
- * @param {Object} body - Request body
111
- * @param {Object} opts - Additional options
112
- */
113
- export const decrypt = (serviceId: string, body: Object, opts?: MedipassRequestOpts = {}): Promise<Object> => {
114
- doesParamExist({ serviceId }, opts.hyperMediaEndpoint);
115
- return request({ ...opts, path: PATH__OPS_DECRTPT }, { method: 'post', data: body });
116
- };
@@ -1,15 +0,0 @@
1
- // @flow
2
-
3
- import request from '../utils/request';
4
- import type { MedipassRequestOpts } from '../_types';
5
-
6
- const PATH__ORGANISATIONS = '/organisations';
7
-
8
- /**
9
- * Get organisations
10
- * @param {Object} query - Query parameters
11
- * @param {Object} opts - Additional options
12
- */
13
- export const getOrganisations = (query?: Object = {}, opts?: MedipassRequestOpts = {}): Promise<Object> => {
14
- return request({ ...opts, path: PATH__ORGANISATIONS }, { method: 'get', params: query });
15
- };
@@ -1,118 +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__PARTNERS = '/partners';
8
- const pathPartner = partnerId => `/partners/${partnerId}`;
9
- const pathPartnerAccount = accountId => `/partners/accounts/${accountId}`;
10
- const pathPartnerPractices = partnerId => `/partners/${partnerId}/practices`;
11
- const pathPartnerPracticeProviderData = (partnerId, practiceId) =>
12
- `/partners/${partnerId}/practices/${practiceId}/providerdata`;
13
-
14
- /**
15
- * Get partners
16
- * @param {Object} query - Query parameters
17
- * @param {Object} opts - Additional options
18
- */
19
- export const getPartners = async (query?: Object = {}, opts?: MedipassRequestOpts = {}): Promise<Object> => {
20
- return request({ ...opts, path: PATH__PARTNERS }, { method: 'get', params: query });
21
- };
22
-
23
- /**
24
- * Get partner
25
- * @param {String} partnerId - Partner ID
26
- * @param {Object} opts - Additional options
27
- */
28
- export const getPartner = async (partnerId: string, opts?: MedipassRequestOpts = {}): Promise<Object> => {
29
- doesParamExist({ partnerId }, opts.hyperMediaEndpoint);
30
- return request({ ...opts, path: pathPartner(partnerId) }, { method: 'get' });
31
- };
32
-
33
- /**
34
- * Update partner
35
- * @param {String} partnerId - Partner ID
36
- * @param {Object} body - Request body
37
- * @param {Object} opts - Additional options
38
- */
39
- export const updatePartner = async (
40
- partnerId: string,
41
- body: Object,
42
- opts?: MedipassRequestOpts = {}
43
- ): Promise<Object> => {
44
- doesParamExist({ partnerId }, opts.hyperMediaEndpoint);
45
- return request({ ...opts, path: pathPartner(partnerId) }, { method: 'put', data: body });
46
- };
47
-
48
- /**
49
- * Update partner practice
50
- * @param {String} partnerId - Partner ID
51
- * @param {String} fullNameId - Practice full name
52
- * @param {Object} body - Request body
53
- * @param {Object} opts - Additional options
54
- */
55
- export const updatePartnerPractice = async (
56
- partnerId: string,
57
- fullNameId: string,
58
- body: Object,
59
- opts?: MedipassRequestOpts = {}
60
- ): Promise<Object> => {
61
- doesParamExist({ partnerId }, opts.hyperMediaEndpoint);
62
- const data = {
63
- fullNameId,
64
- ...body
65
- };
66
- return request({ ...opts, path: pathPartnerPractices(partnerId) }, { method: 'put', data });
67
- };
68
-
69
- /**
70
- * Update partner practice provider data
71
- * @param {String} partnerId - Partner ID
72
- * @param {String} practiceId - Practice ID
73
- * @param {String} providerNumberId - Provider number
74
- * @param {Object} body - Request body
75
- * @param {Object} opts - Additional options
76
- */
77
- export const updatePartnerPracticeProviderData = async (
78
- partnerId: string,
79
- practiceId: string,
80
- providerNumberId: string,
81
- body: Object,
82
- opts?: MedipassRequestOpts = {}
83
- ): Promise<Object> => {
84
- doesParamExist({ partnerId, practiceId, providerNumberId }, opts.hyperMediaEndpoint);
85
- const data = {
86
- providerNumberId,
87
- ...body
88
- };
89
- return request({ ...opts, path: pathPartnerPracticeProviderData(partnerId, practiceId) }, { method: 'put', data });
90
- };
91
-
92
- /**
93
- * Verify partner account
94
- * @param {String} accountId - AccountId ID
95
- * @param {Boolean} forceVerification - Force verification
96
- * @param {Object} opts - Additional options
97
- */
98
- export const verifyPartnerAccount = async (
99
- accountId: string,
100
- forceVerification: boolean = false,
101
- opts?: MedipassRequestOpts = {}
102
- ): Promise<Object> => {
103
- doesParamExist({ accountId }, opts.hyperMediaEndpoint);
104
- return request(
105
- { ...opts, path: `${pathPartnerAccount(accountId)}/verify` },
106
- { method: 'post', data: { forceVerification } }
107
- );
108
- };
109
-
110
- /**
111
- * Notify partner account
112
- * @param {String} accountId - AccountId ID
113
- * @param {Object} opts - Additional options
114
- */
115
- export const notifyPartnerAccount = async (accountId: string, opts?: MedipassRequestOpts = {}): Promise<Object> => {
116
- doesParamExist({ accountId }, opts.hyperMediaEndpoint);
117
- return request({ ...opts, path: `${pathPartnerAccount(accountId)}/notify` }, { method: 'post' });
118
- };
@@ -1,102 +0,0 @@
1
- // @flow
2
- import request from '../utils/request';
3
- import doesParamExist from '../utils/does-param-exist';
4
- import type { MedipassRequestOpts } from '../_types';
5
-
6
- const pathBusinessPatients = (businessId: string) => `/businesses/${businessId}/patients`;
7
- const pathBusinessPatient = (businessId: string, patientId: string) =>
8
- `/businesses/${businessId}/patients/${patientId}`;
9
- const pathBusinessPatientByRefId = (businessId: string, refId: string) =>
10
- `/businesses/${businessId}/patients/ref/${refId}`;
11
-
12
- /**
13
- * Create a business patient
14
- * @param {String} businessId - Business ID
15
- * @param {Object} body - Query parameters
16
- * @param {Object} opts - Additional options
17
- */
18
- export const createBusinessPatient = async (
19
- businessId: string,
20
- body: Object,
21
- opts?: MedipassRequestOpts = {}
22
- ): Promise<Object> => {
23
- doesParamExist({ businessId }, opts.hyperMediaEndpoint);
24
- return request({ ...opts, path: pathBusinessPatients(businessId) }, { method: 'post', data: body });
25
- };
26
-
27
- /**
28
- * Get business patients
29
- * @param {String} businessId - Business ID
30
- * @param {Object} query - Query parameters
31
- * @param {Object} opts - Additional options
32
- */
33
- export const getBusinessPatients = async (
34
- businessId: string,
35
- query?: Object = {},
36
- opts?: MedipassRequestOpts = {}
37
- ): Promise<Object> => {
38
- doesParamExist({ businessId }, opts.hyperMediaEndpoint);
39
- return request({ ...opts, path: pathBusinessPatients(businessId) }, { method: 'get', params: query });
40
- };
41
-
42
- /**
43
- * Get a business patient
44
- * @param {String} businessId - Business ID
45
- * @param {String} patientId - Patient ID
46
- * @param {Object} opts - Additional options
47
- */
48
- export const getBusinessPatient = async (
49
- businessId: string,
50
- patientId: string,
51
- opts?: MedipassRequestOpts = {}
52
- ): Promise<Object> => {
53
- doesParamExist({ businessId }, opts.hyperMediaEndpoint);
54
- return request({ ...opts, path: pathBusinessPatient(businessId, patientId) }, { method: 'get' });
55
- };
56
-
57
- /**
58
- * Get a business patient by ref id
59
- * @param {String} businessId - Business ID
60
- * @param {String} refId - Ref ID
61
- * @param {Object} opts - Additional options
62
- */
63
- export const getBusinessPatientByRefId = async (
64
- businessId: string,
65
- refId: string,
66
- opts?: MedipassRequestOpts = {}
67
- ): Promise<Object> => {
68
- doesParamExist({ businessId, refId }, opts.hyperMediaEndpoint);
69
- return request({ ...opts, path: pathBusinessPatientByRefId(businessId, refId) }, { method: 'get' });
70
- };
71
-
72
- /**
73
- * Update a business patient
74
- * @param {String} businessId - Business ID
75
- * @param {String} patientId - Patient ID
76
- * @param {Object} body - Query parameters
77
- * @param {Object} opts - Additional options
78
- */
79
- export const updateBusinessPatient = async (
80
- businessId: string,
81
- patientId: string,
82
- body: Object,
83
- opts?: MedipassRequestOpts = {}
84
- ): Promise<Object> => {
85
- doesParamExist({ businessId }, opts.hyperMediaEndpoint);
86
- return request({ ...opts, path: pathBusinessPatient(businessId, patientId) }, { method: 'put', data: body });
87
- };
88
-
89
- /**
90
- * Delete a business patient
91
- * @param {String} businessId - Business ID
92
- * @param {String} patientId - Patient ID
93
- * @param {Object} opts - Additional options
94
- */
95
- export const deleteBusinessPatient = async (
96
- businessId: string,
97
- patientId: string,
98
- opts?: MedipassRequestOpts = {}
99
- ): Promise<Object> => {
100
- doesParamExist({ businessId }, opts.hyperMediaEndpoint);
101
- return request({ ...opts, path: pathBusinessPatient(businessId, patientId) }, { method: 'delete' });
102
- };