@oystehr/sdk 3.0.3 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/cjs/index.cjs +9 -2
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/cjs/index.min.cjs +1 -1
  4. package/dist/cjs/index.min.cjs.map +1 -1
  5. package/dist/cjs/resources/classes/erx.d.ts +5 -1
  6. package/dist/cjs/resources/types/ErxMedicationSearchV2Params.d.ts +4 -0
  7. package/dist/cjs/resources/types/ErxMedicationSearchV2Response.d.ts +38 -0
  8. package/dist/cjs/resources/types/Z3ListObjectsParams.d.ts +1 -0
  9. package/dist/cjs/resources/types/index.d.ts +2 -0
  10. package/dist/cjs/tests/setup/constants.d.ts +1 -1
  11. package/dist/esm/index.min.js +1 -1
  12. package/dist/esm/index.min.js.map +1 -1
  13. package/dist/esm/node_modules/tslib/tslib.es6.js +1 -1
  14. package/dist/esm/node_modules/tslib/tslib.es6.js.map +1 -1
  15. package/dist/esm/resources/classes/erx.d.ts +5 -1
  16. package/dist/esm/resources/classes/erx.js +4 -0
  17. package/dist/esm/resources/classes/erx.js.map +1 -1
  18. package/dist/esm/resources/classes/fhir-ext.js +4 -1
  19. package/dist/esm/resources/classes/fhir-ext.js.map +1 -1
  20. package/dist/esm/resources/types/ErxMedicationSearchV2Params.d.ts +4 -0
  21. package/dist/esm/resources/types/ErxMedicationSearchV2Response.d.ts +38 -0
  22. package/dist/esm/resources/types/Z3ListObjectsParams.d.ts +1 -0
  23. package/dist/esm/resources/types/index.d.ts +2 -0
  24. package/dist/esm/tests/setup/constants.d.ts +1 -1
  25. package/package.json +1 -1
  26. package/src/resources/classes/erx.ts +9 -0
  27. package/src/resources/classes/fhir-ext.ts +5 -2
  28. package/src/resources/types/ErxMedicationSearchV2Params.ts +6 -0
  29. package/src/resources/types/ErxMedicationSearchV2Response.ts +40 -0
  30. package/src/resources/types/Z3ListObjectsParams.ts +1 -0
  31. package/src/resources/types/index.ts +2 -0
@@ -1,4 +1,4 @@
1
- import { ErxAllergySearchParams, ErxAllergySearchResponse, ErxMedicationSearchParams, ErxMedicationSearchResponse, ErxSyncPatientParams, ErxSyncPatientResponse, OystehrClientRequest } from '../..';
1
+ import { ErxAllergySearchParams, ErxAllergySearchResponse, ErxMedicationSearchParams, ErxMedicationSearchResponse, ErxMedicationSearchV2Params, ErxMedicationSearchV2Response, ErxSyncPatientParams, ErxSyncPatientResponse, OystehrClientRequest } from '../..';
2
2
  import { SDKResource } from '../../client/client';
3
3
  import { OystehrConfig } from '../../config';
