@health-samurai/aidbox-client 0.0.0-alpha.2 → 0.0.0-alpha.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.
- package/README.md +234 -68
- package/dist/src/auth-providers.d.ts +13 -0
- package/dist/src/auth-providers.d.ts.map +1 -1
- package/dist/src/auth-providers.js +13 -4
- package/dist/src/client.d.ts +504 -31
- package/dist/src/client.d.ts.map +1 -1
- package/dist/src/client.js +1455 -934
- package/dist/src/fhir-types/hl7-fhir-r4-core/Address.d.ts +26 -0
- package/dist/src/fhir-types/hl7-fhir-r4-core/Address.d.ts.map +1 -0
- package/dist/src/fhir-types/hl7-fhir-r4-core/Address.js +5 -0
- package/dist/src/fhir-types/hl7-fhir-r4-core/ContactPoint.d.ts +16 -0
- package/dist/src/fhir-types/hl7-fhir-r4-core/ContactPoint.d.ts.map +1 -0
- package/dist/src/fhir-types/hl7-fhir-r4-core/ContactPoint.js +5 -0
- package/dist/src/fhir-types/hl7-fhir-r4-core/DomainResource.d.ts +1 -1
- package/dist/src/fhir-types/hl7-fhir-r4-core/DomainResource.d.ts.map +1 -1
- package/dist/src/fhir-types/hl7-fhir-r4-core/HumanName.d.ts +20 -0
- package/dist/src/fhir-types/hl7-fhir-r4-core/HumanName.d.ts.map +1 -0
- package/dist/src/fhir-types/hl7-fhir-r4-core/HumanName.js +5 -0
- package/dist/src/fhir-types/hl7-fhir-r4-core/Patient.d.ts +58 -0
- package/dist/src/fhir-types/hl7-fhir-r4-core/Patient.d.ts.map +1 -0
- package/dist/src/fhir-types/hl7-fhir-r4-core/Patient.js +10 -0
- package/dist/src/fhir-types/hl7-fhir-r4-core/Resource.d.ts +1 -1
- package/dist/src/fhir-types/hl7-fhir-r4-core/Resource.d.ts.map +1 -1
- package/dist/src/fhir-types/hl7-fhir-r4-core/index.d.ts +5 -0
- package/dist/src/fhir-types/hl7-fhir-r4-core/index.d.ts.map +1 -1
- package/dist/src/fhir-types/hl7-fhir-r4-core/index.js +1 -0
- package/dist/src/result.d.ts +114 -3
- package/dist/src/result.d.ts.map +1 -1
- package/dist/src/result.js +6 -2
- package/dist/src/types.d.ts +104 -70
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +10 -2
- package/package.json +2 -1
- package/dist/src/fhir-http.d.ts +0 -96
- package/dist/src/fhir-http.d.ts.map +0 -1
- package/dist/src/fhir-http.js +0 -1
package/dist/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,QAAQ,EACR,SAAS,EACT,SAAS,EACT,WAAW,EACX,YAAY,EACZ,SAAS,EACT,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAE9D,MAAM,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;AAC5C,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE7C,MAAM,MAAM,YAAY,GAAG;IAC1B,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAGF,MAAM,MAAM,IAAI,GAAG,QAAQ,GAAG;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC3B,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;IAChE,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,C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
118
|
}
|
|
119
|
-
|
|
119
|
+
/**
|
|
120
|
+
* An error indicating that request didn't met client's expectations and was not sent as a result.
|
|
121
|
+
*/ export var RequestError = /*#__PURE__*/ function(Error1) {
|
|
120
122
|
"use strict";
|
|
121
123
|
_inherits(RequestError, Error1);
|
|
122
124
|
function RequestError(msg, param) {
|
|
@@ -138,7 +140,13 @@ export var RequestError = /*#__PURE__*/ function(Error1) {
|
|
|
138
140
|
}
|
|
139
141
|
return RequestError;
|
|
140
142
|
}(_wrap_native_super(Error));
|
|
141
|
-
|
|
143
|
+
/**
|
|
144
|
+
* An error indicating an unknown errornous response from the server.
|
|
145
|
+
*
|
|
146
|
+
* Thrown from `client.rawRequest` on any non-successful response code.
|
|
147
|
+
*
|
|
148
|
+
* Only thrown from `client.request` on any non-success code if response body isn't an `OperationOutcome`.
|
|
149
|
+
*/ export var ErrorResponse = /*#__PURE__*/ function(Error1) {
|
|
142
150
|
"use strict";
|
|
143
151
|
_inherits(ErrorResponse, Error1);
|
|
144
152
|
function ErrorResponse(msg, cause) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@health-samurai/aidbox-client",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.3",
|
|
4
4
|
"description": "A client library for communicating with Aidbox",
|
|
5
5
|
"author": "Health Samurai",
|
|
6
6
|
"type": "module",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
".": "./dist/src/index.js"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
+
"@types/json-patch": "^0.0.33",
|
|
16
17
|
"yaml": "^2.8.1"
|
|
17
18
|
},
|
|
18
19
|
"publishConfig": {
|
package/dist/src/fhir-http.d.ts
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import type { Parameters } from "./types";
|
|
2
|
-
export type ReadOptions = {
|
|
3
|
-
type: string;
|
|
4
|
-
id: string;
|
|
5
|
-
};
|
|
6
|
-
export type VReadOptions = ReadOptions & {
|
|
7
|
-
vid: string;
|
|
8
|
-
};
|
|
9
|
-
export type SearchTypeOptions = {
|
|
10
|
-
type: string;
|
|
11
|
-
query: Parameters;
|
|
12
|
-
};
|
|
13
|
-
export type SearchSystemOptions = {
|
|
14
|
-
query: Parameters;
|
|
15
|
-
};
|
|
16
|
-
export type SearchCompartmentOptions = {
|
|
17
|
-
query: Parameters;
|
|
18
|
-
type: string;
|
|
19
|
-
compartment: string;
|
|
20
|
-
compartmentId: string;
|
|
21
|
-
};
|
|
22
|
-
export type CreateOptions = {
|
|
23
|
-
type: string;
|
|
24
|
-
resource: object;
|
|
25
|
-
};
|
|
26
|
-
export type ConditionalCreateOptions = {
|
|
27
|
-
type: string;
|
|
28
|
-
resource: object;
|
|
29
|
-
searchParameters: Parameters;
|
|
30
|
-
};
|
|
31
|
-
export type UpdateOptions = {
|
|
32
|
-
type: string;
|
|
33
|
-
resource: object;
|
|
34
|
-
id: string;
|
|
35
|
-
};
|
|
36
|
-
export type ConditionalUpdateOptions = {
|
|
37
|
-
type: string;
|
|
38
|
-
resource: object;
|
|
39
|
-
searchParameters: Parameters;
|
|
40
|
-
};
|
|
41
|
-
export type PatchOptions = {
|
|
42
|
-
type: string;
|
|
43
|
-
id: string;
|
|
44
|
-
patch: object;
|
|
45
|
-
};
|
|
46
|
-
export type ConditionalPatchOptions = {
|
|
47
|
-
type: string;
|
|
48
|
-
searchParameters: Parameters;
|
|
49
|
-
patch: object;
|
|
50
|
-
};
|
|
51
|
-
export type DeleteOptions = {
|
|
52
|
-
type: string;
|
|
53
|
-
id: string;
|
|
54
|
-
};
|
|
55
|
-
export type ConditionalDeleteOptions = {
|
|
56
|
-
type?: string;
|
|
57
|
-
searchParameters: Parameters;
|
|
58
|
-
};
|
|
59
|
-
export type DeleteHistoryVersionOptions = {
|
|
60
|
-
type: string;
|
|
61
|
-
id: string;
|
|
62
|
-
vid: string;
|
|
63
|
-
};
|
|
64
|
-
export type HistoryInstanceOptions = {
|
|
65
|
-
type: string;
|
|
66
|
-
id: string;
|
|
67
|
-
};
|
|
68
|
-
export type HistoryTypeOptions = {
|
|
69
|
-
type: string;
|
|
70
|
-
};
|
|
71
|
-
export type HistorySystemOptions = Record<string, never>;
|
|
72
|
-
export type OperationOptions = {
|
|
73
|
-
type: string;
|
|
74
|
-
id?: string;
|
|
75
|
-
operation: "$run" | "$validate";
|
|
76
|
-
resource: object;
|
|
77
|
-
};
|
|
78
|
-
export type ValidateOptions = Omit<OperationOptions, "operation">;
|
|
79
|
-
export type CapabilitiesOptions = {
|
|
80
|
-
mode: "full" | "normative" | "terminology";
|
|
81
|
-
};
|
|
82
|
-
type Bundle = Record<string, unknown>;
|
|
83
|
-
export type BatchOptions = {
|
|
84
|
-
format: string;
|
|
85
|
-
bundle: Bundle & {
|
|
86
|
-
type: "batch";
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
export type TransactionOptions = {
|
|
90
|
-
format: string;
|
|
91
|
-
bundle: Bundle & {
|
|
92
|
-
type: "transaction";
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
export {};
|
|
96
|
-
//# sourceMappingURL=fhir-http.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fhir-http.d.ts","sourceRoot":"","sources":["../../src/fhir-http.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG;IACxC,GAAG,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,UAAU,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;I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