phenoml 5.3.0 → 6.0.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.
Files changed (66) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/agent/types/ChatMessageTemplate.d.ts +0 -2
  3. package/dist/cjs/api/resources/agent/types/ChatSessionTemplate.d.ts +0 -2
  4. package/dist/cjs/api/resources/construe/client/Client.d.ts +7 -8
  5. package/dist/cjs/api/resources/construe/client/Client.js +13 -12
  6. package/dist/cjs/api/resources/construe/client/requests/UploadRequest.d.ts +55 -0
  7. package/dist/cjs/api/resources/construe/client/requests/UploadRequest.js +12 -0
  8. package/dist/cjs/api/resources/construe/client/requests/index.d.ts +1 -0
  9. package/dist/cjs/api/resources/construe/errors/GatewayTimeoutError.d.ts +5 -0
  10. package/dist/cjs/api/resources/construe/errors/GatewayTimeoutError.js +50 -0
  11. package/dist/cjs/api/resources/construe/errors/index.d.ts +1 -0
  12. package/dist/cjs/api/resources/construe/errors/index.js +1 -0
  13. package/dist/cjs/api/resources/construe/types/ConstrueUploadCodeSystemResponse.d.ts +2 -0
  14. package/dist/cjs/api/resources/construe/types/ExtractedCodeResult.d.ts +1 -3
  15. package/dist/cjs/api/resources/construe/types/GetCodeSystemDetailResponse.d.ts +4 -4
  16. package/dist/cjs/api/resources/construe/types/GetCodeSystemDetailResponse.js +2 -2
  17. package/dist/cjs/api/resources/construe/types/index.d.ts +0 -3
  18. package/dist/cjs/api/resources/construe/types/index.js +0 -3
  19. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderTemplate.d.ts +0 -2
  20. package/dist/cjs/api/resources/summary/types/SummaryTemplate.d.ts +0 -1
  21. package/dist/cjs/api/resources/tools/types/McpServerResponse.d.ts +0 -2
  22. package/dist/cjs/api/resources/tools/types/McpServerToolResponse.d.ts +0 -2
  23. package/dist/cjs/api/resources/workflows/types/WorkflowDefinition.d.ts +0 -2
  24. package/dist/cjs/api/resources/workflows/types/WorkflowResponse.d.ts +0 -2
  25. package/dist/cjs/version.d.ts +1 -1
  26. package/dist/cjs/version.js +1 -1
  27. package/dist/esm/Client.mjs +2 -2
  28. package/dist/esm/api/resources/agent/types/ChatMessageTemplate.d.mts +0 -2
  29. package/dist/esm/api/resources/agent/types/ChatSessionTemplate.d.mts +0 -2
  30. package/dist/esm/api/resources/construe/client/Client.d.mts +7 -8
  31. package/dist/esm/api/resources/construe/client/Client.mjs +13 -12
  32. package/dist/esm/api/resources/construe/client/requests/UploadRequest.d.mts +55 -0
  33. package/dist/esm/api/resources/construe/client/requests/UploadRequest.mjs +9 -0
  34. package/dist/esm/api/resources/construe/client/requests/index.d.mts +1 -0
  35. package/dist/esm/api/resources/construe/errors/GatewayTimeoutError.d.mts +5 -0
  36. package/dist/esm/api/resources/construe/errors/GatewayTimeoutError.mjs +13 -0
  37. package/dist/esm/api/resources/construe/errors/index.d.mts +1 -0
  38. package/dist/esm/api/resources/construe/errors/index.mjs +1 -0
  39. package/dist/esm/api/resources/construe/types/ConstrueUploadCodeSystemResponse.d.mts +2 -0
  40. package/dist/esm/api/resources/construe/types/ExtractedCodeResult.d.mts +1 -3
  41. package/dist/esm/api/resources/construe/types/GetCodeSystemDetailResponse.d.mts +4 -4
  42. package/dist/esm/api/resources/construe/types/GetCodeSystemDetailResponse.mjs +2 -2
  43. package/dist/esm/api/resources/construe/types/index.d.mts +0 -3
  44. package/dist/esm/api/resources/construe/types/index.mjs +0 -3
  45. package/dist/esm/api/resources/fhirProvider/types/FhirProviderTemplate.d.mts +0 -2
  46. package/dist/esm/api/resources/summary/types/SummaryTemplate.d.mts +0 -1
  47. package/dist/esm/api/resources/tools/types/McpServerResponse.d.mts +0 -2
  48. package/dist/esm/api/resources/tools/types/McpServerToolResponse.d.mts +0 -2
  49. package/dist/esm/api/resources/workflows/types/WorkflowDefinition.d.mts +0 -2
  50. package/dist/esm/api/resources/workflows/types/WorkflowResponse.d.mts +0 -2
  51. package/dist/esm/version.d.mts +1 -1
  52. package/dist/esm/version.mjs +1 -1
  53. package/package.json +1 -1
  54. package/reference.md +5 -7
  55. package/dist/cjs/api/resources/construe/types/UploadRequest.d.ts +0 -10
  56. package/dist/cjs/api/resources/construe/types/UploadRequest.js +0 -3
  57. package/dist/cjs/api/resources/construe/types/UploadRequestCsv.d.ts +0 -32
  58. package/dist/cjs/api/resources/construe/types/UploadRequestCsv.js +0 -3
  59. package/dist/cjs/api/resources/construe/types/UploadRequestJson.d.ts +0 -40
  60. package/dist/cjs/api/resources/construe/types/UploadRequestJson.js +0 -3
  61. package/dist/esm/api/resources/construe/types/UploadRequest.d.mts +0 -10
  62. package/dist/esm/api/resources/construe/types/UploadRequest.mjs +0 -2
  63. package/dist/esm/api/resources/construe/types/UploadRequestCsv.d.mts +0 -32
  64. package/dist/esm/api/resources/construe/types/UploadRequestCsv.mjs +0 -2
  65. package/dist/esm/api/resources/construe/types/UploadRequestJson.d.mts +0 -40
  66. package/dist/esm/api/resources/construe/types/UploadRequestJson.mjs +0 -2
