@oystehr/sdk 4.0.0-alpha.6 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/client/client.cjs +259 -0
- package/dist/cjs/client/client.cjs.map +1 -0
- package/dist/cjs/errors/index.cjs +58 -0
- package/dist/cjs/errors/index.cjs.map +1 -0
- package/dist/cjs/index.cjs +11 -1980
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.min.cjs +1 -1
- package/dist/cjs/index.min.cjs.map +1 -1
- package/dist/cjs/resources/classes/application.cjs +88 -0
- package/dist/cjs/resources/classes/application.cjs.map +1 -0
- package/dist/cjs/resources/classes/charge.cjs +44 -0
- package/dist/cjs/resources/classes/charge.cjs.map +1 -0
- package/dist/cjs/resources/classes/conversation-ext.cjs +31 -0
- package/dist/cjs/resources/classes/conversation-ext.cjs.map +1 -0
- package/dist/cjs/resources/classes/conversation.cjs +84 -0
- package/dist/cjs/resources/classes/conversation.cjs.map +1 -0
- package/dist/cjs/resources/classes/developer.cjs +72 -0
- package/dist/cjs/resources/classes/developer.cjs.map +1 -0
- package/dist/cjs/resources/classes/erx.cjs +88 -0
- package/dist/cjs/resources/classes/erx.cjs.map +1 -0
- package/dist/cjs/resources/classes/erx.d.ts +5 -1
- package/dist/cjs/resources/classes/erxV1.cjs +46 -0
- package/dist/cjs/resources/classes/erxV1.cjs.map +1 -0
- package/dist/cjs/resources/classes/erxV2.cjs +22 -0
- package/dist/cjs/resources/classes/erxV2.cjs.map +1 -0
- package/dist/cjs/resources/classes/fax.cjs +46 -0
- package/dist/cjs/resources/classes/fax.cjs.map +1 -0
- package/dist/cjs/resources/classes/fhir-ext.cjs +200 -0
- package/dist/cjs/resources/classes/fhir-ext.cjs.map +1 -0
- package/dist/cjs/resources/classes/fhir-ext.d.ts +7 -7
- package/dist/cjs/resources/classes/fhir.cjs +34 -0
- package/dist/cjs/resources/classes/fhir.cjs.map +1 -0
- package/dist/cjs/resources/classes/fhir.d.ts +2 -2
- package/dist/cjs/resources/classes/index.cjs +88 -0
- package/dist/cjs/resources/classes/index.cjs.map +1 -0
- package/dist/cjs/resources/classes/lab.cjs +76 -0
- package/dist/cjs/resources/classes/lab.cjs.map +1 -0
- package/dist/cjs/resources/classes/m2m.cjs +81 -0
- package/dist/cjs/resources/classes/m2m.cjs.map +1 -0
- package/dist/cjs/resources/classes/messaging.cjs +22 -0
- package/dist/cjs/resources/classes/messaging.cjs.map +1 -0
- package/dist/cjs/resources/classes/paymentMethod.cjs +88 -0
- package/dist/cjs/resources/classes/paymentMethod.cjs.map +1 -0
- package/dist/cjs/resources/classes/project.cjs +34 -0
- package/dist/cjs/resources/classes/project.cjs.map +1 -0
- package/dist/cjs/resources/classes/rcm.cjs +55 -0
- package/dist/cjs/resources/classes/rcm.cjs.map +1 -0
- package/dist/cjs/resources/classes/role.cjs +62 -0
- package/dist/cjs/resources/classes/role.cjs.map +1 -0
- package/dist/cjs/resources/classes/secret.cjs +52 -0
- package/dist/cjs/resources/classes/secret.cjs.map +1 -0
- package/dist/cjs/resources/classes/telemed.cjs +43 -0
- package/dist/cjs/resources/classes/telemed.cjs.map +1 -0
- package/dist/cjs/resources/classes/transactionalSMS.cjs +34 -0
- package/dist/cjs/resources/classes/transactionalSMS.cjs.map +1 -0
- package/dist/cjs/resources/classes/user.cjs +80 -0
- package/dist/cjs/resources/classes/user.cjs.map +1 -0
- package/dist/cjs/resources/classes/version.cjs +22 -0
- package/dist/cjs/resources/classes/version.cjs.map +1 -0
- package/dist/cjs/resources/classes/z3-ext.cjs +81 -0
- package/dist/cjs/resources/classes/z3-ext.cjs.map +1 -0
- package/dist/cjs/resources/classes/z3.cjs +88 -0
- package/dist/cjs/resources/classes/z3.cjs.map +1 -0
- package/dist/cjs/resources/classes/zambda-ext.cjs +15 -0
- package/dist/cjs/resources/classes/zambda-ext.cjs.map +1 -0
- package/dist/cjs/resources/classes/zambda.cjs +89 -0
- package/dist/cjs/resources/classes/zambda.cjs.map +1 -0
- package/dist/cjs/resources/classes/zambdaLogStream.cjs +43 -0
- package/dist/cjs/resources/classes/zambdaLogStream.cjs.map +1 -0
- package/dist/cjs/resources/types/ErxCheckMedicationInteractionsResponse.d.ts +11 -2
- package/dist/cjs/resources/types/ErxCheckPrecheckInteractionsResponse.d.ts +11 -2
- package/dist/cjs/resources/types/ErxGetConfigurationResponse.d.ts +9 -0
- package/dist/cjs/resources/types/ZambdaCreateParams.d.ts +5 -1
- package/dist/cjs/resources/types/ZambdaFunction.d.ts +1 -1
- package/dist/cjs/resources/types/ZambdaUpdateParams.d.ts +1 -1
- package/dist/cjs/resources/types/index.d.ts +1 -0
- package/dist/esm/client/client.js +68 -67
- package/dist/esm/client/client.js.map +1 -1
- package/dist/esm/errors/index.js +3 -2
- package/dist/esm/errors/index.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +1 -1
- package/dist/esm/index.min.js.map +1 -1
- package/dist/esm/node_modules/tslib/package.json +1 -0
- package/dist/esm/resources/classes/application.js +11 -15
- package/dist/esm/resources/classes/application.js.map +1 -1
- package/dist/esm/resources/classes/charge.js +5 -9
- package/dist/esm/resources/classes/charge.js.map +1 -1
- package/dist/esm/resources/classes/conversation-ext.js +4 -5
- package/dist/esm/resources/classes/conversation-ext.js.map +1 -1
- package/dist/esm/resources/classes/conversation.js +16 -20
- package/dist/esm/resources/classes/conversation.js.map +1 -1
- package/dist/esm/resources/classes/developer.js +9 -13
- package/dist/esm/resources/classes/developer.js.map +1 -1
- package/dist/esm/resources/classes/erx.d.ts +5 -1
- package/dist/esm/resources/classes/erx.js +20 -18
- package/dist/esm/resources/classes/erx.js.map +1 -1
- package/dist/esm/resources/classes/erxV1.js +8 -12
- package/dist/esm/resources/classes/erxV1.js.map +1 -1
- package/dist/esm/resources/classes/erxV2.js +4 -8
- package/dist/esm/resources/classes/erxV2.js.map +1 -1
- package/dist/esm/resources/classes/fax.js +6 -10
- package/dist/esm/resources/classes/fax.js.map +1 -1
- package/dist/esm/resources/classes/fhir-ext.d.ts +7 -7
- package/dist/esm/resources/classes/fhir-ext.js +71 -62
- package/dist/esm/resources/classes/fhir-ext.js.map +1 -1
- package/dist/esm/resources/classes/fhir.d.ts +2 -2
- package/dist/esm/resources/classes/fhir.js +20 -20
- package/dist/esm/resources/classes/fhir.js.map +1 -1
- package/dist/esm/resources/classes/index.js +28 -5
- package/dist/esm/resources/classes/index.js.map +1 -1
- package/dist/esm/resources/classes/lab.js +9 -13
- package/dist/esm/resources/classes/lab.js.map +1 -1
- package/dist/esm/resources/classes/m2m.js +10 -14
- package/dist/esm/resources/classes/m2m.js.map +1 -1
- package/dist/esm/resources/classes/messaging.js +4 -8
- package/dist/esm/resources/classes/messaging.js.map +1 -1
- package/dist/esm/resources/classes/paymentMethod.js +7 -11
- package/dist/esm/resources/classes/paymentMethod.js.map +1 -1
- package/dist/esm/resources/classes/project.js +5 -9
- package/dist/esm/resources/classes/project.js.map +1 -1
- package/dist/esm/resources/classes/rcm.js +6 -10
- package/dist/esm/resources/classes/rcm.js.map +1 -1
- package/dist/esm/resources/classes/role.js +8 -12
- package/dist/esm/resources/classes/role.js.map +1 -1
- package/dist/esm/resources/classes/secret.js +7 -11
- package/dist/esm/resources/classes/secret.js.map +1 -1
- package/dist/esm/resources/classes/telemed.js +5 -9
- package/dist/esm/resources/classes/telemed.js.map +1 -1
- package/dist/esm/resources/classes/transactionalSMS.js +4 -8
- package/dist/esm/resources/classes/transactionalSMS.js.map +1 -1
- package/dist/esm/resources/classes/user.js +10 -14
- package/dist/esm/resources/classes/user.js.map +1 -1
- package/dist/esm/resources/classes/version.js +4 -8
- package/dist/esm/resources/classes/version.js.map +1 -1
- package/dist/esm/resources/classes/z3-ext.js +47 -56
- package/dist/esm/resources/classes/z3-ext.js.map +1 -1
- package/dist/esm/resources/classes/z3.js +26 -30
- package/dist/esm/resources/classes/z3.js.map +1 -1
- package/dist/esm/resources/classes/zambda-ext.js +6 -11
- package/dist/esm/resources/classes/zambda-ext.js.map +1 -1
- package/dist/esm/resources/classes/zambda.js +12 -16
- package/dist/esm/resources/classes/zambda.js.map +1 -1
- package/dist/esm/resources/classes/zambdaLogStream.js +6 -10
- package/dist/esm/resources/classes/zambdaLogStream.js.map +1 -1
- package/dist/esm/resources/types/ErxCheckMedicationInteractionsResponse.d.ts +11 -2
- package/dist/esm/resources/types/ErxCheckPrecheckInteractionsResponse.d.ts +11 -2
- package/dist/esm/resources/types/ErxGetConfigurationResponse.d.ts +9 -0
- package/dist/esm/resources/types/ZambdaCreateParams.d.ts +5 -1
- package/dist/esm/resources/types/ZambdaFunction.d.ts +1 -1
- package/dist/esm/resources/types/ZambdaUpdateParams.d.ts +1 -1
- package/dist/esm/resources/types/index.d.ts +1 -0
- package/package.json +5 -4
- package/rollup.config-cjs.mjs +97 -18
- package/src/resources/classes/erx.ts +7 -0
- package/src/resources/classes/fhir-ext.ts +5 -5
- package/src/resources/types/ErxCheckMedicationInteractionsResponse.ts +11 -2
- package/src/resources/types/ErxCheckPrecheckInteractionsResponse.ts +11 -2
- package/src/resources/types/ErxGetConfigurationResponse.ts +11 -0
- package/src/resources/types/ZambdaCreateParams.ts +5 -1
- package/src/resources/types/ZambdaFunction.ts +1 -1
- package/src/resources/types/ZambdaUpdateParams.ts +1 -1
- package/src/resources/types/index.ts +1 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var client = require('../../client/client.cjs');
|
|
4
|
+
|
|
5
|
+
// AUTOGENERATED -- DO NOT EDIT
|
|
6
|
+
class Application extends client.SDKResource {
|
|
7
|
+
constructor(config) {
|
|
8
|
+
super(config);
|
|
9
|
+
}
|
|
10
|
+
#baseUrlThunk() {
|
|
11
|
+
return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Get a list of Applications. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.
|
|
15
|
+
*
|
|
16
|
+
* Access Policy Action: `App:ListAllApplications`
|
|
17
|
+
* Access Policy Resource: `App:Application`
|
|
18
|
+
*/
|
|
19
|
+
list(request) {
|
|
20
|
+
return this.request('/application', 'get', this.#baseUrlThunk.bind(this))(request);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Create a new Application. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.
|
|
24
|
+
*
|
|
25
|
+
* Access Policy Action: `App:CreateApplication`
|
|
26
|
+
* Access Policy Resource: `App:Application`
|
|
27
|
+
*/
|
|
28
|
+
create(params, request) {
|
|
29
|
+
return this.request('/application', 'post', this.#baseUrlThunk.bind(this))(params, request);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Get the Application with the provided ID. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.
|
|
33
|
+
*
|
|
34
|
+
* Access Policy Action: `App:GetApplication`
|
|
35
|
+
* Access Policy Resource: `App:Application`
|
|
36
|
+
*/
|
|
37
|
+
get(params, request) {
|
|
38
|
+
return this.request('/application/{id}', 'get', this.#baseUrlThunk.bind(this))(params, request);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Update the Application with the provided ID. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.
|
|
42
|
+
*
|
|
43
|
+
* Access Policy Action: `App:UpdateApplication`
|
|
44
|
+
* Access Policy Resource: `App:Application`
|
|
45
|
+
*/
|
|
46
|
+
update(params, request) {
|
|
47
|
+
return this.request('/application/{id}', 'patch', this.#baseUrlThunk.bind(this))(params, request);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Delete the Application with the provided ID. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.
|
|
51
|
+
*
|
|
52
|
+
* Access Policy Action: `App:DeleteApplication`
|
|
53
|
+
* Access Policy Resource: `App:Application`
|
|
54
|
+
*/
|
|
55
|
+
delete(params, request) {
|
|
56
|
+
return this.request('/application/{id}', 'delete', this.#baseUrlThunk.bind(this))(params, request);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Rotate client's secrete associated with an application.
|
|
60
|
+
*
|
|
61
|
+
* Access Policy Action: `App:RotateApplicationSecret`
|
|
62
|
+
* Access Policy Resource: `App:Application`
|
|
63
|
+
*/
|
|
64
|
+
rotateSecret(params, request) {
|
|
65
|
+
return this.request('/application/{id}/rotate-secret', 'post', this.#baseUrlThunk.bind(this))(params, request);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Revokes user's refresh token issued for the application.
|
|
69
|
+
*
|
|
70
|
+
* Access Policy Action: `App:RevokeRefreshToken`
|
|
71
|
+
* Access Policy Resource: `App:Application`
|
|
72
|
+
*/
|
|
73
|
+
revokeRefreshToken(params, request) {
|
|
74
|
+
return this.request('/application/{id}/revoke-refresh-token', 'post', this.#baseUrlThunk.bind(this))(params, request);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Revokes user's access token issued for the application.
|
|
78
|
+
*
|
|
79
|
+
* Access Policy Action: `App:RevokeAccessToken`
|
|
80
|
+
* Access Policy Resource: `App:Application`
|
|
81
|
+
*/
|
|
82
|
+
revokeAccessToken(params, request) {
|
|
83
|
+
return this.request('/application/{id}/revoke-access-token', 'post', this.#baseUrlThunk.bind(this))(params, request);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
exports.Application = Application;
|
|
88
|
+
//# sourceMappingURL=application.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application.cjs","sources":["../../../../src/resources/classes/application.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n ApplicationCreateParams,\n ApplicationCreateResponse,\n ApplicationDeleteParams,\n ApplicationGetParams,\n ApplicationGetResponse,\n ApplicationListResponse,\n ApplicationRevokeAccessTokenParams,\n ApplicationRevokeAccessTokenResponse,\n ApplicationRevokeRefreshTokenParams,\n ApplicationRevokeRefreshTokenResponse,\n ApplicationRotateSecretParams,\n ApplicationRotateSecretResponse,\n ApplicationUpdateParams,\n ApplicationUpdateResponse,\n OystehrClientRequest,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Application extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n /**\n * Get a list of Applications. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.\n *\n * Access Policy Action: `App:ListAllApplications`\n * Access Policy Resource: `App:Application`\n */\n list(request?: OystehrClientRequest): Promise<ApplicationListResponse> {\n return this.request('/application', 'get', this.#baseUrlThunk.bind(this))(request);\n }\n /**\n * Create a new Application. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.\n *\n * Access Policy Action: `App:CreateApplication`\n * Access Policy Resource: `App:Application`\n */\n create(params: ApplicationCreateParams, request?: OystehrClientRequest): Promise<ApplicationCreateResponse> {\n return this.request('/application', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Get the Application with the provided ID. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.\n *\n * Access Policy Action: `App:GetApplication`\n * Access Policy Resource: `App:Application`\n */\n get(params: ApplicationGetParams, request?: OystehrClientRequest): Promise<ApplicationGetResponse> {\n return this.request('/application/{id}', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Update the Application with the provided ID. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.\n *\n * Access Policy Action: `App:UpdateApplication`\n * Access Policy Resource: `App:Application`\n */\n update(params: ApplicationUpdateParams, request?: OystehrClientRequest): Promise<ApplicationUpdateResponse> {\n return this.request('/application/{id}', 'patch', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Delete the Application with the provided ID. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.\n *\n * Access Policy Action: `App:DeleteApplication`\n * Access Policy Resource: `App:Application`\n */\n delete(params: ApplicationDeleteParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/application/{id}', 'delete', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Rotate client's secrete associated with an application.\n *\n * Access Policy Action: `App:RotateApplicationSecret`\n * Access Policy Resource: `App:Application`\n */\n rotateSecret(\n params: ApplicationRotateSecretParams,\n request?: OystehrClientRequest\n ): Promise<ApplicationRotateSecretResponse> {\n return this.request('/application/{id}/rotate-secret', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Revokes user's refresh token issued for the application.\n *\n * Access Policy Action: `App:RevokeRefreshToken`\n * Access Policy Resource: `App:Application`\n */\n revokeRefreshToken(\n params: ApplicationRevokeRefreshTokenParams,\n request?: OystehrClientRequest\n ): Promise<ApplicationRevokeRefreshTokenResponse> {\n return this.request(\n '/application/{id}/revoke-refresh-token',\n 'post',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Revokes user's access token issued for the application.\n *\n * Access Policy Action: `App:RevokeAccessToken`\n * Access Policy Resource: `App:Application`\n */\n revokeAccessToken(\n params: ApplicationRevokeAccessTokenParams,\n request?: OystehrClientRequest\n ): Promise<ApplicationRevokeAccessTokenResponse> {\n return this.request(\n '/application/{id}/revoke-access-token',\n 'post',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n}\n"],"names":["SDKResource"],"mappings":";;;;AAAA;AAsBM,MAAO,WAAY,SAAQA,kBAAW,CAAA;AAC1C,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;IACD,aAAa,GAAA;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,eAAe,CAAC,IAAI,mCAAmC,CAAC;KACvF;AACD;;;;;AAKG;AACH,IAAA,IAAI,CAAC,OAA8B,EAAA;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KACpF;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA+B,EAAE,OAA8B,EAAA;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC7F;AACD;;;;;AAKG;IACH,GAAG,CAAC,MAA4B,EAAE,OAA8B,EAAA;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACjG;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA+B,EAAE,OAA8B,EAAA;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnG;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA+B,EAAE,OAA8B,EAAA;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpG;AACD;;;;;AAKG;IACH,YAAY,CACV,MAAqC,EACrC,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,iCAAiC,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChH;AACD;;;;;AAKG;IACH,kBAAkB,CAChB,MAA2C,EAC3C,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CACjB,wCAAwC,EACxC,MAAM,EACN,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAC9B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpB;AACD;;;;;AAKG;IACH,iBAAiB,CACf,MAA0C,EAC1C,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CACjB,uCAAuC,EACvC,MAAM,EACN,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAC9B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpB;AACF;;;;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var client = require('../../client/client.cjs');
|
|
4
|
+
|
|
5
|
+
// AUTOGENERATED -- DO NOT EDIT
|
|
6
|
+
class Charge extends client.SDKResource {
|
|
7
|
+
constructor(config) {
|
|
8
|
+
super(config);
|
|
9
|
+
}
|
|
10
|
+
#baseUrlThunk() {
|
|
11
|
+
return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Charge patient's default payment method for a specified encounter or charge item.
|
|
15
|
+
*
|
|
16
|
+
* Access Policy Requirements:
|
|
17
|
+
* Action: `Payment:Issue`
|
|
18
|
+
* Access Policy Resource: `Payment:Charge`
|
|
19
|
+
* Actions: `FHIR:Read,FHIR:Create,FHIR:Update`
|
|
20
|
+
* Access Policy Resource: `FHIR:ChargeItem:*,`FHIR:PaymentReconciliation:*`
|
|
21
|
+
* Action: `FHIR:Read`
|
|
22
|
+
* Access Policy Resources: `FHIR:Patient:*,FHIR:Encounter:*,FHIR:Coverage:*`
|
|
23
|
+
*/
|
|
24
|
+
issue(params, request) {
|
|
25
|
+
return this.request('/payment/charge/issue', 'post', this.#baseUrlThunk.bind(this))(params, request);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Retrieve charge status for a specified encounter or charge item.
|
|
29
|
+
*
|
|
30
|
+
* Access Policy Requirements:
|
|
31
|
+
* Action: `Payment:Status`
|
|
32
|
+
* Access Policy Resource: `Payment:Charge`
|
|
33
|
+
* Actions: `FHIR:Read,FHIR:Create,FHIR:Update`
|
|
34
|
+
* Access Policy Resource: `FHIR:ChargeItem:*,`FHIR:PaymentReconciliation:*`
|
|
35
|
+
* Action: `FHIR:Read`
|
|
36
|
+
* Access Policy Resources: `FHIR:Patient:*,FHIR:Encounter:*,FHIR:Coverage:*`
|
|
37
|
+
*/
|
|
38
|
+
status(params, request) {
|
|
39
|
+
return this.request('/payment/charge/status', 'post', this.#baseUrlThunk.bind(this))(params, request);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
exports.Charge = Charge;
|
|
44
|
+
//# sourceMappingURL=charge.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"charge.cjs","sources":["../../../../src/resources/classes/charge.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport { ChargeIssueParams, ChargeStatusParams, ChargeStatusResponse, OystehrClientRequest } from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Charge extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n /**\n * Charge patient's default payment method for a specified encounter or charge item.\n *\n * Access Policy Requirements:\n * Action: `Payment:Issue`\n * Access Policy Resource: `Payment:Charge`\n * Actions: `FHIR:Read,FHIR:Create,FHIR:Update`\n * Access Policy Resource: `FHIR:ChargeItem:*,`FHIR:PaymentReconciliation:*`\n * Action: `FHIR:Read`\n * Access Policy Resources: `FHIR:Patient:*,FHIR:Encounter:*,FHIR:Coverage:*`\n */\n issue(params: ChargeIssueParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/payment/charge/issue', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Retrieve charge status for a specified encounter or charge item.\n *\n * Access Policy Requirements:\n * Action: `Payment:Status`\n * Access Policy Resource: `Payment:Charge`\n * Actions: `FHIR:Read,FHIR:Create,FHIR:Update`\n * Access Policy Resource: `FHIR:ChargeItem:*,`FHIR:PaymentReconciliation:*`\n * Action: `FHIR:Read`\n * Access Policy Resources: `FHIR:Patient:*,FHIR:Encounter:*,FHIR:Coverage:*`\n */\n status(params: ChargeStatusParams, request?: OystehrClientRequest): Promise<ChargeStatusResponse> {\n return this.request('/payment/charge/status', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":["SDKResource"],"mappings":";;;;AAAA;AAMM,MAAO,MAAO,SAAQA,kBAAW,CAAA;AACrC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;IACD,aAAa,GAAA;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,eAAe,CAAC,IAAI,mCAAmC,CAAC;KACvF;AACD;;;;;;;;;;AAUG;IACH,KAAK,CAAC,MAAyB,EAAE,OAA8B,EAAA;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,uBAAuB,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACtG;AACD;;;;;;;;;;AAUG;IACH,MAAM,CAAC,MAA0B,EAAE,OAA8B,EAAA;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACvG;AACF;;;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const ENCOUNTER_VS_EXTENSION_URL = 'https://extensions.fhir.zapehr.com/encounter-virtual-service-pre-release';
|
|
4
|
+
const ENCOUNTER_VS_EXTENSION_RELATIVE_URL = 'addressString';
|
|
5
|
+
const ENCOUNTER_VS_CODING_SYSTEM = 'https://fhir.zapehr.com/virtual-service-type';
|
|
6
|
+
function isR5Encounter(encounter) {
|
|
7
|
+
return Object.hasOwn(encounter, 'virtualService');
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Helper function to get a conversationId from an encounter created as an Oystehr Conversation
|
|
11
|
+
* @param encounter well-formed FHIR R4B or R5 Encounter
|
|
12
|
+
* @returns conversationId
|
|
13
|
+
*/
|
|
14
|
+
function getConversationIdFromEncounter(encounter) {
|
|
15
|
+
if (isR5Encounter(encounter)) {
|
|
16
|
+
const virtualService = encounter.virtualService?.find((vs) => vs.channelType?.system === ENCOUNTER_VS_CODING_SYSTEM);
|
|
17
|
+
return virtualService?.addressString;
|
|
18
|
+
}
|
|
19
|
+
if (!encounter.extension)
|
|
20
|
+
return;
|
|
21
|
+
const virtualServiceExtension = encounter.extension.find((extension) => extension.url === ENCOUNTER_VS_EXTENSION_URL);
|
|
22
|
+
if (!virtualServiceExtension?.extension)
|
|
23
|
+
return;
|
|
24
|
+
const conversationId = virtualServiceExtension.extension?.find((extension) => extension.url === ENCOUNTER_VS_EXTENSION_RELATIVE_URL)?.valueString;
|
|
25
|
+
return conversationId;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
exports.ENCOUNTER_VS_EXTENSION_RELATIVE_URL = ENCOUNTER_VS_EXTENSION_RELATIVE_URL;
|
|
29
|
+
exports.ENCOUNTER_VS_EXTENSION_URL = ENCOUNTER_VS_EXTENSION_URL;
|
|
30
|
+
exports.getConversationIdFromEncounter = getConversationIdFromEncounter;
|
|
31
|
+
//# sourceMappingURL=conversation-ext.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation-ext.cjs","sources":["../../../../src/resources/classes/conversation-ext.ts"],"sourcesContent":["import { Encounter as EncounterR4B } from 'fhir/r4b';\nimport { Encounter as EncounterR5 } from 'fhir/r5';\n\nexport const ENCOUNTER_VS_EXTENSION_URL = 'https://extensions.fhir.zapehr.com/encounter-virtual-service-pre-release';\nexport const ENCOUNTER_VS_EXTENSION_RELATIVE_URL = 'addressString';\nconst ENCOUNTER_VS_CODING_SYSTEM = 'https://fhir.zapehr.com/virtual-service-type';\n\nfunction isR5Encounter(encounter: EncounterR4B | EncounterR5): encounter is EncounterR5 {\n return Object.hasOwn(encounter as EncounterR5, 'virtualService');\n}\n\n/**\n * Helper function to get a conversationId from an encounter created as an Oystehr Conversation\n * @param encounter well-formed FHIR R4B or R5 Encounter\n * @returns conversationId\n */\nexport function getConversationIdFromEncounter(encounter: EncounterR4B | EncounterR5): string | undefined {\n if (isR5Encounter(encounter)) {\n const virtualService = encounter.virtualService?.find(\n (vs) => vs.channelType?.system === ENCOUNTER_VS_CODING_SYSTEM\n );\n return virtualService?.addressString;\n }\n if (!encounter.extension) return;\n const virtualServiceExtension = encounter.extension.find((extension) => extension.url === ENCOUNTER_VS_EXTENSION_URL);\n if (!virtualServiceExtension?.extension) return;\n const conversationId = virtualServiceExtension.extension?.find(\n (extension) => extension.url === ENCOUNTER_VS_EXTENSION_RELATIVE_URL\n )?.valueString;\n return conversationId;\n}\n"],"names":[],"mappings":";;AAGO,MAAM,0BAA0B,GAAG,2EAA2E;AAC9G,MAAM,mCAAmC,GAAG,gBAAgB;AACnE,MAAM,0BAA0B,GAAG,8CAA8C,CAAC;AAElF,SAAS,aAAa,CAAC,SAAqC,EAAA;IAC1D,OAAO,MAAM,CAAC,MAAM,CAAC,SAAwB,EAAE,gBAAgB,CAAC,CAAC;AACnE,CAAC;AAED;;;;AAIG;AACG,SAAU,8BAA8B,CAAC,SAAqC,EAAA;AAClF,IAAA,IAAI,aAAa,CAAC,SAAS,CAAC,EAAE;QAC5B,MAAM,cAAc,GAAG,SAAS,CAAC,cAAc,EAAE,IAAI,CACnD,CAAC,EAAE,KAAK,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,0BAA0B,CAC9D,CAAC;QACF,OAAO,cAAc,EAAE,aAAa,CAAC;KACtC;IACD,IAAI,CAAC,SAAS,CAAC,SAAS;QAAE,OAAO;AACjC,IAAA,MAAM,uBAAuB,GAAG,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,GAAG,KAAK,0BAA0B,CAAC,CAAC;IACtH,IAAI,CAAC,uBAAuB,EAAE,SAAS;QAAE,OAAO;IAChD,MAAM,cAAc,GAAG,uBAAuB,CAAC,SAAS,EAAE,IAAI,CAC5D,CAAC,SAAS,KAAK,SAAS,CAAC,GAAG,KAAK,mCAAmC,CACrE,EAAE,WAAW,CAAC;AACf,IAAA,OAAO,cAAc,CAAC;AACxB;;;;;;"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var client = require('../../client/client.cjs');
|
|
4
|
+
var conversationExt = require('./conversation-ext.cjs');
|
|
5
|
+
|
|
6
|
+
// AUTOGENERATED -- DO NOT EDIT
|
|
7
|
+
class Conversation extends client.SDKResource {
|
|
8
|
+
constructor(config) {
|
|
9
|
+
super(config);
|
|
10
|
+
}
|
|
11
|
+
#baseUrlThunk() {
|
|
12
|
+
return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';
|
|
13
|
+
}
|
|
14
|
+
ENCOUNTER_VS_EXTENSION_URL = conversationExt.ENCOUNTER_VS_EXTENSION_URL;
|
|
15
|
+
ENCOUNTER_VS_EXTENSION_RELATIVE_URL = conversationExt.ENCOUNTER_VS_EXTENSION_RELATIVE_URL;
|
|
16
|
+
/**
|
|
17
|
+
* Helper function to get a conversationId from an encounter created as an Oystehr Conversation
|
|
18
|
+
* @param encounter well-formed FHIR R4B or R5 Encounter
|
|
19
|
+
* @returns conversationId
|
|
20
|
+
*/
|
|
21
|
+
getConversationIdFromEncounter = conversationExt.getConversationIdFromEncounter;
|
|
22
|
+
/**
|
|
23
|
+
* Create a new Conversation. [Conversations](https://docs.oystehr.com/oystehr/services/messaging/conversations/) allow you to build multi-channel bi-directional messaging workflows. For example, you might create a Conversation where a provider messages with a patient through a web app, and the patient receives and responds to messages via SMS on their phone.
|
|
24
|
+
*
|
|
25
|
+
* Access Policy Requirements:
|
|
26
|
+
* Action: `Messaging:CreateConversation`
|
|
27
|
+
* Access Policy Resource: `Messaging:Conversation`
|
|
28
|
+
* Action: `FHIR:Create`
|
|
29
|
+
* Access Policy Resource: `FHIR:Encounter`
|
|
30
|
+
* Action: `FHIR:Update`
|
|
31
|
+
* Access Policy Resource: `FHIR:Encounter`
|
|
32
|
+
*/
|
|
33
|
+
create(params, request) {
|
|
34
|
+
return this.request('/messaging/conversation', 'post', this.#baseUrlThunk.bind(this))(params, request);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Get a Conversation Token. Conversation Tokens are used to join the Conversation with the Twilio Conversations SDKs. [Conversations](https://docs.oystehr.com/oystehr/services/messaging/conversations/) allow you to build multi-channel bi-directional messaging workflows. For example, you might create a Conversation where a provider messages with a patient through a web app, and the patient receives and responds to messages via SMS on their phone.
|
|
38
|
+
*
|
|
39
|
+
* Access Policy Action: `Messaging:GetConversationToken`
|
|
40
|
+
* Access Policy Resource: `Messaging:Conversation`.
|
|
41
|
+
*/
|
|
42
|
+
getToken(request) {
|
|
43
|
+
return this.request('/messaging/conversation/token', 'get', this.#baseUrlThunk.bind(this))(request);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Add a participant to a Conversation. [Conversations](https://docs.oystehr.com/oystehr/services/messaging/conversations/) allow you to build multi-channel bi-directional messaging workflows. For example, you might create a Conversation where a provider messages with a patient through a web app, and the patient receives and responds to messages via SMS on their phone.
|
|
47
|
+
*
|
|
48
|
+
* Access Policy Requirements:
|
|
49
|
+
* Action: `Messaging:ConversationAddParticipant`
|
|
50
|
+
* Access Policy Resource: `Messaging:Conversation`
|
|
51
|
+
* Action: `FHIR:Read`
|
|
52
|
+
* Access Policy Resource: `FHIR:Encounter`
|
|
53
|
+
* Action: `FHIR:Update`
|
|
54
|
+
* Access Policy Resource: `FHIR:Encounter`
|
|
55
|
+
*/
|
|
56
|
+
addParticipant(params, request) {
|
|
57
|
+
return this.request('/messaging/conversation/{conversationId}/participant', 'post', this.#baseUrlThunk.bind(this))(params, request);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Remove a participant from a Conversation. [Conversations](https://docs.oystehr.com/oystehr/services/messaging/conversations/) allow you to build multi-channel bi-directional messaging workflows. For example, you might create a Conversation where a provider messages with a patient through a web app, and the patient receives and responds to messages via SMS on their phone.
|
|
61
|
+
*
|
|
62
|
+
* Access Policy Requirements:
|
|
63
|
+
* Action: `Messaging:ConversationRemoveParticipant`
|
|
64
|
+
* Access Policy Resource: `Messaging:Conversation`
|
|
65
|
+
* Action: `FHIR:Read`
|
|
66
|
+
* Access Policy Resource: `FHIR:Patient`, `FHIR:Practitioner`, or `FHIR:RelatedPerson`
|
|
67
|
+
*/
|
|
68
|
+
removeParticipant(params, request) {
|
|
69
|
+
return this.request('/messaging/conversation/{conversationId}/participant', 'delete', this.#baseUrlThunk.bind(this))(params, request);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Send a message to a Conversation. [Conversations](https://docs.oystehr.com/oystehr/services/messaging/conversations/) allow you to build multi-channel bi-directional messaging workflows. For example, you might create a Conversation where a provider messages with a patient through a web app, and the patient receives and responds to messages via SMS on their phone.
|
|
73
|
+
*
|
|
74
|
+
* Access Policy Requirements:
|
|
75
|
+
* Action: `Messaging:ConversationSendMessage`
|
|
76
|
+
* Access Policy Resource: `Messaging:Conversation`
|
|
77
|
+
*/
|
|
78
|
+
message(params, request) {
|
|
79
|
+
return this.request('/messaging/conversation/{conversationId}/message', 'post', this.#baseUrlThunk.bind(this))(params, request);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
exports.Conversation = Conversation;
|
|
84
|
+
//# sourceMappingURL=conversation.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation.cjs","sources":["../../../../src/resources/classes/conversation.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n ConversationAddParticipantParams,\n ConversationCreateParams,\n ConversationCreateResponse,\n ConversationGetTokenResponse,\n ConversationMessageParams,\n ConversationRemoveParticipantParams,\n OystehrClientRequest,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\nimport * as ext from './conversation-ext';\n\nexport class Conversation extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n ENCOUNTER_VS_EXTENSION_URL = ext.ENCOUNTER_VS_EXTENSION_URL;\n ENCOUNTER_VS_EXTENSION_RELATIVE_URL = ext.ENCOUNTER_VS_EXTENSION_RELATIVE_URL;\n /**\n * Helper function to get a conversationId from an encounter created as an Oystehr Conversation\n * @param encounter well-formed FHIR R4B or R5 Encounter\n * @returns conversationId\n */\n getConversationIdFromEncounter = ext.getConversationIdFromEncounter;\n /**\n * Create a new Conversation. [Conversations](https://docs.oystehr.com/oystehr/services/messaging/conversations/) allow you to build multi-channel bi-directional messaging workflows. For example, you might create a Conversation where a provider messages with a patient through a web app, and the patient receives and responds to messages via SMS on their phone.\n *\n * Access Policy Requirements:\n * Action: `Messaging:CreateConversation`\n * Access Policy Resource: `Messaging:Conversation`\n * Action: `FHIR:Create`\n * Access Policy Resource: `FHIR:Encounter`\n * Action: `FHIR:Update`\n * Access Policy Resource: `FHIR:Encounter`\n */\n create(params: ConversationCreateParams, request?: OystehrClientRequest): Promise<ConversationCreateResponse> {\n return this.request('/messaging/conversation', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Get a Conversation Token. Conversation Tokens are used to join the Conversation with the Twilio Conversations SDKs. [Conversations](https://docs.oystehr.com/oystehr/services/messaging/conversations/) allow you to build multi-channel bi-directional messaging workflows. For example, you might create a Conversation where a provider messages with a patient through a web app, and the patient receives and responds to messages via SMS on their phone.\n *\n * Access Policy Action: `Messaging:GetConversationToken`\n * Access Policy Resource: `Messaging:Conversation`.\n */\n getToken(request?: OystehrClientRequest): Promise<ConversationGetTokenResponse> {\n return this.request('/messaging/conversation/token', 'get', this.#baseUrlThunk.bind(this))(request);\n }\n /**\n * Add a participant to a Conversation. [Conversations](https://docs.oystehr.com/oystehr/services/messaging/conversations/) allow you to build multi-channel bi-directional messaging workflows. For example, you might create a Conversation where a provider messages with a patient through a web app, and the patient receives and responds to messages via SMS on their phone.\n *\n * Access Policy Requirements:\n * Action: `Messaging:ConversationAddParticipant`\n * Access Policy Resource: `Messaging:Conversation`\n * Action: `FHIR:Read`\n * Access Policy Resource: `FHIR:Encounter`\n * Action: `FHIR:Update`\n * Access Policy Resource: `FHIR:Encounter`\n */\n addParticipant(params: ConversationAddParticipantParams, request?: OystehrClientRequest): Promise<void> {\n return this.request(\n '/messaging/conversation/{conversationId}/participant',\n 'post',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Remove a participant from a Conversation. [Conversations](https://docs.oystehr.com/oystehr/services/messaging/conversations/) allow you to build multi-channel bi-directional messaging workflows. For example, you might create a Conversation where a provider messages with a patient through a web app, and the patient receives and responds to messages via SMS on their phone.\n *\n * Access Policy Requirements:\n * Action: `Messaging:ConversationRemoveParticipant`\n * Access Policy Resource: `Messaging:Conversation`\n * Action: `FHIR:Read`\n * Access Policy Resource: `FHIR:Patient`, `FHIR:Practitioner`, or `FHIR:RelatedPerson`\n */\n removeParticipant(params: ConversationRemoveParticipantParams, request?: OystehrClientRequest): Promise<void> {\n return this.request(\n '/messaging/conversation/{conversationId}/participant',\n 'delete',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Send a message to a Conversation. [Conversations](https://docs.oystehr.com/oystehr/services/messaging/conversations/) allow you to build multi-channel bi-directional messaging workflows. For example, you might create a Conversation where a provider messages with a patient through a web app, and the patient receives and responds to messages via SMS on their phone.\n *\n * Access Policy Requirements:\n * Action: `Messaging:ConversationSendMessage`\n * Access Policy Resource: `Messaging:Conversation`\n */\n message(params: ConversationMessageParams, request?: OystehrClientRequest): Promise<void> {\n return this.request(\n '/messaging/conversation/{conversationId}/message',\n 'post',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n}\n"],"names":["SDKResource","ext.ENCOUNTER_VS_EXTENSION_URL","ext.ENCOUNTER_VS_EXTENSION_RELATIVE_URL","ext.getConversationIdFromEncounter"],"mappings":";;;;;AAAA;AAeM,MAAO,YAAa,SAAQA,kBAAW,CAAA;AAC3C,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;IACD,aAAa,GAAA;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,eAAe,CAAC,IAAI,mCAAmC,CAAC;KACvF;AACD,IAAA,0BAA0B,GAAGC,0CAA8B,CAAC;AAC5D,IAAA,mCAAmC,GAAGC,mDAAuC,CAAC;AAC9E;;;;AAIG;AACH,IAAA,8BAA8B,GAAGC,8CAAkC,CAAC;AACpE;;;;;;;;;;AAUG;IACH,MAAM,CAAC,MAAgC,EAAE,OAA8B,EAAA;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,yBAAyB,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACxG;AACD;;;;;AAKG;AACH,IAAA,QAAQ,CAAC,OAA8B,EAAA;QACrC,OAAO,IAAI,CAAC,OAAO,CAAC,+BAA+B,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KACrG;AACD;;;;;;;;;;AAUG;IACH,cAAc,CAAC,MAAwC,EAAE,OAA8B,EAAA;QACrF,OAAO,IAAI,CAAC,OAAO,CACjB,sDAAsD,EACtD,MAAM,EACN,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAC9B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpB;AACD;;;;;;;;AAQG;IACH,iBAAiB,CAAC,MAA2C,EAAE,OAA8B,EAAA;QAC3F,OAAO,IAAI,CAAC,OAAO,CACjB,sDAAsD,EACtD,QAAQ,EACR,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAC9B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpB;AACD;;;;;;AAMG;IACH,OAAO,CAAC,MAAiC,EAAE,OAA8B,EAAA;QACvE,OAAO,IAAI,CAAC,OAAO,CACjB,kDAAkD,EAClD,MAAM,EACN,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAC9B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpB;AACF;;;;"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var client = require('../../client/client.cjs');
|
|
4
|
+
|
|
5
|
+
// AUTOGENERATED -- DO NOT EDIT
|
|
6
|
+
class Developer extends client.SDKResource {
|
|
7
|
+
constructor(config) {
|
|
8
|
+
super(config);
|
|
9
|
+
}
|
|
10
|
+
#baseUrlThunk() {
|
|
11
|
+
return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Get the Developer with the provided ID. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.
|
|
15
|
+
*
|
|
16
|
+
* Access Policy Action: `IAM:GetDeveloper`
|
|
17
|
+
* Access Policy Resource: `IAM:Developer`
|
|
18
|
+
*/
|
|
19
|
+
get(params, request) {
|
|
20
|
+
return this.request('/developer/{id}', 'get', this.#baseUrlThunk.bind(this))(params, request);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Update the Developer with the provided ID. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.
|
|
24
|
+
*
|
|
25
|
+
* Access Policy Action: `IAM:UpdateDeveloper`
|
|
26
|
+
* Access Policy Resource: `IAM:Developer`
|
|
27
|
+
*/
|
|
28
|
+
update(params, request) {
|
|
29
|
+
return this.request('/developer/{id}', 'patch', this.#baseUrlThunk.bind(this))(params, request);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Remove the Developer with the provided ID from the project. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.
|
|
33
|
+
*
|
|
34
|
+
* Access Policy Action: `IAM:RemoveDeveloper`
|
|
35
|
+
* Access Policy Resource: `IAM:Developer`
|
|
36
|
+
*/
|
|
37
|
+
delete(params, request) {
|
|
38
|
+
return this.request('/developer/{id}', 'delete', this.#baseUrlThunk.bind(this))(params, request);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Invite a new Developer to the Project. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.
|
|
42
|
+
*
|
|
43
|
+
* Access Policy Action: `IAM:InviteDeveloper`
|
|
44
|
+
* Access Policy Resource: `IAM:Developer`
|
|
45
|
+
*/
|
|
46
|
+
invite(params, request) {
|
|
47
|
+
return this.request('/developer/invite', 'post', this.#baseUrlThunk.bind(this))(params, request);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* DEPRECATED. Please use [v2/list](https://api-reference.oystehr.com/reference/get_developer-v2-list) instead.
|
|
51
|
+
*
|
|
52
|
+
* Get a list of all Developers who are part of the Project. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.
|
|
53
|
+
*
|
|
54
|
+
* Access Policy Action: `IAM:ListAllDevelopers`
|
|
55
|
+
* Access Policy Resource: `IAM:Developer`
|
|
56
|
+
*/
|
|
57
|
+
list(request) {
|
|
58
|
+
return this.request('/developer', 'get', this.#baseUrlThunk.bind(this))(request);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Get Developers in the Project with pagination, sort, sort order and filtering. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
|
|
62
|
+
*
|
|
63
|
+
* Access Policy Action: `Project:ListAllUsers`
|
|
64
|
+
* Access Policy Resource: `Project:Settings`
|
|
65
|
+
*/
|
|
66
|
+
listV2(params, request) {
|
|
67
|
+
return this.request('/developer/v2/list', 'get', this.#baseUrlThunk.bind(this))(params, request);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
exports.Developer = Developer;
|
|
72
|
+
//# sourceMappingURL=developer.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"developer.cjs","sources":["../../../../src/resources/classes/developer.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n DeveloperDeleteParams,\n DeveloperGetParams,\n DeveloperGetResponse,\n DeveloperInviteParams,\n DeveloperInviteResponse,\n DeveloperListResponse,\n DeveloperListV2Params,\n DeveloperListV2Response,\n DeveloperUpdateParams,\n DeveloperUpdateResponse,\n OystehrClientRequest,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Developer extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n /**\n * Get the Developer with the provided ID. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.\n *\n * Access Policy Action: `IAM:GetDeveloper`\n * Access Policy Resource: `IAM:Developer`\n */\n get(params: DeveloperGetParams, request?: OystehrClientRequest): Promise<DeveloperGetResponse> {\n return this.request('/developer/{id}', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Update the Developer with the provided ID. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.\n *\n * Access Policy Action: `IAM:UpdateDeveloper`\n * Access Policy Resource: `IAM:Developer`\n */\n update(params: DeveloperUpdateParams, request?: OystehrClientRequest): Promise<DeveloperUpdateResponse> {\n return this.request('/developer/{id}', 'patch', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Remove the Developer with the provided ID from the project. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.\n *\n * Access Policy Action: `IAM:RemoveDeveloper`\n * Access Policy Resource: `IAM:Developer`\n */\n delete(params: DeveloperDeleteParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/developer/{id}', 'delete', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Invite a new Developer to the Project. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.\n *\n * Access Policy Action: `IAM:InviteDeveloper`\n * Access Policy Resource: `IAM:Developer`\n */\n invite(params: DeveloperInviteParams, request?: OystehrClientRequest): Promise<DeveloperInviteResponse> {\n return this.request('/developer/invite', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * DEPRECATED. Please use [v2/list](https://api-reference.oystehr.com/reference/get_developer-v2-list) instead.\n *\n * Get a list of all Developers who are part of the Project. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.\n *\n * Access Policy Action: `IAM:ListAllDevelopers`\n * Access Policy Resource: `IAM:Developer`\n */\n list(request?: OystehrClientRequest): Promise<DeveloperListResponse> {\n return this.request('/developer', 'get', this.#baseUrlThunk.bind(this))(request);\n }\n /**\n * Get Developers in the Project with pagination, sort, sort order and filtering. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `Project:ListAllUsers`\n * Access Policy Resource: `Project:Settings`\n */\n listV2(params: DeveloperListV2Params, request?: OystehrClientRequest): Promise<DeveloperListV2Response>;\n /**\n * Get Developers in the Project with pagination, sort, sort order and filtering. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `Project:ListAllUsers`\n * Access Policy Resource: `Project:Settings`\n */\n listV2(request?: OystehrClientRequest): Promise<DeveloperListV2Response>;\n /**\n * Get Developers in the Project with pagination, sort, sort order and filtering. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `Project:ListAllUsers`\n * Access Policy Resource: `Project:Settings`\n */\n listV2(\n params?: DeveloperListV2Params | OystehrClientRequest,\n request?: OystehrClientRequest\n ): Promise<DeveloperListV2Response> {\n return this.request('/developer/v2/list', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":["SDKResource"],"mappings":";;;;AAAA;AAkBM,MAAO,SAAU,SAAQA,kBAAW,CAAA;AACxC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;IACD,aAAa,GAAA;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,eAAe,CAAC,IAAI,mCAAmC,CAAC;KACvF;AACD;;;;;AAKG;IACH,GAAG,CAAC,MAA0B,EAAE,OAA8B,EAAA;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/F;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA6B,EAAE,OAA8B,EAAA;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACjG;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA6B,EAAE,OAA8B,EAAA;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAClG;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA6B,EAAE,OAA8B,EAAA;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAClG;AACD;;;;;;;AAOG;AACH,IAAA,IAAI,CAAC,OAA8B,EAAA;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KAClF;AAeD;;;;;AAKG;IACH,MAAM,CACJ,MAAqD,EACrD,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAClG;AACF;;;;"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var client = require('../../client/client.cjs');
|
|
4
|
+
|
|
5
|
+
// AUTOGENERATED -- DO NOT EDIT
|
|
6
|
+
class Erx extends client.SDKResource {
|
|
7
|
+
constructor(config) {
|
|
8
|
+
super(config);
|
|
9
|
+
}
|
|
10
|
+
#baseUrlThunk() {
|
|
11
|
+
return this.config.services?.['erxApiUrl'] ?? 'https://erx-api.zapehr.com/v3';
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Search for allergens.
|
|
15
|
+
*/
|
|
16
|
+
searchAllergens(params, request) {
|
|
17
|
+
return this.request('/allergen', 'get', this.#baseUrlThunk.bind(this))(params, request);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Search for medications.
|
|
21
|
+
*/
|
|
22
|
+
searchMedications(params, request) {
|
|
23
|
+
return this.request('/medication', 'get', this.#baseUrlThunk.bind(this))(params, request);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Get eRx configuration for project.
|
|
27
|
+
*/
|
|
28
|
+
getConfiguration(request) {
|
|
29
|
+
return this.request('/config', 'get', this.#baseUrlThunk.bind(this))(request);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Checks for drug-allergy interactions for a patient. This endpoint requires the patient's allergies to be synced with the upstream eRx provider.
|
|
33
|
+
*/
|
|
34
|
+
checkAllergyInteractions(params, request) {
|
|
35
|
+
return this.request('/patient/{patientId}/interactions/allergy', 'get', this.#baseUrlThunk.bind(this))(params, request);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Checks for drug-drug interactions for a patient. This endpoint requires the patient's medications to be synced with the upstream eRx provider.
|
|
39
|
+
*/
|
|
40
|
+
checkMedicationInteractions(params, request) {
|
|
41
|
+
return this.request('/patient/{patientId}/interactions/medication', 'get', this.#baseUrlThunk.bind(this))(params, request);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Checks for drug-allergy and drug-drug interactions with a specific drug for a patient. This endpoint requires the patient's allergies and medications to be synced with the upstream eRx provider.
|
|
45
|
+
*/
|
|
46
|
+
checkPrecheckInteractions(params, request) {
|
|
47
|
+
return this.request('/patient/{patientId}/interactions/precheck/{drugId}', 'get', this.#baseUrlThunk.bind(this))(params, request);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Cancel prescription for patient.
|
|
51
|
+
*/
|
|
52
|
+
cancelPrescription(params, request) {
|
|
53
|
+
return this.request('/patient/{patientId}/prescriptions/{medicationRequestId}', 'delete', this.#baseUrlThunk.bind(this))(params, request);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Syncs demographic, allergy, and medication data for a patient with the upstream eRx provider.
|
|
57
|
+
*/
|
|
58
|
+
syncPatient(params, request) {
|
|
59
|
+
return this.request('/patient/{patientId}/sync', 'post', this.#baseUrlThunk.bind(this))(params, request);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Create an SSO link for a practitioner. This link can be used to log in to the eRx service as the specified practitioner.
|
|
63
|
+
*/
|
|
64
|
+
connectPractitioner(params, request) {
|
|
65
|
+
return this.request('/practitioner/connect', 'get', this.#baseUrlThunk.bind(this))(params, request);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Check eRx enrollment for a practitioner.
|
|
69
|
+
*/
|
|
70
|
+
checkPractitionerEnrollment(params, request) {
|
|
71
|
+
return this.request('/practitioner/{practitionerId}', 'get', this.#baseUrlThunk.bind(this))(params, request);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Enroll a practitioner in the eRx service.
|
|
75
|
+
*/
|
|
76
|
+
enrollPractitioner(params, request) {
|
|
77
|
+
return this.request('/practitioner/{practitionerId}', 'post', this.#baseUrlThunk.bind(this))(params, request);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Unenroll a practitioner from the eRx service.
|
|
81
|
+
*/
|
|
82
|
+
unenrollPractitioner(params, request) {
|
|
83
|
+
return this.request('/practitioner/{practitionerId}', 'delete', this.#baseUrlThunk.bind(this))(params, request);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
exports.Erx = Erx;
|
|
88
|
+
//# sourceMappingURL=erx.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"erx.cjs","sources":["../../../../src/resources/classes/erx.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n ErxCancelPrescriptionParams,\n ErxCheckAllergyInteractionsParams,\n ErxCheckAllergyInteractionsResponse,\n ErxCheckMedicationInteractionsParams,\n ErxCheckMedicationInteractionsResponse,\n ErxCheckPractitionerEnrollmentParams,\n ErxCheckPractitionerEnrollmentResponse,\n ErxCheckPrecheckInteractionsParams,\n ErxCheckPrecheckInteractionsResponse,\n ErxConnectPractitionerParams,\n ErxConnectPractitionerResponse,\n ErxEnrollPractitionerParams,\n ErxGetConfigurationResponse,\n ErxSearchAllergensParams,\n ErxSearchAllergensResponse,\n ErxSearchMedicationsParams,\n ErxSearchMedicationsResponse,\n ErxSyncPatientParams,\n ErxUnenrollPractitionerParams,\n OystehrClientRequest,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Erx extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['erxApiUrl'] ?? 'https://erx-api.zapehr.com/v3';\n }\n /**\n * Search for allergens.\n */\n searchAllergens(\n params: ErxSearchAllergensParams,\n request?: OystehrClientRequest\n ): Promise<ErxSearchAllergensResponse> {\n return this.request('/allergen', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Search for medications.\n */\n searchMedications(\n params: ErxSearchMedicationsParams,\n request?: OystehrClientRequest\n ): Promise<ErxSearchMedicationsResponse> {\n return this.request('/medication', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Get eRx configuration for project.\n */\n getConfiguration(request?: OystehrClientRequest): Promise<ErxGetConfigurationResponse> {\n return this.request('/config', 'get', this.#baseUrlThunk.bind(this))(request);\n }\n /**\n * Checks for drug-allergy interactions for a patient. This endpoint requires the patient's allergies to be synced with the upstream eRx provider.\n */\n checkAllergyInteractions(\n params: ErxCheckAllergyInteractionsParams,\n request?: OystehrClientRequest\n ): Promise<ErxCheckAllergyInteractionsResponse> {\n return this.request(\n '/patient/{patientId}/interactions/allergy',\n 'get',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Checks for drug-drug interactions for a patient. This endpoint requires the patient's medications to be synced with the upstream eRx provider.\n */\n checkMedicationInteractions(\n params: ErxCheckMedicationInteractionsParams,\n request?: OystehrClientRequest\n ): Promise<ErxCheckMedicationInteractionsResponse> {\n return this.request(\n '/patient/{patientId}/interactions/medication',\n 'get',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Checks for drug-allergy and drug-drug interactions with a specific drug for a patient. This endpoint requires the patient's allergies and medications to be synced with the upstream eRx provider.\n */\n checkPrecheckInteractions(\n params: ErxCheckPrecheckInteractionsParams,\n request?: OystehrClientRequest\n ): Promise<ErxCheckPrecheckInteractionsResponse> {\n return this.request(\n '/patient/{patientId}/interactions/precheck/{drugId}',\n 'get',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Cancel prescription for patient.\n */\n cancelPrescription(params: ErxCancelPrescriptionParams, request?: OystehrClientRequest): Promise<void> {\n return this.request(\n '/patient/{patientId}/prescriptions/{medicationRequestId}',\n 'delete',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Syncs demographic, allergy, and medication data for a patient with the upstream eRx provider.\n */\n syncPatient(params: ErxSyncPatientParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/patient/{patientId}/sync', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Create an SSO link for a practitioner. This link can be used to log in to the eRx service as the specified practitioner.\n */\n connectPractitioner(\n params: ErxConnectPractitionerParams,\n request?: OystehrClientRequest\n ): Promise<ErxConnectPractitionerResponse>;\n /**\n * Create an SSO link for a practitioner. This link can be used to log in to the eRx service as the specified practitioner.\n */\n connectPractitioner(request?: OystehrClientRequest): Promise<ErxConnectPractitionerResponse>;\n /**\n * Create an SSO link for a practitioner. This link can be used to log in to the eRx service as the specified practitioner.\n */\n connectPractitioner(\n params?: ErxConnectPractitionerParams | OystehrClientRequest,\n request?: OystehrClientRequest\n ): Promise<ErxConnectPractitionerResponse> {\n return this.request('/practitioner/connect', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Check eRx enrollment for a practitioner.\n */\n checkPractitionerEnrollment(\n params: ErxCheckPractitionerEnrollmentParams,\n request?: OystehrClientRequest\n ): Promise<ErxCheckPractitionerEnrollmentResponse> {\n return this.request('/practitioner/{practitionerId}', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Enroll a practitioner in the eRx service.\n */\n enrollPractitioner(params: ErxEnrollPractitionerParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/practitioner/{practitionerId}', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Unenroll a practitioner from the eRx service.\n */\n unenrollPractitioner(params: ErxUnenrollPractitionerParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/practitioner/{practitionerId}', 'delete', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":["SDKResource"],"mappings":";;;;AAAA;AA2BM,MAAO,GAAI,SAAQA,kBAAW,CAAA;AAClC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;IACD,aAAa,GAAA;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,WAAW,CAAC,IAAI,+BAA+B,CAAC;KAC/E;AACD;;AAEG;IACH,eAAe,CACb,MAAgC,EAChC,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACzF;AACD;;AAEG;IACH,iBAAiB,CACf,MAAkC,EAClC,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC3F;AACD;;AAEG;AACH,IAAA,gBAAgB,CAAC,OAA8B,EAAA;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KAC/E;AACD;;AAEG;IACH,wBAAwB,CACtB,MAAyC,EACzC,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CACjB,2CAA2C,EAC3C,KAAK,EACL,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAC9B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpB;AACD;;AAEG;IACH,2BAA2B,CACzB,MAA4C,EAC5C,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CACjB,8CAA8C,EAC9C,KAAK,EACL,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAC9B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpB;AACD;;AAEG;IACH,yBAAyB,CACvB,MAA0C,EAC1C,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CACjB,qDAAqD,EACrD,KAAK,EACL,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAC9B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpB;AACD;;AAEG;IACH,kBAAkB,CAAC,MAAmC,EAAE,OAA8B,EAAA;QACpF,OAAO,IAAI,CAAC,OAAO,CACjB,0DAA0D,EAC1D,QAAQ,EACR,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAC9B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpB;AACD;;AAEG;IACH,WAAW,CAAC,MAA4B,EAAE,OAA8B,EAAA;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,2BAA2B,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC1G;AAYD;;AAEG;IACH,mBAAmB,CACjB,MAA4D,EAC5D,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,uBAAuB,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACrG;AACD;;AAEG;IACH,2BAA2B,CACzB,MAA4C,EAC5C,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,gCAAgC,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC9G;AACD;;AAEG;IACH,kBAAkB,CAAC,MAAmC,EAAE,OAA8B,EAAA;QACpF,OAAO,IAAI,CAAC,OAAO,CAAC,gCAAgC,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/G;AACD;;AAEG;IACH,oBAAoB,CAAC,MAAqC,EAAE,OAA8B,EAAA;QACxF,OAAO,IAAI,CAAC,OAAO,CAAC,gCAAgC,EAAE,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACjH;AACF;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ErxCancelPrescriptionParams, ErxCheckAllergyInteractionsParams, ErxCheckAllergyInteractionsResponse, ErxCheckMedicationInteractionsParams, ErxCheckMedicationInteractionsResponse, ErxCheckPractitionerEnrollmentParams, ErxCheckPractitionerEnrollmentResponse, ErxCheckPrecheckInteractionsParams, ErxCheckPrecheckInteractionsResponse, ErxConnectPractitionerParams, ErxConnectPractitionerResponse, ErxEnrollPractitionerParams, ErxSearchAllergensParams, ErxSearchAllergensResponse, ErxSearchMedicationsParams, ErxSearchMedicationsResponse, ErxSyncPatientParams, ErxUnenrollPractitionerParams, OystehrClientRequest } from '../..';
|
|
1
|
+
import { ErxCancelPrescriptionParams, ErxCheckAllergyInteractionsParams, ErxCheckAllergyInteractionsResponse, ErxCheckMedicationInteractionsParams, ErxCheckMedicationInteractionsResponse, ErxCheckPractitionerEnrollmentParams, ErxCheckPractitionerEnrollmentResponse, ErxCheckPrecheckInteractionsParams, ErxCheckPrecheckInteractionsResponse, ErxConnectPractitionerParams, ErxConnectPractitionerResponse, ErxEnrollPractitionerParams, ErxGetConfigurationResponse, ErxSearchAllergensParams, ErxSearchAllergensResponse, ErxSearchMedicationsParams, ErxSearchMedicationsResponse, ErxSyncPatientParams, ErxUnenrollPractitionerParams, OystehrClientRequest } from '../..';
|
|
2
2
|
import { SDKResource } from '../../client/client';
|
|
3
3
|
import { OystehrConfig } from '../../config';
|
|
4
4
|
export declare class Erx extends SDKResource {
|
|
@@ -12,6 +12,10 @@ export declare class Erx extends SDKResource {
|
|
|
12
12
|
* Search for medications.
|
|
13
13
|
*/
|
|
14
14
|
searchMedications(params: ErxSearchMedicationsParams, request?: OystehrClientRequest): Promise<ErxSearchMedicationsResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* Get eRx configuration for project.
|
|
17
|
+
*/
|
|
18
|
+
getConfiguration(request?: OystehrClientRequest): Promise<ErxGetConfigurationResponse>;
|
|
15
19
|
/**
|
|
16
20
|
* Checks for drug-allergy interactions for a patient. This endpoint requires the patient's allergies to be synced with the upstream eRx provider.
|
|
17
21
|
*/
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var client = require('../../client/client.cjs');
|
|
4
|
+
|
|
5
|
+
// AUTOGENERATED -- DO NOT EDIT
|
|
6
|
+
class ErxV1 extends client.SDKResource {
|
|
7
|
+
constructor(config) {
|
|
8
|
+
super(config);
|
|
9
|
+
}
|
|
10
|
+
#baseUrlThunk() {
|
|
11
|
+
return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Retrieve patient properties from FHIR service and sync them with eRx service
|
|
15
|
+
*/
|
|
16
|
+
syncPatient(params, request) {
|
|
17
|
+
return this.request('/erx/sync-patient/{patientId}', 'post', this.#baseUrlThunk.bind(this))(params, request);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Search for allergies
|
|
21
|
+
*/
|
|
22
|
+
allergySearch(params, request) {
|
|
23
|
+
return this.request('/erx/allergy/search', 'get', this.#baseUrlThunk.bind(this))(params, request);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Cancel photon order
|
|
27
|
+
*/
|
|
28
|
+
cancelOrder(params, request) {
|
|
29
|
+
return this.request('/erx/cancel-order', 'post', this.#baseUrlThunk.bind(this))(params, request);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Cancel photon prescription
|
|
33
|
+
*/
|
|
34
|
+
cancelPrescription(params, request) {
|
|
35
|
+
return this.request('/erx/cancel-prescription', 'post', this.#baseUrlThunk.bind(this))(params, request);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Search for medications. Provide at least one of code or name filters
|
|
39
|
+
*/
|
|
40
|
+
medicationSearch(params, request) {
|
|
41
|
+
return this.request('/erx/medication/search', 'get', this.#baseUrlThunk.bind(this))(params, request);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
exports.ErxV1 = ErxV1;
|
|
46
|
+
//# sourceMappingURL=erxV1.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"erxV1.cjs","sources":["../../../../src/resources/classes/erxV1.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n ErxV1AllergySearchParams,\n ErxV1AllergySearchResponse,\n ErxV1CancelOrderParams,\n ErxV1CancelOrderResponse,\n ErxV1CancelPrescriptionParams,\n ErxV1CancelPrescriptionResponse,\n ErxV1MedicationSearchParams,\n ErxV1MedicationSearchResponse,\n ErxV1SyncPatientParams,\n ErxV1SyncPatientResponse,\n OystehrClientRequest,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class ErxV1 extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n /**\n * Retrieve patient properties from FHIR service and sync them with eRx service\n */\n syncPatient(params: ErxV1SyncPatientParams, request?: OystehrClientRequest): Promise<ErxV1SyncPatientResponse> {\n return this.request('/erx/sync-patient/{patientId}', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Search for allergies\n */\n allergySearch(params: ErxV1AllergySearchParams, request?: OystehrClientRequest): Promise<ErxV1AllergySearchResponse> {\n return this.request('/erx/allergy/search', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Cancel photon order\n */\n cancelOrder(params: ErxV1CancelOrderParams, request?: OystehrClientRequest): Promise<ErxV1CancelOrderResponse> {\n return this.request('/erx/cancel-order', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Cancel photon prescription\n */\n cancelPrescription(\n params: ErxV1CancelPrescriptionParams,\n request?: OystehrClientRequest\n ): Promise<ErxV1CancelPrescriptionResponse> {\n return this.request('/erx/cancel-prescription', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(\n params: ErxV1MedicationSearchParams,\n request?: OystehrClientRequest\n ): Promise<ErxV1MedicationSearchResponse>;\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(request?: OystehrClientRequest): Promise<ErxV1MedicationSearchResponse>;\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(\n params?: ErxV1MedicationSearchParams | OystehrClientRequest,\n request?: OystehrClientRequest\n ): Promise<ErxV1MedicationSearchResponse> {\n return this.request('/erx/medication/search', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":["SDKResource"],"mappings":";;;;AAAA;AAkBM,MAAO,KAAM,SAAQA,kBAAW,CAAA;AACpC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;IACD,aAAa,GAAA;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,eAAe,CAAC,IAAI,mCAAmC,CAAC;KACvF;AACD;;AAEG;IACH,WAAW,CAAC,MAA8B,EAAE,OAA8B,EAAA;QACxE,OAAO,IAAI,CAAC,OAAO,CAAC,+BAA+B,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC9G;AACD;;AAEG;IACH,aAAa,CAAC,MAAgC,EAAE,OAA8B,EAAA;QAC5E,OAAO,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnG;AACD;;AAEG;IACH,WAAW,CAAC,MAA8B,EAAE,OAA8B,EAAA;QACxE,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAClG;AACD;;AAEG;IACH,kBAAkB,CAChB,MAAqC,EACrC,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,0BAA0B,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACzG;AAYD;;AAEG;IACH,gBAAgB,CACd,MAA2D,EAC3D,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACtG;AACF;;;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var client = require('../../client/client.cjs');
|
|
4
|
+
|
|
5
|
+
// AUTOGENERATED -- DO NOT EDIT
|
|
6
|
+
class ErxV2 extends client.SDKResource {
|
|
7
|
+
constructor(config) {
|
|
8
|
+
super(config);
|
|
9
|
+
}
|
|
10
|
+
#baseUrlThunk() {
|
|
11
|
+
return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Search for medications. Provide at least one of code or name filters
|
|
15
|
+
*/
|
|
16
|
+
medicationSearch(params, request) {
|
|
17
|
+
return this.request('/erx/v2/medication/search', 'get', this.#baseUrlThunk.bind(this))(params, request);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
exports.ErxV2 = ErxV2;
|
|
22
|
+
//# sourceMappingURL=erxV2.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"erxV2.cjs","sources":["../../../../src/resources/classes/erxV2.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport { ErxV2MedicationSearchParams, ErxV2MedicationSearchResponse, OystehrClientRequest } from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class ErxV2 extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(\n params: ErxV2MedicationSearchParams,\n request?: OystehrClientRequest\n ): Promise<ErxV2MedicationSearchResponse>;\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(request?: OystehrClientRequest): Promise<ErxV2MedicationSearchResponse>;\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(\n params?: ErxV2MedicationSearchParams | OystehrClientRequest,\n request?: OystehrClientRequest\n ): Promise<ErxV2MedicationSearchResponse> {\n return this.request('/erx/v2/medication/search', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":["SDKResource"],"mappings":";;;;AAAA;AAMM,MAAO,KAAM,SAAQA,kBAAW,CAAA;AACpC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;IACD,aAAa,GAAA;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,eAAe,CAAC,IAAI,mCAAmC,CAAC;KACvF;AAYD;;AAEG;IACH,gBAAgB,CACd,MAA2D,EAC3D,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,2BAA2B,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACzG;AACF;;;;"}
|