4
4
  export declare class Erx extends SDKResource {
@@ -15,4 +15,8 @@ export declare class Erx extends SDKResource {
15
15
  * Search for medications. Provide at least one of code or name filters
16
16
  */
17
17
  medicationSearch: (params: ErxMedicationSearchParams, request?: OystehrClientRequest) => Promise<ErxMedicationSearchResponse>;
18
+ /**
19
+ * Search for medications. Provide at least one of code or name filters
20
+ */
21
+ medicationSearchV2: (params: ErxMedicationSearchV2Params, request?: OystehrClientRequest) => Promise<ErxMedicationSearchV2Response>;
18
22
  }
@@ -0,0 +1,4 @@
1
+ export interface ErxMedicationSearchV2Params {
2
+ name?: string;
3
+ code?: string;
4
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Medications
3
+ */
4
+ export interface ErxMedicationSearchV2Response {
5
+ medications?: {
6
+ /**
7
+ * Internal identifier for the medication.
8
+ */
9
+ id: string;
10
+ /**
11
+ * Human readible name of medication.
12
+ */
13
+ name: string;
14
+ codes: {
15
+ /**
16
+ * RxNorm Concept Unique (RxCUI) identifier of medication.
17
+ */
18
+ rxcui?: string | null;
19
+ productNDC?: string | null;
20
+ packageNDC?: string | null;
21
+ SKU?: string | null;
22
+ HCPCS?: string | null;
23
+ };
24
+ /**
25
+ * Null implies a medication can not be prescribed
26
+ */
27
+ type?: ('RX' | 'OTC') | null;
28
+ concept?: ('DRUG' | 'PRODUCT' | 'PACKAGE') | null;
29
+ schedule?: ('I' | 'II' | 'III' | 'IV' | 'V') | null;
30
+ controlled?: boolean | null;
31
+ brandName?: string | null;
32
+ genericName?: string | null;
33
+ strength?: string | null;
34
+ form?: string | null;
35
+ manufacturer?: string | null;
36
+ description?: string | null;
37
+ }[];
38
+ }
@@ -1,4 +1,5 @@
1
1
  export interface Z3ListObjectsParams {
2
2
  bucketName: string;
3
3
  'objectPath+': string;
4
+ direct?: boolean;
4
5
  }
@@ -97,6 +97,8 @@ export * from './ErxAllergySearchParams';
97
97
  export * from './ErxAllergySearchResponse';
98
98
  export * from './ErxMedicationSearchParams';
99
99
  export * from './ErxMedicationSearchResponse';
100
+ export * from './ErxMedicationSearchV2Params';
101
+ export * from './ErxMedicationSearchV2Response';
100
102
  export * from './RoleListResponse';
101
103
  export * from './RoleCreateParams';
102
104
  export * from './RoleCreateResponse';
@@ -3,7 +3,7 @@ export declare const projectId = "eb1306aa-fba5-416a-a2a4-6b69eca58d87";
3
3
  export declare const FHIR_API_URL = "http://localhost:3030/dev";
4
4
  export declare const PLATFORM_API_URL = "http://localhost:3031/dev";
5
5
  export declare const PROJECT_API_URL = "http://localhost:3032/dev";
6
- export declare const FHIR_VERSION: import("@zapehr/core").FhirVersion;
6
+ export declare const FHIR_VERSION: any;
7
7
  export declare const config: {
8
8
  accessToken: string;
9
9
  projectId: string;
@@ -1,2 +1,2 @@
1
- import{v4 as e}from"uuid";class t extends Error{constructor({message:e,code:s}){super(e),Object.setPrototypeOf(this,t.prototype),this.code=s,this.name="OystehrSdkError"}toString(){return`${this.name}: ${this.message} (code: ${this.code})`}}function s(e){var t;const s=[];for(const i of null!==(t=e.issue)&&void 0!==t?t:[])i.details&&i.details.text&&s.push(i.details.text);return s.length||s.push("Unknown FHIR error"),s.join(",")}class i extends t{constructor({error:e,code:t}){super({message:s(e),code:t}),Object.setPrototypeOf(this,i.prototype),this.cause=e,this.name="OystehrFHIRError"}}function r(e,t,s,i){return new(s||(s=Promise))((function(r,n){function o(e){try{u(i.next(e))}catch(e){n(e)}}function c(e){try{u(i.throw(e))}catch(e){n(e)}}function u(e){var t;e.done?r(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(o,c)}u((i=i.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const n="https://project-api.zapehr.com/v1",o=[408,429,500,502,503,504],c=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT","UND_ERR_CONNECT_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_SOCKET"];class u{constructor(e){this.config=e}request(e,s){return(i,o)=>r(this,void 0,void 0,(function*(){const r=()=>{var e;return null!==(e=this.config.projectApiUrl)&&void 0!==e?e:n},c=()=>this.config;try{return yield h(r,c,e,s)(i,o)}catch(e){const s=e;throw new t({message:s.message,code:s.code})}}))}fhirRequest(e,s){return(n,o)=>r(this,void 0,void 0,(function*(){try{const t=()=>{var e;return null!==(e=this.config.fhirApiUrl)&&void 0!==e?e:"https://fhir-api.zapehr.com"},i=()=>this.config;return yield h(t,i,e,s)(n,o)}catch(e){const s=e;if("string"==typeof s.message)throw new t({message:s.message,code:s.code});throw new i({error:s.message,code:s.code})}}))}}function a(e){return"accessToken"in e}function h(s,i,n,u){return(h,d)=>r(this,void 0,void 0,(function*(){var p,m,f,v,g,y,q,b,j,O,w;const x=h&&!d&&!Array.isArray(h)&&a(h)?{}:null!==(p=h)&&void 0!==p?p:{},E=h&&!d&&!Array.isArray(h)&&a(h)?h:d,T=u.toLowerCase(),S=i(),k=null!==(m=S.fetch)&&void 0!==m?m:fetch,R=null!==(f=null==E?void 0:E.accessToken)&&void 0!==f?f:S.accessToken,U=null!==(v=null==E?void 0:E.projectId)&&void 0!==v?v:i().projectId;let N=n,P=x;if(!Array.isArray(x)){const[e,s]=function(e,s){const i=Object.assign({},s),r=e.replace(/\{([^}]+)\}/g,((e,r)=>{if(delete i[r],r.match(/^.*\+$/))return s[r]+"";if(!s[r]||""===s[r])throw new t({message:`Required path parameter is an empty string: ${r}`,code:400});return s[r]?encodeURIComponent(s[r]+""):""})),n=Object.keys(i),o=n.length?n.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:i[t]})),{}):{};return[r,o]}(n,x);N=e,P=s}N=N.replace(/^\//,"");const z=s(),I=z.endsWith("/")?z:z+"/",$=new URL(N,I);let A;if(Array.isArray(P))A=JSON.stringify(P);else if(Object.keys(P).length)if("get"===T)l(P,$.searchParams);else if("application/x-www-form-urlencoded"===(null==E?void 0:E.contentType)){const e=new URLSearchParams;l(P,e),A=e.toString()}else A=JSON.stringify(P);else"application/x-www-form-urlencoded"!==(null==E?void 0:E.contentType)&&"post"===T&&(A="{}");const C=Object.assign(U?{"x-zapehr-project-id":U,"x-oystehr-project-id":U}:{},{"content-type":null!==(g=null==E?void 0:E.contentType)&&void 0!==g?g:"application/json"},R?{Authorization:`Bearer ${R}`}:{},(null==E?void 0:E.ifMatch)?{"If-Match":E.ifMatch}:{},{"x-oystehr-request-id":null!==(y=null==E?void 0:E.requestId)&&void 0!==y?y:e()}),_={retries:null!==(b=null===(q=S.retry)||void 0===q?void 0:q.retries)&&void 0!==b?b:3,onRetry:null===(j=S.retry)||void 0===j?void 0:j.onRetry,retryOn:[...null!==(w=null===(O=S.retry)||void 0===O?void 0:O.retryOn)&&void 0!==w?w:[],...o]};return _.retryOn.push(...o),function(e,t){var s,i;return r(this,void 0,void 0,(function*(){let r;for(const n of Array.from({length:(null!==(s=t.retries)&&void 0!==s?s:0)+1},((e,t)=>t)))try{return yield e(n)}catch(e){let s=!1;if("response"in e){const i=e;s=t.retryOn.includes(i.code),r={message:e.message,code:e.code}}else if(r=e,"code"in e&&"string"==typeof e.code){const t=e;s=c.includes(t.code)}if(!s)break;t.onRetry&&n!==(null!==(i=t.retries)&&void 0!==i?i:0)&&t.onRetry(n+1)}throw r}))}((e=>r(this,void 0,void 0,(function*(){var t,s,i,r,n,o;const c=yield k(new Request($,{method:T.toUpperCase(),body:A,headers:C})),u=c.body?yield c.text():null;let a;try{a=u&&((null===(t=c.headers.get("content-type"))||void 0===t?void 0:t.includes("application/json"))||(null===(s=c.headers.get("content-type"))||void 0===s?void 0:s.includes("application/fhir+json")))?JSON.parse(u):null}catch(e){a=null}if(!c.ok||c.status>=400){C["x-oystehr-fetch-attempts"]=`${e}`;throw{message:null!==(n=null!==(r=null!==(i=null==a?void 0:a.message)&&void 0!==i?i:a)&&void 0!==r?r:u)&&void 0!==n?n:c.statusText,code:null!==(o=null==a?void 0:a.code)&&void 0!==o?o:c.status,response:c}}return a}))),_)}))}function l(e,t){for(const[s,i]of Object.entries(e))Array.isArray(i)?i.forEach((e=>t.append(s,e))):t.append(s,i)}class d extends u{constructor(e){super(e),this.list=e=>this.request("/application","get")(e),this.create=(e,t)=>this.request("/application","post")(e,t),this.get=(e,t)=>this.request("/application/{id}","get")(e,t),this.update=(e,t)=>this.request("/application/{id}","patch")(e,t),this.delete=(e,t)=>this.request("/application/{id}","delete")(e,t),this.rotateSecret=(e,t)=>this.request("/application/{id}/rotate-secret","post")(e,t),this.revokeRefreshToken=(e,t)=>this.request("/application/{id}/revoke-refresh-token","post")(e,t),this.revokeAccessToken=(e,t)=>this.request("/application/{id}/revoke-access-token","post")(e,t)}}class p extends u{constructor(e){super(e),this.issue=(e,t)=>this.request("/payment/charge/issue","post")(e,t),this.status=(e,t)=>this.request("/payment/charge/status","post")(e,t)}}const m="https://extensions.fhir.zapehr.com/encounter-virtual-service-pre-release",f="addressString";function v(e){var t,s,i;if(function(e){return Object.hasOwn(e,"virtualService")}(e)){const s=null===(t=e.virtualService)||void 0===t?void 0:t.find((e=>{var t;return"https://fhir.zapehr.com/virtual-service-type"===(null===(t=e.channelType)||void 0===t?void 0:t.system)}));return null==s?void 0:s.addressString}if(!e.extension)return;const r=e.extension.find((e=>e.url===m));if(!(null==r?void 0:r.extension))return;return null===(i=null===(s=r.extension)||void 0===s?void 0:s.find((e=>e.url===f)))||void 0===i?void 0:i.valueString}class g extends u{constructor(e){super(e),this.ENCOUNTER_VS_EXTENSION_URL=m,this.ENCOUNTER_VS_EXTENSION_RELATIVE_URL=f,this.getConversationIdFromEncounter=v,this.create=(e,t)=>this.request("/messaging/conversation","post")(e,t),this.getToken=e=>this.request("/messaging/conversation/token","get")(e),this.addParticipant=(e,t)=>this.request("/messaging/conversation/{conversationId}/participant","post")(e,t),this.removeParticipant=(e,t)=>this.request("/messaging/conversation/{conversationId}/participant","delete")(e,t),this.message=(e,t)=>this.request("/messaging/conversation/{conversationId}/message","post")(e,t)}}class y extends u{constructor(e){super(e),this.get=(e,t)=>this.request("/developer/{id}","get")(e,t),this.update=(e,t)=>this.request("/developer/{id}","patch")(e,t),this.delete=(e,t)=>this.request("/developer/{id}","delete")(e,t),this.invite=(e,t)=>this.request("/developer/invite","post")(e,t),this.list=e=>this.request("/developer","get")(e),this.listV2=(e,t)=>this.request("/developer/v2/list","get")(e,t)}}class q extends u{constructor(e){super(e),this.syncPatient=(e,t)=>this.request("/erx/sync-patient/{patientId}","post")(e,t),this.allergySearch=(e,t)=>this.request("/erx/allergy/search","get")(e,t),this.medicationSearch=(e,t)=>this.request("/erx/medication/search","get")(e,t)}}function b(e,t){return r(this,void 0,void 0,(function*(){const{resourceType:s,params:i}=e;let r;i&&(r=Object.entries(i).reduce(((e,[t,s])=>(e[s.name]||(e[s.name]=[]),e[s.name].push(s.value),e)),{}));const n=yield this.fhirRequest(`/${s}/_search`,"POST")(r,Object.assign(Object.assign({},t),{contentType:"application/x-www-form-urlencoded"}));return Object.assign(Object.assign({},n),{entry:n.entry,unbundle:function(){var e,t;return null!==(t=null===(e=this.entry)||void 0===e?void 0:e.map((e=>e.resource)).filter((e=>void 0!==e)))&&void 0!==t?t:[]}})}))}function j(e,t){return r(this,void 0,void 0,(function*(){const{resourceType:s}=e;return this.fhirRequest(`/${s}`,"POST")(e,t)}))}function O({resourceType:e,id:t},s){return r(this,void 0,void 0,(function*(){return this.fhirRequest(`/${e}/${t}`,"GET")({},s)}))}function w(e,t){return r(this,void 0,void 0,(function*(){const{id:s,resourceType:i}=e;return this.fhirRequest(`/${i}/${s}`,"PUT")(e,Object.assign(Object.assign({},t),{ifMatch:(null==t?void 0:t.optimisticLockingVersionId)?`W/"${t.optimisticLockingVersionId}"`:void 0}))}))}function x({resourceType:e,id:t,operations:s},i){return r(this,void 0,void 0,(function*(){return this.fhirRequest(`/${e}/${t}`,"PATCH")(s,Object.assign(Object.assign({},i),{contentType:"application/json-patch+json",ifMatch:(null==i?void 0:i.optimisticLockingVersionId)?`W/"${i.optimisticLockingVersionId}"`:void 0}))}))}function E({resourceType:e,id:t},s){return r(this,void 0,void 0,(function*(){return this.fhirRequest(`/${e}/${t}`,"DELETE")({},s)}))}function T({resourceType:e,id:t,versionId:s},i){return r(this,void 0,void 0,(function*(){return this.fhirRequest(`/${e}/${t}/_history${s?`/${s}`:""}`,"GET")({},i)}))}function S(e){const{method:t,url:s}=e,i={request:{method:t,url:s}};if(s.split("?").length>1){const[e,t]=s.split("?"),r=t.split("&").map((e=>{const[t,s]=e.split("=");return{name:t,value:s}})).reduce(((e,{name:t,value:s})=>(e[t]=s,e)),{}),n=new URLSearchParams;l(r,n),i.request.url=`${e}?${n.toString()}`}if(["GET","DELETE","HEAD"].includes(t))return i;if("PUT"===t){const{resource:t}=e;return Object.assign(Object.assign({},i),{resource:t})}if("PATCH"===t)return"resource"in e?Object.assign(Object.assign({},i),{resource:e.resource}):Object.assign(Object.assign({},i),{resource:{resourceType:"Binary",contentType:"application/json-patch+json",data:Buffer.from(JSON.stringify(e.operations),"utf8").toString("base64")}});if("POST"===t){const{resource:t,fullUrl:s}=e;return Object.assign(Object.assign({},i),{resource:t,fullUrl:s})}throw new Error("Unrecognized method")}function k(e){return function(t,s){return r(this,void 0,void 0,(function*(){return this.fhirRequest("/","POST")({resourceType:"Bundle",type:e,entry:t.requests.map(S)},s)}))}}const R=k("batch"),U=k("transaction");function N(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&&((null==t?void 0:t.all)||(null==t?void 0:t.use))&&s.push("["+e.use+"]"),s.join((null==t?void 0:t.lineSeparator)||", ").trim()}function P(e,t){const s=[];return e.prefix&&!1!==(null==t?void 0:t.prefix)&&s.push(...e.prefix),e.given&&s.push(...e.given),e.family&&s.push(e.family),e.suffix&&!1!==(null==t?void 0:t.suffix)&&s.push(...e.suffix),e.use&&((null==t?void 0:t.all)||(null==t?void 0:t.use))&&s.push("["+e.use+"]"),s.join(" ").trim()}class z extends u{constructor(e){super(e),this.search=b,this.create=j,this.get=O,this.update=w,this.patch=x,this.delete=E,this.history=T,this.batch=R,this.transaction=U,this.formatAddress=N,this.formatHumanName=P}}class I extends u{constructor(e){super(e),this.list=e=>this.request("/m2m","get")(e),this.create=(e,t)=>this.request("/m2m","post")(e,t),this.get=(e,t)=>this.request("/m2m/{id}","get")(e,t),this.update=(e,t)=>this.request("/m2m/{id}","patch")(e,t),this.delete=(e,t)=>this.request("/m2m/{id}","delete")(e,t),this.rotateSecret=(e,t)=>this.request("/m2m/{id}/rotate-secret","post")(e,t),this.listV2=(e,t)=>this.request("/m2m/v2/list","get")(e,t)}}class $ extends u{constructor(e){super(e),this.getMessagingConfig=e=>this.request("/messaging/config","get")(e)}}class A extends u{constructor(e){super(e),this.setUp=(e,t)=>this.request("/payment/payment-method/setup","post")(e,t),this.setDefault=(e,t)=>this.request("/payment/payment-method/set-default","post")(e,t),this.delete=(e,t)=>this.request("/payment/payment-method","delete")(e,t),this.list=(e,t)=>this.request("/payment/payment-method/list","post")(e,t)}}class C extends u{constructor(e){super(e),this.get=e=>this.request("/project","get")(e),this.update=(e,t)=>this.request("/project","patch")(e,t)}}class _ extends u{constructor(e){super(e),this.eligibilityCheck=(e,t)=>this.request("/rcm/eligibility-check","post")(e,t),this.validateProfessionalClaim=(e,t)=>this.request("/rcm/professional-claim/validate","post")(e,t),this.submitProfessionalClaim=(e,t)=>this.request("/rcm/professional-claim/submit","post")(e,t)}}class L extends u{constructor(e){super(e),this.list=e=>this.request("/iam/role","get")(e),this.create=(e,t)=>this.request("/iam/role","post")(e,t),this.get=(e,t)=>this.request("/iam/role/{roleId}","get")(e,t),this.update=(e,t)=>this.request("/iam/role/{roleId}","patch")(e,t),this.delete=(e,t)=>this.request("/iam/role/{roleId}","delete")(e,t)}}class M extends u{constructor(e){super(e),this.list=e=>this.request("/secret","get")(e),this.set=(e,t)=>this.request("/secret","post")(e,t),this.get=(e,t)=>this.request("/secret/{name}","get")(e,t),this.delete=(e,t)=>this.request("/secret/{name}","delete")(e,t)}}class D extends u{constructor(e){super(e),this.createMeeting=(e,t)=>this.request("/telemed/v2/meeting","post")(e,t),this.joinMeeting=(e,t)=>this.request("/telemed/v2/meeting/{encounterId}/join","get")(e,t)}}class F extends u{constructor(e){super(e),this.send=(e,t)=>this.request("/messaging/transactional-sms/send","post")(e,t)}}class V extends u{constructor(e){super(e),this.me=e=>this.request("/user/me","get")(e),this.get=(e,t)=>this.request("/user/{id}","get")(e,t),this.update=(e,t)=>this.request("/user/{id}","patch")(e,t),this.delete=(e,t)=>this.request("/user/{id}","delete")(e,t),this.invite=(e,t)=>this.request("/user/invite","post")(e,t),this.list=e=>this.request("/user","get")(e),this.listV2=(e,t)=>this.request("/user/v2/list","get")(e,t)}}class H extends u{constructor(e){super(e),this.get=e=>this.request("/version","get")(e)}}function B({bucketName:e,"objectPath+":t,file:s}){return r(this,void 0,void 0,(function*(){const i=yield this.request("/z3/{bucketName}/{objectPath+}","post")({action:"upload",bucketName:e,"objectPath+":t});yield fetch(i.signedUrl,{method:"PUT",body:s})}))}function G({bucketName:e,"objectPath+":t}){return r(this,void 0,void 0,(function*(){const s=yield this.request("/z3/{bucketName}/{objectPath+}","post")({action:"download",bucketName:e,"objectPath+":t}),i=yield fetch(s.signedUrl,{method:"GET"});if(!i.ok)throw new Error("Failed to download file");return i.arrayBuffer()}))}function J(e){var s;return r(this,void 0,void 0,(function*(){let i,r;const o=new URL(e.url);if("z3:"===o.protocol){const e=o.pathname.split("/").slice(1);i=o.hostname,r=e.join("/")}else{if(!o.href.startsWith(null!==(s=this.config.projectApiUrl)&&void 0!==s?s:n))throw new t({message:"Invalid Z3 URL",code:400});{const e=o.pathname.split("/").slice(3);i=e[0],r=e.slice(1).join("/")}}const c={action:"upload",bucketName:i,"objectPath+":r};return this.request("/z3/{bucketName}/{objectPath+}","post")(c)}))}class W extends u{constructor(e){super(e),this.uploadFile=B,this.downloadFile=G,this.getPresignedUrlForZ3Url=J,this.listBuckets=e=>this.request("/z3","get")(e),this.createBucket=(e,t)=>this.request("/z3/{bucketName}","put")(e,t),this.deleteBucket=(e,t)=>this.request("/z3/{bucketName}","delete")(e,t),this.listObjects=(e,t)=>this.request("/z3/{bucketName}/{objectPath+}","get")(e,t),this.getPresignedUrl=(e,t)=>this.request("/z3/{bucketName}/{objectPath+}","post")(e,t),this.deleteObject=(e,t)=>this.request("/z3/{bucketName}/{objectPath+}","delete")(e,t)}}function X({id:e,file:t,filename:s}){return r(this,void 0,void 0,(function*(){const i=yield this.request("/zambda/{id}/s3-upload","post")({id:e,filename:s});yield fetch(i.signedUrl,{method:"PUT",body:t})}))}class Z extends u{constructor(e){super(e),this.uploadFile=X,this.list=e=>this.request("/zambda","get")(e),this.create=(e,t)=>this.request("/zambda","post")(e,t),this.get=(e,t)=>this.request("/zambda/{id}","get")(e,t),this.update=(e,t)=>this.request("/zambda/{id}","patch")(e,t),this.delete=(e,t)=>this.request("/zambda/{id}","delete")(e,t),this.execute=(e,t)=>this.request("/zambda/{id}/execute","post")(e,t),this.executePublic=(e,t)=>this.request("/zambda/{id}/execute-public","post")(e,t),this.s3Upload=(e,t)=>this.request("/zambda/{id}/s3-upload","post")(e,t)}}class K extends u{constructor(e){super(e),this.list=(e,t)=>this.request("/zambda/{id}/logStream","post")(e,t),this.search=(e,t)=>this.request("/zambda/{id}/logStream/search","post")(e,t),this.get=(e,t)=>this.request("/zambda/{id}/logStream/{logStreamName}","post")(e,t)}}let Q=class{constructor(e){this.config=e,this.application=new d(e),this.developer=new y(e),this.m2m=new I(e),this.messaging=new $(e),this.conversation=new g(e),this.transactionalSMS=new F(e),this.paymentMethod=new A(e),this.charge=new p(e),this.project=new C(e),this.rcm=new _(e),this.erx=new q(e),this.role=new L(e),this.secret=new M(e),this.telemed=new D(e),this.user=new V(e),this.version=new H(e),this.z3=new W(e),this.zambda=new Z(e),this.zambdaLogStream=new K(e),this.fhir=new z(e)}};class Y extends Q{}Y.OystehrFHIRError=i,Y.OystehrSdkError=t;export{Y as default};
1
+ import{v4 as e}from"uuid";class t extends Error{constructor({message:e,code:s}){super(e),Object.setPrototypeOf(this,t.prototype),this.code=s,this.name="OystehrSdkError"}toString(){return`${this.name}: ${this.message} (code: ${this.code})`}}function s(e){var t;const s=[];for(const i of null!==(t=e.issue)&&void 0!==t?t:[])i.details&&i.details.text&&s.push(i.details.text);return s.length||s.push("Unknown FHIR error"),s.join(",")}class i extends t{constructor({error:e,code:t}){super({message:s(e),code:t}),Object.setPrototypeOf(this,i.prototype),this.cause=e,this.name="OystehrFHIRError"}}function r(e,t,s,i){return new(s||(s=Promise))((function(r,n){function o(e){try{u(i.next(e))}catch(e){n(e)}}function c(e){try{u(i.throw(e))}catch(e){n(e)}}function u(e){var t;e.done?r(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(o,c)}u((i=i.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const n="https://project-api.zapehr.com/v1",o=[408,429,500,502,503,504],c=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT","UND_ERR_CONNECT_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_SOCKET"];class u{constructor(e){this.config=e}request(e,s){return(i,o)=>r(this,void 0,void 0,(function*(){const r=()=>{var e;return null!==(e=this.config.projectApiUrl)&&void 0!==e?e:n},c=()=>this.config;try{return yield h(r,c,e,s)(i,o)}catch(e){const s=e;throw new t({message:s.message,code:s.code})}}))}fhirRequest(e,s){return(n,o)=>r(this,void 0,void 0,(function*(){try{const t=()=>{var e;return null!==(e=this.config.fhirApiUrl)&&void 0!==e?e:"https://fhir-api.zapehr.com"},i=()=>this.config;return yield h(t,i,e,s)(n,o)}catch(e){const s=e;if("string"==typeof s.message)throw new t({message:s.message,code:s.code});throw new i({error:s.message,code:s.code})}}))}}function a(e){return"accessToken"in e}function h(s,i,n,u){return(h,d)=>r(this,void 0,void 0,(function*(){var p,m,f,v,g,y,q,b,j,O,w;const x=h&&!d&&!Array.isArray(h)&&a(h)?{}:null!==(p=h)&&void 0!==p?p:{},E=h&&!d&&!Array.isArray(h)&&a(h)?h:d,T=u.toLowerCase(),S=i(),k=null!==(m=S.fetch)&&void 0!==m?m:fetch,R=null!==(f=null==E?void 0:E.accessToken)&&void 0!==f?f:S.accessToken,U=null!==(v=null==E?void 0:E.projectId)&&void 0!==v?v:i().projectId;let N=n,P=x;if(!Array.isArray(x)){const[e,s]=function(e,s){const i=Object.assign({},s),r=e.replace(/\{([^}]+)\}/g,((e,r)=>{if(delete i[r],r.match(/^.*\+$/))return s[r]+"";if(!s[r]||""===s[r])throw new t({message:`Required path parameter is an empty string: ${r}`,code:400});return s[r]?encodeURIComponent(s[r]+""):""})),n=Object.keys(i),o=n.length?n.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:i[t]})),{}):{};return[r,o]}(n,x);N=e,P=s}N=N.replace(/^\//,"");const z=s(),I=z.endsWith("/")?z:z+"/",$=new URL(N,I);let A;if(Array.isArray(P))A=JSON.stringify(P);else if(Object.keys(P).length)if("get"===T)l(P,$.searchParams);else if("application/x-www-form-urlencoded"===(null==E?void 0:E.contentType)){const e=new URLSearchParams;l(P,e),A=e.toString()}else A=JSON.stringify(P);else"application/x-www-form-urlencoded"!==(null==E?void 0:E.contentType)&&"post"===T&&(A="{}");const C=Object.assign(U?{"x-zapehr-project-id":U,"x-oystehr-project-id":U}:{},{"content-type":null!==(g=null==E?void 0:E.contentType)&&void 0!==g?g:"application/json"},R?{Authorization:`Bearer ${R}`}:{},(null==E?void 0:E.ifMatch)?{"If-Match":E.ifMatch}:{},{"x-oystehr-request-id":null!==(y=null==E?void 0:E.requestId)&&void 0!==y?y:e()}),_={retries:null!==(b=null===(q=S.retry)||void 0===q?void 0:q.retries)&&void 0!==b?b:3,onRetry:null===(j=S.retry)||void 0===j?void 0:j.onRetry,retryOn:[...null!==(w=null===(O=S.retry)||void 0===O?void 0:O.retryOn)&&void 0!==w?w:[],...o]};return _.retryOn.push(...o),function(e,t){var s,i;return r(this,void 0,void 0,(function*(){let r;for(const n of Array.from({length:(null!==(s=t.retries)&&void 0!==s?s:0)+1},((e,t)=>t)))try{return yield e(n)}catch(e){let s=!1;if("response"in e){const i=e;s=t.retryOn.includes(i.code),r={message:e.message,code:e.code}}else if(r=e,"code"in e&&"string"==typeof e.code){const t=e;s=c.includes(t.code)}if(!s)break;t.onRetry&&n!==(null!==(i=t.retries)&&void 0!==i?i:0)&&t.onRetry(n+1)}throw r}))}((e=>r(this,void 0,void 0,(function*(){var t,s,i,r,n,o;const c=yield k(new Request($,{method:T.toUpperCase(),body:A,headers:C})),u=c.body?yield c.text():null;let a;try{a=u&&((null===(t=c.headers.get("content-type"))||void 0===t?void 0:t.includes("application/json"))||(null===(s=c.headers.get("content-type"))||void 0===s?void 0:s.includes("application/fhir+json")))?JSON.parse(u):null}catch(e){a=null}if(!c.ok||c.status>=400){C["x-oystehr-fetch-attempts"]=`${e}`;throw{message:null!==(n=null!==(r=null!==(i=null==a?void 0:a.message)&&void 0!==i?i:a)&&void 0!==r?r:u)&&void 0!==n?n:c.statusText,code:null!==(o=null==a?void 0:a.code)&&void 0!==o?o:c.status,response:c}}return a}))),_)}))}function l(e,t){for(const[s,i]of Object.entries(e))Array.isArray(i)?i.forEach((e=>t.append(s,e))):t.append(s,i)}class d extends u{constructor(e){super(e),this.list=e=>this.request("/application","get")(e),this.create=(e,t)=>this.request("/application","post")(e,t),this.get=(e,t)=>this.request("/application/{id}","get")(e,t),this.update=(e,t)=>this.request("/application/{id}","patch")(e,t),this.delete=(e,t)=>this.request("/application/{id}","delete")(e,t),this.rotateSecret=(e,t)=>this.request("/application/{id}/rotate-secret","post")(e,t),this.revokeRefreshToken=(e,t)=>this.request("/application/{id}/revoke-refresh-token","post")(e,t),this.revokeAccessToken=(e,t)=>this.request("/application/{id}/revoke-access-token","post")(e,t)}}class p extends u{constructor(e){super(e),this.issue=(e,t)=>this.request("/payment/charge/issue","post")(e,t),this.status=(e,t)=>this.request("/payment/charge/status","post")(e,t)}}const m="https://extensions.fhir.zapehr.com/encounter-virtual-service-pre-release",f="addressString";function v(e){var t,s,i;if(function(e){return Object.hasOwn(e,"virtualService")}(e)){const s=null===(t=e.virtualService)||void 0===t?void 0:t.find((e=>{var t;return"https://fhir.zapehr.com/virtual-service-type"===(null===(t=e.channelType)||void 0===t?void 0:t.system)}));return null==s?void 0:s.addressString}if(!e.extension)return;const r=e.extension.find((e=>e.url===m));if(!(null==r?void 0:r.extension))return;return null===(i=null===(s=r.extension)||void 0===s?void 0:s.find((e=>e.url===f)))||void 0===i?void 0:i.valueString}class g extends u{constructor(e){super(e),this.ENCOUNTER_VS_EXTENSION_URL=m,this.ENCOUNTER_VS_EXTENSION_RELATIVE_URL=f,this.getConversationIdFromEncounter=v,this.create=(e,t)=>this.request("/messaging/conversation","post")(e,t),this.getToken=e=>this.request("/messaging/conversation/token","get")(e),this.addParticipant=(e,t)=>this.request("/messaging/conversation/{conversationId}/participant","post")(e,t),this.removeParticipant=(e,t)=>this.request("/messaging/conversation/{conversationId}/participant","delete")(e,t),this.message=(e,t)=>this.request("/messaging/conversation/{conversationId}/message","post")(e,t)}}class y extends u{constructor(e){super(e),this.get=(e,t)=>this.request("/developer/{id}","get")(e,t),this.update=(e,t)=>this.request("/developer/{id}","patch")(e,t),this.delete=(e,t)=>this.request("/developer/{id}","delete")(e,t),this.invite=(e,t)=>this.request("/developer/invite","post")(e,t),this.list=e=>this.request("/developer","get")(e),this.listV2=(e,t)=>this.request("/developer/v2/list","get")(e,t)}}class q extends u{constructor(e){super(e),this.syncPatient=(e,t)=>this.request("/erx/sync-patient/{patientId}","post")(e,t),this.allergySearch=(e,t)=>this.request("/erx/allergy/search","get")(e,t),this.medicationSearch=(e,t)=>this.request("/erx/medication/search","get")(e,t),this.medicationSearchV2=(e,t)=>this.request("/erx/v2/medication/search","get")(e,t)}}function b(e,t){return r(this,void 0,void 0,(function*(){const{resourceType:s,params:i}=e;let r;i&&(r=Object.entries(i).reduce(((e,[t,s])=>(e[s.name]||(e[s.name]=[]),e[s.name].push(s.value),e)),{}));const n=yield this.fhirRequest(`/${s}/_search`,"POST")(r,Object.assign(Object.assign({},t),{contentType:"application/x-www-form-urlencoded"}));return Object.assign(Object.assign({},n),{entry:n.entry,unbundle:function(){var e,t;return null!==(t=null===(e=this.entry)||void 0===e?void 0:e.map((e=>e.resource)).filter((e=>void 0!==e)))&&void 0!==t?t:[]}})}))}function j(e,t){return r(this,void 0,void 0,(function*(){const{resourceType:s}=e;return this.fhirRequest(`/${s}`,"POST")(e,t)}))}function O({resourceType:e,id:t},s){return r(this,void 0,void 0,(function*(){return this.fhirRequest(`/${e}/${t}`,"GET")({},s)}))}function w(e,t){return r(this,void 0,void 0,(function*(){const{id:s,resourceType:i}=e;return this.fhirRequest(`/${i}/${s}`,"PUT")(e,Object.assign(Object.assign({},t),{ifMatch:(null==t?void 0:t.optimisticLockingVersionId)?`W/"${t.optimisticLockingVersionId}"`:void 0}))}))}function x({resourceType:e,id:t,operations:s},i){return r(this,void 0,void 0,(function*(){return this.fhirRequest(`/${e}/${t}`,"PATCH")(s,Object.assign(Object.assign({},i),{contentType:"application/json-patch+json",ifMatch:(null==i?void 0:i.optimisticLockingVersionId)?`W/"${i.optimisticLockingVersionId}"`:void 0}))}))}function E({resourceType:e,id:t},s){return r(this,void 0,void 0,(function*(){return this.fhirRequest(`/${e}/${t}`,"DELETE")({},s)}))}function T({resourceType:e,id:t,versionId:s},i){return r(this,void 0,void 0,(function*(){return this.fhirRequest(`/${e}/${t}/_history${s?`/${s}`:""}`,"GET")({},i)}))}function S(e){const{method:t,url:s}=e,i={request:{method:t,url:s}};if(s.split("?").length>1){const[e,t]=s.split("?"),r=t.split("&").map((e=>{const[t,s]=e.split("=");return{name:t,value:s}})).reduce(((e,{name:t,value:s})=>(e[t]||(e[t]=[]),e[t].push(s),e)),{}),n=new URLSearchParams;l(r,n),i.request.url=`${e}?${n.toString()}`}if(["GET","DELETE","HEAD"].includes(t))return i;if("PUT"===t){const{resource:t}=e;return Object.assign(Object.assign({},i),{resource:t})}if("PATCH"===t)return"resource"in e?Object.assign(Object.assign({},i),{resource:e.resource}):Object.assign(Object.assign({},i),{resource:{resourceType:"Binary",contentType:"application/json-patch+json",data:Buffer.from(JSON.stringify(e.operations),"utf8").toString("base64")}});if("POST"===t){const{resource:t,fullUrl:s}=e;return Object.assign(Object.assign({},i),{resource:t,fullUrl:s})}throw new Error("Unrecognized method")}function k(e){return function(t,s){return r(this,void 0,void 0,(function*(){return this.fhirRequest("/","POST")({resourceType:"Bundle",type:e,entry:t.requests.map(S)},s)}))}}const R=k("batch"),U=k("transaction");function N(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&&((null==t?void 0:t.all)||(null==t?void 0:t.use))&&s.push("["+e.use+"]"),s.join((null==t?void 0:t.lineSeparator)||", ").trim()}function P(e,t){const s=[];return e.prefix&&!1!==(null==t?void 0:t.prefix)&&s.push(...e.prefix),e.given&&s.push(...e.given),e.family&&s.push(e.family),e.suffix&&!1!==(null==t?void 0:t.suffix)&&s.push(...e.suffix),e.use&&((null==t?void 0:t.all)||(null==t?void 0:t.use))&&s.push("["+e.use+"]"),s.join(" ").trim()}class z extends u{constructor(e){super(e),this.search=b,this.create=j,this.get=O,this.update=w,this.patch=x,this.delete=E,this.history=T,this.batch=R,this.transaction=U,this.formatAddress=N,this.formatHumanName=P}}class I extends u{constructor(e){super(e),this.list=e=>this.request("/m2m","get")(e),this.create=(e,t)=>this.request("/m2m","post")(e,t),this.get=(e,t)=>this.request("/m2m/{id}","get")(e,t),this.update=(e,t)=>this.request("/m2m/{id}","patch")(e,t),this.delete=(e,t)=>this.request("/m2m/{id}","delete")(e,t),this.rotateSecret=(e,t)=>this.request("/m2m/{id}/rotate-secret","post")(e,t),this.listV2=(e,t)=>this.request("/m2m/v2/list","get")(e,t)}}class $ extends u{constructor(e){super(e),this.getMessagingConfig=e=>this.request("/messaging/config","get")(e)}}class A extends u{constructor(e){super(e),this.setUp=(e,t)=>this.request("/payment/payment-method/setup","post")(e,t),this.setDefault=(e,t)=>this.request("/payment/payment-method/set-default","post")(e,t),this.delete=(e,t)=>this.request("/payment/payment-method","delete")(e,t),this.list=(e,t)=>this.request("/payment/payment-method/list","post")(e,t)}}class C extends u{constructor(e){super(e),this.get=e=>this.request("/project","get")(e),this.update=(e,t)=>this.request("/project","patch")(e,t)}}class _ extends u{constructor(e){super(e),this.eligibilityCheck=(e,t)=>this.request("/rcm/eligibility-check","post")(e,t),this.validateProfessionalClaim=(e,t)=>this.request("/rcm/professional-claim/validate","post")(e,t),this.submitProfessionalClaim=(e,t)=>this.request("/rcm/professional-claim/submit","post")(e,t)}}class L extends u{constructor(e){super(e),this.list=e=>this.request("/iam/role","get")(e),this.create=(e,t)=>this.request("/iam/role","post")(e,t),this.get=(e,t)=>this.request("/iam/role/{roleId}","get")(e,t),this.update=(e,t)=>this.request("/iam/role/{roleId}","patch")(e,t),this.delete=(e,t)=>this.request("/iam/role/{roleId}","delete")(e,t)}}class M extends u{constructor(e){super(e),this.list=e=>this.request("/secret","get")(e),this.set=(e,t)=>this.request("/secret","post")(e,t),this.get=(e,t)=>this.request("/secret/{name}","get")(e,t),this.delete=(e,t)=>this.request("/secret/{name}","delete")(e,t)}}class D extends u{constructor(e){super(e),this.createMeeting=(e,t)=>this.request("/telemed/v2/meeting","post")(e,t),this.joinMeeting=(e,t)=>this.request("/telemed/v2/meeting/{encounterId}/join","get")(e,t)}}class V extends u{constructor(e){super(e),this.send=(e,t)=>this.request("/messaging/transactional-sms/send","post")(e,t)}}class F extends u{constructor(e){super(e),this.me=e=>this.request("/user/me","get")(e),this.get=(e,t)=>this.request("/user/{id}","get")(e,t),this.update=(e,t)=>this.request("/user/{id}","patch")(e,t),this.delete=(e,t)=>this.request("/user/{id}","delete")(e,t),this.invite=(e,t)=>this.request("/user/invite","post")(e,t),this.list=e=>this.request("/user","get")(e),this.listV2=(e,t)=>this.request("/user/v2/list","get")(e,t)}}class H extends u{constructor(e){super(e),this.get=e=>this.request("/version","get")(e)}}function B({bucketName:e,"objectPath+":t,file:s}){return r(this,void 0,void 0,(function*(){const i=yield this.request("/z3/{bucketName}/{objectPath+}","post")({action:"upload",bucketName:e,"objectPath+":t});yield fetch(i.signedUrl,{method:"PUT",body:s})}))}function G({bucketName:e,"objectPath+":t}){return r(this,void 0,void 0,(function*(){const s=yield this.request("/z3/{bucketName}/{objectPath+}","post")({action:"download",bucketName:e,"objectPath+":t}),i=yield fetch(s.signedUrl,{method:"GET"});if(!i.ok)throw new Error("Failed to download file");return i.arrayBuffer()}))}function J(e){var s;return r(this,void 0,void 0,(function*(){let i,r;const o=new URL(e.url);if("z3:"===o.protocol){const e=o.pathname.split("/").slice(1);i=o.hostname,r=e.join("/")}else{if(!o.href.startsWith(null!==(s=this.config.projectApiUrl)&&void 0!==s?s:n))throw new t({message:"Invalid Z3 URL",code:400});{const e=o.pathname.split("/").slice(3);i=e[0],r=e.slice(1).join("/")}}const c={action:"upload",bucketName:i,"objectPath+":r};return this.request("/z3/{bucketName}/{objectPath+}","post")(c)}))}class W extends u{constructor(e){super(e),this.uploadFile=B,this.downloadFile=G,this.getPresignedUrlForZ3Url=J,this.listBuckets=e=>this.request("/z3","get")(e),this.createBucket=(e,t)=>this.request("/z3/{bucketName}","put")(e,t),this.deleteBucket=(e,t)=>this.request("/z3/{bucketName}","delete")(e,t),this.listObjects=(e,t)=>this.request("/z3/{bucketName}/{objectPath+}","get")(e,t),this.getPresignedUrl=(e,t)=>this.request("/z3/{bucketName}/{objectPath+}","post")(e,t),this.deleteObject=(e,t)=>this.request("/z3/{bucketName}/{objectPath+}","delete")(e,t)}}function X({id:e,file:t,filename:s}){return r(this,void 0,void 0,(function*(){const i=yield this.request("/zambda/{id}/s3-upload","post")({id:e,filename:s});yield fetch(i.signedUrl,{method:"PUT",body:t})}))}class Z extends u{constructor(e){super(e),this.uploadFile=X,this.list=e=>this.request("/zambda","get")(e),this.create=(e,t)=>this.request("/zambda","post")(e,t),this.get=(e,t)=>this.request("/zambda/{id}","get")(e,t),this.update=(e,t)=>this.request("/zambda/{id}","patch")(e,t),this.delete=(e,t)=>this.request("/zambda/{id}","delete")(e,t),this.execute=(e,t)=>this.request("/zambda/{id}/execute","post")(e,t),this.executePublic=(e,t)=>this.request("/zambda/{id}/execute-public","post")(e,t),this.s3Upload=(e,t)=>this.request("/zambda/{id}/s3-upload","post")(e,t)}}class K extends u{constructor(e){super(e),this.list=(e,t)=>this.request("/zambda/{id}/logStream","post")(e,t),this.search=(e,t)=>this.request("/zambda/{id}/logStream/search","post")(e,t),this.get=(e,t)=>this.request("/zambda/{id}/logStream/{logStreamName}","post")(e,t)}}let Q=class{constructor(e){this.config=e,this.application=new d(e),this.developer=new y(e),this.m2m=new I(e),this.messaging=new $(e),this.conversation=new g(e),this.transactionalSMS=new V(e),this.paymentMethod=new A(e),this.charge=new p(e),this.project=new C(e),this.rcm=new _(e),this.erx=new q(e),this.role=new L(e),this.secret=new M(e),this.telemed=new D(e),this.user=new F(e),this.version=new H(e),this.z3=new W(e),this.zambda=new Z(e),this.zambdaLogStream=new K(e),this.fhir=new z(e)}};class Y extends Q{}Y.OystehrFHIRError=i,Y.OystehrSdkError=t;export{Y as default};
2
2
  //# sourceMappingURL=index.min.js.map