phenoml 5.2.0 → 5.3.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 (30) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/construe/client/Client.d.ts +24 -0
  3. package/dist/cjs/api/resources/construe/client/Client.js +90 -0
  4. package/dist/cjs/api/resources/construe/client/requests/GetConstrueCodesSystemsCodesystemExportRequest.d.ts +10 -0
  5. package/dist/cjs/api/resources/construe/client/requests/GetConstrueCodesSystemsCodesystemExportRequest.js +3 -0
  6. package/dist/cjs/api/resources/construe/client/requests/index.d.ts +1 -0
  7. package/dist/cjs/api/resources/construe/types/ExportCodeSystemResponse.d.ts +11 -0
  8. package/dist/cjs/api/resources/construe/types/ExportCodeSystemResponse.js +3 -0
  9. package/dist/cjs/api/resources/construe/types/index.d.ts +1 -0
  10. package/dist/cjs/api/resources/construe/types/index.js +1 -0
  11. package/dist/cjs/api/resources/fhirProvider/client/Client.d.ts +0 -1
  12. package/dist/cjs/api/resources/fhirProvider/client/Client.js +0 -3
  13. package/dist/cjs/version.d.ts +1 -1
  14. package/dist/cjs/version.js +1 -1
  15. package/dist/esm/Client.mjs +2 -2
  16. package/dist/esm/api/resources/construe/client/Client.d.mts +24 -0
  17. package/dist/esm/api/resources/construe/client/Client.mjs +90 -0
  18. package/dist/esm/api/resources/construe/client/requests/GetConstrueCodesSystemsCodesystemExportRequest.d.mts +10 -0
  19. package/dist/esm/api/resources/construe/client/requests/GetConstrueCodesSystemsCodesystemExportRequest.mjs +2 -0
  20. package/dist/esm/api/resources/construe/client/requests/index.d.mts +1 -0
  21. package/dist/esm/api/resources/construe/types/ExportCodeSystemResponse.d.mts +11 -0
  22. package/dist/esm/api/resources/construe/types/ExportCodeSystemResponse.mjs +2 -0
  23. package/dist/esm/api/resources/construe/types/index.d.mts +1 -0
  24. package/dist/esm/api/resources/construe/types/index.mjs +1 -0
  25. package/dist/esm/api/resources/fhirProvider/client/Client.d.mts +0 -1
  26. package/dist/esm/api/resources/fhirProvider/client/Client.mjs +0 -3
  27. package/dist/esm/version.d.mts +1 -1
  28. package/dist/esm/version.mjs +1 -1
  29. package/package.json +1 -1
  30. package/reference.md +75 -0
