@openmrs/esm-api 3.2.1-pre.1094 → 3.2.1-pre.1102

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-api",
3
- "version": "3.2.1-pre.1094",
3
+ "version": "3.2.1-pre.1102",
4
4
  "license": "MPL-2.0",
5
5
  "description": "The javascript module for interacting with the OpenMRS API",
6
6
  "browser": "dist/openmrs-esm-api.js",
@@ -44,11 +44,11 @@
44
44
  "@openmrs/esm-error-handling": "3.x"
45
45
  },
46
46
  "devDependencies": {
47
- "@openmrs/esm-config": "^3.2.1-pre.1094",
48
- "@openmrs/esm-error-handling": "^3.2.1-pre.1094",
49
- "@openmrs/esm-state": "^3.2.1-pre.1094",
47
+ "@openmrs/esm-config": "^3.2.1-pre.1102",
48
+ "@openmrs/esm-error-handling": "^3.2.1-pre.1102",
49
+ "@openmrs/esm-state": "^3.2.1-pre.1102",
50
50
  "@types/fhir": "0.0.31",
51
51
  "rxjs": "^6.5.3"
52
52
  },
53
- "gitHead": "098d850b2490bbfc115d844bd1b5ffabf876e98a"
53
+ "gitHead": "6780e8f11ac37b73336935de1f56ed5b82eb51c0"
54
54
  }
package/src/fhir.ts CHANGED
@@ -1,7 +1,4 @@
1
- /**
2
- * @module
3
- * @category API
4
- */
1
+ /** @module @category API */
5
2
  import { openmrsFetch, FetchHeaders, OpenmrsFetchError } from "./openmrs-fetch";
6
3
  import type { FhirClient } from "./types/fhir";
7
4
 
@@ -1,8 +1,4 @@
1
- /**
2
- * @module
3
- * @category API
4
- */
5
-
1
+ /** @module @category API */
6
2
  import { Observable } from "rxjs";
7
3
  import isPlainObject from "lodash-es/isPlainObject";
8
4
  import { getConfig, navigate } from "@openmrs/esm-config";
@@ -10,6 +6,16 @@ import { FetchResponse } from "./types";
10
6
 
11
7
  export const sessionEndpoint = "/ws/rest/v1/session";
12
8
 
9
+ /**
10
+ * Append `path` to the OpenMRS SPA base.
11
+ *
12
+ * #### Example
13
+ *
14
+ * ```ts
15
+ * makeUrl('/foo/bar');
16
+ * // => '/openmrs/foo/bar'
17
+ * ```
18
+ */
13
19
  export function makeUrl(path: string) {
14
20
  return window.openmrsBase + path;
15
21
  }
package/src/public.ts ADDED
@@ -0,0 +1,11 @@
1
+ export * from "./types";
2
+ export * from "./openmrs-fetch";
3
+ export * from "./fhir";
4
+
5
+ export * from "./shared-api-objects/current-user";
6
+ export * from "./shared-api-objects/current-patient";
7
+ export * from "./shared-api-objects/visit-utils";
8
+ export * from "./shared-api-objects/visit-type";
9
+ export * from "./shared-api-objects/location";
10
+
11
+ export * from "./openmrs-backend-dependencies";
@@ -1,8 +1,4 @@
1
- /**
2
- * @module
3
- * @category API
4
- */
5
-
1
+ /** @module @category API */
6
2
  import { fhir } from "../fhir";
7
3
  import { FetchResponse } from "../types";
8
4
 
@@ -1,8 +1,4 @@
1
- /**
2
- * @module
3
- * @category API
4
- */
5
-
1
+ /** @module @category API */
6
2
  import { Observable, ReplaySubject } from "rxjs";
7
3
  import { filter, map, tap, mergeAll } from "rxjs/operators";
8
4
  import { openmrsFetch, sessionEndpoint } from "../openmrs-fetch";
@@ -1,8 +1,4 @@
1
- /**
2
- * @module
3
- * @category API
4
- */
5
-
1
+ /** @module @category API */
6
2
  import { Observable } from "rxjs";
7
3
  import { map, take } from "rxjs/operators";
8
4
  import { openmrsObservableFetch } from "../openmrs-fetch";
@@ -1,8 +1,4 @@
1
- /**
2
- * @module
3
- * @category API
4
- */
5
-
1
+ /** @module @category API */
6
2
  import { Observable } from "rxjs";
7
3
  import { map, take } from "rxjs/operators";
8
4
  import { openmrsObservableFetch } from "../openmrs-fetch";
@@ -1,8 +1,4 @@
1
- /**
2
- * @module
3
- * @category API
4
- */
5
-
1
+ /** @module @category API */
6
2
  import { Observable, BehaviorSubject } from "rxjs";
7
3
  import { take, map } from "rxjs/operators";
8
4
  import { openmrsObservableFetch } from "../openmrs-fetch";