@oystehr/sdk 4.2.0 → 4.2.3
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/index.min.cjs +1 -1
- package/dist/cjs/index.min.cjs.map +1 -1
- package/dist/cjs/resources/classes/lab.cjs +2 -2
- package/dist/cjs/resources/classes/lab.cjs.map +1 -1
- package/dist/cjs/resources/classes/lab.d.ts +2 -2
- package/dist/cjs/resources/types/LabRouteGetParams.d.ts +3 -0
- package/dist/cjs/resources/types/M2mListV2Item.d.ts +11 -0
- package/dist/cjs/resources/types/M2mListV2Response.d.ts +2 -2
- package/dist/cjs/resources/types/index.d.ts +2 -0
- package/dist/esm/index.min.js +1 -1
- package/dist/esm/index.min.js.map +1 -1
- package/dist/esm/resources/classes/lab.d.ts +2 -2
- package/dist/esm/resources/classes/lab.js +2 -2
- package/dist/esm/resources/classes/lab.js.map +1 -1
- package/dist/esm/resources/types/LabRouteGetParams.d.ts +3 -0
- package/dist/esm/resources/types/M2mListV2Item.d.ts +11 -0
- package/dist/esm/resources/types/M2mListV2Response.d.ts +2 -2
- package/dist/esm/resources/types/index.d.ts +2 -0
- package/package.json +1 -1
- package/src/resources/classes/lab.ts +3 -2
- package/src/resources/types/LabRouteGetParams.ts +5 -0
- package/src/resources/types/M2mListV2Item.ts +13 -0
- package/src/resources/types/M2mListV2Response.ts +2 -2
- package/src/resources/types/index.ts +2 -0
|
@@ -37,8 +37,8 @@ class Lab extends client.SDKResource {
|
|
|
37
37
|
* Action: `Lab:GetSingleRoute`
|
|
38
38
|
* Access Policy Resource: `Lab:Route`
|
|
39
39
|
*/
|
|
40
|
-
routeGet(request) {
|
|
41
|
-
return this.request('/route/{routeGuid}', 'get', this.#baseUrlThunk.bind(this))(request);
|
|
40
|
+
routeGet(params, request) {
|
|
41
|
+
return this.request('/route/{routeGuid}', 'get', this.#baseUrlThunk.bind(this))(params, request);
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* Delete a route. Deleting a Route will permanently remove the `routeGuid`. Orders can no longer be submitted to this lab until a new Route is created. See [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#delete-route) for more details.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lab.cjs","sources":["../../../../src/resources/classes/lab.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n LabOrderableItemListParams,\n LabOrderableItemListResponse,\n LabOrderableItemQuestionnaireGetParams,\n LabOrderableItemQuestionnaireGetResponse,\n LabOrderSubmitParams,\n LabOrderSubmitResponse,\n LabRouteCreateParams,\n LabRouteCreateResponse,\n LabRouteDeleteParams,\n LabRouteGetResponse,\n LabRouteListResponse,\n OystehrClientRequest,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Lab extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['labApiUrl'] ?? 'https://labs-api.zapehr.com/v1';\n }\n /**\n * Gets a list of Routes associated with the project. Returns an empty list if no Routes are found.\n *\n * Access Policy Requirements:\n * Action: `Lab:GetRoutes`\n * Access Policy Resource: `Lab:Route`\n */\n routeList(request?: OystehrClientRequest): Promise<LabRouteListResponse> {\n return this.request('/route', 'get', this.#baseUrlThunk.bind(this))(request);\n }\n /**\n * Create a route. A Route represents that a lab and particular customer have a relationship, and a Route is necessary to submit an order to a lab. See [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#create-route) for more details.\n *\n * Access Policy Requirements:\n * Action: `Lab:CreateRoute`\n * Access Policy Resource: `Lab:Route`\n */\n routeCreate(params: LabRouteCreateParams, request?: OystehrClientRequest): Promise<LabRouteCreateResponse> {\n return this.request('/route', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Gets a Route associated with the project by specified Guid.\n *\n * Access Policy Requirements:\n * Action: `Lab:GetSingleRoute`\n * Access Policy Resource: `Lab:Route`\n */\n routeGet(request?: OystehrClientRequest): Promise<LabRouteGetResponse> {\n return this.request('/route/{routeGuid}', 'get', this.#baseUrlThunk.bind(this))(request);\n }\n /**\n * Delete a route. Deleting a Route will permanently remove the `routeGuid`. Orders can no longer be submitted to this lab until a new Route is created. See [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#delete-route) for more details.\n *\n * Access Policy Requirements:\n * Action: `Lab:DeleteRoute`\n * Access Policy Resource: `Lab:Route`\n */\n routeDelete(params: LabRouteDeleteParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/route/{routeGuid}', 'delete', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Returns list of active orderable items for the latest compendium version. Page size is default 25 and max 100 items. See [orderable item Search](https://docs.oystehr.com/oystehr/services/lab/explore-the-compendium/#orderable-item-search) for more details.\n *\n * Access Policy Requirements:\n * Action: `Lab:SearchOrderableItems`\n * Access Policy Resource: `Lab:OrderableItem`\n */\n orderableItemList(\n params: LabOrderableItemListParams,\n request?: OystehrClientRequest\n ): Promise<LabOrderableItemListResponse>;\n /**\n * Returns list of active orderable items for the latest compendium version. Page size is default 25 and max 100 items. See [orderable item Search](https://docs.oystehr.com/oystehr/services/lab/explore-the-compendium/#orderable-item-search) for more details.\n *\n * Access Policy Requirements:\n * Action: `Lab:SearchOrderableItems`\n * Access Policy Resource: `Lab:OrderableItem`\n */\n orderableItemList(request?: OystehrClientRequest): Promise<LabOrderableItemListResponse>;\n /**\n * Returns list of active orderable items for the latest compendium version. Page size is default 25 and max 100 items. See [orderable item Search](https://docs.oystehr.com/oystehr/services/lab/explore-the-compendium/#orderable-item-search) for more details.\n *\n * Access Policy Requirements:\n * Action: `Lab:SearchOrderableItems`\n * Access Policy Resource: `Lab:OrderableItem`\n */\n orderableItemList(\n params?: LabOrderableItemListParams | OystehrClientRequest,\n request?: OystehrClientRequest\n ): Promise<LabOrderableItemListResponse> {\n return this.request('/orderableItem', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Retrieve the AOE (Answer on Entry) Questionnaire for the given orderable item. The orderable item is defined by its labGuid, compendiumVersion, and itemCode. See [AOE](https://docs.oystehr.com/oystehr/services/lab/explore-the-compendium/#AOE) for more details.\n *\n * Access Policy Requirements:\n * Action: `Lab:SearchOrderableItems`\n * Access Policy Resource: `Lab:OrderableItem`\n */\n orderableItemQuestionnaireGet(\n params: LabOrderableItemQuestionnaireGetParams,\n request?: OystehrClientRequest\n ): Promise<LabOrderableItemQuestionnaireGetResponse> {\n return this.request(\n '/canonical-questionnaire/lab/{labGuid}/compendium/{compendiumVersion}/item/{itemCode}/questionnaire',\n 'get',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Submit a lab order. Oystehr's [Submit Lab](https://docs.oystehr.com/oystehr/services/lab/submit-an-order/) feature allows users to submit an order consisting of one or more well-configured ServiceRequests to an external lab. In order to successfully submit an order, a [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#create-route) to and Organization representing that lab must exist. If the lab requires its own requisition document (eReq) or an Advance Beneficiary Notice (ABN), the appropriate DocumentReferences will be included in the response.\n *\n * Access Policy Requirements:\n * Action: `Lab:SubmitOrder`\n * Access Policy Resource: `Lab:Order`\n */\n orderSubmit(params: LabOrderSubmitParams, request?: OystehrClientRequest): Promise<LabOrderSubmitResponse> {\n return this.request('/submit', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":["SDKResource"],"mappings":";;;;AAAA;
|
|
1
|
+
{"version":3,"file":"lab.cjs","sources":["../../../../src/resources/classes/lab.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n LabOrderableItemListParams,\n LabOrderableItemListResponse,\n LabOrderableItemQuestionnaireGetParams,\n LabOrderableItemQuestionnaireGetResponse,\n LabOrderSubmitParams,\n LabOrderSubmitResponse,\n LabRouteCreateParams,\n LabRouteCreateResponse,\n LabRouteDeleteParams,\n LabRouteGetParams,\n LabRouteGetResponse,\n LabRouteListResponse,\n OystehrClientRequest,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Lab extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['labApiUrl'] ?? 'https://labs-api.zapehr.com/v1';\n }\n /**\n * Gets a list of Routes associated with the project. Returns an empty list if no Routes are found.\n *\n * Access Policy Requirements:\n * Action: `Lab:GetRoutes`\n * Access Policy Resource: `Lab:Route`\n */\n routeList(request?: OystehrClientRequest): Promise<LabRouteListResponse> {\n return this.request('/route', 'get', this.#baseUrlThunk.bind(this))(request);\n }\n /**\n * Create a route. A Route represents that a lab and particular customer have a relationship, and a Route is necessary to submit an order to a lab. See [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#create-route) for more details.\n *\n * Access Policy Requirements:\n * Action: `Lab:CreateRoute`\n * Access Policy Resource: `Lab:Route`\n */\n routeCreate(params: LabRouteCreateParams, request?: OystehrClientRequest): Promise<LabRouteCreateResponse> {\n return this.request('/route', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Gets a Route associated with the project by specified Guid.\n *\n * Access Policy Requirements:\n * Action: `Lab:GetSingleRoute`\n * Access Policy Resource: `Lab:Route`\n */\n routeGet(params: LabRouteGetParams, request?: OystehrClientRequest): Promise<LabRouteGetResponse> {\n return this.request('/route/{routeGuid}', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Delete a route. Deleting a Route will permanently remove the `routeGuid`. Orders can no longer be submitted to this lab until a new Route is created. See [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#delete-route) for more details.\n *\n * Access Policy Requirements:\n * Action: `Lab:DeleteRoute`\n * Access Policy Resource: `Lab:Route`\n */\n routeDelete(params: LabRouteDeleteParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/route/{routeGuid}', 'delete', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Returns list of active orderable items for the latest compendium version. Page size is default 25 and max 100 items. See [orderable item Search](https://docs.oystehr.com/oystehr/services/lab/explore-the-compendium/#orderable-item-search) for more details.\n *\n * Access Policy Requirements:\n * Action: `Lab:SearchOrderableItems`\n * Access Policy Resource: `Lab:OrderableItem`\n */\n orderableItemList(\n params: LabOrderableItemListParams,\n request?: OystehrClientRequest\n ): Promise<LabOrderableItemListResponse>;\n /**\n * Returns list of active orderable items for the latest compendium version. Page size is default 25 and max 100 items. See [orderable item Search](https://docs.oystehr.com/oystehr/services/lab/explore-the-compendium/#orderable-item-search) for more details.\n *\n * Access Policy Requirements:\n * Action: `Lab:SearchOrderableItems`\n * Access Policy Resource: `Lab:OrderableItem`\n */\n orderableItemList(request?: OystehrClientRequest): Promise<LabOrderableItemListResponse>;\n /**\n * Returns list of active orderable items for the latest compendium version. Page size is default 25 and max 100 items. See [orderable item Search](https://docs.oystehr.com/oystehr/services/lab/explore-the-compendium/#orderable-item-search) for more details.\n *\n * Access Policy Requirements:\n * Action: `Lab:SearchOrderableItems`\n * Access Policy Resource: `Lab:OrderableItem`\n */\n orderableItemList(\n params?: LabOrderableItemListParams | OystehrClientRequest,\n request?: OystehrClientRequest\n ): Promise<LabOrderableItemListResponse> {\n return this.request('/orderableItem', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Retrieve the AOE (Answer on Entry) Questionnaire for the given orderable item. The orderable item is defined by its labGuid, compendiumVersion, and itemCode. See [AOE](https://docs.oystehr.com/oystehr/services/lab/explore-the-compendium/#AOE) for more details.\n *\n * Access Policy Requirements:\n * Action: `Lab:SearchOrderableItems`\n * Access Policy Resource: `Lab:OrderableItem`\n */\n orderableItemQuestionnaireGet(\n params: LabOrderableItemQuestionnaireGetParams,\n request?: OystehrClientRequest\n ): Promise<LabOrderableItemQuestionnaireGetResponse> {\n return this.request(\n '/canonical-questionnaire/lab/{labGuid}/compendium/{compendiumVersion}/item/{itemCode}/questionnaire',\n 'get',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Submit a lab order. Oystehr's [Submit Lab](https://docs.oystehr.com/oystehr/services/lab/submit-an-order/) feature allows users to submit an order consisting of one or more well-configured ServiceRequests to an external lab. In order to successfully submit an order, a [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#create-route) to and Organization representing that lab must exist. If the lab requires its own requisition document (eReq) or an Advance Beneficiary Notice (ABN), the appropriate DocumentReferences will be included in the response.\n *\n * Access Policy Requirements:\n * Action: `Lab:SubmitOrder`\n * Access Policy Resource: `Lab:Order`\n */\n orderSubmit(params: LabOrderSubmitParams, request?: OystehrClientRequest): Promise<LabOrderSubmitResponse> {\n return this.request('/submit', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":["SDKResource"],"mappings":";;;;AAAA;AAoBM,MAAO,GAAI,SAAQA,kBAAW,CAAA;AAClC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC;IACf;IACA,aAAa,GAAA;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,WAAW,CAAC,IAAI,gCAAgC;IAChF;AACA;;;;;;AAMG;AACH,IAAA,SAAS,CAAC,OAA8B,EAAA;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC;IAC9E;AACA;;;;;;AAMG;IACH,WAAW,CAAC,MAA4B,EAAE,OAA8B,EAAA;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC;IACvF;AACA;;;;;;AAMG;IACH,QAAQ,CAAC,MAAyB,EAAE,OAA8B,EAAA;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC;IAClG;AACA;;;;;;AAMG;IACH,WAAW,CAAC,MAA4B,EAAE,OAA8B,EAAA;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC;IACrG;AAoBA;;;;;;AAMG;IACH,iBAAiB,CACf,MAA0D,EAC1D,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC;IAC9F;AACA;;;;;;AAMG;IACH,6BAA6B,CAC3B,MAA8C,EAC9C,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CACjB,qGAAqG,EACrG,KAAK,EACL,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAC9B,CAAC,MAAM,EAAE,OAAO,CAAC;IACpB;AACA;;;;;;AAMG;IACH,WAAW,CAAC,MAA4B,EAAE,OAA8B,EAAA;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC;IACxF;AACD;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LabOrderableItemListParams, LabOrderableItemListResponse, LabOrderableItemQuestionnaireGetParams, LabOrderableItemQuestionnaireGetResponse, LabOrderSubmitParams, LabOrderSubmitResponse, LabRouteCreateParams, LabRouteCreateResponse, LabRouteDeleteParams, LabRouteGetResponse, LabRouteListResponse, OystehrClientRequest } from '../..';
|
|
1
|
+
import { LabOrderableItemListParams, LabOrderableItemListResponse, LabOrderableItemQuestionnaireGetParams, LabOrderableItemQuestionnaireGetResponse, LabOrderSubmitParams, LabOrderSubmitResponse, LabRouteCreateParams, LabRouteCreateResponse, LabRouteDeleteParams, LabRouteGetParams, LabRouteGetResponse, LabRouteListResponse, OystehrClientRequest } from '../..';
|
|
2
2
|
import { SDKResource } from '../../client/client';
|
|
3
3
|
import { OystehrConfig } from '../../config';
|
|
4
4
|
export declare class Lab extends SDKResource {
|
|
@@ -27,7 +27,7 @@ export declare class Lab extends SDKResource {
|
|
|
27
27
|
* Action: `Lab:GetSingleRoute`
|
|
28
28
|
* Access Policy Resource: `Lab:Route`
|
|
29
29
|
*/
|
|
30
|
-
routeGet(request?: OystehrClientRequest): Promise<LabRouteGetResponse>;
|
|
30
|
+
routeGet(params: LabRouteGetParams, request?: OystehrClientRequest): Promise<LabRouteGetResponse>;
|
|
31
31
|
/**
|
|
32
32
|
* Delete a route. Deleting a Route will permanently remove the `routeGuid`. Orders can no longer be submitted to this lab until a new Route is created. See [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#delete-route) for more details.
|
|
33
33
|
*
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface M2mListV2Item {
|
|
2
|
+
id: string;
|
|
3
|
+
/**
|
|
4
|
+
* A name for the M2M Client to help you differentiate it from other M2M Clients in the project.
|
|
5
|
+
*/
|
|
6
|
+
name: string;
|
|
7
|
+
/**
|
|
8
|
+
* A description of the M2M Client to help you differentiate it from other M2M Clients in the project.
|
|
9
|
+
*/
|
|
10
|
+
description?: string;
|
|
11
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { M2mListV2Item } from './M2mListV2Item';
|
|
2
2
|
/**
|
|
3
3
|
* List of all M2M clients with pagination details.
|
|
4
4
|
*/
|
|
@@ -6,7 +6,7 @@ export interface M2mListV2Response {
|
|
|
6
6
|
/**
|
|
7
7
|
* An array of M2M Client objects. This array is empty if no M2M Clients match the query criteria.
|
|
8
8
|
*/
|
|
9
|
-
data:
|
|
9
|
+
data: M2mListV2Item[];
|
|
10
10
|
metadata: {
|
|
11
11
|
/**
|
|
12
12
|
* Cursor to fetch the next page of results. Null if there are no further pages.
|
|
@@ -24,6 +24,7 @@ export * from './ClaimDateWithQualifier';
|
|
|
24
24
|
export * from './ClaimAddress';
|
|
25
25
|
export * from './ClaimId';
|
|
26
26
|
export * from './ClaimCMS1500';
|
|
27
|
+
export * from './M2mListV2Item';
|
|
27
28
|
export * from './M2mListItem';
|
|
28
29
|
export * from './M2m';
|
|
29
30
|
export * from './AccessPolicy';
|
|
@@ -160,6 +161,7 @@ export * from './FaxSendResponse';
|
|
|
160
161
|
export * from './LabRouteListResponse';
|
|
161
162
|
export * from './LabRouteCreateParams';
|
|
162
163
|
export * from './LabRouteCreateResponse';
|
|
164
|
+
export * from './LabRouteGetParams';
|
|
163
165
|
export * from './LabRouteGetResponse';
|
|
164
166
|
export * from './LabRouteDeleteParams';
|
|
165
167
|
export * from './LabOrderableItemListParams';
|
package/dist/esm/index.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{v4 as e}from"uuid";class t extends Error{code;constructor({message:e,code:s,cause:r}){super(e,{cause:r}),Object.setPrototypeOf(this,t.prototype),this.code=s,this.name="OystehrSdkError"}toString(){return`${this.name}: ${this.message} (code: ${this.code})`}toJSON(){return{name:this.name,message:this.message,code:this.code,cause:this.cause}}}function s(e){const t=[];for(const s of e.issue??[])s.details&&s.details.text&&t.push(s.details.text);return t.length||t.push("Unknown FHIR error"),t.join(",")}class r extends t{cause;constructor({error:e,code:t}){super({message:s(e),code:t}),Object.setPrototypeOf(this,r.prototype),this.cause=e,this.name="OystehrFHIRError"}toJSON(){return{name:this.name,message:this.message,code:this.code,cause:this.cause}}}const i=[408,429,500,502,503,504],n=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT","UND_ERR_CONNECT_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_SOCKET"];class h{config;constructor(e){this.config=e}request(e,s,r){return async(i,n)=>{const h=()=>this.config;try{return await o(r,h,e,s)(i,n)}catch(e){const s=e;throw new t({message:s.message,code:s.code,cause:s.cause})}}}fhirRequest(e,s){return async(i,n)=>{try{const t=()=>this.config.services?.fhirApiUrl??"https://fhir-api.zapehr.com",r=()=>this.config;return await o(t,r,e,s)(i,n)}catch(e){const s=e;if("string"==typeof s.message)throw new t({message:s.message,code:s.code,cause:s.cause});throw new r({error:s.message,code:s.code})}}}}function a(e){return"accessToken"in e}function o(s,r,h,o){return async(c,p)=>{const l=c&&!p&&!Array.isArray(c)&&a(c)?{}:c??{},d=c&&!p&&!Array.isArray(c)&&a(c)?c:p,b=o.toLowerCase(),m=r(),g=m.fetch??fetch,f=d?.accessToken??m.accessToken,U=d?.projectId??r().projectId;let T=h,k=l;if(!Array.isArray(l)){const[e,s]=function(e,s){const r={...s},i=e.replace(/\{([^}]+)\}/g,((e,i)=>{if(delete r[i],i.match(/^.*\+$/))return s[i]+"";if(!s[i]||""===s[i])throw new t({message:`Required path parameter is an empty string: ${i}`,code:400});return s[i]?encodeURIComponent(s[i]+""):""})),n=Object.keys(r),h=n.length?n.reduce(((e,t)=>({...e,[t]:r[t]})),{}):{};return[i,h]}(h,l);T=e,k=s}T=T.replace(/^\//,"");const q=s(),y=q.endsWith("/")?q:q+"/",v=new URL(T,y);let j;if(Array.isArray(k))j=JSON.stringify(k);else if(Object.keys(k).length)if("get"===b)u(k,v.searchParams);else if("application/x-www-form-urlencoded"===d?.contentType){const e=new URLSearchParams;u(k,e),j=e.toString()}else j=JSON.stringify(k);else"application/x-www-form-urlencoded"!==d?.contentType&&"post"===b&&(j="{}");const w=Object.assign(U?{"x-zapehr-project-id":U,"x-oystehr-project-id":U}:{},{"content-type":d?.contentType??"application/json"},f?{Authorization:`Bearer ${f}`}:{},d?.ifMatch?{"If-Match":d.ifMatch}:{},{"x-oystehr-request-id":d?.requestId??e()}),x={retries:m.retry?.retries??3,jitter:m.retry?.jitter??20,delay:m.retry?.delay??100,onRetry:m.retry?.onRetry,retryOn:[...m.retry?.retryOn??[],...i]};return x.retryOn.push(...i),async function(e,t){let s;for(const r of Array.from({length:(t.retries??0)+1},((e,t)=>t)))try{return await e(r)}catch(e){let i=!1;if("response"in e){const r=e;i=t.retryOn.includes(r.code),s={message:e.message,code:e.code}}else if(s=e,"code"in e&&"string"==typeof e.code){const t=e;i=n.includes(t.code)}if(!i)break;const h=Math.floor(Math.random()*(t.jitter+1));await new Promise((e=>setTimeout(e,t.delay+h))),t.onRetry&&r!==(t.retries??0)&&t.onRetry(r+1)}throw s}((async()=>{const e=await g(new Request(v,{method:b.toUpperCase(),body:j,headers:w})),t=e.body?await e.text():null;let s;try{s=t&&(e.headers.get("content-type")?.includes("application/json")||e.headers.get("content-type")?.includes("application/fhir+json"))?JSON.parse(t):null}catch(e){s=null}if(!e.ok||e.status>=400){throw{message:s?.output?.message??s?.message??s??t??e.statusText,code:s?.output?.code??s?.code??e.status,response:e}}return s}),x)}}function u(e,t){for(const[s,r]of Object.entries(e))Array.isArray(r)?r.forEach((e=>t.append(s,e))):t.append(s,r)}class c extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}list(e){return this.request("/application","get",this.#e.bind(this))(e)}create(e,t){return this.request("/application","post",this.#e.bind(this))(e,t)}get(e,t){return this.request("/application/{id}","get",this.#e.bind(this))(e,t)}update(e,t){return this.request("/application/{id}","patch",this.#e.bind(this))(e,t)}delete(e,t){return this.request("/application/{id}","delete",this.#e.bind(this))(e,t)}rotateSecret(e,t){return this.request("/application/{id}/rotate-secret","post",this.#e.bind(this))(e,t)}revokeRefreshToken(e,t){return this.request("/application/{id}/revoke-refresh-token","post",this.#e.bind(this))(e,t)}revokeAccessToken(e,t){return this.request("/application/{id}/revoke-access-token","post",this.#e.bind(this))(e,t)}}class p extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}issue(e,t){return this.request("/payment/charge/issue","post",this.#e.bind(this))(e,t)}status(e,t){return this.request("/payment/charge/status","post",this.#e.bind(this))(e,t)}}const l="https://extensions.fhir.zapehr.com/encounter-virtual-service-pre-release",d="addressString";function b(e){if(function(e){return Object.hasOwn(e,"virtualService")}(e)){const t=e.virtualService?.find((e=>"https://fhir.zapehr.com/virtual-service-type"===e.channelType?.system));return t?.addressString}if(!e.extension)return;const t=e.extension.find((e=>e.url===l));if(!t?.extension)return;const s=t.extension?.find((e=>e.url===d))?.valueString;return s}class m extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}ENCOUNTER_VS_EXTENSION_URL=l;ENCOUNTER_VS_EXTENSION_RELATIVE_URL=d;getConversationIdFromEncounter=b;create(e,t){return this.request("/messaging/conversation","post",this.#e.bind(this))(e,t)}getToken(e){return this.request("/messaging/conversation/token","get",this.#e.bind(this))(e)}addParticipant(e,t){return this.request("/messaging/conversation/{conversationId}/participant","post",this.#e.bind(this))(e,t)}removeParticipant(e,t){return this.request("/messaging/conversation/{conversationId}/participant","delete",this.#e.bind(this))(e,t)}message(e,t){return this.request("/messaging/conversation/{conversationId}/message","post",this.#e.bind(this))(e,t)}}class g extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}get(e,t){return this.request("/developer/{id}","get",this.#e.bind(this))(e,t)}update(e,t){return this.request("/developer/{id}","patch",this.#e.bind(this))(e,t)}delete(e,t){return this.request("/developer/{id}","delete",this.#e.bind(this))(e,t)}invite(e,t){return this.request("/developer/invite","post",this.#e.bind(this))(e,t)}list(e){return this.request("/developer","get",this.#e.bind(this))(e)}listV2(e,t){return this.request("/developer/v2/list","get",this.#e.bind(this))(e,t)}}class f extends h{constructor(e){super(e)}#e(){return this.config.services?.erxApiUrl??"https://erx-api.zapehr.com/v3"}searchAllergens(e,t){return this.request("/allergen","get",this.#e.bind(this))(e,t)}searchMedications(e,t){return this.request("/medication","get",this.#e.bind(this))(e,t)}getConfiguration(e){return this.request("/config","get",this.#e.bind(this))(e)}checkAllergyInteractions(e,t){return this.request("/patient/{patientId}/interactions/allergy","get",this.#e.bind(this))(e,t)}checkMedicationInteractions(e,t){return this.request("/patient/{patientId}/interactions/medication","get",this.#e.bind(this))(e,t)}checkPrecheckInteractions(e,t){return this.request("/patient/{patientId}/interactions/precheck/{drugId}","get",this.#e.bind(this))(e,t)}cancelPrescription(e,t){return this.request("/patient/{patientId}/prescriptions/{medicationRequestId}","delete",this.#e.bind(this))(e,t)}syncPatient(e,t){return this.request("/patient/{patientId}/sync","post",this.#e.bind(this))(e,t)}connectPractitioner(e,t){return this.request("/practitioner/connect","get",this.#e.bind(this))(e,t)}checkPractitionerEnrollment(e,t){return this.request("/practitioner/{practitionerId}","get",this.#e.bind(this))(e,t)}enrollPractitioner(e,t){return this.request("/practitioner/{practitionerId}","post",this.#e.bind(this))(e,t)}unenrollPractitioner(e,t){return this.request("/practitioner/{practitionerId}","delete",this.#e.bind(this))(e,t)}}class U extends h{constructor(e){super(e)}#e(){return this.config.services?.faxApiUrl??"https://fax-api.zapehr.com/v1"}offboard(e){return this.request("/offboard","post",this.#e.bind(this))(e)}onboard(e){return this.request("/onboard","post",this.#e.bind(this))(e)}getConfiguration(e){return this.request("/config","get",this.#e.bind(this))(e)}send(e,t){return this.request("/send","post",this.#e.bind(this))(e,t)}}const T=65535;async function k(e,t){const{resourceType:s,params:r}=e;let i;r&&(i=Object.entries(r).reduce(((e,[t,s])=>(e[s.name]||(e[s.name]=[]),e[s.name].push(s.value),e)),{}));const n=await this.fhirRequest(`/${s}/_search`,"POST")(i,{...t,contentType:"application/x-www-form-urlencoded"});return{...n,entry:n.entry,unbundle:function(){return this.entry?.map((e=>e.resource)).filter((e=>void 0!==e))??[]}}}async function q(e,t){const{resourceType:s}=e;return this.fhirRequest(`/${s}`,"POST")(e,t)}async function y({resourceType:e,id:t},s){return this.fhirRequest(`/${e}/${t}`,"GET")({},s)}async function v(e,t){const{id:s,resourceType:r}=e;return this.fhirRequest(`/${r}/${s}`,"PUT")(e,{...t,ifMatch:t?.optimisticLockingVersionId?`W/"${t.optimisticLockingVersionId}"`:void 0})}async function j({resourceType:e,id:t,operations:s},r){return this.fhirRequest(`/${e}/${t}`,"PATCH")(s,{...r,contentType:"application/json-patch+json",ifMatch:r?.optimisticLockingVersionId?`W/"${r.optimisticLockingVersionId}"`:void 0})}async function w({resourceType:e,id:t},s){return this.fhirRequest(`/${e}/${t}`,"DELETE")({},s)}async function x({resourceType:e,id:t,versionId:s},r){return this.fhirRequest(`/${e}/${t}/_history${s?`/${s}`:""}`,"GET")({},r)}function z(e){const{method:t,url:s}=e,r={request:{method:t,url:s}};if(s.split("?").length>1){const[e,t]=s.split("?"),i=t.split("&").map((e=>{const[t,s]=e.split("=");return{name:t,value:s}})).reduce(((e,{name:t,value:s})=>t?(e[t]||(e[t]=[]),e[t].push(s),e):e),{}),n=new URLSearchParams;u(i,n),r.request.url=`${e}?${n.toString()}`}if(["GET","DELETE","HEAD"].includes(t))return r;if("PUT"===t){const{resource:t}=e;return{request:{...r.request,ifMatch:e.ifMatch},resource:t}}if("PATCH"===t){if("resource"in e)return{request:{...r.request,ifMatch:e.ifMatch},resource:e.resource};const t=function(e){const t=(new globalThis.TextEncoder).encode(e);let s="";for(let e=0;e<t.length;e+=T){const r=t.subarray(e,e+T);s+=globalThis.btoa(String.fromCodePoint.apply(void 0,r))}return s}(JSON.stringify(e.operations));return{...r,resource:{resourceType:"Binary",contentType:"application/json-patch+json",data:t}}}if("POST"===t){const{resource:t,fullUrl:s}=e;return{...r,resource:t,fullUrl:s}}throw new Error("Unrecognized method")}function E(e){return async function(t,s){return this.fhirRequest("/","POST")({resourceType:"Bundle",type:e,entry:t.requests.map(z)},s)}}const A=E("batch"),I=E("transaction");function S(e,t){const s=[];if(e.line&&s.push(...e.line),e.city||e.state||e.postalCode){const t=[];e.city&&t.push(e.city),e.state&&t.push(e.state),e.postalCode&&t.push(e.postalCode),s.push(t.join(", "))}return e.use&&(t?.all||t?.use)&&s.push("["+e.use+"]"),s.join(t?.lineSeparator||", ").trim()}function P(e,t){const s=[];return e.prefix&&!1!==t?.prefix&&s.push(...e.prefix),e.given&&s.push(...e.given),e.family&&s.push(e.family),e.suffix&&!1!==t?.suffix&&s.push(...e.suffix),e.use&&(t?.all||t?.use)&&s.push("["+e.use+"]"),s.join(" ").trim()}class O extends h{constructor(e){super(e)}#e(){return this.config.services?.fhirApiUrl??"https://fhir-api.zapehr.com"}search=k;create=q;get=y;update=v;patch=j;delete=w;history=x;batch=A;transaction=I;formatAddress=S;formatHumanName=P}class R extends h{constructor(e){super(e)}#e(){return this.config.services?.labApiUrl??"https://labs-api.zapehr.com/v1"}routeList(e){return this.request("/route","get",this.#e.bind(this))(e)}routeCreate(e,t){return this.request("/route","post",this.#e.bind(this))(e,t)}routeGet(e){return this.request("/route/{routeGuid}","get",this.#e.bind(this))(e)}routeDelete(e,t){return this.request("/route/{routeGuid}","delete",this.#e.bind(this))(e,t)}orderableItemList(e,t){return this.request("/orderableItem","get",this.#e.bind(this))(e,t)}orderableItemQuestionnaireGet(e,t){return this.request("/canonical-questionnaire/lab/{labGuid}/compendium/{compendiumVersion}/item/{itemCode}/questionnaire","get",this.#e.bind(this))(e,t)}orderSubmit(e,t){return this.request("/submit","post",this.#e.bind(this))(e,t)}}class N extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}list(e){return this.request("/m2m","get",this.#e.bind(this))(e)}create(e,t){return this.request("/m2m","post",this.#e.bind(this))(e,t)}me(e){return this.request("/m2m/me","get",this.#e.bind(this))(e)}get(e,t){return this.request("/m2m/{id}","get",this.#e.bind(this))(e,t)}update(e,t){return this.request("/m2m/{id}","patch",this.#e.bind(this))(e,t)}delete(e,t){return this.request("/m2m/{id}","delete",this.#e.bind(this))(e,t)}rotateSecret(e,t){return this.request("/m2m/{id}/rotate-secret","post",this.#e.bind(this))(e,t)}listV2(e,t){return this.request("/m2m/v2/list","get",this.#e.bind(this))(e,t)}}class C extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}getMessagingConfig(e){return this.request("/messaging/config","get",this.#e.bind(this))(e)}}class M extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}setUp(e,t){return this.request("/payment/payment-method/setup","post",this.#e.bind(this))(e,t)}setDefault(e,t){return this.request("/payment/payment-method/set-default","post",this.#e.bind(this))(e,t)}delete(e,t){return this.request("/payment/payment-method","delete",this.#e.bind(this))(e,t)}list(e,t){return this.request("/payment/payment-method/list","post",this.#e.bind(this))(e,t)}}class $ extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}get(e){return this.request("/project","get",this.#e.bind(this))(e)}update(e,t){return this.request("/project","patch",this.#e.bind(this))(e,t)}}class L extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}eligibilityCheck(e,t){return this.request("/rcm/eligibility-check","post",this.#e.bind(this))(e,t)}validateProfessionalClaim(e,t){return this.request("/rcm/professional-claim/validate","post",this.#e.bind(this))(e,t)}submitProfessionalClaim(e,t){return this.request("/rcm/professional-claim/submit","post",this.#e.bind(this))(e,t)}}class _ extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}list(e){return this.request("/iam/role","get",this.#e.bind(this))(e)}create(e,t){return this.request("/iam/role","post",this.#e.bind(this))(e,t)}get(e,t){return this.request("/iam/role/{roleId}","get",this.#e.bind(this))(e,t)}update(e,t){return this.request("/iam/role/{roleId}","patch",this.#e.bind(this))(e,t)}delete(e,t){return this.request("/iam/role/{roleId}","delete",this.#e.bind(this))(e,t)}}class D extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}list(e){return this.request("/secret","get",this.#e.bind(this))(e)}set(e,t){return this.request("/secret","post",this.#e.bind(this))(e,t)}get(e,t){return this.request("/secret/{name}","get",this.#e.bind(this))(e,t)}delete(e,t){return this.request("/secret/{name}","delete",this.#e.bind(this))(e,t)}}class V extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}createMeeting(e,t){return this.request("/telemed/v2/meeting","post",this.#e.bind(this))(e,t)}joinMeeting(e,t){return this.request("/telemed/v2/meeting/{encounterId}/join","get",this.#e.bind(this))(e,t)}}class F extends h{constructor(e){super(e)}#e(){return this.config.services?.terminologyApiUrl??"https://terminology-api.zapehr.com/v1"}searchCpt(e,t){return this.request("/cpt/search","get",this.#e.bind(this))(e,t)}searchHcpcs(e,t){return this.request("/hcpcs/search","get",this.#e.bind(this))(e,t)}}class H extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}send(e,t){return this.request("/messaging/transactional-sms/send","post",this.#e.bind(this))(e,t)}}class G extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}me(e){return this.request("/user/me","get",this.#e.bind(this))(e)}get(e,t){return this.request("/user/{id}","get",this.#e.bind(this))(e,t)}update(e,t){return this.request("/user/{id}","patch",this.#e.bind(this))(e,t)}delete(e,t){return this.request("/user/{id}","delete",this.#e.bind(this))(e,t)}resetMfa(e,t){return this.request("/user/{id}/reset-mfa","post",this.#e.bind(this))(e,t)}resetPasswordLink(e,t){return this.request("/user/{id}/reset-password-link","post",this.#e.bind(this))(e,t)}invite(e,t){return this.request("/user/invite","post",this.#e.bind(this))(e,t)}list(e){return this.request("/user","get",this.#e.bind(this))(e)}listV2(e,t){return this.request("/user/v2/list","get",this.#e.bind(this))(e,t)}}class B extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}get(e){return this.request("/version","get",this.#e.bind(this))(e)}}function J(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}async function W({bucketName:e,"objectPath+":t,file:s}){const r=await this.request("/z3/{bucketName}/{objectPath+}","post",J.bind(this))({action:"upload",bucketName:e,"objectPath+":t});await fetch(r.signedUrl,{method:"PUT",body:s})}async function X({bucketName:e,"objectPath+":t}){const s=await this.request("/z3/{bucketName}/{objectPath+}","post",J.bind(this))({action:"download",bucketName:e,"objectPath+":t}),r=await fetch(s.signedUrl,{method:"GET"});if(!r.ok)throw new Error("Failed to download file");return r.arrayBuffer()}async function Z(e){let s,r;const i=new URL(e.url);if("z3:"===i.protocol){const e=i.pathname.split("/").slice(1);s=i.hostname,r=e.join("/")}else{if(!i.href.startsWith(this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"))throw new t({message:"Invalid Z3 URL",code:400});{const e=i.pathname.split("/").slice(3);s=e[0],r=e.slice(1).join("/")}}const n={action:"upload",bucketName:s,"objectPath+":r};return this.request("/z3/{bucketName}/{objectPath+}","post",J.bind(this))(n)}class K extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}uploadFile=W;downloadFile=X;getPresignedUrlForZ3Url=Z;listBuckets(e){return this.request("/z3","get",this.#e.bind(this))(e)}createBucket(e,t){return this.request("/z3/{bucketName}","put",this.#e.bind(this))(e,t)}deleteBucket(e,t){return this.request("/z3/{bucketName}","delete",this.#e.bind(this))(e,t)}listObjects(e,t){return this.request("/z3/{bucketName}/{objectPath+}","get",this.#e.bind(this))(e,t)}getPresignedUrl(e,t){return this.request("/z3/{bucketName}/{objectPath+}","post",this.#e.bind(this))(e,t)}deleteObject(e,t){return this.request("/z3/{bucketName}/{objectPath+}","delete",this.#e.bind(this))(e,t)}}function Q(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}async function Y({id:e,file:t,filename:s}){const r=await this.request("/zambda/{id}/s3-upload","post",Q.bind(this))({id:e,filename:s});await fetch(r.signedUrl,{method:"PUT",body:t})}class ee extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}uploadFile=Y;list(e){return this.request("/zambda","get",this.#e.bind(this))(e)}create(e,t){return this.request("/zambda","post",this.#e.bind(this))(e,t)}get(e,t){return this.request("/zambda/{id}","get",this.#e.bind(this))(e,t)}update(e,t){return this.request("/zambda/{id}","patch",this.#e.bind(this))(e,t)}delete(e,t){return this.request("/zambda/{id}","delete",this.#e.bind(this))(e,t)}execute(e,t){return this.request("/zambda/{id}/execute","post",this.#e.bind(this))(e,t)}executePublic(e,t){return this.request("/zambda/{id}/execute-public","post",this.#e.bind(this))(e,t)}s3Upload(e,t){return this.request("/zambda/{id}/s3-upload","post",this.#e.bind(this))(e,t)}}class te extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}list(e,t){return this.request("/zambda/{id}/logStream","post",this.#e.bind(this))(e,t)}search(e,t){return this.request("/zambda/{id}/logStream/search","post",this.#e.bind(this))(e,t)}get(e,t){return this.request("/zambda/{id}/logStream/{logStreamName}","post",this.#e.bind(this))(e,t)}}let se=class{config;application;developer;m2m;messaging;conversation;transactionalSMS;paymentMethod;charge;project;rcm;role;secret;telemed;user;version;z3;zambda;zambdaLogStream;fax;lab;erx;terminology;fhir;constructor(e){this.config=e,this.config.services??={},this.config.services.projectApiUrl??=e.projectApiUrl,this.config.services.fhirApiUrl??=e.fhirApiUrl,this.application=new c(e),this.developer=new g(e),this.m2m=new N(e),this.messaging=new C(e),this.conversation=new m(e),this.transactionalSMS=new H(e),this.paymentMethod=new M(e),this.charge=new p(e),this.project=new $(e),this.rcm=new L(e),this.role=new _(e),this.secret=new D(e),this.telemed=new V(e),this.user=new G(e),this.version=new B(e),this.z3=new K(e),this.zambda=new ee(e),this.zambdaLogStream=new te(e),this.fax=new U(e),this.lab=new R(e),this.erx=new f(e),this.terminology=new F(e),this.fhir=new O(e)}};class re extends se{static OystehrFHIRError=r;static OystehrSdkError=t}export{re as default};
|
|
1
|
+
import{v4 as e}from"uuid";class t extends Error{code;constructor({message:e,code:s,cause:r}){super(e,{cause:r}),Object.setPrototypeOf(this,t.prototype),this.code=s,this.name="OystehrSdkError"}toString(){return`${this.name}: ${this.message} (code: ${this.code})`}toJSON(){return{name:this.name,message:this.message,code:this.code,cause:this.cause}}}function s(e){const t=[];for(const s of e.issue??[])s.details&&s.details.text&&t.push(s.details.text);return t.length||t.push("Unknown FHIR error"),t.join(",")}class r extends t{cause;constructor({error:e,code:t}){super({message:s(e),code:t}),Object.setPrototypeOf(this,r.prototype),this.cause=e,this.name="OystehrFHIRError"}toJSON(){return{name:this.name,message:this.message,code:this.code,cause:this.cause}}}const i=[408,429,500,502,503,504],n=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT","UND_ERR_CONNECT_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_SOCKET"];class h{config;constructor(e){this.config=e}request(e,s,r){return async(i,n)=>{const h=()=>this.config;try{return await o(r,h,e,s)(i,n)}catch(e){const s=e;throw new t({message:s.message,code:s.code,cause:s.cause})}}}fhirRequest(e,s){return async(i,n)=>{try{const t=()=>this.config.services?.fhirApiUrl??"https://fhir-api.zapehr.com",r=()=>this.config;return await o(t,r,e,s)(i,n)}catch(e){const s=e;if("string"==typeof s.message)throw new t({message:s.message,code:s.code,cause:s.cause});throw new r({error:s.message,code:s.code})}}}}function a(e){return"accessToken"in e}function o(s,r,h,o){return async(c,p)=>{const l=c&&!p&&!Array.isArray(c)&&a(c)?{}:c??{},d=c&&!p&&!Array.isArray(c)&&a(c)?c:p,b=o.toLowerCase(),m=r(),g=m.fetch??fetch,f=d?.accessToken??m.accessToken,U=d?.projectId??r().projectId;let T=h,k=l;if(!Array.isArray(l)){const[e,s]=function(e,s){const r={...s},i=e.replace(/\{([^}]+)\}/g,((e,i)=>{if(delete r[i],i.match(/^.*\+$/))return s[i]+"";if(!s[i]||""===s[i])throw new t({message:`Required path parameter is an empty string: ${i}`,code:400});return s[i]?encodeURIComponent(s[i]+""):""})),n=Object.keys(r),h=n.length?n.reduce(((e,t)=>({...e,[t]:r[t]})),{}):{};return[i,h]}(h,l);T=e,k=s}T=T.replace(/^\//,"");const q=s(),y=q.endsWith("/")?q:q+"/",v=new URL(T,y);let j;if(Array.isArray(k))j=JSON.stringify(k);else if(Object.keys(k).length)if("get"===b)u(k,v.searchParams);else if("application/x-www-form-urlencoded"===d?.contentType){const e=new URLSearchParams;u(k,e),j=e.toString()}else j=JSON.stringify(k);else"application/x-www-form-urlencoded"!==d?.contentType&&"post"===b&&(j="{}");const w=Object.assign(U?{"x-zapehr-project-id":U,"x-oystehr-project-id":U}:{},{"content-type":d?.contentType??"application/json"},f?{Authorization:`Bearer ${f}`}:{},d?.ifMatch?{"If-Match":d.ifMatch}:{},{"x-oystehr-request-id":d?.requestId??e()}),x={retries:m.retry?.retries??3,jitter:m.retry?.jitter??20,delay:m.retry?.delay??100,onRetry:m.retry?.onRetry,retryOn:[...m.retry?.retryOn??[],...i]};return x.retryOn.push(...i),async function(e,t){let s;for(const r of Array.from({length:(t.retries??0)+1},((e,t)=>t)))try{return await e(r)}catch(e){let i=!1;if("response"in e){const r=e;i=t.retryOn.includes(r.code),s={message:e.message,code:e.code}}else if(s=e,"code"in e&&"string"==typeof e.code){const t=e;i=n.includes(t.code)}if(!i)break;const h=Math.floor(Math.random()*(t.jitter+1));await new Promise((e=>setTimeout(e,t.delay+h))),t.onRetry&&r!==(t.retries??0)&&t.onRetry(r+1)}throw s}((async()=>{const e=await g(new Request(v,{method:b.toUpperCase(),body:j,headers:w})),t=e.body?await e.text():null;let s;try{s=t&&(e.headers.get("content-type")?.includes("application/json")||e.headers.get("content-type")?.includes("application/fhir+json"))?JSON.parse(t):null}catch(e){s=null}if(!e.ok||e.status>=400){throw{message:s?.output?.message??s?.message??s??t??e.statusText,code:s?.output?.code??s?.code??e.status,response:e}}return s}),x)}}function u(e,t){for(const[s,r]of Object.entries(e))Array.isArray(r)?r.forEach((e=>t.append(s,e))):t.append(s,r)}class c extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}list(e){return this.request("/application","get",this.#e.bind(this))(e)}create(e,t){return this.request("/application","post",this.#e.bind(this))(e,t)}get(e,t){return this.request("/application/{id}","get",this.#e.bind(this))(e,t)}update(e,t){return this.request("/application/{id}","patch",this.#e.bind(this))(e,t)}delete(e,t){return this.request("/application/{id}","delete",this.#e.bind(this))(e,t)}rotateSecret(e,t){return this.request("/application/{id}/rotate-secret","post",this.#e.bind(this))(e,t)}revokeRefreshToken(e,t){return this.request("/application/{id}/revoke-refresh-token","post",this.#e.bind(this))(e,t)}revokeAccessToken(e,t){return this.request("/application/{id}/revoke-access-token","post",this.#e.bind(this))(e,t)}}class p extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}issue(e,t){return this.request("/payment/charge/issue","post",this.#e.bind(this))(e,t)}status(e,t){return this.request("/payment/charge/status","post",this.#e.bind(this))(e,t)}}const l="https://extensions.fhir.zapehr.com/encounter-virtual-service-pre-release",d="addressString";function b(e){if(function(e){return Object.hasOwn(e,"virtualService")}(e)){const t=e.virtualService?.find((e=>"https://fhir.zapehr.com/virtual-service-type"===e.channelType?.system));return t?.addressString}if(!e.extension)return;const t=e.extension.find((e=>e.url===l));if(!t?.extension)return;const s=t.extension?.find((e=>e.url===d))?.valueString;return s}class m extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}ENCOUNTER_VS_EXTENSION_URL=l;ENCOUNTER_VS_EXTENSION_RELATIVE_URL=d;getConversationIdFromEncounter=b;create(e,t){return this.request("/messaging/conversation","post",this.#e.bind(this))(e,t)}getToken(e){return this.request("/messaging/conversation/token","get",this.#e.bind(this))(e)}addParticipant(e,t){return this.request("/messaging/conversation/{conversationId}/participant","post",this.#e.bind(this))(e,t)}removeParticipant(e,t){return this.request("/messaging/conversation/{conversationId}/participant","delete",this.#e.bind(this))(e,t)}message(e,t){return this.request("/messaging/conversation/{conversationId}/message","post",this.#e.bind(this))(e,t)}}class g extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}get(e,t){return this.request("/developer/{id}","get",this.#e.bind(this))(e,t)}update(e,t){return this.request("/developer/{id}","patch",this.#e.bind(this))(e,t)}delete(e,t){return this.request("/developer/{id}","delete",this.#e.bind(this))(e,t)}invite(e,t){return this.request("/developer/invite","post",this.#e.bind(this))(e,t)}list(e){return this.request("/developer","get",this.#e.bind(this))(e)}listV2(e,t){return this.request("/developer/v2/list","get",this.#e.bind(this))(e,t)}}class f extends h{constructor(e){super(e)}#e(){return this.config.services?.erxApiUrl??"https://erx-api.zapehr.com/v3"}searchAllergens(e,t){return this.request("/allergen","get",this.#e.bind(this))(e,t)}searchMedications(e,t){return this.request("/medication","get",this.#e.bind(this))(e,t)}getConfiguration(e){return this.request("/config","get",this.#e.bind(this))(e)}checkAllergyInteractions(e,t){return this.request("/patient/{patientId}/interactions/allergy","get",this.#e.bind(this))(e,t)}checkMedicationInteractions(e,t){return this.request("/patient/{patientId}/interactions/medication","get",this.#e.bind(this))(e,t)}checkPrecheckInteractions(e,t){return this.request("/patient/{patientId}/interactions/precheck/{drugId}","get",this.#e.bind(this))(e,t)}cancelPrescription(e,t){return this.request("/patient/{patientId}/prescriptions/{medicationRequestId}","delete",this.#e.bind(this))(e,t)}syncPatient(e,t){return this.request("/patient/{patientId}/sync","post",this.#e.bind(this))(e,t)}connectPractitioner(e,t){return this.request("/practitioner/connect","get",this.#e.bind(this))(e,t)}checkPractitionerEnrollment(e,t){return this.request("/practitioner/{practitionerId}","get",this.#e.bind(this))(e,t)}enrollPractitioner(e,t){return this.request("/practitioner/{practitionerId}","post",this.#e.bind(this))(e,t)}unenrollPractitioner(e,t){return this.request("/practitioner/{practitionerId}","delete",this.#e.bind(this))(e,t)}}class U extends h{constructor(e){super(e)}#e(){return this.config.services?.faxApiUrl??"https://fax-api.zapehr.com/v1"}offboard(e){return this.request("/offboard","post",this.#e.bind(this))(e)}onboard(e){return this.request("/onboard","post",this.#e.bind(this))(e)}getConfiguration(e){return this.request("/config","get",this.#e.bind(this))(e)}send(e,t){return this.request("/send","post",this.#e.bind(this))(e,t)}}const T=65535;async function k(e,t){const{resourceType:s,params:r}=e;let i;r&&(i=Object.entries(r).reduce(((e,[t,s])=>(e[s.name]||(e[s.name]=[]),e[s.name].push(s.value),e)),{}));const n=await this.fhirRequest(`/${s}/_search`,"POST")(i,{...t,contentType:"application/x-www-form-urlencoded"});return{...n,entry:n.entry,unbundle:function(){return this.entry?.map((e=>e.resource)).filter((e=>void 0!==e))??[]}}}async function q(e,t){const{resourceType:s}=e;return this.fhirRequest(`/${s}`,"POST")(e,t)}async function y({resourceType:e,id:t},s){return this.fhirRequest(`/${e}/${t}`,"GET")({},s)}async function v(e,t){const{id:s,resourceType:r}=e;return this.fhirRequest(`/${r}/${s}`,"PUT")(e,{...t,ifMatch:t?.optimisticLockingVersionId?`W/"${t.optimisticLockingVersionId}"`:void 0})}async function j({resourceType:e,id:t,operations:s},r){return this.fhirRequest(`/${e}/${t}`,"PATCH")(s,{...r,contentType:"application/json-patch+json",ifMatch:r?.optimisticLockingVersionId?`W/"${r.optimisticLockingVersionId}"`:void 0})}async function w({resourceType:e,id:t},s){return this.fhirRequest(`/${e}/${t}`,"DELETE")({},s)}async function x({resourceType:e,id:t,versionId:s},r){return this.fhirRequest(`/${e}/${t}/_history${s?`/${s}`:""}`,"GET")({},r)}function z(e){const{method:t,url:s}=e,r={request:{method:t,url:s}};if(s.split("?").length>1){const[e,t]=s.split("?"),i=t.split("&").map((e=>{const[t,s]=e.split("=");return{name:t,value:s}})).reduce(((e,{name:t,value:s})=>t?(e[t]||(e[t]=[]),e[t].push(s),e):e),{}),n=new URLSearchParams;u(i,n),r.request.url=`${e}?${n.toString()}`}if(["GET","DELETE","HEAD"].includes(t))return r;if("PUT"===t){const{resource:t}=e;return{request:{...r.request,ifMatch:e.ifMatch},resource:t}}if("PATCH"===t){if("resource"in e)return{request:{...r.request,ifMatch:e.ifMatch},resource:e.resource};const t=function(e){const t=(new globalThis.TextEncoder).encode(e);let s="";for(let e=0;e<t.length;e+=T){const r=t.subarray(e,e+T);s+=globalThis.btoa(String.fromCodePoint.apply(void 0,r))}return s}(JSON.stringify(e.operations));return{...r,resource:{resourceType:"Binary",contentType:"application/json-patch+json",data:t}}}if("POST"===t){const{resource:t,fullUrl:s}=e;return{...r,resource:t,fullUrl:s}}throw new Error("Unrecognized method")}function E(e){return async function(t,s){return this.fhirRequest("/","POST")({resourceType:"Bundle",type:e,entry:t.requests.map(z)},s)}}const A=E("batch"),I=E("transaction");function S(e,t){const s=[];if(e.line&&s.push(...e.line),e.city||e.state||e.postalCode){const t=[];e.city&&t.push(e.city),e.state&&t.push(e.state),e.postalCode&&t.push(e.postalCode),s.push(t.join(", "))}return e.use&&(t?.all||t?.use)&&s.push("["+e.use+"]"),s.join(t?.lineSeparator||", ").trim()}function P(e,t){const s=[];return e.prefix&&!1!==t?.prefix&&s.push(...e.prefix),e.given&&s.push(...e.given),e.family&&s.push(e.family),e.suffix&&!1!==t?.suffix&&s.push(...e.suffix),e.use&&(t?.all||t?.use)&&s.push("["+e.use+"]"),s.join(" ").trim()}class O extends h{constructor(e){super(e)}#e(){return this.config.services?.fhirApiUrl??"https://fhir-api.zapehr.com"}search=k;create=q;get=y;update=v;patch=j;delete=w;history=x;batch=A;transaction=I;formatAddress=S;formatHumanName=P}class R extends h{constructor(e){super(e)}#e(){return this.config.services?.labApiUrl??"https://labs-api.zapehr.com/v1"}routeList(e){return this.request("/route","get",this.#e.bind(this))(e)}routeCreate(e,t){return this.request("/route","post",this.#e.bind(this))(e,t)}routeGet(e,t){return this.request("/route/{routeGuid}","get",this.#e.bind(this))(e,t)}routeDelete(e,t){return this.request("/route/{routeGuid}","delete",this.#e.bind(this))(e,t)}orderableItemList(e,t){return this.request("/orderableItem","get",this.#e.bind(this))(e,t)}orderableItemQuestionnaireGet(e,t){return this.request("/canonical-questionnaire/lab/{labGuid}/compendium/{compendiumVersion}/item/{itemCode}/questionnaire","get",this.#e.bind(this))(e,t)}orderSubmit(e,t){return this.request("/submit","post",this.#e.bind(this))(e,t)}}class N extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}list(e){return this.request("/m2m","get",this.#e.bind(this))(e)}create(e,t){return this.request("/m2m","post",this.#e.bind(this))(e,t)}me(e){return this.request("/m2m/me","get",this.#e.bind(this))(e)}get(e,t){return this.request("/m2m/{id}","get",this.#e.bind(this))(e,t)}update(e,t){return this.request("/m2m/{id}","patch",this.#e.bind(this))(e,t)}delete(e,t){return this.request("/m2m/{id}","delete",this.#e.bind(this))(e,t)}rotateSecret(e,t){return this.request("/m2m/{id}/rotate-secret","post",this.#e.bind(this))(e,t)}listV2(e,t){return this.request("/m2m/v2/list","get",this.#e.bind(this))(e,t)}}class C extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}getMessagingConfig(e){return this.request("/messaging/config","get",this.#e.bind(this))(e)}}class M extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}setUp(e,t){return this.request("/payment/payment-method/setup","post",this.#e.bind(this))(e,t)}setDefault(e,t){return this.request("/payment/payment-method/set-default","post",this.#e.bind(this))(e,t)}delete(e,t){return this.request("/payment/payment-method","delete",this.#e.bind(this))(e,t)}list(e,t){return this.request("/payment/payment-method/list","post",this.#e.bind(this))(e,t)}}class $ extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}get(e){return this.request("/project","get",this.#e.bind(this))(e)}update(e,t){return this.request("/project","patch",this.#e.bind(this))(e,t)}}class L extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}eligibilityCheck(e,t){return this.request("/rcm/eligibility-check","post",this.#e.bind(this))(e,t)}validateProfessionalClaim(e,t){return this.request("/rcm/professional-claim/validate","post",this.#e.bind(this))(e,t)}submitProfessionalClaim(e,t){return this.request("/rcm/professional-claim/submit","post",this.#e.bind(this))(e,t)}}class _ extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}list(e){return this.request("/iam/role","get",this.#e.bind(this))(e)}create(e,t){return this.request("/iam/role","post",this.#e.bind(this))(e,t)}get(e,t){return this.request("/iam/role/{roleId}","get",this.#e.bind(this))(e,t)}update(e,t){return this.request("/iam/role/{roleId}","patch",this.#e.bind(this))(e,t)}delete(e,t){return this.request("/iam/role/{roleId}","delete",this.#e.bind(this))(e,t)}}class D extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}list(e){return this.request("/secret","get",this.#e.bind(this))(e)}set(e,t){return this.request("/secret","post",this.#e.bind(this))(e,t)}get(e,t){return this.request("/secret/{name}","get",this.#e.bind(this))(e,t)}delete(e,t){return this.request("/secret/{name}","delete",this.#e.bind(this))(e,t)}}class V extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}createMeeting(e,t){return this.request("/telemed/v2/meeting","post",this.#e.bind(this))(e,t)}joinMeeting(e,t){return this.request("/telemed/v2/meeting/{encounterId}/join","get",this.#e.bind(this))(e,t)}}class F extends h{constructor(e){super(e)}#e(){return this.config.services?.terminologyApiUrl??"https://terminology-api.zapehr.com/v1"}searchCpt(e,t){return this.request("/cpt/search","get",this.#e.bind(this))(e,t)}searchHcpcs(e,t){return this.request("/hcpcs/search","get",this.#e.bind(this))(e,t)}}class H extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}send(e,t){return this.request("/messaging/transactional-sms/send","post",this.#e.bind(this))(e,t)}}class G extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}me(e){return this.request("/user/me","get",this.#e.bind(this))(e)}get(e,t){return this.request("/user/{id}","get",this.#e.bind(this))(e,t)}update(e,t){return this.request("/user/{id}","patch",this.#e.bind(this))(e,t)}delete(e,t){return this.request("/user/{id}","delete",this.#e.bind(this))(e,t)}resetMfa(e,t){return this.request("/user/{id}/reset-mfa","post",this.#e.bind(this))(e,t)}resetPasswordLink(e,t){return this.request("/user/{id}/reset-password-link","post",this.#e.bind(this))(e,t)}invite(e,t){return this.request("/user/invite","post",this.#e.bind(this))(e,t)}list(e){return this.request("/user","get",this.#e.bind(this))(e)}listV2(e,t){return this.request("/user/v2/list","get",this.#e.bind(this))(e,t)}}class B extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}get(e){return this.request("/version","get",this.#e.bind(this))(e)}}function J(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}async function W({bucketName:e,"objectPath+":t,file:s}){const r=await this.request("/z3/{bucketName}/{objectPath+}","post",J.bind(this))({action:"upload",bucketName:e,"objectPath+":t});await fetch(r.signedUrl,{method:"PUT",body:s})}async function X({bucketName:e,"objectPath+":t}){const s=await this.request("/z3/{bucketName}/{objectPath+}","post",J.bind(this))({action:"download",bucketName:e,"objectPath+":t}),r=await fetch(s.signedUrl,{method:"GET"});if(!r.ok)throw new Error("Failed to download file");return r.arrayBuffer()}async function Z(e){let s,r;const i=new URL(e.url);if("z3:"===i.protocol){const e=i.pathname.split("/").slice(1);s=i.hostname,r=e.join("/")}else{if(!i.href.startsWith(this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"))throw new t({message:"Invalid Z3 URL",code:400});{const e=i.pathname.split("/").slice(3);s=e[0],r=e.slice(1).join("/")}}const n={action:"upload",bucketName:s,"objectPath+":r};return this.request("/z3/{bucketName}/{objectPath+}","post",J.bind(this))(n)}class K extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}uploadFile=W;downloadFile=X;getPresignedUrlForZ3Url=Z;listBuckets(e){return this.request("/z3","get",this.#e.bind(this))(e)}createBucket(e,t){return this.request("/z3/{bucketName}","put",this.#e.bind(this))(e,t)}deleteBucket(e,t){return this.request("/z3/{bucketName}","delete",this.#e.bind(this))(e,t)}listObjects(e,t){return this.request("/z3/{bucketName}/{objectPath+}","get",this.#e.bind(this))(e,t)}getPresignedUrl(e,t){return this.request("/z3/{bucketName}/{objectPath+}","post",this.#e.bind(this))(e,t)}deleteObject(e,t){return this.request("/z3/{bucketName}/{objectPath+}","delete",this.#e.bind(this))(e,t)}}function Q(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}async function Y({id:e,file:t,filename:s}){const r=await this.request("/zambda/{id}/s3-upload","post",Q.bind(this))({id:e,filename:s});await fetch(r.signedUrl,{method:"PUT",body:t})}class ee extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}uploadFile=Y;list(e){return this.request("/zambda","get",this.#e.bind(this))(e)}create(e,t){return this.request("/zambda","post",this.#e.bind(this))(e,t)}get(e,t){return this.request("/zambda/{id}","get",this.#e.bind(this))(e,t)}update(e,t){return this.request("/zambda/{id}","patch",this.#e.bind(this))(e,t)}delete(e,t){return this.request("/zambda/{id}","delete",this.#e.bind(this))(e,t)}execute(e,t){return this.request("/zambda/{id}/execute","post",this.#e.bind(this))(e,t)}executePublic(e,t){return this.request("/zambda/{id}/execute-public","post",this.#e.bind(this))(e,t)}s3Upload(e,t){return this.request("/zambda/{id}/s3-upload","post",this.#e.bind(this))(e,t)}}class te extends h{constructor(e){super(e)}#e(){return this.config.services?.projectApiUrl??"https://project-api.zapehr.com/v1"}list(e,t){return this.request("/zambda/{id}/logStream","post",this.#e.bind(this))(e,t)}search(e,t){return this.request("/zambda/{id}/logStream/search","post",this.#e.bind(this))(e,t)}get(e,t){return this.request("/zambda/{id}/logStream/{logStreamName}","post",this.#e.bind(this))(e,t)}}let se=class{config;application;developer;m2m;messaging;conversation;transactionalSMS;paymentMethod;charge;project;rcm;role;secret;telemed;user;version;z3;zambda;zambdaLogStream;fax;lab;erx;terminology;fhir;constructor(e){this.config=e,this.config.services??={},this.config.services.projectApiUrl??=e.projectApiUrl,this.config.services.fhirApiUrl??=e.fhirApiUrl,this.application=new c(e),this.developer=new g(e),this.m2m=new N(e),this.messaging=new C(e),this.conversation=new m(e),this.transactionalSMS=new H(e),this.paymentMethod=new M(e),this.charge=new p(e),this.project=new $(e),this.rcm=new L(e),this.role=new _(e),this.secret=new D(e),this.telemed=new V(e),this.user=new G(e),this.version=new B(e),this.z3=new K(e),this.zambda=new ee(e),this.zambdaLogStream=new te(e),this.fax=new U(e),this.lab=new R(e),this.erx=new f(e),this.terminology=new F(e),this.fhir=new O(e)}};class re extends se{static OystehrFHIRError=r;static OystehrSdkError=t}export{re as default};
|
|
2
2
|
//# sourceMappingURL=index.min.js.map
|