@@ -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.2.0",
56
- "User-Agent": "phenoml/5.2.0",
55
+ "X-Fern-SDK-Version": "5.3.0",
56
+ "User-Agent": "phenoml/5.3.0",
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) });
@@ -110,6 +110,30 @@ export declare class Construe {
110
110
  */
111
111
  deleteCustomCodeSystem(codesystem: string, request?: phenoml.construe.DeleteConstrueCodesSystemsCodesystemRequest, requestOptions?: Construe.RequestOptions): core.HttpResponsePromise<phenoml.construe.DeleteCodeSystemResponse>;
112
112
  private __deleteCustomCodeSystem;
113
+ /**
114
+ * Exports a custom (non-builtin) code system as a JSON file compatible with the upload format.
115
+ * The exported file can be re-uploaded directly via POST /construe/upload with format "json".
116
+ * Only available on dedicated instances. Builtin systems cannot be exported.
117
+ *
118
+ * @param {string} codesystem - Code system name
119
+ * @param {phenoml.construe.GetConstrueCodesSystemsCodesystemExportRequest} request
120
+ * @param {Construe.RequestOptions} requestOptions - Request-specific configuration.
121
+ *
122
+ * @throws {@link phenoml.construe.BadRequestError}
123
+ * @throws {@link phenoml.construe.UnauthorizedError}
124
+ * @throws {@link phenoml.construe.ForbiddenError}
125
+ * @throws {@link phenoml.construe.NotFoundError}
126
+ * @throws {@link phenoml.construe.ConflictError}
127
+ * @throws {@link phenoml.construe.FailedDependencyError}
128
+ * @throws {@link phenoml.construe.InternalServerError}
129
+ *
130
+ * @example
131
+ * await client.construe.exportCustomCodeSystem("CUSTOM_CODES", {
132
+ * version: "version"
133
+ * })
134
+ */
135
+ exportCustomCodeSystem(codesystem: string, request?: phenoml.construe.GetConstrueCodesSystemsCodesystemExportRequest, requestOptions?: Construe.RequestOptions): core.HttpResponsePromise<phenoml.construe.ExportCodeSystemResponse>;
136
+ private __exportCustomCodeSystem;
113
137
  /**
114
138
  * Returns a paginated list of all codes in the specified code system from the terminology server.
115
139
  *
@@ -443,6 +443,96 @@ class Construe {
443
443
  }
444
444
  });
445
445
  }
446
+ /**
447
+ * Exports a custom (non-builtin) code system as a JSON file compatible with the upload format.
448
+ * The exported file can be re-uploaded directly via POST /construe/upload with format "json".
449
+ * Only available on dedicated instances. Builtin systems cannot be exported.
450
+ *
451
+ * @param {string} codesystem - Code system name
452
+ * @param {phenoml.construe.GetConstrueCodesSystemsCodesystemExportRequest} request
453
+ * @param {Construe.RequestOptions} requestOptions - Request-specific configuration.
454
+ *
455
+ * @throws {@link phenoml.construe.BadRequestError}
456
+ * @throws {@link phenoml.construe.UnauthorizedError}
457
+ * @throws {@link phenoml.construe.ForbiddenError}
458
+ * @throws {@link phenoml.construe.NotFoundError}
459
+ * @throws {@link phenoml.construe.ConflictError}
460
+ * @throws {@link phenoml.construe.FailedDependencyError}
461
+ * @throws {@link phenoml.construe.InternalServerError}
462
+ *
463
+ * @example
464
+ * await client.construe.exportCustomCodeSystem("CUSTOM_CODES", {
465
+ * version: "version"
466
+ * })
467
+ */
468
+ exportCustomCodeSystem(codesystem, request = {}, requestOptions) {
469
+ return core.HttpResponsePromise.fromPromise(this.__exportCustomCodeSystem(codesystem, request, requestOptions));
470
+ }
471
+ __exportCustomCodeSystem(codesystem_1) {
472
+ return __awaiter(this, arguments, void 0, function* (codesystem, request = {}, requestOptions) {
473
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
474
+ const { version } = request;
475
+ const _queryParams = {};
476
+ if (version != null) {
477
+ _queryParams.version = version;
478
+ }
479
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
480
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
481
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `construe/codes/systems/${core.url.encodePathParam(codesystem)}/export`),
482
+ method: "GET",
483
+ headers: _headers,
484
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
485
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
486
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
487
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
488
+ });
489
+ if (_response.ok) {
490
+ return {
491
+ data: _response.body,
492
+ rawResponse: _response.rawResponse,
493
+ };
494
+ }
495
+ if (_response.error.reason === "status-code") {
496
+ switch (_response.error.statusCode) {
497
+ case 400:
498
+ throw new phenoml.construe.BadRequestError(_response.error.body, _response.rawResponse);
499
+ case 401:
500
+ throw new phenoml.construe.UnauthorizedError(_response.error.body, _response.rawResponse);
501
+ case 403:
502
+ throw new phenoml.construe.ForbiddenError(_response.error.body, _response.rawResponse);
503
+ case 404:
504
+ throw new phenoml.construe.NotFoundError(_response.error.body, _response.rawResponse);
505
+ case 409:
506
+ throw new phenoml.construe.ConflictError(_response.error.body, _response.rawResponse);
507
+ case 424:
508
+ throw new phenoml.construe.FailedDependencyError(_response.error.body, _response.rawResponse);
509
+ case 500:
510
+ throw new phenoml.construe.InternalServerError(_response.error.body, _response.rawResponse);
511
+ default:
512
+ throw new errors.phenomlError({
513
+ statusCode: _response.error.statusCode,
514
+ body: _response.error.body,
515
+ rawResponse: _response.rawResponse,
516
+ });
517
+ }
518
+ }
519
+ switch (_response.error.reason) {
520
+ case "non-json":
521
+ throw new errors.phenomlError({
522
+ statusCode: _response.error.statusCode,
523
+ body: _response.error.rawBody,
524
+ rawResponse: _response.rawResponse,
525
+ });
526
+ case "timeout":
527
+ throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /construe/codes/systems/{codesystem}/export.");
528
+ case "unknown":
529
+ throw new errors.phenomlError({
530
+ message: _response.error.errorMessage,
531
+ rawResponse: _response.rawResponse,
532
+ });
533
+ }
534
+ });
535
+ }
446
536
  /**
447
537
  * Returns a paginated list of all codes in the specified code system from the terminology server.
448
538
  *
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * version: "version"
5
+ * }
6
+ */
7
+ export interface GetConstrueCodesSystemsCodesystemExportRequest {
8
+ /** Specific version of the code system. Required if multiple versions exist. */
9
+ version?: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -4,4 +4,5 @@ export type { GetConstrueCodesCodesystemCodeIdRequest } from "./GetConstrueCodes
4
4
  export type { GetConstrueCodesCodesystemRequest } from "./GetConstrueCodesCodesystemRequest.js";
5
5
  export type { GetConstrueCodesCodesystemSearchSemanticRequest } from "./GetConstrueCodesCodesystemSearchSemanticRequest.js";
6
6
  export type { GetConstrueCodesCodesystemSearchTextRequest } from "./GetConstrueCodesCodesystemSearchTextRequest.js";
7
+ export type { GetConstrueCodesSystemsCodesystemExportRequest } from "./GetConstrueCodesSystemsCodesystemExportRequest.js";
7
8
  export type { GetConstrueCodesSystemsCodesystemRequest } from "./GetConstrueCodesSystemsCodesystemRequest.js";
@@ -0,0 +1,11 @@
1
+ import type * as phenoml from "../../../index.js";
2
+ export interface ExportCodeSystemResponse {
3
+ /** Code system name */
4
+ name: string;
5
+ /** Code system version */
6
+ version: string;
7
+ /** Upload format (always "json") */
8
+ format: "json";
9
+ /** All codes in the system */
10
+ codes: phenoml.construe.CodeResponse[];
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -4,6 +4,7 @@ export * from "./CodeSystemDetails.js";
4
4
  export * from "./CodeSystemInfo.js";
5
5
  export * from "./ConstrueUploadCodeSystemResponse.js";
6
6
  export * from "./DeleteCodeSystemResponse.js";
7
+ export * from "./ExportCodeSystemResponse.js";
7
8
  export * from "./ExtractCodesResult.js";
8
9
  export * from "./ExtractedCodeResult.js";
9
10
  export * from "./ExtractRequestConfig.js";
@@ -20,6 +20,7 @@ __exportStar(require("./CodeSystemDetails.js"), exports);
20
20
  __exportStar(require("./CodeSystemInfo.js"), exports);
21
21
  __exportStar(require("./ConstrueUploadCodeSystemResponse.js"), exports);
22
22
  __exportStar(require("./DeleteCodeSystemResponse.js"), exports);
23
+ __exportStar(require("./ExportCodeSystemResponse.js"), exports);
23
24
  __exportStar(require("./ExtractCodesResult.js"), exports);
24
25
  __exportStar(require("./ExtractedCodeResult.js"), exports);
25
26
  __exportStar(require("./ExtractRequestConfig.js"), exports);
@@ -59,7 +59,6 @@ export declare class FhirProvider {
59
59
  * @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
60
60
  *
61
61
  * @throws {@link phenoml.fhirProvider.UnauthorizedError}
62
- * @throws {@link phenoml.fhirProvider.ForbiddenError}
63
62
  * @throws {@link phenoml.fhirProvider.NotFoundError}
64
63
  * @throws {@link phenoml.fhirProvider.InternalServerError}
65
64
  *
@@ -211,7 +211,6 @@ class FhirProvider {
211
211
  * @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
212
212
  *
213
213
  * @throws {@link phenoml.fhirProvider.UnauthorizedError}
214
- * @throws {@link phenoml.fhirProvider.ForbiddenError}
215
214
  * @throws {@link phenoml.fhirProvider.NotFoundError}
216
215
  * @throws {@link phenoml.fhirProvider.InternalServerError}
217
216
  *
@@ -244,8 +243,6 @@ class FhirProvider {
244
243
  switch (_response.error.statusCode) {
245
244
  case 401:
246
245
  throw new phenoml.fhirProvider.UnauthorizedError(_response.error.body, _response.rawResponse);
247
- case 403:
248
- throw new phenoml.fhirProvider.ForbiddenError(_response.error.body, _response.rawResponse);
249
246
  case 404:
250
247
  throw new phenoml.fhirProvider.NotFoundError(_response.error.body, _response.rawResponse);
251
248
  case 500:
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "5.2.0";
1
+ export declare const SDK_VERSION = "5.3.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.2.0";
4
+ exports.SDK_VERSION = "5.3.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.2.0",
20
- "User-Agent": "phenoml/5.2.0",
19
+ "X-Fern-SDK-Version": "5.3.0",
20
+ "User-Agent": "phenoml/5.3.0",
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) });
@@ -110,6 +110,30 @@ export declare class Construe {
110
110
  */
111
111
  deleteCustomCodeSystem(codesystem: string, request?: phenoml.construe.DeleteConstrueCodesSystemsCodesystemRequest, requestOptions?: Construe.RequestOptions): core.HttpResponsePromise<phenoml.construe.DeleteCodeSystemResponse>;
112
112
  private __deleteCustomCodeSystem;
113
+ /**
114
+ * Exports a custom (non-builtin) code system as a JSON file compatible with the upload format.
115
+ * The exported file can be re-uploaded directly via POST /construe/upload with format "json".
116
+ * Only available on dedicated instances. Builtin systems cannot be exported.
117
+ *
118
+ * @param {string} codesystem - Code system name
119
+ * @param {phenoml.construe.GetConstrueCodesSystemsCodesystemExportRequest} request
120
+ * @param {Construe.RequestOptions} requestOptions - Request-specific configuration.
121
+ *
122
+ * @throws {@link phenoml.construe.BadRequestError}
123
+ * @throws {@link phenoml.construe.UnauthorizedError}
124
+ * @throws {@link phenoml.construe.ForbiddenError}
125
+ * @throws {@link phenoml.construe.NotFoundError}
126
+ * @throws {@link phenoml.construe.ConflictError}
127
+ * @throws {@link phenoml.construe.FailedDependencyError}
128
+ * @throws {@link phenoml.construe.InternalServerError}
129
+ *
130
+ * @example
131
+ * await client.construe.exportCustomCodeSystem("CUSTOM_CODES", {
132
+ * version: "version"
133
+ * })
134
+ */
135
+ exportCustomCodeSystem(codesystem: string, request?: phenoml.construe.GetConstrueCodesSystemsCodesystemExportRequest, requestOptions?: Construe.RequestOptions): core.HttpResponsePromise<phenoml.construe.ExportCodeSystemResponse>;
136
+ private __exportCustomCodeSystem;
113
137
  /**
114
138
  * Returns a paginated list of all codes in the specified code system from the terminology server.
115
139
  *
@@ -407,6 +407,96 @@ export class Construe {
407
407
  }
408
408
  });
409
409
  }
410
+ /**
411
+ * Exports a custom (non-builtin) code system as a JSON file compatible with the upload format.
412
+ * The exported file can be re-uploaded directly via POST /construe/upload with format "json".
413
+ * Only available on dedicated instances. Builtin systems cannot be exported.
414
+ *
415
+ * @param {string} codesystem - Code system name
416
+ * @param {phenoml.construe.GetConstrueCodesSystemsCodesystemExportRequest} request
417
+ * @param {Construe.RequestOptions} requestOptions - Request-specific configuration.
418
+ *
419
+ * @throws {@link phenoml.construe.BadRequestError}
420
+ * @throws {@link phenoml.construe.UnauthorizedError}
421
+ * @throws {@link phenoml.construe.ForbiddenError}
422
+ * @throws {@link phenoml.construe.NotFoundError}
423
+ * @throws {@link phenoml.construe.ConflictError}
424
+ * @throws {@link phenoml.construe.FailedDependencyError}
425
+ * @throws {@link phenoml.construe.InternalServerError}
426
+ *
427
+ * @example
428
+ * await client.construe.exportCustomCodeSystem("CUSTOM_CODES", {
429
+ * version: "version"
430
+ * })
431
+ */
432
+ exportCustomCodeSystem(codesystem, request = {}, requestOptions) {
433
+ return core.HttpResponsePromise.fromPromise(this.__exportCustomCodeSystem(codesystem, request, requestOptions));
434
+ }
435
+ __exportCustomCodeSystem(codesystem_1) {
436
+ return __awaiter(this, arguments, void 0, function* (codesystem, request = {}, requestOptions) {
437
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
438
+ const { version } = request;
439
+ const _queryParams = {};
440
+ if (version != null) {
441
+ _queryParams.version = version;
442
+ }
443
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
444
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
445
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `construe/codes/systems/${core.url.encodePathParam(codesystem)}/export`),
446
+ method: "GET",
447
+ headers: _headers,
448
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
449
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
450
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
451
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
452
+ });
453
+ if (_response.ok) {
454
+ return {
455
+ data: _response.body,
456
+ rawResponse: _response.rawResponse,
457
+ };
458
+ }
459
+ if (_response.error.reason === "status-code") {
460
+ switch (_response.error.statusCode) {
461
+ case 400:
462
+ throw new phenoml.construe.BadRequestError(_response.error.body, _response.rawResponse);
463
+ case 401:
464
+ throw new phenoml.construe.UnauthorizedError(_response.error.body, _response.rawResponse);
465
+ case 403:
466
+ throw new phenoml.construe.ForbiddenError(_response.error.body, _response.rawResponse);
467
+ case 404:
468
+ throw new phenoml.construe.NotFoundError(_response.error.body, _response.rawResponse);
469
+ case 409:
470
+ throw new phenoml.construe.ConflictError(_response.error.body, _response.rawResponse);
471
+ case 424:
472
+ throw new phenoml.construe.FailedDependencyError(_response.error.body, _response.rawResponse);
473
+ case 500:
474
+ throw new phenoml.construe.InternalServerError(_response.error.body, _response.rawResponse);
475
+ default:
476
+ throw new errors.phenomlError({
477
+ statusCode: _response.error.statusCode,
478
+ body: _response.error.body,
479
+ rawResponse: _response.rawResponse,
480
+ });
481
+ }
482
+ }
483
+ switch (_response.error.reason) {
484
+ case "non-json":
485
+ throw new errors.phenomlError({
486
+ statusCode: _response.error.statusCode,
487
+ body: _response.error.rawBody,
488
+ rawResponse: _response.rawResponse,
489
+ });
490
+ case "timeout":
491
+ throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /construe/codes/systems/{codesystem}/export.");
492
+ case "unknown":
493
+ throw new errors.phenomlError({
494
+ message: _response.error.errorMessage,
495
+ rawResponse: _response.rawResponse,
496
+ });
497
+ }
498
+ });
499
+ }
410
500
  /**
411
501
  * Returns a paginated list of all codes in the specified code system from the terminology server.
412
502
  *
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * version: "version"
5
+ * }
6
+ */
7
+ export interface GetConstrueCodesSystemsCodesystemExportRequest {
8
+ /** Specific version of the code system. Required if multiple versions exist. */
9
+ version?: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -4,4 +4,5 @@ export type { GetConstrueCodesCodesystemCodeIdRequest } from "./GetConstrueCodes
4
4
  export type { GetConstrueCodesCodesystemRequest } from "./GetConstrueCodesCodesystemRequest.mjs";
5
5
  export type { GetConstrueCodesCodesystemSearchSemanticRequest } from "./GetConstrueCodesCodesystemSearchSemanticRequest.mjs";
6
6
  export type { GetConstrueCodesCodesystemSearchTextRequest } from "./GetConstrueCodesCodesystemSearchTextRequest.mjs";
7
+ export type { GetConstrueCodesSystemsCodesystemExportRequest } from "./GetConstrueCodesSystemsCodesystemExportRequest.mjs";
7
8
  export type { GetConstrueCodesSystemsCodesystemRequest } from "./GetConstrueCodesSystemsCodesystemRequest.mjs";
@@ -0,0 +1,11 @@
1
+ import type * as phenoml from "../../../index.mjs";
2
+ export interface ExportCodeSystemResponse {
3
+ /** Code system name */
4
+ name: string;
5
+ /** Code system version */
6
+ version: string;
7
+ /** Upload format (always "json") */
8
+ format: "json";
9
+ /** All codes in the system */
10
+ codes: phenoml.construe.CodeResponse[];
11
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -4,6 +4,7 @@ export * from "./CodeSystemDetails.mjs";
4
4
  export * from "./CodeSystemInfo.mjs";
5
5
  export * from "./ConstrueUploadCodeSystemResponse.mjs";
6
6
  export * from "./DeleteCodeSystemResponse.mjs";
7
+ export * from "./ExportCodeSystemResponse.mjs";
7
8
  export * from "./ExtractCodesResult.mjs";
8
9
  export * from "./ExtractedCodeResult.mjs";
9
10
  export * from "./ExtractRequestConfig.mjs";
@@ -4,6 +4,7 @@ export * from "./CodeSystemDetails.mjs";
4
4
  export * from "./CodeSystemInfo.mjs";
5
5
  export * from "./ConstrueUploadCodeSystemResponse.mjs";
6
6
  export * from "./DeleteCodeSystemResponse.mjs";
7
+ export * from "./ExportCodeSystemResponse.mjs";
7
8
  export * from "./ExtractCodesResult.mjs";
8
9
  export * from "./ExtractedCodeResult.mjs";
9
10
  export * from "./ExtractRequestConfig.mjs";
@@ -59,7 +59,6 @@ export declare class FhirProvider {
59
59
  * @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
60
60
  *
61
61
  * @throws {@link phenoml.fhirProvider.UnauthorizedError}
62
- * @throws {@link phenoml.fhirProvider.ForbiddenError}
63
62
  * @throws {@link phenoml.fhirProvider.NotFoundError}
64
63
  * @throws {@link phenoml.fhirProvider.InternalServerError}
65
64
  *
@@ -175,7 +175,6 @@ export class FhirProvider {
175
175
  * @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
176
176
  *
177
177
  * @throws {@link phenoml.fhirProvider.UnauthorizedError}
178
- * @throws {@link phenoml.fhirProvider.ForbiddenError}
179
178
  * @throws {@link phenoml.fhirProvider.NotFoundError}
180
179
  * @throws {@link phenoml.fhirProvider.InternalServerError}
181
180
  *
@@ -208,8 +207,6 @@ export class FhirProvider {
208
207
  switch (_response.error.statusCode) {
209
208
  case 401:
210
209
  throw new phenoml.fhirProvider.UnauthorizedError(_response.error.body, _response.rawResponse);
211
- case 403:
212
- throw new phenoml.fhirProvider.ForbiddenError(_response.error.body, _response.rawResponse);
213
210
  case 404:
214
211
  throw new phenoml.fhirProvider.NotFoundError(_response.error.body, _response.rawResponse);
215
212
  case 500:
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "5.2.0";
1
+ export declare const SDK_VERSION = "5.3.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "5.2.0";
1
+ export const SDK_VERSION = "5.3.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phenoml",
3
- "version": "5.2.0",
3
+ "version": "5.3.0",
4
4
  "private": false,
5
5
  "repository": "github:PhenoML/phenoml-ts-sdk",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -1478,6 +1478,81 @@ await client.construe.deleteCustomCodeSystem("CUSTOM_CODES", {
1478
1478
  </dl>
1479
1479
 
1480
1480
 
1481
+ </dd>
1482
+ </dl>
1483
+ </details>
1484
+
1485
+ <details><summary><code>client.construe.<a href="/src/api/resources/construe/client/Client.ts">exportCustomCodeSystem</a>(codesystem, { ...params }) -> phenoml.ExportCodeSystemResponse</code></summary>
1486
+ <dl>
1487
+ <dd>
1488
+
1489
+ #### 📝 Description
1490
+
1491
+ <dl>
1492
+ <dd>
1493
+
1494
+ <dl>
1495
+ <dd>
1496
+
1497
+ Exports a custom (non-builtin) code system as a JSON file compatible with the upload format.
1498
+ The exported file can be re-uploaded directly via POST /construe/upload with format "json".
1499
+ Only available on dedicated instances. Builtin systems cannot be exported.
1500
+ </dd>
1501
+ </dl>
1502
+ </dd>
1503
+ </dl>
1504
+
1505
+ #### 🔌 Usage
1506
+
1507
+ <dl>
1508
+ <dd>
1509
+
1510
+ <dl>
1511
+ <dd>
1512
+
1513
+ ```typescript
1514
+ await client.construe.exportCustomCodeSystem("CUSTOM_CODES", {
1515
+ version: "version"
1516
+ });
1517
+
1518
+ ```
1519
+ </dd>
1520
+ </dl>
1521
+ </dd>
1522
+ </dl>
1523
+
1524
+ #### ⚙️ Parameters
1525
+
1526
+ <dl>
1527
+ <dd>
1528
+
1529
+ <dl>
1530
+ <dd>
1531
+
1532
+ **codesystem:** `string` — Code system name
1533
+
1534
+ </dd>
1535
+ </dl>
1536
+
1537
+ <dl>
1538
+ <dd>
1539
+
1540
+ **request:** `phenoml.construe.GetConstrueCodesSystemsCodesystemExportRequest`
1541
+
1542
+ </dd>
1543
+ </dl>
1544
+
1545
+ <dl>
1546
+ <dd>
1547
+
1548
+ **requestOptions:** `Construe.RequestOptions`
1549
+
1550
+ </dd>
1551
+ </dl>
1552
+ </dd>
1553
+ </dl>
1554
+
1555
+
1481
1556
  </dd>
1482
1557
  </dl>
1483
1558
  </details>