@haste-health/client 0.15.3

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.
@@ -0,0 +1,257 @@
1
+ import {
2
+ Bundle,
3
+ CapabilityStatement,
4
+ OperationOutcome,
5
+ Parameters,
6
+ Resource,
7
+ ResourceType,
8
+ code,
9
+ id,
10
+ } from "@oxidized-health/fhir-types/r4b/types";
11
+ import { R4B } from "@oxidized-health/fhir-types/versions";
12
+ import type { ParsedParameter } from "../url.js";
13
+ import {
14
+ Request,
15
+ RequestInteractionTypes,
16
+ RequestLevel,
17
+ ResponseInteractionTypes,
18
+ } from "./utilities.js";
19
+ export interface R4BInstanceInteraction extends Request<R4B, "instance"> {
20
+ resource: ResourceType;
21
+ id: id;
22
+ }
23
+ export interface R4BTypeInteraction extends Request<R4B, "type"> {
24
+ resource: ResourceType;
25
+ }
26
+ export interface R4BSystemInteraction extends Request<R4B, "system"> {}
27
+ export type R4BReadRequest = R4BInstanceInteraction & {
28
+ type: RequestInteractionTypes["read"];
29
+ };
30
+ export type R4BVersionReadRequest = R4BInstanceInteraction & {
31
+ type: RequestInteractionTypes["vread"];
32
+ versionId: string;
33
+ };
34
+ export type R4BUpdateRequest = R4BInstanceInteraction & {
35
+ type: RequestInteractionTypes["update"];
36
+ body: Resource;
37
+ };
38
+ export type R4BPatchRequest = R4BInstanceInteraction & {
39
+ type: RequestInteractionTypes["patch"];
40
+ body: unknown;
41
+ };
42
+ export type R4BInstanceDeleteRequest = R4BInstanceInteraction & {
43
+ type: RequestInteractionTypes["delete"];
44
+ };
45
+ export type R4BTypeDeleteRequest = R4BTypeInteraction & {
46
+ parameters: ParsedParameter<string | number>[];
47
+ type: RequestInteractionTypes["delete"];
48
+ };
49
+ export type R4BSystemDeleteRequest = R4BSystemInteraction & {
50
+ parameters: ParsedParameter<string | number>[];
51
+ type: RequestInteractionTypes["delete"];
52
+ };
53
+ export type R4BHistoryInstanceRequest = R4BInstanceInteraction & {
54
+ type: RequestInteractionTypes["history"];
55
+ parameters?: ParsedParameter<string | number>[];
56
+ };
57
+ export type R4BCreateRequest = R4BTypeInteraction & {
58
+ type: RequestInteractionTypes["create"];
59
+ body: Resource;
60
+ };
61
+ export type R4BConditinalUpdateRequest = R4BTypeInteraction & {
62
+ type: RequestInteractionTypes["update"];
63
+ parameters: ParsedParameter<string | number>[];
64
+ body: Resource;
65
+ };
66
+ export type R4BTypeSearchRequest = R4BTypeInteraction & {
67
+ parameters: ParsedParameter<string | number>[];
68
+ type: RequestInteractionTypes["search"];
69
+ };
70
+ export type R4BTypeHistoryRequest = R4BTypeInteraction & {
71
+ type: RequestInteractionTypes["history"];
72
+ parameters?: ParsedParameter<string | number>[];
73
+ };
74
+ export type R4BCapabilitiesRequest = R4BSystemInteraction & {
75
+ type: RequestInteractionTypes["capabilities"];
76
+ };
77
+ export type R4BBatchRequest = R4BSystemInteraction & {
78
+ type: RequestInteractionTypes["batch"];
79
+ body: Bundle;
80
+ };
81
+ export type R4BTransactionRequest = R4BSystemInteraction & {
82
+ type: RequestInteractionTypes["transaction"];
83
+ body: Bundle;
84
+ };
85
+ export type R4BSystemHistoryRequest = R4BSystemInteraction & {
86
+ type: RequestInteractionTypes["history"];
87
+ parameters?: ParsedParameter<string | number>[];
88
+ };
89
+ export type R4BSystemSearchRequest = R4BSystemInteraction & {
90
+ parameters: ParsedParameter<string | number>[];
91
+ type: RequestInteractionTypes["search"];
92
+ };
93
+ export type R4BInvokeInstanceRequest = R4BInstanceInteraction & {
94
+ type: RequestInteractionTypes["invoke"];
95
+ operation: code;
96
+ body: Resource;
97
+ };
98
+ export type R4BInvokeTypeRequest = R4BTypeInteraction & {
99
+ type: RequestInteractionTypes["invoke"];
100
+ operation: code;
101
+ body: Resource;
102
+ };
103
+ export type R4BInvokeSystemRequest = R4BSystemInteraction & {
104
+ type: RequestInteractionTypes["invoke"];
105
+ operation: code;
106
+ body: Resource;
107
+ };
108
+ export type R4BFHIRRequest =
109
+ | R4BInvokeInstanceRequest
110
+ | R4BInvokeTypeRequest
111
+ | R4BInvokeSystemRequest
112
+ | R4BReadRequest
113
+ | R4BVersionReadRequest
114
+ | R4BUpdateRequest
115
+ | R4BPatchRequest
116
+ | R4BInstanceDeleteRequest
117
+ | R4BHistoryInstanceRequest
118
+ | R4BCreateRequest
119
+ | R4BTypeSearchRequest
120
+ | R4BTypeHistoryRequest
121
+ | R4BTypeDeleteRequest
122
+ | R4BCapabilitiesRequest
123
+ | R4BBatchRequest
124
+ | R4BTransactionRequest
125
+ | R4BSystemHistoryRequest
126
+ | R4BSystemSearchRequest
127
+ | R4BSystemDeleteRequest
128
+ | R4BConditinalUpdateRequest;
129
+ export type R4BReadResponse = R4BInstanceInteraction & {
130
+ type: ResponseInteractionTypes["read"];
131
+ body: Resource;
132
+ };
133
+ export type R4BVersionReadResponse = R4BInstanceInteraction & {
134
+ type: ResponseInteractionTypes["vread"];
135
+ versionId: string;
136
+ body: Resource;
137
+ };
138
+ export type R4BUpdateResponse = R4BInstanceInteraction & {
139
+ type: ResponseInteractionTypes["update"];
140
+ created?: boolean;
141
+ body: Resource;
142
+ };
143
+ export type R4BPatchResponse = R4BInstanceInteraction & {
144
+ type: ResponseInteractionTypes["patch"];
145
+ body: Resource;
146
+ };
147
+ export type R4BInstanceDeleteResponse = R4BInstanceInteraction & {
148
+ type: ResponseInteractionTypes["delete"];
149
+ };
150
+ export type R4BTypeDeleteResponse = R4BTypeInteraction & {
151
+ parameters: ParsedParameter<string | number>[];
152
+ type: ResponseInteractionTypes["delete"];
153
+ deletions?: {
154
+ id: id;
155
+ type: ResourceType;
156
+ }[];
157
+ };
158
+ export type R4BSystemDeleteResponse = R4BSystemInteraction & {
159
+ parameters: ParsedParameter<string | number>[];
160
+ type: ResponseInteractionTypes["delete"];
161
+ deletions?: {
162
+ id: id;
163
+ type: ResourceType;
164
+ }[];
165
+ };
166
+ export type R4BInstanceHistoryResponse = R4BInstanceInteraction & {
167
+ type: ResponseInteractionTypes["history"];
168
+ body: Bundle;
169
+ };
170
+ export type R4BCreateResponse = R4BTypeInteraction & {
171
+ type: ResponseInteractionTypes["create"];
172
+ body: Resource;
173
+ };
174
+ export type R4BTypeSearchResponse = R4BTypeInteraction & {
175
+ parameters: ParsedParameter<string | number>[];
176
+ type: ResponseInteractionTypes["search"];
177
+ body: Bundle;
178
+ };
179
+ export type R4BTypeHistoryResponse = R4BTypeInteraction & {
180
+ type: ResponseInteractionTypes["history"];
181
+ body: Bundle;
182
+ };
183
+ export type R4BCapabilitiesResponse = R4BSystemInteraction & {
184
+ type: ResponseInteractionTypes["capabilities"];
185
+ body: CapabilityStatement;
186
+ };
187
+ export type R4BBatchResponse = R4BSystemInteraction & {
188
+ type: ResponseInteractionTypes["batch"];
189
+ body: Bundle;
190
+ };
191
+ export type R4BTransactionResponse = R4BSystemInteraction & {
192
+ type: ResponseInteractionTypes["transaction"];
193
+ body: Bundle;
194
+ };
195
+ export type R4BSystemHistoryResponse = R4BSystemInteraction & {
196
+ type: ResponseInteractionTypes["history"];
197
+ body: Bundle;
198
+ };
199
+ export type R4BSystemSearchResponse = R4BSystemInteraction & {
200
+ parameters: ParsedParameter<string | number>[];
201
+ type: ResponseInteractionTypes["search"];
202
+ body: Bundle;
203
+ };
204
+ export type R4BInvokeInstanceResponse = R4BInstanceInteraction & {
205
+ type: ResponseInteractionTypes["invoke"];
206
+ operation: code;
207
+ body: Parameters;
208
+ };
209
+ export type R4BInvokeTypeResponse = R4BTypeInteraction & {
210
+ type: ResponseInteractionTypes["invoke"];
211
+ operation: code;
212
+ body: Parameters;
213
+ };
214
+ export type R4BInvokeSystemResponse = R4BSystemInteraction & {
215
+ type: ResponseInteractionTypes["invoke"];
216
+ operation: code;
217
+ body: Parameters;
218
+ };
219
+ export type R4BInvokeResponse =
220
+ | R4BInvokeInstanceResponse
221
+ | R4BInvokeTypeResponse
222
+ | R4BInvokeSystemResponse;
223
+ export type R4BInvokeRequest =
224
+ | R4BInvokeInstanceRequest
225
+ | R4BInvokeTypeRequest
226
+ | R4BInvokeSystemRequest;
227
+ interface R4BErrorResponse<Level extends keyof RequestLevel>
228
+ extends Request<R4B, Level> {
229
+ type: ResponseInteractionTypes["error"];
230
+ body: OperationOutcome;
231
+ }
232
+ export type R4BFHIRErrorResponse =
233
+ | R4BErrorResponse<"system">
234
+ | R4BErrorResponse<"type">
235
+ | R4BErrorResponse<"instance">;
236
+ export type R4BFHIRResponse =
237
+ | R4BFHIRErrorResponse
238
+ | R4BInvokeInstanceResponse
239
+ | R4BInvokeTypeResponse
240
+ | R4BInvokeSystemResponse
241
+ | R4BReadResponse
242
+ | R4BVersionReadResponse
243
+ | R4BUpdateResponse
244
+ | R4BPatchResponse
245
+ | R4BInstanceDeleteResponse
246
+ | R4BInstanceHistoryResponse
247
+ | R4BCreateResponse
248
+ | R4BTypeSearchResponse
249
+ | R4BTypeHistoryResponse
250
+ | R4BTypeDeleteResponse
251
+ | R4BCapabilitiesResponse
252
+ | R4BBatchResponse
253
+ | R4BTransactionResponse
254
+ | R4BSystemHistoryResponse
255
+ | R4BSystemSearchResponse
256
+ | R4BSystemDeleteResponse;
257
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=r4b.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"r4b.js","sourceRoot":"","sources":["../../src/types/r4b.ts"],"names":[],"mappings":""}
@@ -0,0 +1,40 @@
1
+ import { FHIR_VERSIONS_SUPPORTED } from "@haste-health/fhir-types/versions";
2
+ export type RequestLevel = {
3
+ instance: "instance";
4
+ system: "system";
5
+ type: "type";
6
+ };
7
+ export type Interaction = {
8
+ read: "read";
9
+ vread: "vread";
10
+ update: "update";
11
+ patch: "patch";
12
+ delete: "delete";
13
+ history: "history";
14
+ create: "create";
15
+ search: "search";
16
+ capabilities: "capabilities";
17
+ batch: "batch";
18
+ transaction: "transaction";
19
+ invoke: "invoke";
20
+ };
21
+ export declare function toInteraction<I extends AllInteractions>(r: RequestType[I] | ResponseType[I]): I;
22
+ export type AllInteractions = Interaction[keyof Interaction];
23
+ export type RequestType = {
24
+ [I in Interaction[keyof Interaction]]: `${I}-request`;
25
+ };
26
+ export type ResponseType = {
27
+ [I in Interaction[keyof Interaction]]: `${I}-response`;
28
+ } & {
29
+ error: "error-response";
30
+ };
31
+ export declare function RequestType<I extends Interaction[keyof Interaction]>(interaction: I): RequestType[I];
32
+ export declare function ResponseType<I extends Interaction[keyof Interaction] | "error">(interaction: I): ResponseType[I];
33
+ export type Request<Version extends (typeof FHIR_VERSIONS_SUPPORTED)[number], level extends keyof RequestLevel> = {
34
+ fhirVersion: Version;
35
+ level: RequestLevel[level];
36
+ http?: {
37
+ status: number;
38
+ headers: Record<string, string>;
39
+ };
40
+ };
@@ -0,0 +1,10 @@
1
+ export function toInteraction(r) {
2
+ return r.split("-")[0];
3
+ }
4
+ export function RequestType(interaction) {
5
+ return `${interaction}-request`;
6
+ }
7
+ export function ResponseType(interaction) {
8
+ return `${interaction}-response`;
9
+ }
10
+ //# sourceMappingURL=utilities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utilities.js","sourceRoot":"","sources":["../../src/types/utilities.ts"],"names":[],"mappings":"AAuBA,MAAM,UAAU,aAAa,CAC3B,CAAmC;IAEnC,OAAO,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAM,CAAC;AAC9B,CAAC;AAYD,MAAM,UAAU,WAAW,CACzB,WAAc;IAEd,OAAO,GAAG,WAAW,UAA4B,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,YAAY,CAE1B,WAAc;IACd,OAAO,GAAG,WAAW,WAA8B,CAAC;AACtD,CAAC"}
package/lib/url.d.ts ADDED
@@ -0,0 +1,51 @@
1
+ import { FHIR_VERSION, Resource } from "@haste-health/fhir-types/versions";
2
+ type SPECIAL_CHARACTER = "\\" | "|" | "$" | ",";
3
+ /**
4
+ * Returns string with split pieces and unescapes special characters from the split piece.
5
+ * @param parameter Parameter to be split
6
+ * @param specialCharacter One of special characters that get escaped on parameter.
7
+ */
8
+ export declare function splitParameter(parameter: string, specialCharacter: SPECIAL_CHARACTER): string[];
9
+ /**
10
+ * Escapes a parameter values special characters
11
+ * Reference: https://hl7.org/fhir/R4/search.html#escaping
12
+ * @param parameter Parameter value to escape
13
+ * @returns Escaped Parameter
14
+ */
15
+ export declare function escapeParameter(parameter: string): string;
16
+ /**
17
+ * Unescapes a parameter values special characters.
18
+ * Reference: https://hl7.org/fhir/R4/search.html#escaping
19
+ * @param parameter Escaped Parameter
20
+ * @returns Unescaped Parameter
21
+ */
22
+ export declare function unescapeParameter(parameter: string): string;
23
+ export interface ParsedParameter<T> {
24
+ name: string;
25
+ value: T[];
26
+ modifier?: string;
27
+ chains?: string[];
28
+ }
29
+ export interface SearchParameterResource<Version extends FHIR_VERSION> extends ParsedParameter<string | number> {
30
+ type: "resource";
31
+ searchParameter: Resource<Version, "SearchParameter">;
32
+ chainedParameters?: Resource<Version, "SearchParameter">[][];
33
+ }
34
+ export interface SearchParameterResult extends ParsedParameter<string | number> {
35
+ type: "result";
36
+ }
37
+ export type MetaParameter<Version extends FHIR_VERSION> = SearchParameterResource<Version> | SearchParameterResult;
38
+ export type Parameters<Version extends FHIR_VERSION> = ParsedParameter<string | number>[] | MetaParameter<Version>[];
39
+ /**
40
+ * Given a query string create complex FHIR Query object.
41
+ * @param queryParams Raw query parameters pulled off url
42
+ * @returns Record of parsed parameters with name modifier and value.
43
+ */
44
+ export declare function parseQuery(queryParams: string | undefined): ParsedParameter<string>[];
45
+ /**
46
+ * Given a url string parsequery parameters.
47
+ * @param url Any url to parse out query parameters.
48
+ * @returns Record of parsed parameters with name modifier and value.
49
+ */
50
+ export default function parseUrl(url: string): ParsedParameter<string | number>[];
51
+ export {};
package/lib/url.js ADDED
@@ -0,0 +1,83 @@
1
+ import { OperationError, outcomeError } from "@haste-health/operation-outcomes";
2
+ const SPECIAL_CHARACTERS = ["\\", "|", "$", ","];
3
+ /**
4
+ * Returns string with split pieces and unescapes special characters from the split piece.
5
+ * @param parameter Parameter to be split
6
+ * @param specialCharacter One of special characters that get escaped on parameter.
7
+ */
8
+ export function splitParameter(parameter, specialCharacter) {
9
+ const specialCharEg = new RegExp(`\\${specialCharacter}`, "g");
10
+ let prevIndex = -1;
11
+ const pieces = [];
12
+ let match;
13
+ while ((match = specialCharEg.exec(parameter))) {
14
+ if (match.index === 0 || parameter[match.index - 1] !== "\\") {
15
+ pieces.push(parameter.substring(prevIndex + 1, match.index));
16
+ prevIndex = match.index;
17
+ }
18
+ }
19
+ pieces.push(parameter.substring(prevIndex + 1));
20
+ return pieces.map(unescapeParameter);
21
+ }
22
+ /**
23
+ * Escapes a parameter values special characters
24
+ * Reference: https://hl7.org/fhir/R4/search.html#escaping
25
+ * @param parameter Parameter value to escape
26
+ * @returns Escaped Parameter
27
+ */
28
+ export function escapeParameter(parameter) {
29
+ return SPECIAL_CHARACTERS.reduce((parameter, character) => {
30
+ return parameter.replaceAll(character, `\\${character}`);
31
+ }, parameter);
32
+ }
33
+ /**
34
+ * Unescapes a parameter values special characters.
35
+ * Reference: https://hl7.org/fhir/R4/search.html#escaping
36
+ * @param parameter Escaped Parameter
37
+ * @returns Unescaped Parameter
38
+ */
39
+ export function unescapeParameter(parameter) {
40
+ return SPECIAL_CHARACTERS.reduce((parameter, character) => {
41
+ return parameter.replaceAll(`\\${character}`, character);
42
+ }, parameter);
43
+ }
44
+ /**
45
+ * Given a query string create complex FHIR Query object.
46
+ * @param queryParams Raw query parameters pulled off url
47
+ * @returns Record of parsed parameters with name modifier and value.
48
+ */
49
+ export function parseQuery(queryParams) {
50
+ const parameters = !queryParams
51
+ ? []
52
+ : queryParams
53
+ .split("&")
54
+ .map((param) => param.split("="))
55
+ .reduce((parameters, [key, value]) => {
56
+ const chains = key.split(".");
57
+ const [name, modifier] = chains[0].split(":");
58
+ const searchParam = {
59
+ name,
60
+ modifier,
61
+ value: value.split(",").map((v) => decodeURIComponent(v)),
62
+ };
63
+ if (chains.length > 1)
64
+ searchParam.chains = chains.slice(1);
65
+ if (modifier)
66
+ searchParam.modifier = modifier;
67
+ return { ...parameters, [searchParam.name]: searchParam };
68
+ }, {});
69
+ return Object.values(parameters);
70
+ }
71
+ /**
72
+ * Given a url string parsequery parameters.
73
+ * @param url Any url to parse out query parameters.
74
+ * @returns Record of parsed parameters with name modifier and value.
75
+ */
76
+ export default function parseUrl(url) {
77
+ const chunks = url.split("?");
78
+ if (chunks.length > 2)
79
+ throw new OperationError(outcomeError("invalid", "Invalid query string"));
80
+ const [_, queryParams] = chunks;
81
+ return parseQuery(queryParams);
82
+ }
83
+ //# sourceMappingURL=url.js.map
package/lib/url.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"url.js","sourceRoot":"","sources":["../src/url.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAGhF,MAAM,kBAAkB,GAAwB,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAEtE;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAC5B,SAAiB,EACjB,gBAAmC;IAEnC,MAAM,aAAa,GAAG,IAAI,MAAM,CAAC,KAAK,gBAAgB,EAAE,EAAE,GAAG,CAAC,CAAC;IAC/D,IAAI,SAAS,GAAG,CAAC,CAAC,CAAC;IACnB,MAAM,MAAM,GAAG,EAAE,CAAC;IAClB,IAAI,KAAK,CAAC;IAEV,OAAO,CAAC,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC;QAC/C,IAAI,KAAK,CAAC,KAAK,KAAK,CAAC,IAAI,SAAS,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YAC7D,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,GAAG,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;YAC7D,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC;QAC1B,CAAC;IACH,CAAC;IACD,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC;IAEhD,OAAO,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;AACvC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,SAAiB;IAC/C,OAAO,kBAAkB,CAAC,MAAM,CAC9B,CAAC,SAAiB,EAAE,SAAiB,EAAU,EAAE;QAC/C,OAAO,SAAS,CAAC,UAAU,CAAC,SAAS,EAAE,KAAK,SAAS,EAAE,CAAC,CAAC;IAC3D,CAAC,EACD,SAAS,CACV,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,SAAiB;IACjD,OAAO,kBAAkB,CAAC,MAAM,CAC9B,CAAC,SAAiB,EAAE,SAAiB,EAAU,EAAE;QAC/C,OAAO,SAAS,CAAC,UAAU,CAAC,KAAK,SAAS,EAAE,EAAE,SAAS,CAAC,CAAC;IAC3D,CAAC,EACD,SAAS,CACV,CAAC;AACJ,CAAC;AA6BD;;;;GAIG;AACH,MAAM,UAAU,UAAU,CACxB,WAA+B;IAE/B,MAAM,UAAU,GAAG,CAAC,WAAW;QAC7B,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,WAAW;aACR,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aAChC,MAAM,CACL,CACE,UAAU,EACV,CAAC,GAAG,EAAE,KAAK,CAAC,EAC6B,EAAE;YAC3C,MAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAE9B,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAE9C,MAAM,WAAW,GAA4B;gBAC3C,IAAI;gBACJ,QAAQ;gBACR,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;aAC1D,CAAC;YAEF,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;gBAAE,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC5D,IAAI,QAAQ;gBAAE,WAAW,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAE9C,OAAO,EAAE,GAAG,UAAU,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,CAAC;QAC5D,CAAC,EACD,EAAE,CACH,CAAC;IAER,OAAO,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AACnC,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAC9B,GAAW;IAEX,MAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;QACnB,MAAM,IAAI,cAAc,CAAC,YAAY,CAAC,SAAS,EAAE,sBAAsB,CAAC,CAAC,CAAC;IAC5E,MAAM,CAAC,CAAC,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC;IAChC,OAAO,UAAU,CAAC,WAAW,CAAC,CAAC;AACjC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@haste-health/client",
3
+ "version": "0.15.3",
4
+ "homepage": "https://haste.health",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/HasteHealth/HasteHealth.git"
8
+ },
9
+ "main": "./lib/index.js",
10
+ "types": "./lib/index.d.ts",
11
+ "type": "module",
12
+ "scripts": {
13
+ "build": "tsc",
14
+ "test": "pnpm node --experimental-vm-modules $(pnpm bin jest)",
15
+ "publish": "pnpm build && pnpm npm publish --access public --tolerate-republish"
16
+ },
17
+ "exports": {
18
+ ".": "./lib/index.js",
19
+ "./lib/url": "./lib/url.js",
20
+ "./lib/types": "./lib/types/index.js",
21
+ "./lib/interface": "./lib/interface.js",
22
+ "./types": "./lib/types/index.js",
23
+ "./interface": "./lib/interface.js",
24
+ "./middleware": "./lib/middleware/index.js",
25
+ "./url": "./lib/url.js",
26
+ "./lib/http": "./lib/http/index.js",
27
+ "./http": "./lib/http/index.js"
28
+ },
29
+ "devDependencies": {
30
+ "@haste-health/fhir-types": "workspace:^",
31
+ "@jest/globals": "^29.7.0",
32
+ "jest": "^29.7.0",
33
+ "ts-jest": "^29.3.2",
34
+ "typescript": "5.9.2"
35
+ },
36
+ "dependencies": {
37
+ "@haste-health/operation-execution": "workspace:^",
38
+ "@haste-health/operation-outcomes": "workspace:^"
39
+ },
40
+ "files": [
41
+ "lib/**",
42
+ "README.md",
43
+ "src/**"
44
+ ]
45
+ }