@ohm_studio/sdk-react-native 0.1.0 → 0.2.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 CHANGED
@@ -1,8 +1,10 @@
1
- # @ohm_studio/sdk-react-native
1
+ # OHM RN SDK · `@ohm_studio/sdk-react-native`
2
+
3
+ > The **short name** is `OHM RN SDK`. The **full npm name** is `@ohm_studio/sdk-react-native` — that's what you install. Both names refer to the same package.
2
4
 
3
5
  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
6
 
5
- > For web / Node, install [`@ohm_studio/sdk`](https://www.npmjs.com/package/@ohm_studio/sdk) instead.
7
+ > For web / Node, install [`@ohm_studio/sdk`](https://www.npmjs.com/package/@ohm_studio/sdk) (**OHM SDK**) instead.
6
8
 
7
9
  ## Install
8
10
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { OHMCoreClient } from "@ohm_studio/sdk-core";
2
2
  import type { OHMClientOptions } from "@ohm_studio/sdk-core";
3
3
  export * from "@ohm_studio/sdk-core";
4
+ export { ExpoRecorder, isExpoAvAvailable } from "./recorder";
5
+ export type { ExpoRecorderOptions, RNFile } from "./recorder";
4
6
  /**
5
7
  * OHM Studio SDK for React Native.
6
8
  *
@@ -30,6 +32,7 @@ export declare class OHM extends OHMCoreClient {
30
32
  file: any;
31
33
  fields?: Record<string, string>;
32
34
  }): Promise<T>;
35
+ protected buildMultipartBody(file: unknown, fields?: Record<string, string>): Promise<unknown>;
33
36
  }
34
37
  export default OHM;
35
38
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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"}
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;AACrC,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC7D,YAAY,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAY9D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,GAAI,SAAQ,aAAa;gBACxB,IAAI,EAAE,gBAAgB;cAelB,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;cAQE,kBAAkB,CAChC,IAAI,EAAE,OAAO,EACb,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,OAAO,CAAC,OAAO,CAAC;CAuBpB;AAED,eAAe,GAAG,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { OHMConfigError, OHMCoreClient } from "@ohm_studio/sdk-core";
2
2
  export * from "@ohm_studio/sdk-core";
3
+ export { ExpoRecorder, isExpoAvAvailable } from "./recorder";
3
4
  /** Detect React Native runtime — used to gate the bundled-key safeguard. */
4
5
  function isReactNative() {
5
6
  return (
@@ -32,7 +33,8 @@ function isReactNative() {
32
33
  */
33
34
  export class OHM extends OHMCoreClient {
34
35
  constructor(opts) {
35
- if (isReactNative() &&
36
+ if (!opts.mock &&
37
+ isReactNative() &&
36
38
  opts.apiKey?.startsWith("ohms_live_") &&
37
39
  !opts.acknowledgeBundledKey) {
38
40
  throw new OHMConfigError({
@@ -42,29 +44,31 @@ export class OHM extends OHMCoreClient {
42
44
  super(opts);
43
45
  }
44
46
  async runMultipart(opts) {
47
+ const fd = (await this.buildMultipartBody(opts.file, opts.fields));
48
+ return this.requestRaw("POST", opts.path, { body: fd });
49
+ }
50
+ async buildMultipartBody(file, fields) {
45
51
  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.
52
+ if (file && typeof file === "object" && "uri" in file) {
53
+ const f = file;
54
+ // RN FormData accepts the { uri, name, type } shape directly.
50
55
  // @ts-ignore — RN's FormData type isn't standard.
51
56
  fd.append("file", {
52
- uri: opts.file.uri,
53
- name: opts.file.name || "audio.m4a",
54
- type: opts.file.type || "audio/mp4",
57
+ uri: f.uri,
58
+ name: f.name || "audio.m4a",
59
+ type: f.type || "audio/mp4",
55
60
  });
56
61
  }
57
- else if (typeof Blob !== "undefined" && opts.file instanceof Blob) {
58
- // Some RN polyfills support Blob.
59
- fd.append("file", opts.file, "audio.bin");
62
+ else if (typeof Blob !== "undefined" && file instanceof Blob) {
63
+ fd.append("file", file, "audio.bin");
60
64
  }
61
65
  else {
62
66
  throw new Error("Unsupported file input on React Native — pass `{ uri, name, type }`");
63
67
  }
64
- for (const [k, v] of Object.entries(opts.fields || {})) {
68
+ for (const [k, v] of Object.entries(fields || {})) {
65
69
  fd.append(k, v);
66
70
  }
67
- return this.requestRaw("POST", opts.path, { body: fd });
71
+ return fd;
68
72
  }
69
73
  }
70
74
  export default OHM;
package/dist/index.js.map CHANGED
@@ -1 +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,C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,CAAC,EAAE,CAAC;YAClD,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AAED,eAAe,GAAG,CAAC"}
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Lightweight Expo-AV adapter for OHM. We don't take a hard dependency on
3
+ * `expo-av` (it'd force every consumer of the OHM RN SDK to install Expo
4
+ * even if they're using bare RN with `react-native-audio-recorder-player`).
5
+ * Instead we accept the Expo Audio API surface as a parameter at
6
+ * runtime — type-safely — and provide the start/stop ergonomics customers
7
+ * actually want.
8
+ *
9
+ * @example
10
+ * import { Audio } from "expo-av";
11
+ * import { ExpoRecorder } from "@ohm_studio/sdk-react-native";
12
+ *
13
+ * const rec = new ExpoRecorder(Audio);
14
+ * await rec.start();
15
+ * const file = await rec.stop(); // { uri, name, type }
16
+ *
17
+ * const { data } = await ohm.audio.extract({ apiSlug, file });
18
+ */
19
+ /** The shape `ohm.audio.extract` expects on React Native. */
20
+ export interface RNFile {
21
+ uri: string;
22
+ name: string;
23
+ type: string;
24
+ }
25
+ /** Minimal subset of `expo-av`'s Audio API we depend on. */
26
+ interface ExpoAudioModule {
27
+ requestPermissionsAsync: () => Promise<{
28
+ status: string;
29
+ granted?: boolean;
30
+ }>;
31
+ Recording: {
32
+ createAsync: (options: any) => Promise<{
33
+ recording: ExpoAudioRecording;
34
+ }>;
35
+ };
36
+ RecordingOptionsPresets: {
37
+ HIGH_QUALITY: any;
38
+ LOW_QUALITY?: any;
39
+ };
40
+ }
41
+ interface ExpoAudioRecording {
42
+ stopAndUnloadAsync: () => Promise<unknown>;
43
+ getURI: () => string | null;
44
+ }
45
+ export interface ExpoRecorderOptions {
46
+ /** One of expo-av's RecordingOptionsPresets, defaults to HIGH_QUALITY. */
47
+ recordingPreset?: any;
48
+ /** Mime type tag attached to the file shape — default `audio/mp4`. */
49
+ mimeType?: string;
50
+ /** Filename tag attached to the file shape — default `rec.m4a`. */
51
+ fileName?: string;
52
+ }
53
+ /** True if `expo-av` is installed in the host RN app. */
54
+ export declare function isExpoAvAvailable(): boolean;
55
+ export declare class ExpoRecorder {
56
+ private audio;
57
+ private recording;
58
+ private opts;
59
+ /**
60
+ * @param expoAudio - Pass the `Audio` named import from `expo-av`. We
61
+ * take it as a parameter so the OHM SDK doesn't need a runtime
62
+ * dependency on Expo.
63
+ */
64
+ constructor(expoAudio: ExpoAudioModule, opts?: ExpoRecorderOptions);
65
+ /**
66
+ * Request mic permission and start recording. Throws if permission is
67
+ * denied. Resolves once the recording has started.
68
+ */
69
+ start(): Promise<void>;
70
+ /**
71
+ * Stop recording and return the file shape `ohm.audio.extract` expects.
72
+ */
73
+ stop(): Promise<RNFile>;
74
+ /** Discard the in-progress recording without producing a file. */
75
+ cancel(): Promise<void>;
76
+ }
77
+ export {};
78
+ //# sourceMappingURL=recorder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["../src/recorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,6DAA6D;AAC7D,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,4DAA4D;AAC5D,UAAU,eAAe;IACvB,uBAAuB,EAAE,MAAM,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC9E,SAAS,EAAE;QACT,WAAW,EAAE,CACX,OAAO,EAAE,GAAG,KACT,OAAO,CAAC;YAAE,SAAS,EAAE,kBAAkB,CAAA;SAAE,CAAC,CAAC;KACjD,CAAC;IACF,uBAAuB,EAAE;QACvB,YAAY,EAAE,GAAG,CAAC;QAClB,WAAW,CAAC,EAAE,GAAG,CAAC;KACnB,CAAC;CACH;AAED,UAAU,kBAAkB;IAC1B,kBAAkB,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3C,MAAM,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,mBAAmB;IAClC,0EAA0E;IAC1E,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,yDAAyD;AACzD,wBAAgB,iBAAiB,IAAI,OAAO,CAQ3C;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,KAAK,CAAkB;IAC/B,OAAO,CAAC,SAAS,CAAmC;IACpD,OAAO,CAAC,IAAI,CAAsB;IAElC;;;;OAIG;gBACS,SAAS,EAAE,eAAe,EAAE,IAAI,GAAE,mBAAwB;IAKtE;;;OAGG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAY5B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC;IAa7B,kEAAkE;IAC5D,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;CAU9B"}
@@ -0,0 +1,87 @@
1
+ /**
2
+ * Lightweight Expo-AV adapter for OHM. We don't take a hard dependency on
3
+ * `expo-av` (it'd force every consumer of the OHM RN SDK to install Expo
4
+ * even if they're using bare RN with `react-native-audio-recorder-player`).
5
+ * Instead we accept the Expo Audio API surface as a parameter at
6
+ * runtime — type-safely — and provide the start/stop ergonomics customers
7
+ * actually want.
8
+ *
9
+ * @example
10
+ * import { Audio } from "expo-av";
11
+ * import { ExpoRecorder } from "@ohm_studio/sdk-react-native";
12
+ *
13
+ * const rec = new ExpoRecorder(Audio);
14
+ * await rec.start();
15
+ * const file = await rec.stop(); // { uri, name, type }
16
+ *
17
+ * const { data } = await ohm.audio.extract({ apiSlug, file });
18
+ */
19
+ /** True if `expo-av` is installed in the host RN app. */
20
+ export function isExpoAvAvailable() {
21
+ try {
22
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
23
+ require.resolve("expo-av");
24
+ return true;
25
+ }
26
+ catch {
27
+ return false;
28
+ }
29
+ }
30
+ export class ExpoRecorder {
31
+ audio;
32
+ recording = null;
33
+ opts;
34
+ /**
35
+ * @param expoAudio - Pass the `Audio` named import from `expo-av`. We
36
+ * take it as a parameter so the OHM SDK doesn't need a runtime
37
+ * dependency on Expo.
38
+ */
39
+ constructor(expoAudio, opts = {}) {
40
+ this.audio = expoAudio;
41
+ this.opts = opts;
42
+ }
43
+ /**
44
+ * Request mic permission and start recording. Throws if permission is
45
+ * denied. Resolves once the recording has started.
46
+ */
47
+ async start() {
48
+ const perm = await this.audio.requestPermissionsAsync();
49
+ if (perm.status !== "granted") {
50
+ throw new Error("Microphone permission denied");
51
+ }
52
+ const preset = this.opts.recordingPreset ??
53
+ this.audio.RecordingOptionsPresets.HIGH_QUALITY;
54
+ const { recording } = await this.audio.Recording.createAsync(preset);
55
+ this.recording = recording;
56
+ }
57
+ /**
58
+ * Stop recording and return the file shape `ohm.audio.extract` expects.
59
+ */
60
+ async stop() {
61
+ if (!this.recording)
62
+ throw new Error("ExpoRecorder is not recording");
63
+ await this.recording.stopAndUnloadAsync();
64
+ const uri = this.recording.getURI();
65
+ this.recording = null;
66
+ if (!uri)
67
+ throw new Error("Recording produced no file URI");
68
+ return {
69
+ uri,
70
+ name: this.opts.fileName ?? "rec.m4a",
71
+ type: this.opts.mimeType ?? "audio/mp4",
72
+ };
73
+ }
74
+ /** Discard the in-progress recording without producing a file. */
75
+ async cancel() {
76
+ if (this.recording) {
77
+ try {
78
+ await this.recording.stopAndUnloadAsync();
79
+ }
80
+ catch {
81
+ /* ignore */
82
+ }
83
+ this.recording = null;
84
+ }
85
+ }
86
+ }
87
+ //# sourceMappingURL=recorder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recorder.js","sourceRoot":"","sources":["../src/recorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;G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AAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,GAAG;YAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;QAC5D,OAAO;YACL,GAAG;YACH,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,SAAS;YACrC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,WAAW;SACxC,CAAC;IACJ,CAAC;IAED,kEAAkE;IAClE,KAAK,CAAC,MAAM;QACV,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,IAAI,CAAC;gBACH,MAAM,IAAI,CAAC,SAAS,CAAC,kBAAkB,EAAE,CAAC;YAC5C,CAAC;YAAC,MAAM,CAAC;gBACP,YAAY;YACd,CAAC;YACD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACxB,CAAC;IACH,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ohm_studio/sdk-react-native",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "OHM Studio SDK for React Native. Voice-to-structured-JSON clinical extraction APIs in your mobile app.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -18,10 +18,7 @@
18
18
  "import": "./dist/react/index.js"
19
19
  }
20
20
  },
21
- "files": [
22
- "dist",
23
- "README.md"
24
- ],
21
+ "files": ["dist", "README.md"],
25
22
  "keywords": [
26
23
  "ohm",
27
24
  "react-native",
@@ -41,28 +38,24 @@
41
38
  "publishConfig": {
42
39
  "access": "public"
43
40
  },
41
+ "scripts": {
42
+ "build": "tsc -p tsconfig.json",
43
+ "typecheck": "tsc -p tsconfig.json --noEmit"
44
+ },
44
45
  "dependencies": {
45
- "@ohm_studio/sdk-core": "0.1.0"
46
+ "@ohm_studio/sdk-core": "workspace:*"
46
47
  },
47
48
  "peerDependencies": {
48
49
  "react": ">=17",
49
50
  "react-native": ">=0.71"
50
51
  },
51
52
  "peerDependenciesMeta": {
52
- "react": {
53
- "optional": true
54
- },
55
- "react-native": {
56
- "optional": true
57
- }
53
+ "react": { "optional": true },
54
+ "react-native": { "optional": true }
58
55
  },
59
56
  "devDependencies": {
60
57
  "@types/react": "^18.3.23",
61
58
  "react": "^18.3.1",
62
59
  "typescript": "^5.8.3"
63
- },
64
- "scripts": {
65
- "build": "tsc -p tsconfig.json",
66
- "typecheck": "tsc -p tsconfig.json --noEmit"
67
60
  }
68
- }
61
+ }