@ohm_studio/sdk-react-native 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +71 -0
- package/dist/index.js.map +1 -0
- package/dist/react/index.d.ts +36 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +58 -0
- package/dist/react/index.js.map +1 -0
- package/package.json +68 -0
package/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# @ohm_studio/sdk-react-native
|
|
2
|
+
|
|
3
|
+
OHM Studio SDK for **React Native / Expo** — voice-to-structured-JSON clinical extraction inside your mobile app. Multi-language STT, FHIR-shaped outputs, formulary-aware prescriptions.
|
|
4
|
+
|
|
5
|
+
> For web / Node, install [`@ohm_studio/sdk`](https://www.npmjs.com/package/@ohm_studio/sdk) instead.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @ohm_studio/sdk-react-native
|
|
11
|
+
# or
|
|
12
|
+
pnpm add @ohm_studio/sdk-react-native
|
|
13
|
+
# or
|
|
14
|
+
yarn add @ohm_studio/sdk-react-native
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Quickstart
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { OHM } from "@ohm_studio/sdk-react-native";
|
|
21
|
+
|
|
22
|
+
// IMPORTANT: live keys (ohms_live_*) MUST NOT ship in your bundle.
|
|
23
|
+
// Use ohms_test_* for local dev, or proxy through your backend.
|
|
24
|
+
const ohm = new OHM({
|
|
25
|
+
apiKey: TEST_KEY, // ohms_test_*
|
|
26
|
+
baseUrl: "https://api.ohm.doctor",
|
|
27
|
+
acknowledgeBundledKey: true, // dev-only override
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// Audio → structured JSON in one call
|
|
31
|
+
const { transcript, data } = await ohm.audio.extract({
|
|
32
|
+
apiSlug: "opd-clinic",
|
|
33
|
+
file: { uri: localUri, name: "rec.m4a", type: "audio/mp4" },
|
|
34
|
+
});
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Capturing audio
|
|
38
|
+
|
|
39
|
+
`@ohm_studio/sdk-react-native` doesn't ship a recorder — pair with whichever you prefer:
|
|
40
|
+
|
|
41
|
+
| Library | Notes |
|
|
42
|
+
|--------------------------------------|--------------------------------------------------|
|
|
43
|
+
| [`expo-av`](https://docs.expo.dev/versions/latest/sdk/av/) | Easiest in Expo apps. Returns a local URI. |
|
|
44
|
+
| [`react-native-audio-recorder-player`](https://www.npmjs.com/package/react-native-audio-recorder-player) | Bare RN. Configurable codec / bitrate. |
|
|
45
|
+
|
|
46
|
+
Whichever you use, pass the resulting `{ uri, name, type }` to `ohm.audio.extract`.
|
|
47
|
+
|
|
48
|
+
## React hooks
|
|
49
|
+
|
|
50
|
+
```tsx
|
|
51
|
+
import { OHM } from "@ohm_studio/sdk-react-native";
|
|
52
|
+
import { OhmProvider, useOhmAudioExtract } from "@ohm_studio/sdk-react-native/react";
|
|
53
|
+
|
|
54
|
+
const ohm = new OHM({ apiKey: TEST_KEY, acknowledgeBundledKey: true });
|
|
55
|
+
|
|
56
|
+
export default function App() {
|
|
57
|
+
return (
|
|
58
|
+
<OhmProvider client={ohm}>
|
|
59
|
+
<Recorder />
|
|
60
|
+
</OhmProvider>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Production: proxy your backend
|
|
66
|
+
|
|
67
|
+
Don't ship live keys. Run a tiny proxy on your backend that holds the live key and forwards requests from your RN app (authenticated with your existing session token). Documented at [docs.ohm.doctor/security/rn-key-handling](https://docs.ohm.doctor/security/rn-key-handling).
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { OHMCoreClient } from "@ohm_studio/sdk-core";
|
|
2
|
+
import type { OHMClientOptions } from "@ohm_studio/sdk-core";
|
|
3
|
+
export * from "@ohm_studio/sdk-core";
|
|
4
|
+
/**
|
|
5
|
+
* OHM Studio SDK for React Native.
|
|
6
|
+
*
|
|
7
|
+
* Differs from `@ohm_studio/sdk` in two places:
|
|
8
|
+
* 1. Audio uploads use the React Native `FormData` shape:
|
|
9
|
+
* `{ uri, name, type }` rather than a Blob/File.
|
|
10
|
+
* 2. Live keys (`ohms_live_*`) are blocked by default in RN bundles —
|
|
11
|
+
* pass `acknowledgeBundledKey: true` only if you know what you're
|
|
12
|
+
* doing. See: https://docs.ohm.doctor/security/rn-key-handling
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* const ohm = new OHM({
|
|
16
|
+
* apiKey: TEST_KEY, // ohms_test_*
|
|
17
|
+
* baseUrl: 'https://api.ohm.doctor',
|
|
18
|
+
* acknowledgeBundledKey: true, // dev-only override
|
|
19
|
+
* });
|
|
20
|
+
*
|
|
21
|
+
* const { transcript, data } = await ohm.audio.extract({
|
|
22
|
+
* apiSlug: 'opd',
|
|
23
|
+
* file: { uri: localUri, name: 'rec.m4a', type: 'audio/mp4' },
|
|
24
|
+
* });
|
|
25
|
+
*/
|
|
26
|
+
export declare class OHM extends OHMCoreClient {
|
|
27
|
+
constructor(opts: OHMClientOptions);
|
|
28
|
+
protected runMultipart<T>(opts: {
|
|
29
|
+
path: string;
|
|
30
|
+
file: any;
|
|
31
|
+
fields?: Record<string, string>;
|
|
32
|
+
}): Promise<T>;
|
|
33
|
+
}
|
|
34
|
+
export default OHM;
|
|
35
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,cAAc,sBAAsB,CAAC;AAYrC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,GAAI,SAAQ,aAAa;gBACxB,IAAI,EAAE,gBAAgB;cAclB,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE;QACpC,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,GAAG,CAAC;QACV,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACjC,GAAG,OAAO,CAAC,CAAC,CAAC;CA2Bf;AAED,eAAe,GAAG,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { OHMConfigError, OHMCoreClient } from "@ohm_studio/sdk-core";
|
|
2
|
+
export * from "@ohm_studio/sdk-core";
|
|
3
|
+
/** Detect React Native runtime — used to gate the bundled-key safeguard. */
|
|
4
|
+
function isReactNative() {
|
|
5
|
+
return (
|
|
6
|
+
// @ts-ignore — RN-only globals
|
|
7
|
+
typeof navigator !== "undefined" &&
|
|
8
|
+
// @ts-ignore
|
|
9
|
+
navigator.product === "ReactNative");
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* OHM Studio SDK for React Native.
|
|
13
|
+
*
|
|
14
|
+
* Differs from `@ohm_studio/sdk` in two places:
|
|
15
|
+
* 1. Audio uploads use the React Native `FormData` shape:
|
|
16
|
+
* `{ uri, name, type }` rather than a Blob/File.
|
|
17
|
+
* 2. Live keys (`ohms_live_*`) are blocked by default in RN bundles —
|
|
18
|
+
* pass `acknowledgeBundledKey: true` only if you know what you're
|
|
19
|
+
* doing. See: https://docs.ohm.doctor/security/rn-key-handling
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* const ohm = new OHM({
|
|
23
|
+
* apiKey: TEST_KEY, // ohms_test_*
|
|
24
|
+
* baseUrl: 'https://api.ohm.doctor',
|
|
25
|
+
* acknowledgeBundledKey: true, // dev-only override
|
|
26
|
+
* });
|
|
27
|
+
*
|
|
28
|
+
* const { transcript, data } = await ohm.audio.extract({
|
|
29
|
+
* apiSlug: 'opd',
|
|
30
|
+
* file: { uri: localUri, name: 'rec.m4a', type: 'audio/mp4' },
|
|
31
|
+
* });
|
|
32
|
+
*/
|
|
33
|
+
export class OHM extends OHMCoreClient {
|
|
34
|
+
constructor(opts) {
|
|
35
|
+
if (isReactNative() &&
|
|
36
|
+
opts.apiKey?.startsWith("ohms_live_") &&
|
|
37
|
+
!opts.acknowledgeBundledKey) {
|
|
38
|
+
throw new OHMConfigError({
|
|
39
|
+
message: "Live OHM keys (ohms_live_*) must NOT ship in React Native bundles — anyone can decompile your app and steal them. Use ohms_test_* for local dev, or set up a backend proxy. See https://docs.ohm.doctor/security/rn-key-handling",
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
super(opts);
|
|
43
|
+
}
|
|
44
|
+
async runMultipart(opts) {
|
|
45
|
+
const fd = new FormData();
|
|
46
|
+
if (opts.file &&
|
|
47
|
+
typeof opts.file === "object" &&
|
|
48
|
+
"uri" in opts.file) {
|
|
49
|
+
// RN FormData accepts this shape directly.
|
|
50
|
+
// @ts-ignore — RN's FormData type isn't standard.
|
|
51
|
+
fd.append("file", {
|
|
52
|
+
uri: opts.file.uri,
|
|
53
|
+
name: opts.file.name || "audio.m4a",
|
|
54
|
+
type: opts.file.type || "audio/mp4",
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
else if (typeof Blob !== "undefined" && opts.file instanceof Blob) {
|
|
58
|
+
// Some RN polyfills support Blob.
|
|
59
|
+
fd.append("file", opts.file, "audio.bin");
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
throw new Error("Unsupported file input on React Native — pass `{ uri, name, type }`");
|
|
63
|
+
}
|
|
64
|
+
for (const [k, v] of Object.entries(opts.fields || {})) {
|
|
65
|
+
fd.append(k, v);
|
|
66
|
+
}
|
|
67
|
+
return this.requestRaw("POST", opts.path, { body: fd });
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export default OHM;
|
|
71
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGrE,cAAc,sBAAsB,CAAC;AAErC,4EAA4E;AAC5E,SAAS,aAAa;IACpB,OAAO;IACL,+BAA+B;IAC/B,OAAO,SAAS,KAAK,WAAW;QAChC,aAAa;QACb,SAAS,CAAC,OAAO,KAAK,aAAa,CACpC,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,OAAO,GAAI,SAAQ,aAAa;IACpC,YAAY,IAAsB;QAChC,IACE,aAAa,EAAE;YACf,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC;YACrC,CAAC,IAAI,CAAC,qBAAqB,EAC3B,CAAC;YACD,MAAM,IAAI,cAAc,CAAC;gBACvB,OAAO,EACL,kOAAkO;aACrO,CAAC,CAAC;QACL,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAES,KAAK,CAAC,YAAY,CAAI,IAI/B;QACC,MAAM,EAAE,GAAG,IAAI,QAAQ,EAAE,CAAC;QAC1B,IACE,IAAI,CAAC,IAAI;YACT,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ;YAC7B,KAAK,IAAI,IAAI,CAAC,IAAI,EAClB,CAAC;YACD,2CAA2C;YAC3C,kDAAkD;YAClD,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE;gBAChB,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG;gBAClB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,WAAW;gBACnC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,WAAW;aACpC,CAAC,CAAC;QACL,CAAC;aAAM,IAAI,OAAO,IAAI,KAAK,WAAW,IAAI,IAAI,CAAC,IAAI,YAAY,IAAI,EAAE,CAAC;YACpE,kCAAkC;YAClC,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,IAAW,EAAE,WAAW,CAAC,CAAC;QACnD,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CACb,qEAAqE,CACtE,CAAC;QACJ,CAAC;QACD,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,CAAC;YACvD,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,OAAO,IAAI,CAAC,UAAU,CAAI,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,EAAS,EAAE,CAAC,CAAC;IACpE,CAAC;CACF;AAED,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { AudioExtractInput, AudioExtractResult, ExtractInput, ExtractResult, SummarizeInput, SummarizeResult } from "@ohm_studio/sdk-core";
|
|
3
|
+
import { OHM } from "../index";
|
|
4
|
+
export declare function OhmProvider({ client, children, }: {
|
|
5
|
+
client: OHM;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}): import("react").FunctionComponentElement<import("react").ProviderProps<OHM | null>>;
|
|
8
|
+
export declare function useOhmExtract<T = Record<string, unknown>>(opts: {
|
|
9
|
+
apiSlug: string;
|
|
10
|
+
}): {
|
|
11
|
+
mutateAsync: (input: Omit<ExtractInput, "apiSlug">) => Promise<ExtractResult<T>>;
|
|
12
|
+
mutate: (input: Omit<ExtractInput, "apiSlug">) => void;
|
|
13
|
+
reset: () => void;
|
|
14
|
+
data: ExtractResult<T> | null;
|
|
15
|
+
error: Error | null;
|
|
16
|
+
isPending: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare function useOhmAudioExtract<T = Record<string, unknown>>(opts: {
|
|
19
|
+
apiSlug: string;
|
|
20
|
+
}): {
|
|
21
|
+
mutateAsync: (input: Omit<AudioExtractInput, "apiSlug">) => Promise<AudioExtractResult<T>>;
|
|
22
|
+
mutate: (input: Omit<AudioExtractInput, "apiSlug">) => void;
|
|
23
|
+
reset: () => void;
|
|
24
|
+
data: AudioExtractResult<T> | null;
|
|
25
|
+
error: Error | null;
|
|
26
|
+
isPending: boolean;
|
|
27
|
+
};
|
|
28
|
+
export declare function useOhmSummarize(): {
|
|
29
|
+
mutateAsync: (input: SummarizeInput) => Promise<SummarizeResult>;
|
|
30
|
+
mutate: (input: SummarizeInput) => void;
|
|
31
|
+
reset: () => void;
|
|
32
|
+
data: SummarizeResult | null;
|
|
33
|
+
error: Error | null;
|
|
34
|
+
isPending: boolean;
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAa/B,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,QAAQ,GACT,EAAE;IACD,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,SAAS,CAAC;CACrB,uFAEA;AAoDD,wBAAgB,aAAa,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE;IAC/D,OAAO,EAAE,MAAM,CAAC;CACjB;;;;;WAxCQ,KAAK,GAAG,IAAI;eACR,OAAO;EA4CnB;AAED,wBAAgB,kBAAkB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE;IACpE,OAAO,EAAE,MAAM,CAAC;CACjB;;;;;WAjDQ,KAAK,GAAG,IAAI;eACR,OAAO;EAqDnB;AAED,wBAAgB,eAAe;;;;;WAxDtB,KAAK,GAAG,IAAI;eACR,OAAO;EA2DnB"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { createContext, createElement, useCallback, useContext, useState, } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* React hooks for @ohm_studio/sdk. Mirrors `@ohm_studio/sdk-react-native/react` so a
|
|
4
|
+
* snippet copies cleanly between web and mobile codebases.
|
|
5
|
+
*
|
|
6
|
+
* The hooks are thin and DEPENDENCY-FREE — no TanStack Query required.
|
|
7
|
+
* If you'd rather use Query, the underlying `client.extract` /
|
|
8
|
+
* `client.audio.extract` calls slot into `useMutation` directly.
|
|
9
|
+
*/
|
|
10
|
+
const OhmContext = createContext(null);
|
|
11
|
+
export function OhmProvider({ client, children, }) {
|
|
12
|
+
return createElement(OhmContext.Provider, { value: client }, children);
|
|
13
|
+
}
|
|
14
|
+
function useClient() {
|
|
15
|
+
const c = useContext(OhmContext);
|
|
16
|
+
if (!c) {
|
|
17
|
+
throw new Error("useOhm hooks must be wrapped in <OhmProvider client={ohm}>");
|
|
18
|
+
}
|
|
19
|
+
return c;
|
|
20
|
+
}
|
|
21
|
+
function useOhmMutation(fn) {
|
|
22
|
+
const client = useClient();
|
|
23
|
+
const [state, setState] = useState({
|
|
24
|
+
data: null,
|
|
25
|
+
error: null,
|
|
26
|
+
isPending: false,
|
|
27
|
+
});
|
|
28
|
+
const mutateAsync = useCallback(async (input) => {
|
|
29
|
+
setState({ data: null, error: null, isPending: true });
|
|
30
|
+
try {
|
|
31
|
+
const data = await fn(client, input);
|
|
32
|
+
setState({ data, error: null, isPending: false });
|
|
33
|
+
return data;
|
|
34
|
+
}
|
|
35
|
+
catch (err) {
|
|
36
|
+
setState({ data: null, error: err, isPending: false });
|
|
37
|
+
throw err;
|
|
38
|
+
}
|
|
39
|
+
}, [client, fn]);
|
|
40
|
+
return {
|
|
41
|
+
...state,
|
|
42
|
+
mutateAsync,
|
|
43
|
+
mutate: (input) => {
|
|
44
|
+
void mutateAsync(input);
|
|
45
|
+
},
|
|
46
|
+
reset: () => setState({ data: null, error: null, isPending: false }),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export function useOhmExtract(opts) {
|
|
50
|
+
return useOhmMutation((c, input) => c.extract({ ...input, apiSlug: opts.apiSlug }));
|
|
51
|
+
}
|
|
52
|
+
export function useOhmAudioExtract(opts) {
|
|
53
|
+
return useOhmMutation((c, input) => c.audio.extract({ ...input, apiSlug: opts.apiSlug }));
|
|
54
|
+
}
|
|
55
|
+
export function useOhmSummarize() {
|
|
56
|
+
return useOhmMutation((c, input) => c.summarize(input));
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,QAAQ,GAET,MAAM,OAAO,CAAC;AAWf;;;;;;;GAOG;AAEH,MAAM,UAAU,GAAG,aAAa,CAAa,IAAI,CAAC,CAAC;AAEnD,MAAM,UAAU,WAAW,CAAC,EAC1B,MAAM,EACN,QAAQ,GAIT;IACC,OAAO,aAAa,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,QAAQ,CAAC,CAAC;AACzE,CAAC;AAED,SAAS,SAAS;IAChB,MAAM,CAAC,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;IACjC,IAAI,CAAC,CAAC,EAAE,CAAC;QACP,MAAM,IAAI,KAAK,CACb,4DAA4D,CAC7D,CAAC;IACJ,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAQD,SAAS,cAAc,CACrB,EAAoD;IAEpD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAyB;QACzD,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,KAAK;KACjB,CAAC,CAAC;IACH,MAAM,WAAW,GAAG,WAAW,CAC7B,KAAK,EAAE,KAAa,EAAE,EAAE;QACtB,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACvD,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;YACrC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;YAClD,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;YACvD,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC,EACD,CAAC,MAAM,EAAE,EAAE,CAAC,CACb,CAAC;IACF,OAAO;QACL,GAAG,KAAK;QACR,WAAW;QACX,MAAM,EAAE,CAAC,KAAa,EAAE,EAAE;YACxB,KAAK,WAAW,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC;QACD,KAAK,EAAE,GAAG,EAAE,CACV,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;KAC1D,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,aAAa,CAA8B,IAE1D;IACC,OAAO,cAAc,CAGnB,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAI,EAAE,GAAG,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AACrE,CAAC;AAED,MAAM,UAAU,kBAAkB,CAA8B,IAE/D;IACC,OAAO,cAAc,CAGnB,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAI,EAAE,GAAG,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AAC3E,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,OAAO,cAAc,CAAkC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAClE,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CACnB,CAAC;AACJ,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ohm_studio/sdk-react-native",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "OHM Studio SDK for React Native. Voice-to-structured-JSON clinical extraction APIs in your mobile app.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"react-native": "./dist/index.js",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./react": {
|
|
17
|
+
"types": "./dist/react/index.d.ts",
|
|
18
|
+
"import": "./dist/react/index.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"README.md"
|
|
24
|
+
],
|
|
25
|
+
"keywords": [
|
|
26
|
+
"ohm",
|
|
27
|
+
"react-native",
|
|
28
|
+
"expo",
|
|
29
|
+
"clinical",
|
|
30
|
+
"ehr",
|
|
31
|
+
"fhir",
|
|
32
|
+
"stt",
|
|
33
|
+
"extraction"
|
|
34
|
+
],
|
|
35
|
+
"homepage": "https://docs.ohm.doctor",
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "https://github.com/aivfkesavan/OHM_Products",
|
|
39
|
+
"directory": "packages/sdk-react-native"
|
|
40
|
+
},
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@ohm_studio/sdk-core": "0.1.0"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"react": ">=17",
|
|
49
|
+
"react-native": ">=0.71"
|
|
50
|
+
},
|
|
51
|
+
"peerDependenciesMeta": {
|
|
52
|
+
"react": {
|
|
53
|
+
"optional": true
|
|
54
|
+
},
|
|
55
|
+
"react-native": {
|
|
56
|
+
"optional": true
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@types/react": "^18.3.23",
|
|
61
|
+
"react": "^18.3.1",
|
|
62
|
+
"typescript": "^5.8.3"
|
|
63
|
+
},
|
|
64
|
+
"scripts": {
|
|
65
|
+
"build": "tsc -p tsconfig.json",
|
|
66
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
67
|
+
}
|
|
68
|
+
}
|