@@ -52,8 +52,8 @@ class phenomlClient {
52
52
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
53
53
  "X-Fern-Language": "JavaScript",
54
54
  "X-Fern-SDK-Name": "phenoml",
55
- "X-Fern-SDK-Version": "5.3.0",
56
- "User-Agent": "phenoml/5.3.0",
55
+ "X-Fern-SDK-Version": "6.0.0",
56
+ "User-Agent": "phenoml/auto",
57
57
  "X-Fern-Runtime": core.RUNTIME.type,
58
58
  "X-Fern-Runtime-Version": core.RUNTIME.version,
59
59
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -17,8 +17,6 @@ export interface ChatMessageTemplate {
17
17
  created?: string;
18
18
  /** Message updated time */
19
19
  updated?: string;
20
- /** User ID */
21
- user_id?: string;
22
20
  /** Function name */
23
21
  function_name?: string;
24
22
  /** Function arguments */
@@ -1,8 +1,6 @@
1
1
  export interface ChatSessionTemplate {
2
2
  /** Chat session ID */
3
3
  id?: string;
4
- /** User ID */
5
- user_id?: string;
6
4
  /** Chat session ID */
7
5
  session_id?: string;
8
6
  /** Chat session status */
@@ -12,8 +12,9 @@ export declare class Construe {
12
12
  constructor(_options: Construe.Options);
13
13
  /**
14
14
  * Upload a custom medical code system with codes and descriptions for use in code extraction. Requires a paid plan.
15
- * Upon upload, construe generates embeddings for all of the codes in the code system and stores them in the vector database so you can
16
- * subsequently use the code system for construe/extract and lang2fhir/create (coming soon!)
15
+ * Returns 202 immediately; embedding generation runs asynchronously. Poll
16
+ * GET /construe/codes/systems/{codesystem}?version={version} to check when status
17
+ * transitions from "processing" to "ready" or "failed".
17
18
  *
18
19
  * @param {phenoml.construe.UploadRequest} request
19
20
  * @param {Construe.RequestOptions} requestOptions - Request-specific configuration.
@@ -27,12 +28,9 @@ export declare class Construe {
27
28
  *
28
29
  * @example
29
30
  * await client.construe.uploadCodeSystem({
30
- * format: "csv",
31
31
  * name: "CUSTOM_CODES",
32
32
  * version: "1.0",
33
- * file: "file",
34
- * code_col: "code",
35
- * desc_col: "description"
33
+ * format: "csv"
36
34
  * })
37
35
  */
38
36
  uploadCodeSystem(request: phenoml.construe.UploadRequest, requestOptions?: Construe.RequestOptions): core.HttpResponsePromise<phenoml.construe.ConstrueUploadCodeSystemResponse>;
@@ -47,8 +45,10 @@ export declare class Construe {
47
45
  *
48
46
  * @throws {@link phenoml.construe.BadRequestError}
49
47
  * @throws {@link phenoml.construe.UnauthorizedError}
50
- * @throws {@link phenoml.construe.FailedDependencyError}
48
+ * @throws {@link phenoml.construe.NotFoundError}
51
49
  * @throws {@link phenoml.construe.InternalServerError}
50
+ * @throws {@link phenoml.construe.ServiceUnavailableError}
51
+ * @throws {@link phenoml.construe.GatewayTimeoutError}
52
52
  *
53
53
  * @example
54
54
  * await client.construe.extractCodes({
@@ -253,7 +253,6 @@ export declare class Construe {
253
253
  * @throws {@link phenoml.construe.NotFoundError}
254
254
  * @throws {@link phenoml.construe.InternalServerError}
255
255
  * @throws {@link phenoml.construe.NotImplementedError}
256
- * @throws {@link phenoml.construe.ServiceUnavailableError}
257
256
  *
258
257
  * @example
259
258
  * await client.construe.terminologyServerTextSearch("ICD-10-CM", {
@@ -55,8 +55,9 @@ class Construe {
55
55
  }
56
56
  /**
57
57
  * Upload a custom medical code system with codes and descriptions for use in code extraction. Requires a paid plan.
58
- * Upon upload, construe generates embeddings for all of the codes in the code system and stores them in the vector database so you can
59
- * subsequently use the code system for construe/extract and lang2fhir/create (coming soon!)
58
+ * Returns 202 immediately; embedding generation runs asynchronously. Poll
59
+ * GET /construe/codes/systems/{codesystem}?version={version} to check when status
60
+ * transitions from "processing" to "ready" or "failed".
60
61
  *
61
62
  * @param {phenoml.construe.UploadRequest} request
62
63
  * @param {Construe.RequestOptions} requestOptions - Request-specific configuration.
@@ -70,12 +71,9 @@ class Construe {
70
71
  *
71
72
  * @example
72
73
  * await client.construe.uploadCodeSystem({
73
- * format: "csv",
74
74
  * name: "CUSTOM_CODES",
75
75
  * version: "1.0",
76
- * file: "file",
77
- * code_col: "code",
78
- * desc_col: "description"
76
+ * format: "csv"
79
77
  * })
80
78
  */
81
79
  uploadCodeSystem(request, requestOptions) {
@@ -152,8 +150,10 @@ class Construe {
152
150
  *
153
151
  * @throws {@link phenoml.construe.BadRequestError}
154
152
  * @throws {@link phenoml.construe.UnauthorizedError}
155
- * @throws {@link phenoml.construe.FailedDependencyError}
153
+ * @throws {@link phenoml.construe.NotFoundError}
156
154
  * @throws {@link phenoml.construe.InternalServerError}
155
+ * @throws {@link phenoml.construe.ServiceUnavailableError}
156
+ * @throws {@link phenoml.construe.GatewayTimeoutError}
157
157
  *
158
158
  * @example
159
159
  * await client.construe.extractCodes({
@@ -188,10 +188,14 @@ class Construe {
188
188
  throw new phenoml.construe.BadRequestError(_response.error.body, _response.rawResponse);
189
189
  case 401:
190
190
  throw new phenoml.construe.UnauthorizedError(_response.error.body, _response.rawResponse);
191
- case 424:
192
- throw new phenoml.construe.FailedDependencyError(_response.error.body, _response.rawResponse);
191
+ case 404:
192
+ throw new phenoml.construe.NotFoundError(_response.error.body, _response.rawResponse);
193
193
  case 500:
194
194
  throw new phenoml.construe.InternalServerError(_response.error.body, _response.rawResponse);
195
+ case 503:
196
+ throw new phenoml.construe.ServiceUnavailableError(_response.error.body, _response.rawResponse);
197
+ case 504:
198
+ throw new phenoml.construe.GatewayTimeoutError(_response.error.body, _response.rawResponse);
195
199
  default:
196
200
  throw new errors.phenomlError({
197
201
  statusCode: _response.error.statusCode,
@@ -836,7 +840,6 @@ class Construe {
836
840
  * @throws {@link phenoml.construe.NotFoundError}
837
841
  * @throws {@link phenoml.construe.InternalServerError}
838
842
  * @throws {@link phenoml.construe.NotImplementedError}
839
- * @throws {@link phenoml.construe.ServiceUnavailableError}
840
843
  *
841
844
  * @example
842
845
  * await client.construe.terminologyServerTextSearch("ICD-10-CM", {
@@ -885,8 +888,6 @@ class Construe {
885
888
  throw new phenoml.construe.InternalServerError(_response.error.body, _response.rawResponse);
886
889
  case 501:
887
890
  throw new phenoml.construe.NotImplementedError(_response.error.body, _response.rawResponse);
888
- case 503:
889
- throw new phenoml.construe.ServiceUnavailableError(_response.error.body, _response.rawResponse);
890
891
  default:
891
892
  throw new errors.phenomlError({
892
893
  statusCode: _response.error.statusCode,
@@ -0,0 +1,55 @@
1
+ import type * as phenoml from "../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {
5
+ * name: "CUSTOM_CODES",
6
+ * version: "1.0",
7
+ * format: "csv"
8
+ * }
9
+ */
10
+ export interface UploadRequest {
11
+ /**
12
+ * Name of the code system. Names are case-insensitive and stored uppercase.
13
+ * Builtin system names (e.g. ICD-10-CM, SNOMED_CT_US_LITE, LOINC, CPT, etc.) are
14
+ * reserved and cannot be used for custom uploads; attempts return HTTP 403 Forbidden.
15
+ */
16
+ name: string;
17
+ /** Version of the code system */
18
+ version: string;
19
+ /** Optional revision number */
20
+ revision?: number;
21
+ /** Upload format */
22
+ format: UploadRequest.Format;
23
+ /**
24
+ * The file contents as a base64-encoded string.
25
+ * For CSV format, this is the CSV file contents.
26
+ * For JSON format, this is a base64-encoded JSON array; prefer using 'codes' instead.
27
+ */
28
+ file?: string;
29
+ /** Column name containing codes (required for CSV format) */
30
+ code_col?: string;
31
+ /** Column name containing descriptions (required for CSV format) */
32
+ desc_col?: string;
33
+ /** Optional column name containing long definitions (for CSV format) */
34
+ defn_col?: string;
35
+ /**
36
+ * The codes to upload as a JSON array (JSON format only).
37
+ * This is the preferred way to upload JSON codes, as it avoids unnecessary base64 encoding.
38
+ * If both 'codes' and 'file' are provided, 'codes' takes precedence.
39
+ */
40
+ codes?: phenoml.construe.CodeResponse[];
41
+ /**
42
+ * If true, replaces an existing code system with the same name and version.
43
+ * Builtin systems cannot be replaced; attempts to do so return HTTP 403 Forbidden.
44
+ * When false (default), uploading a duplicate returns 409 Conflict.
45
+ */
46
+ replace?: boolean;
47
+ }
48
+ export declare namespace UploadRequest {
49
+ /** Upload format */
50
+ const Format: {
51
+ readonly Csv: "csv";
52
+ readonly Json: "json";
53
+ };
54
+ type Format = (typeof Format)[keyof typeof Format];
55
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.UploadRequest = void 0;
5
+ var UploadRequest;
6
+ (function (UploadRequest) {
7
+ /** Upload format */
8
+ UploadRequest.Format = {
9
+ Csv: "csv",
10
+ Json: "json",
11
+ };
12
+ })(UploadRequest || (exports.UploadRequest = UploadRequest = {}));
@@ -6,3 +6,4 @@ export type { GetConstrueCodesCodesystemSearchSemanticRequest } from "./GetConst
6
6
  export type { GetConstrueCodesCodesystemSearchTextRequest } from "./GetConstrueCodesCodesystemSearchTextRequest.js";
7
7
  export type { GetConstrueCodesSystemsCodesystemExportRequest } from "./GetConstrueCodesSystemsCodesystemExportRequest.js";
8
8
  export type { GetConstrueCodesSystemsCodesystemRequest } from "./GetConstrueCodesSystemsCodesystemRequest.js";
9
+ export type { UploadRequest } from "./UploadRequest.js";
@@ -0,0 +1,5 @@
1
+ import type * as core from "../../../../core/index.js";
2
+ import * as errors from "../../../../errors/index.js";
3
+ export declare class GatewayTimeoutError extends errors.phenomlError {
4
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
5
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.GatewayTimeoutError = void 0;
38
+ const errors = __importStar(require("../../../../errors/index.js"));
39
+ class GatewayTimeoutError extends errors.phenomlError {
40
+ constructor(body, rawResponse) {
41
+ super({
42
+ message: "GatewayTimeoutError",
43
+ statusCode: 504,
44
+ body: body,
45
+ rawResponse: rawResponse,
46
+ });
47
+ Object.setPrototypeOf(this, GatewayTimeoutError.prototype);
48
+ }
49
+ }
50
+ exports.GatewayTimeoutError = GatewayTimeoutError;
@@ -2,6 +2,7 @@ export * from "./BadRequestError.js";
2
2
  export * from "./ConflictError.js";
3
3
  export * from "./FailedDependencyError.js";
4
4
  export * from "./ForbiddenError.js";
5
+ export * from "./GatewayTimeoutError.js";
5
6
  export * from "./InternalServerError.js";
6
7
  export * from "./NotFoundError.js";
7
8
  export * from "./NotImplementedError.js";
@@ -18,6 +18,7 @@ __exportStar(require("./BadRequestError.js"), exports);
18
18
  __exportStar(require("./ConflictError.js"), exports);
19
19
  __exportStar(require("./FailedDependencyError.js"), exports);
20
20
  __exportStar(require("./ForbiddenError.js"), exports);
21
+ __exportStar(require("./GatewayTimeoutError.js"), exports);
21
22
  __exportStar(require("./InternalServerError.js"), exports);
22
23
  __exportStar(require("./NotFoundError.js"), exports);
23
24
  __exportStar(require("./NotImplementedError.js"), exports);
@@ -1,3 +1,5 @@
1
1
  export interface ConstrueUploadCodeSystemResponse {
2
2
  status?: string;
3
+ name?: string;
4
+ version?: string;
3
5
  }
@@ -6,10 +6,8 @@ export interface ExtractedCodeResult {
6
6
  description: string;
7
7
  /** Whether the code passed validation. Always true unless include_invalid is set to true, in which case invalid codes will have this set to false. */
8
8
  valid: boolean;
9
- /** Long description of the code */
10
- longDescription?: string;
11
9
  /** Explanation for why this code was extracted (if include_rationale is true) */
12
- rationale?: string;
10
+ reason?: string;
13
11
  /**
14
12
  * Whether this code is an ancestor (parent) of an extracted code rather than directly extracted.
15
13
  * Only present when include_ancestors is true.
@@ -9,9 +9,9 @@ export interface GetCodeSystemDetailResponse {
9
9
  builtin: boolean;
10
10
  /**
11
11
  * Processing status of the code system.
12
- * - "processing": embeddings are being generated (async upload in progress)
12
+ * - "processing": embeddings are being generated
13
13
  * - "ready": code system is ready for use
14
- * - "failed": async processing failed (re-upload with replace=true to retry)
14
+ * - "failed": processing failed (re-upload with replace=true to retry)
15
15
  */
16
16
  status: GetCodeSystemDetailResponse.Status;
17
17
  /** When the code system was created */
@@ -22,9 +22,9 @@ export interface GetCodeSystemDetailResponse {
22
22
  export declare namespace GetCodeSystemDetailResponse {
23
23
  /**
24
24
  * Processing status of the code system.
25
- * - "processing": embeddings are being generated (async upload in progress)
25
+ * - "processing": embeddings are being generated
26
26
  * - "ready": code system is ready for use
27
- * - "failed": async processing failed (re-upload with replace=true to retry)
27
+ * - "failed": processing failed (re-upload with replace=true to retry)
28
28
  */
29
29
  const Status: {
30
30
  readonly Processing: "processing";
@@ -6,9 +6,9 @@ var GetCodeSystemDetailResponse;
6
6
  (function (GetCodeSystemDetailResponse) {
7
7
  /**
8
8
  * Processing status of the code system.
9
- * - "processing": embeddings are being generated (async upload in progress)
9
+ * - "processing": embeddings are being generated
10
10
  * - "ready": code system is ready for use
11
- * - "failed": async processing failed (re-upload with replace=true to retry)
11
+ * - "failed": processing failed (re-upload with replace=true to retry)
12
12
  */
13
13
  GetCodeSystemDetailResponse.Status = {
14
14
  Processing: "processing",
@@ -17,6 +17,3 @@ export * from "./SemanticSearchResponse.js";
17
17
  export * from "./SemanticSearchResult.js";
18
18
  export * from "./TextSearchResponse.js";
19
19
  export * from "./TextSearchResult.js";
20
- export * from "./UploadRequest.js";
21
- export * from "./UploadRequestCsv.js";
22
- export * from "./UploadRequestJson.js";
@@ -33,6 +33,3 @@ __exportStar(require("./SemanticSearchResponse.js"), exports);
33
33
  __exportStar(require("./SemanticSearchResult.js"), exports);
34
34
  __exportStar(require("./TextSearchResponse.js"), exports);
35
35
  __exportStar(require("./TextSearchResult.js"), exports);
36
- __exportStar(require("./UploadRequest.js"), exports);
37
- __exportStar(require("./UploadRequestCsv.js"), exports);
38
- __exportStar(require("./UploadRequestJson.js"), exports);
@@ -2,8 +2,6 @@ import type * as phenoml from "../../../index.js";
2
2
  export interface FhirProviderTemplate {
3
3
  /** Unique identifier for the FHIR provider */
4
4
  id?: string;
5
- /** ID of the user who owns this FHIR provider */
6
- user_id?: string;
7
5
  /** Display name for the FHIR provider */
8
6
  name?: string;
9
7
  /** Optional description of the FHIR provider */
@@ -1,6 +1,5 @@
1
1
  export interface SummaryTemplate {
2
2
  id?: string;
3
- user_id?: string;
4
3
  name?: string;
5
4
  description?: string;
6
5
  /** Template with {{resource.field}} placeholders */
@@ -13,8 +13,6 @@ export declare namespace McpServerResponse {
13
13
  interface Data {
14
14
  /** ID of the MCP server */
15
15
  id?: string;
16
- /** ID of the user who created the MCP server */
17
- user_id?: string;
18
16
  /** Name of the MCP server */
19
17
  name?: string;
20
18
  /** Description of the MCP server */
@@ -13,8 +13,6 @@ export declare namespace McpServerToolResponse {
13
13
  interface Data {
14
14
  /** ID of the MCP server tool */
15
15
  id?: string;
16
- /** ID of the user who created the MCP server tool */
17
- user_id?: string;
18
16
  /** Name of the MCP server tool */
19
17
  name?: string;
20
18
  /** Description of the MCP server tool */
@@ -2,8 +2,6 @@ import type * as phenoml from "../../../index.js";
2
2
  export interface WorkflowDefinition {
3
3
  /** Unique identifier for the workflow */
4
4
  id?: string;
5
- /** ID of the user who created the workflow */
6
- user_id?: string;
7
5
  /** Human-readable name for the workflow */
8
6
  name?: string;
9
7
  /** Natural language instructions that define the workflow logic */
@@ -5,8 +5,6 @@ import type * as phenoml from "../../../index.js";
5
5
  export interface WorkflowResponse {
6
6
  /** Unique identifier for the workflow */
7
7
  id?: string;
8
- /** ID of the user who created the workflow */
9
- user_id?: string;
10
8
  /** Human-readable name for the workflow */
11
9
  name?: string;
12
10
  /** Natural language instructions that define the workflow logic */
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "5.3.0";
1
+ export declare const SDK_VERSION = "6.0.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "5.3.0";
4
+ exports.SDK_VERSION = "6.0.0";
@@ -16,8 +16,8 @@ export class phenomlClient {
16
16
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
17
17
  "X-Fern-Language": "JavaScript",
18
18
  "X-Fern-SDK-Name": "phenoml",
19
- "X-Fern-SDK-Version": "5.3.0",
20
- "User-Agent": "phenoml/5.3.0",
19
+ "X-Fern-SDK-Version": "6.0.0",
20
+ "User-Agent": "phenoml/auto",
21
21
  "X-Fern-Runtime": core.RUNTIME.type,
22
22
  "X-Fern-Runtime-Version": core.RUNTIME.version,
23
23
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -17,8 +17,6 @@ export interface ChatMessageTemplate {
17
17
  created?: string;
18
18
  /** Message updated time */
19
19
  updated?: string;
20
- /** User ID */
21
- user_id?: string;
22
20
  /** Function name */
23
21
  function_name?: string;
24
22
  /** Function arguments */
@@ -1,8 +1,6 @@
1
1
  export interface ChatSessionTemplate {
2
2
  /** Chat session ID */
3
3
  id?: string;
4
- /** User ID */
5
- user_id?: string;
6
4
  /** Chat session ID */
7
5
  session_id?: string;
8
6
  /** Chat session status */
@@ -12,8 +12,9 @@ export declare class Construe {
12
12
  constructor(_options: Construe.Options);
13
13
  /**
14
14
  * Upload a custom medical code system with codes and descriptions for use in code extraction. Requires a paid plan.
15
- * Upon upload, construe generates embeddings for all of the codes in the code system and stores them in the vector database so you can
16
- * subsequently use the code system for construe/extract and lang2fhir/create (coming soon!)
15
+ * Returns 202 immediately; embedding generation runs asynchronously. Poll
16
+ * GET /construe/codes/systems/{codesystem}?version={version} to check when status
17
+ * transitions from "processing" to "ready" or "failed".
17
18
  *
18
19
  * @param {phenoml.construe.UploadRequest} request
19
20
  * @param {Construe.RequestOptions} requestOptions - Request-specific configuration.
@@ -27,12 +28,9 @@ export declare class Construe {
27
28
  *
28
29
  * @example
29
30
  * await client.construe.uploadCodeSystem({
30
- * format: "csv",
31
31
  * name: "CUSTOM_CODES",
32
32
  * version: "1.0",
33
- * file: "file",
34
- * code_col: "code",
35
- * desc_col: "description"
33
+ * format: "csv"
36
34
  * })
37
35
  */
38
36
  uploadCodeSystem(request: phenoml.construe.UploadRequest, requestOptions?: Construe.RequestOptions): core.HttpResponsePromise<phenoml.construe.ConstrueUploadCodeSystemResponse>;
@@ -47,8 +45,10 @@ export declare class Construe {
47
45
  *
48
46
  * @throws {@link phenoml.construe.BadRequestError}
49
47
  * @throws {@link phenoml.construe.UnauthorizedError}
50
- * @throws {@link phenoml.construe.FailedDependencyError}
48
+ * @throws {@link phenoml.construe.NotFoundError}
51
49
  * @throws {@link phenoml.construe.InternalServerError}
50
+ * @throws {@link phenoml.construe.ServiceUnavailableError}
51
+ * @throws {@link phenoml.construe.GatewayTimeoutError}
52
52
  *
53
53
  * @example
54
54
  * await client.construe.extractCodes({
@@ -253,7 +253,6 @@ export declare class Construe {
253
253
  * @throws {@link phenoml.construe.NotFoundError}
254
254
  * @throws {@link phenoml.construe.InternalServerError}
255
255
  * @throws {@link phenoml.construe.NotImplementedError}
256
- * @throws {@link phenoml.construe.ServiceUnavailableError}
257
256
  *
258
257
  * @example
259
258
  * await client.construe.terminologyServerTextSearch("ICD-10-CM", {
@@ -19,8 +19,9 @@ export class Construe {
19
19
  }
20
20
  /**
21
21
  * Upload a custom medical code system with codes and descriptions for use in code extraction. Requires a paid plan.
22
- * Upon upload, construe generates embeddings for all of the codes in the code system and stores them in the vector database so you can
23
- * subsequently use the code system for construe/extract and lang2fhir/create (coming soon!)
22
+ * Returns 202 immediately; embedding generation runs asynchronously. Poll
23
+ * GET /construe/codes/systems/{codesystem}?version={version} to check when status
24
+ * transitions from "processing" to "ready" or "failed".
24
25
  *
25
26
  * @param {phenoml.construe.UploadRequest} request
26
27
  * @param {Construe.RequestOptions} requestOptions - Request-specific configuration.
@@ -34,12 +35,9 @@ export class Construe {
34
35
  *
35
36
  * @example
36
37
  * await client.construe.uploadCodeSystem({
37
- * format: "csv",
38
38
  * name: "CUSTOM_CODES",
39
39
  * version: "1.0",
40
- * file: "file",
41
- * code_col: "code",
42
- * desc_col: "description"
40
+ * format: "csv"
43
41
  * })
44
42
  */
45
43
  uploadCodeSystem(request, requestOptions) {
@@ -116,8 +114,10 @@ export class Construe {
116
114
  *
117
115
  * @throws {@link phenoml.construe.BadRequestError}
118
116
  * @throws {@link phenoml.construe.UnauthorizedError}
119
- * @throws {@link phenoml.construe.FailedDependencyError}
117
+ * @throws {@link phenoml.construe.NotFoundError}
120
118
  * @throws {@link phenoml.construe.InternalServerError}
119
+ * @throws {@link phenoml.construe.ServiceUnavailableError}
120
+ * @throws {@link phenoml.construe.GatewayTimeoutError}
121
121
  *
122
122
  * @example
123
123
  * await client.construe.extractCodes({
@@ -152,10 +152,14 @@ export class Construe {
152
152
  throw new phenoml.construe.BadRequestError(_response.error.body, _response.rawResponse);
153
153
  case 401:
154
154
  throw new phenoml.construe.UnauthorizedError(_response.error.body, _response.rawResponse);
155
- case 424:
156
- throw new phenoml.construe.FailedDependencyError(_response.error.body, _response.rawResponse);
155
+ case 404:
156
+ throw new phenoml.construe.NotFoundError(_response.error.body, _response.rawResponse);
157
157
  case 500:
158
158
  throw new phenoml.construe.InternalServerError(_response.error.body, _response.rawResponse);
159
+ case 503:
160
+ throw new phenoml.construe.ServiceUnavailableError(_response.error.body, _response.rawResponse);
161
+ case 504:
162
+ throw new phenoml.construe.GatewayTimeoutError(_response.error.body, _response.rawResponse);
159
163
  default:
160
164
  throw new errors.phenomlError({
161
165
  statusCode: _response.error.statusCode,
@@ -800,7 +804,6 @@ export class Construe {
800
804
  * @throws {@link phenoml.construe.NotFoundError}
801
805
  * @throws {@link phenoml.construe.InternalServerError}
802
806
  * @throws {@link phenoml.construe.NotImplementedError}
803
- * @throws {@link phenoml.construe.ServiceUnavailableError}
804
807
  *
805
808
  * @example
806
809
  * await client.construe.terminologyServerTextSearch("ICD-10-CM", {
@@ -849,8 +852,6 @@ export class Construe {
849
852
  throw new phenoml.construe.InternalServerError(_response.error.body, _response.rawResponse);
850
853
  case 501:
851
854
  throw new phenoml.construe.NotImplementedError(_response.error.body, _response.rawResponse);
852
- case 503:
853
- throw new phenoml.construe.ServiceUnavailableError(_response.error.body, _response.rawResponse);
854
855
  default:
855
856
  throw new errors.phenomlError({
856
857
  statusCode: _response.error.statusCode,
@@ -0,0 +1,55 @@
1
+ import type * as phenoml from "../../../../index.mjs";
2
+ /**
3
+ * @example
4
+ * {
5
+ * name: "CUSTOM_CODES",
6
+ * version: "1.0",
7
+ * format: "csv"
8
+ * }
9
+ */
10
+ export interface UploadRequest {
11
+ /**
12
+ * Name of the code system. Names are case-insensitive and stored uppercase.
13
+ * Builtin system names (e.g. ICD-10-CM, SNOMED_CT_US_LITE, LOINC, CPT, etc.) are
14
+ * reserved and cannot be used for custom uploads; attempts return HTTP 403 Forbidden.
15
+ */
16
+ name: string;
17
+ /** Version of the code system */
18
+ version: string;
19
+ /** Optional revision number */
20
+ revision?: number;
21
+ /** Upload format */
22
+ format: UploadRequest.Format;
23
+ /**
24
+ * The file contents as a base64-encoded string.
25
+ * For CSV format, this is the CSV file contents.
26
+ * For JSON format, this is a base64-encoded JSON array; prefer using 'codes' instead.
27
+ */
28
+ file?: string;
29
+ /** Column name containing codes (required for CSV format) */
30
+ code_col?: string;
31
+ /** Column name containing descriptions (required for CSV format) */
32
+ desc_col?: string;
33
+ /** Optional column name containing long definitions (for CSV format) */
34
+ defn_col?: string;
35
+ /**
36
+ * The codes to upload as a JSON array (JSON format only).
37
+ * This is the preferred way to upload JSON codes, as it avoids unnecessary base64 encoding.
38
+ * If both 'codes' and 'file' are provided, 'codes' takes precedence.
39
+ */
40
+ codes?: phenoml.construe.CodeResponse[];
41
+ /**
42
+ * If true, replaces an existing code system with the same name and version.
43
+ * Builtin systems cannot be replaced; attempts to do so return HTTP 403 Forbidden.
44
+ * When false (default), uploading a duplicate returns 409 Conflict.
45
+ */
46
+ replace?: boolean;
47
+ }
48
+ export declare namespace UploadRequest {
49
+ /** Upload format */
50
+ const Format: {
51
+ readonly Csv: "csv";
52
+ readonly Json: "json";
53
+ };
54
+ type Format = (typeof Format)[keyof typeof Format];
55
+ }
@@ -0,0 +1,9 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export var UploadRequest;
3
+ (function (UploadRequest) {
4
+ /** Upload format */
5
+ UploadRequest.Format = {
6
+ Csv: "csv",
7
+ Json: "json",
8
+ };
9
+ })(UploadRequest || (UploadRequest = {}));
@@ -6,3 +6,4 @@ export type { GetConstrueCodesCodesystemSearchSemanticRequest } from "./GetConst
6
6
  export type { GetConstrueCodesCodesystemSearchTextRequest } from "./GetConstrueCodesCodesystemSearchTextRequest.mjs";
7
7
  export type { GetConstrueCodesSystemsCodesystemExportRequest } from "./GetConstrueCodesSystemsCodesystemExportRequest.mjs";
8
8
  export type { GetConstrueCodesSystemsCodesystemRequest } from "./GetConstrueCodesSystemsCodesystemRequest.mjs";
9
+ export type { UploadRequest } from "./UploadRequest.mjs";
@@ -0,0 +1,5 @@
1
+ import type * as core from "../../../../core/index.mjs";
2
+ import * as errors from "../../../../errors/index.mjs";
3
+ export declare class GatewayTimeoutError extends errors.phenomlError {
4
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
5
+ }
@@ -0,0 +1,13 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as errors from "../../../../errors/index.mjs";
3
+ export class GatewayTimeoutError extends errors.phenomlError {
4
+ constructor(body, rawResponse) {
5
+ super({
6
+ message: "GatewayTimeoutError",
7
+ statusCode: 504,
8
+ body: body,
9
+ rawResponse: rawResponse,
10
+ });
11
+ Object.setPrototypeOf(this, GatewayTimeoutError.prototype);
12
+ }
13
+ }
@@ -2,6 +2,7 @@ export * from "./BadRequestError.mjs";
2
2
  export * from "./ConflictError.mjs";
3
3
  export * from "./FailedDependencyError.mjs";
4
4
  export * from "./ForbiddenError.mjs";
5
+ export * from "./GatewayTimeoutError.mjs";
5
6
  export * from "./InternalServerError.mjs";
6
7
  export * from "./NotFoundError.mjs";
7
8
  export * from "./NotImplementedError.mjs";
@@ -2,6 +2,7 @@ export * from "./BadRequestError.mjs";
2
2
  export * from "./ConflictError.mjs";
3
3
  export * from "./FailedDependencyError.mjs";
4
4
  export * from "./ForbiddenError.mjs";
5
+ export * from "./GatewayTimeoutError.mjs";
5
6
  export * from "./InternalServerError.mjs";
6
7
  export * from "./NotFoundError.mjs";
7
8
  export * from "./NotImplementedError.mjs";
@@ -1,3 +1,5 @@
1
1
  export interface ConstrueUploadCodeSystemResponse {
2
2
  status?: string;
3
+ name?: string;
4
+ version?: string;
3
5
  }
@@ -6,10 +6,8 @@ export interface ExtractedCodeResult {
6
6
  description: string;
7
7
  /** Whether the code passed validation. Always true unless include_invalid is set to true, in which case invalid codes will have this set to false. */
8
8
  valid: boolean;
9
- /** Long description of the code */
10
- longDescription?: string;
11
9
  /** Explanation for why this code was extracted (if include_rationale is true) */
12
- rationale?: string;
10
+ reason?: string;
13
11
  /**
14
12
  * Whether this code is an ancestor (parent) of an extracted code rather than directly extracted.
15
13
  * Only present when include_ancestors is true.
@@ -9,9 +9,9 @@ export interface GetCodeSystemDetailResponse {
9
9
  builtin: boolean;
10
10
  /**
11
11
  * Processing status of the code system.
12
- * - "processing": embeddings are being generated (async upload in progress)
12
+ * - "processing": embeddings are being generated
13
13
  * - "ready": code system is ready for use
14
- * - "failed": async processing failed (re-upload with replace=true to retry)
14
+ * - "failed": processing failed (re-upload with replace=true to retry)
15
15
  */
16
16
  status: GetCodeSystemDetailResponse.Status;
17
17
  /** When the code system was created */
@@ -22,9 +22,9 @@ export interface GetCodeSystemDetailResponse {
22
22
  export declare namespace GetCodeSystemDetailResponse {
23
23
  /**
24
24
  * Processing status of the code system.
25
- * - "processing": embeddings are being generated (async upload in progress)
25
+ * - "processing": embeddings are being generated
26
26
  * - "ready": code system is ready for use
27
- * - "failed": async processing failed (re-upload with replace=true to retry)
27
+ * - "failed": processing failed (re-upload with replace=true to retry)
28
28
  */
29
29
  const Status: {
30
30
  readonly Processing: "processing";
@@ -3,9 +3,9 @@ export var GetCodeSystemDetailResponse;
3
3
  (function (GetCodeSystemDetailResponse) {
4
4
  /**
5
5
  * Processing status of the code system.
6
- * - "processing": embeddings are being generated (async upload in progress)
6
+ * - "processing": embeddings are being generated
7
7
  * - "ready": code system is ready for use
8
- * - "failed": async processing failed (re-upload with replace=true to retry)
8
+ * - "failed": processing failed (re-upload with replace=true to retry)
9
9
  */
10
10
  GetCodeSystemDetailResponse.Status = {
11
11
  Processing: "processing",
@@ -17,6 +17,3 @@ export * from "./SemanticSearchResponse.mjs";
17
17
  export * from "./SemanticSearchResult.mjs";
18
18
  export * from "./TextSearchResponse.mjs";
19
19
  export * from "./TextSearchResult.mjs";
20
- export * from "./UploadRequest.mjs";
21
- export * from "./UploadRequestCsv.mjs";
22
- export * from "./UploadRequestJson.mjs";
@@ -17,6 +17,3 @@ export * from "./SemanticSearchResponse.mjs";
17
17
  export * from "./SemanticSearchResult.mjs";
18
18
  export * from "./TextSearchResponse.mjs";
19
19
  export * from "./TextSearchResult.mjs";
20
- export * from "./UploadRequest.mjs";
21
- export * from "./UploadRequestCsv.mjs";
22
- export * from "./UploadRequestJson.mjs";
@@ -2,8 +2,6 @@ import type * as phenoml from "../../../index.mjs";
2
2
  export interface FhirProviderTemplate {
3
3
  /** Unique identifier for the FHIR provider */
4
4
  id?: string;
5
- /** ID of the user who owns this FHIR provider */
6
- user_id?: string;
7
5
  /** Display name for the FHIR provider */
8
6
  name?: string;
9
7
  /** Optional description of the FHIR provider */
@@ -1,6 +1,5 @@
1
1
  export interface SummaryTemplate {
2
2
  id?: string;
3
- user_id?: string;
4
3
  name?: string;
5
4
  description?: string;
6
5
  /** Template with {{resource.field}} placeholders */
@@ -13,8 +13,6 @@ export declare namespace McpServerResponse {
13
13
  interface Data {
14
14
  /** ID of the MCP server */
15
15
  id?: string;
16
- /** ID of the user who created the MCP server */
17
- user_id?: string;
18
16
  /** Name of the MCP server */
19
17
  name?: string;
20
18
  /** Description of the MCP server */
@@ -13,8 +13,6 @@ export declare namespace McpServerToolResponse {
13
13
  interface Data {
14
14
  /** ID of the MCP server tool */
15
15
  id?: string;
16
- /** ID of the user who created the MCP server tool */
17
- user_id?: string;
18
16
  /** Name of the MCP server tool */
19
17
  name?: string;
20
18
  /** Description of the MCP server tool */
@@ -2,8 +2,6 @@ import type * as phenoml from "../../../index.mjs";
2
2
  export interface WorkflowDefinition {
3
3
  /** Unique identifier for the workflow */
4
4
  id?: string;
5
- /** ID of the user who created the workflow */
6
- user_id?: string;
7
5
  /** Human-readable name for the workflow */
8
6
  name?: string;
9
7
  /** Natural language instructions that define the workflow logic */
@@ -5,8 +5,6 @@ import type * as phenoml from "../../../index.mjs";
5
5
  export interface WorkflowResponse {
6
6
  /** Unique identifier for the workflow */
7
7
  id?: string;
8
- /** ID of the user who created the workflow */
9
- user_id?: string;
10
8
  /** Human-readable name for the workflow */
11
9
  name?: string;
12
10
  /** Natural language instructions that define the workflow logic */
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "5.3.0";
1
+ export declare const SDK_VERSION = "6.0.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "5.3.0";
1
+ export const SDK_VERSION = "6.0.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phenoml",
3
- "version": "5.3.0",
3
+ "version": "6.0.0",
4
4
  "private": false,
5
5
  "repository": "github:PhenoML/phenoml-ts-sdk",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -1154,8 +1154,9 @@ await client.cohort.analyze({
1154
1154
  <dd>
1155
1155
 
1156
1156
  Upload a custom medical code system with codes and descriptions for use in code extraction. Requires a paid plan.
1157
- Upon upload, construe generates embeddings for all of the codes in the code system and stores them in the vector database so you can
1158
- subsequently use the code system for construe/extract and lang2fhir/create (coming soon!)
1157
+ Returns 202 immediately; embedding generation runs asynchronously. Poll
1158
+ GET /construe/codes/systems/{codesystem}?version={version} to check when status
1159
+ transitions from "processing" to "ready" or "failed".
1159
1160
  </dd>
1160
1161
  </dl>
1161
1162
  </dd>
@@ -1171,12 +1172,9 @@ subsequently use the code system for construe/extract and lang2fhir/create (comi
1171
1172
 
1172
1173
  ```typescript
1173
1174
  await client.construe.uploadCodeSystem({
1174
- format: "csv",
1175
1175
  name: "CUSTOM_CODES",
1176
1176
  version: "1.0",
1177
- file: "file",
1178
- code_col: "code",
1179
- desc_col: "description"
1177
+ format: "csv"
1180
1178
  });
1181
1179
 
1182
1180
  ```
@@ -1193,7 +1191,7 @@ await client.construe.uploadCodeSystem({
1193
1191
  <dl>
1194
1192
  <dd>
1195
1193
 
1196
- **request:** `phenoml.UploadRequest`
1194
+ **request:** `phenoml.construe.UploadRequest`
1197
1195
 
1198
1196
  </dd>
1199
1197
  </dl>
@@ -1,10 +0,0 @@
1
- import type * as phenoml from "../../../index.js";
2
- export type UploadRequest = phenoml.construe.UploadRequest.Csv | phenoml.construe.UploadRequest.Json;
3
- export declare namespace UploadRequest {
4
- interface Csv extends phenoml.construe.UploadRequestCsv {
5
- format: "csv";
6
- }
7
- interface Json extends phenoml.construe.UploadRequestJson {
8
- format: "json";
9
- }
10
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,32 +0,0 @@
1
- export interface UploadRequestCsv {
2
- /**
3
- * Name of the code system. Names are case-insensitive and stored uppercase.
4
- * Builtin system names (e.g. ICD-10-CM, SNOMED_CT_US_LITE, LOINC, CPT, etc.) are
5
- * reserved and cannot be used for custom uploads; attempts return HTTP 403 Forbidden.
6
- */
7
- name: string;
8
- /** Version of the code system */
9
- version: string;
10
- /** Optional revision number */
11
- revision?: number;
12
- /** The CSV file contents as a base64-encoded string. */
13
- file: string;
14
- /** Column name containing codes */
15
- code_col: string;
16
- /** Column name containing descriptions */
17
- desc_col: string;
18
- /** Optional column name containing long definitions */
19
- defn_col?: string;
20
- /**
21
- * If true, replaces an existing code system with the same name and version.
22
- * Builtin systems cannot be replaced; attempts to do so return HTTP 403 Forbidden.
23
- * When false (default), uploading a duplicate returns 409 Conflict.
24
- */
25
- replace?: boolean;
26
- /**
27
- * If true, returns 202 Accepted immediately after validation and starts processing
28
- * in the background. Poll GET /construe/codes/systems/{name}?version={version} to
29
- * check when status transitions from "processing" to "ready" or "failed".
30
- */
31
- async?: boolean;
32
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,40 +0,0 @@
1
- import type * as phenoml from "../../../index.js";
2
- /**
3
- * Upload codes in JSON format. Either 'file' or 'codes' must be provided.
4
- * If both are provided, 'codes' takes precedence.
5
- */
6
- export interface UploadRequestJson {
7
- /**
8
- * Name of the code system. Names are case-insensitive and stored uppercase.
9
- * Builtin system names (e.g. ICD-10-CM, SNOMED_CT_US_LITE, LOINC, CPT, etc.) are
10
- * reserved and cannot be used for custom uploads; attempts return HTTP 403 Forbidden.
11
- */
12
- name: string;
13
- /** Version of the code system */
14
- version: string;
15
- /** Optional revision number */
16
- revision?: number;
17
- /**
18
- * The file contents as a base64-encoded JSON array string.
19
- * Prefer using 'codes' instead to pass the array directly without base64 encoding.
20
- */
21
- file?: string;
22
- /**
23
- * The codes to upload as a JSON array.
24
- * This is the preferred way to upload JSON codes, as it avoids unnecessary base64 encoding.
25
- * If both 'codes' and 'file' are provided, 'codes' takes precedence.
26
- */
27
- codes?: phenoml.construe.CodeResponse[];
28
- /**
29
- * If true, replaces an existing code system with the same name and version.
30
- * Builtin systems cannot be replaced; attempts to do so return HTTP 403 Forbidden.
31
- * When false (default), uploading a duplicate returns 409 Conflict.
32
- */
33
- replace?: boolean;
34
- /**
35
- * If true, returns 202 Accepted immediately after validation and starts processing
36
- * in the background. Poll GET /construe/codes/systems/{name}?version={version} to
37
- * check when status transitions from "processing" to "ready" or "failed".
38
- */
39
- async?: boolean;
40
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,10 +0,0 @@
1
- import type * as phenoml from "../../../index.mjs";
2
- export type UploadRequest = phenoml.construe.UploadRequest.Csv | phenoml.construe.UploadRequest.Json;
3
- export declare namespace UploadRequest {
4
- interface Csv extends phenoml.construe.UploadRequestCsv {
5
- format: "csv";
6
- }
7
- interface Json extends phenoml.construe.UploadRequestJson {
8
- format: "json";
9
- }
10
- }
@@ -1,2 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- export {};
@@ -1,32 +0,0 @@
1
- export interface UploadRequestCsv {
2
- /**
3
- * Name of the code system. Names are case-insensitive and stored uppercase.
4
- * Builtin system names (e.g. ICD-10-CM, SNOMED_CT_US_LITE, LOINC, CPT, etc.) are
5
- * reserved and cannot be used for custom uploads; attempts return HTTP 403 Forbidden.
6
- */
7
- name: string;
8
- /** Version of the code system */
9
- version: string;
10
- /** Optional revision number */
11
- revision?: number;
12
- /** The CSV file contents as a base64-encoded string. */
13
- file: string;
14
- /** Column name containing codes */
15
- code_col: string;
16
- /** Column name containing descriptions */
17
- desc_col: string;
18
- /** Optional column name containing long definitions */
19
- defn_col?: string;
20
- /**
21
- * If true, replaces an existing code system with the same name and version.
22
- * Builtin systems cannot be replaced; attempts to do so return HTTP 403 Forbidden.
23
- * When false (default), uploading a duplicate returns 409 Conflict.
24
- */
25
- replace?: boolean;
26
- /**
27
- * If true, returns 202 Accepted immediately after validation and starts processing
28
- * in the background. Poll GET /construe/codes/systems/{name}?version={version} to
29
- * check when status transitions from "processing" to "ready" or "failed".
30
- */
31
- async?: boolean;
32
- }
@@ -1,2 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- export {};
@@ -1,40 +0,0 @@
1
- import type * as phenoml from "../../../index.mjs";
2
- /**
3
- * Upload codes in JSON format. Either 'file' or 'codes' must be provided.
4
- * If both are provided, 'codes' takes precedence.
5
- */
6
- export interface UploadRequestJson {
7
- /**
8
- * Name of the code system. Names are case-insensitive and stored uppercase.
9
- * Builtin system names (e.g. ICD-10-CM, SNOMED_CT_US_LITE, LOINC, CPT, etc.) are
10
- * reserved and cannot be used for custom uploads; attempts return HTTP 403 Forbidden.
11
- */
12
- name: string;
13
- /** Version of the code system */
14
- version: string;
15
- /** Optional revision number */
16
- revision?: number;
17
- /**
18
- * The file contents as a base64-encoded JSON array string.
19
- * Prefer using 'codes' instead to pass the array directly without base64 encoding.
20
- */
21
- file?: string;
22
- /**
23
- * The codes to upload as a JSON array.
24
- * This is the preferred way to upload JSON codes, as it avoids unnecessary base64 encoding.
25
- * If both 'codes' and 'file' are provided, 'codes' takes precedence.
26
- */
27
- codes?: phenoml.construe.CodeResponse[];
28
- /**
29
- * If true, replaces an existing code system with the same name and version.
30
- * Builtin systems cannot be replaced; attempts to do so return HTTP 403 Forbidden.
31
- * When false (default), uploading a duplicate returns 409 Conflict.
32
- */
33
- replace?: boolean;
34
- /**
35
- * If true, returns 202 Accepted immediately after validation and starts processing
36
- * in the background. Poll GET /construe/codes/systems/{name}?version={version} to
37
- * check when status transitions from "processing" to "ready" or "failed".
38
- */
39
- async?: boolean;
40
- }
@@ -1,2 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- export {};