phenoml 10.0.1 → 10.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/fhir/client/Client.d.ts +12 -0
- package/dist/cjs/api/resources/fhir/client/Client.js +36 -0
- package/dist/cjs/api/resources/fhir/errors/ServiceUnavailableError.d.ts +5 -0
- package/dist/cjs/api/resources/fhir/errors/ServiceUnavailableError.js +54 -0
- package/dist/cjs/api/resources/fhir/errors/TooManyRequestsError.d.ts +6 -0
- package/dist/cjs/api/resources/fhir/errors/TooManyRequestsError.js +54 -0
- package/dist/cjs/api/resources/fhir/errors/index.d.ts +2 -0
- package/dist/cjs/api/resources/fhir/errors/index.js +2 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/fhir/client/Client.d.mts +12 -0
- package/dist/esm/api/resources/fhir/client/Client.mjs +36 -0
- package/dist/esm/api/resources/fhir/errors/ServiceUnavailableError.d.mts +5 -0
- package/dist/esm/api/resources/fhir/errors/ServiceUnavailableError.mjs +17 -0
- package/dist/esm/api/resources/fhir/errors/TooManyRequestsError.d.mts +6 -0
- package/dist/esm/api/resources/fhir/errors/TooManyRequestsError.mjs +17 -0
- package/dist/esm/api/resources/fhir/errors/index.d.mts +2 -0
- package/dist/esm/api/resources/fhir/errors/index.mjs +2 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "phenoml",
|
|
46
|
-
"X-Fern-SDK-Version": "10.0
|
|
47
|
-
"User-Agent": "phenoml/10.0
|
|
46
|
+
"X-Fern-SDK-Version": "10.1.0",
|
|
47
|
+
"User-Agent": "phenoml/10.1.0",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -29,8 +29,10 @@ export declare class FhirClient {
|
|
|
29
29
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
30
30
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
31
31
|
* @throws {@link phenoml.fhir.NotFoundError}
|
|
32
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
32
33
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
33
34
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
35
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
34
36
|
*
|
|
35
37
|
* @example
|
|
36
38
|
* await client.fhir.search("550e8400-e29b-41d4-a716-446655440000", "Patient", {
|
|
@@ -58,8 +60,10 @@ export declare class FhirClient {
|
|
|
58
60
|
*
|
|
59
61
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
60
62
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
63
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
61
64
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
62
65
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
66
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
63
67
|
*
|
|
64
68
|
* @example
|
|
65
69
|
* await client.fhir.create("550e8400-e29b-41d4-a716-446655440000", "Patient", {
|
|
@@ -100,8 +104,10 @@ export declare class FhirClient {
|
|
|
100
104
|
*
|
|
101
105
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
102
106
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
107
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
103
108
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
104
109
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
110
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
105
111
|
*
|
|
106
112
|
* @example
|
|
107
113
|
* await client.fhir.upsert("550e8400-e29b-41d4-a716-446655440000", "Patient", {
|
|
@@ -145,8 +151,10 @@ export declare class FhirClient {
|
|
|
145
151
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
146
152
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
147
153
|
* @throws {@link phenoml.fhir.NotFoundError}
|
|
154
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
148
155
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
149
156
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
157
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
150
158
|
*
|
|
151
159
|
* @example
|
|
152
160
|
* await client.fhir.delete("550e8400-e29b-41d4-a716-446655440000", "Patient", {
|
|
@@ -180,8 +188,10 @@ export declare class FhirClient {
|
|
|
180
188
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
181
189
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
182
190
|
* @throws {@link phenoml.fhir.NotFoundError}
|
|
191
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
183
192
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
184
193
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
194
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
185
195
|
*
|
|
186
196
|
* @example
|
|
187
197
|
* await client.fhir.patch("550e8400-e29b-41d4-a716-446655440000", "Patient", {
|
|
@@ -262,8 +272,10 @@ export declare class FhirClient {
|
|
|
262
272
|
*
|
|
263
273
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
264
274
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
275
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
265
276
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
266
277
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
278
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
267
279
|
*
|
|
268
280
|
* @example
|
|
269
281
|
* await client.fhir.executeBundle("550e8400-e29b-41d4-a716-446655440000", {
|
|
@@ -75,8 +75,10 @@ class FhirClient {
|
|
|
75
75
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
76
76
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
77
77
|
* @throws {@link phenoml.fhir.NotFoundError}
|
|
78
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
78
79
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
79
80
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
81
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
80
82
|
*
|
|
81
83
|
* @example
|
|
82
84
|
* await client.fhir.search("550e8400-e29b-41d4-a716-446655440000", "Patient", {
|
|
@@ -121,10 +123,14 @@ class FhirClient {
|
|
|
121
123
|
throw new phenoml.fhir.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
122
124
|
case 404:
|
|
123
125
|
throw new phenoml.fhir.NotFoundError(_response.error.body, _response.rawResponse);
|
|
126
|
+
case 429:
|
|
127
|
+
throw new phenoml.fhir.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
124
128
|
case 500:
|
|
125
129
|
throw new phenoml.fhir.InternalServerError(_response.error.body, _response.rawResponse);
|
|
126
130
|
case 502:
|
|
127
131
|
throw new phenoml.fhir.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
132
|
+
case 503:
|
|
133
|
+
throw new phenoml.fhir.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
128
134
|
default:
|
|
129
135
|
throw new errors.phenomlError({
|
|
130
136
|
statusCode: _response.error.statusCode,
|
|
@@ -154,8 +160,10 @@ class FhirClient {
|
|
|
154
160
|
*
|
|
155
161
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
156
162
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
163
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
157
164
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
158
165
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
166
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
159
167
|
*
|
|
160
168
|
* @example
|
|
161
169
|
* await client.fhir.create("550e8400-e29b-41d4-a716-446655440000", "Patient", {
|
|
@@ -211,10 +219,14 @@ class FhirClient {
|
|
|
211
219
|
throw new phenoml.fhir.BadRequestError(_response.error.body, _response.rawResponse);
|
|
212
220
|
case 401:
|
|
213
221
|
throw new phenoml.fhir.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
222
|
+
case 429:
|
|
223
|
+
throw new phenoml.fhir.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
214
224
|
case 500:
|
|
215
225
|
throw new phenoml.fhir.InternalServerError(_response.error.body, _response.rawResponse);
|
|
216
226
|
case 502:
|
|
217
227
|
throw new phenoml.fhir.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
228
|
+
case 503:
|
|
229
|
+
throw new phenoml.fhir.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
218
230
|
default:
|
|
219
231
|
throw new errors.phenomlError({
|
|
220
232
|
statusCode: _response.error.statusCode,
|
|
@@ -244,8 +256,10 @@ class FhirClient {
|
|
|
244
256
|
*
|
|
245
257
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
246
258
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
259
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
247
260
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
248
261
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
262
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
249
263
|
*
|
|
250
264
|
* @example
|
|
251
265
|
* await client.fhir.upsert("550e8400-e29b-41d4-a716-446655440000", "Patient", {
|
|
@@ -303,10 +317,14 @@ class FhirClient {
|
|
|
303
317
|
throw new phenoml.fhir.BadRequestError(_response.error.body, _response.rawResponse);
|
|
304
318
|
case 401:
|
|
305
319
|
throw new phenoml.fhir.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
320
|
+
case 429:
|
|
321
|
+
throw new phenoml.fhir.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
306
322
|
case 500:
|
|
307
323
|
throw new phenoml.fhir.InternalServerError(_response.error.body, _response.rawResponse);
|
|
308
324
|
case 502:
|
|
309
325
|
throw new phenoml.fhir.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
326
|
+
case 503:
|
|
327
|
+
throw new phenoml.fhir.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
310
328
|
default:
|
|
311
329
|
throw new errors.phenomlError({
|
|
312
330
|
statusCode: _response.error.statusCode,
|
|
@@ -337,8 +355,10 @@ class FhirClient {
|
|
|
337
355
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
338
356
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
339
357
|
* @throws {@link phenoml.fhir.NotFoundError}
|
|
358
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
340
359
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
341
360
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
361
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
342
362
|
*
|
|
343
363
|
* @example
|
|
344
364
|
* await client.fhir.delete("550e8400-e29b-41d4-a716-446655440000", "Patient", {
|
|
@@ -380,10 +400,14 @@ class FhirClient {
|
|
|
380
400
|
throw new phenoml.fhir.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
381
401
|
case 404:
|
|
382
402
|
throw new phenoml.fhir.NotFoundError(_response.error.body, _response.rawResponse);
|
|
403
|
+
case 429:
|
|
404
|
+
throw new phenoml.fhir.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
383
405
|
case 500:
|
|
384
406
|
throw new phenoml.fhir.InternalServerError(_response.error.body, _response.rawResponse);
|
|
385
407
|
case 502:
|
|
386
408
|
throw new phenoml.fhir.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
409
|
+
case 503:
|
|
410
|
+
throw new phenoml.fhir.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
387
411
|
default:
|
|
388
412
|
throw new errors.phenomlError({
|
|
389
413
|
statusCode: _response.error.statusCode,
|
|
@@ -419,8 +443,10 @@ class FhirClient {
|
|
|
419
443
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
420
444
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
421
445
|
* @throws {@link phenoml.fhir.NotFoundError}
|
|
446
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
422
447
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
423
448
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
449
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
424
450
|
*
|
|
425
451
|
* @example
|
|
426
452
|
* await client.fhir.patch("550e8400-e29b-41d4-a716-446655440000", "Patient", {
|
|
@@ -521,10 +547,14 @@ class FhirClient {
|
|
|
521
547
|
throw new phenoml.fhir.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
522
548
|
case 404:
|
|
523
549
|
throw new phenoml.fhir.NotFoundError(_response.error.body, _response.rawResponse);
|
|
550
|
+
case 429:
|
|
551
|
+
throw new phenoml.fhir.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
524
552
|
case 500:
|
|
525
553
|
throw new phenoml.fhir.InternalServerError(_response.error.body, _response.rawResponse);
|
|
526
554
|
case 502:
|
|
527
555
|
throw new phenoml.fhir.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
556
|
+
case 503:
|
|
557
|
+
throw new phenoml.fhir.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
528
558
|
default:
|
|
529
559
|
throw new errors.phenomlError({
|
|
530
560
|
statusCode: _response.error.statusCode,
|
|
@@ -551,8 +581,10 @@ class FhirClient {
|
|
|
551
581
|
*
|
|
552
582
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
553
583
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
584
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
554
585
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
555
586
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
587
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
556
588
|
*
|
|
557
589
|
* @example
|
|
558
590
|
* await client.fhir.executeBundle("550e8400-e29b-41d4-a716-446655440000", {
|
|
@@ -627,10 +659,14 @@ class FhirClient {
|
|
|
627
659
|
throw new phenoml.fhir.BadRequestError(_response.error.body, _response.rawResponse);
|
|
628
660
|
case 401:
|
|
629
661
|
throw new phenoml.fhir.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
662
|
+
case 429:
|
|
663
|
+
throw new phenoml.fhir.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
630
664
|
case 500:
|
|
631
665
|
throw new phenoml.fhir.InternalServerError(_response.error.body, _response.rawResponse);
|
|
632
666
|
case 502:
|
|
633
667
|
throw new phenoml.fhir.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
668
|
+
case 503:
|
|
669
|
+
throw new phenoml.fhir.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
634
670
|
default:
|
|
635
671
|
throw new errors.phenomlError({
|
|
636
672
|
statusCode: _response.error.statusCode,
|
|
@@ -0,0 +1,54 @@
|
|
|
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.ServiceUnavailableError = void 0;
|
|
38
|
+
const errors = __importStar(require("../../../../errors/index.js"));
|
|
39
|
+
class ServiceUnavailableError extends errors.phenomlError {
|
|
40
|
+
constructor(body, rawResponse) {
|
|
41
|
+
super({
|
|
42
|
+
message: "ServiceUnavailableError",
|
|
43
|
+
statusCode: 503,
|
|
44
|
+
body: body,
|
|
45
|
+
rawResponse: rawResponse,
|
|
46
|
+
});
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = this.constructor.name;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.ServiceUnavailableError = ServiceUnavailableError;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as core from "../../../../core/index.js";
|
|
2
|
+
import * as errors from "../../../../errors/index.js";
|
|
3
|
+
import type * as phenoml from "../../../index.js";
|
|
4
|
+
export declare class TooManyRequestsError extends errors.phenomlError {
|
|
5
|
+
constructor(body: phenoml.fhir.ErrorResponse, rawResponse?: core.RawResponse);
|
|
6
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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.TooManyRequestsError = void 0;
|
|
38
|
+
const errors = __importStar(require("../../../../errors/index.js"));
|
|
39
|
+
class TooManyRequestsError extends errors.phenomlError {
|
|
40
|
+
constructor(body, rawResponse) {
|
|
41
|
+
super({
|
|
42
|
+
message: "TooManyRequestsError",
|
|
43
|
+
statusCode: 429,
|
|
44
|
+
body: body,
|
|
45
|
+
rawResponse: rawResponse,
|
|
46
|
+
});
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = this.constructor.name;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.TooManyRequestsError = TooManyRequestsError;
|
|
@@ -2,4 +2,6 @@ export * from "./BadGatewayError.js";
|
|
|
2
2
|
export * from "./BadRequestError.js";
|
|
3
3
|
export * from "./InternalServerError.js";
|
|
4
4
|
export * from "./NotFoundError.js";
|
|
5
|
+
export * from "./ServiceUnavailableError.js";
|
|
6
|
+
export * from "./TooManyRequestsError.js";
|
|
5
7
|
export * from "./UnauthorizedError.js";
|
|
@@ -18,4 +18,6 @@ __exportStar(require("./BadGatewayError.js"), exports);
|
|
|
18
18
|
__exportStar(require("./BadRequestError.js"), exports);
|
|
19
19
|
__exportStar(require("./InternalServerError.js"), exports);
|
|
20
20
|
__exportStar(require("./NotFoundError.js"), exports);
|
|
21
|
+
__exportStar(require("./ServiceUnavailableError.js"), exports);
|
|
22
|
+
__exportStar(require("./TooManyRequestsError.js"), exports);
|
|
21
23
|
__exportStar(require("./UnauthorizedError.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "10.0
|
|
1
|
+
export declare const SDK_VERSION = "10.1.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "phenoml",
|
|
9
|
-
"X-Fern-SDK-Version": "10.0
|
|
10
|
-
"User-Agent": "phenoml/10.0
|
|
9
|
+
"X-Fern-SDK-Version": "10.1.0",
|
|
10
|
+
"User-Agent": "phenoml/10.1.0",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -29,8 +29,10 @@ export declare class FhirClient {
|
|
|
29
29
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
30
30
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
31
31
|
* @throws {@link phenoml.fhir.NotFoundError}
|
|
32
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
32
33
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
33
34
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
35
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
34
36
|
*
|
|
35
37
|
* @example
|
|
36
38
|
* await client.fhir.search("550e8400-e29b-41d4-a716-446655440000", "Patient", {
|
|
@@ -58,8 +60,10 @@ export declare class FhirClient {
|
|
|
58
60
|
*
|
|
59
61
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
60
62
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
63
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
61
64
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
62
65
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
66
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
63
67
|
*
|
|
64
68
|
* @example
|
|
65
69
|
* await client.fhir.create("550e8400-e29b-41d4-a716-446655440000", "Patient", {
|
|
@@ -100,8 +104,10 @@ export declare class FhirClient {
|
|
|
100
104
|
*
|
|
101
105
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
102
106
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
107
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
103
108
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
104
109
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
110
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
105
111
|
*
|
|
106
112
|
* @example
|
|
107
113
|
* await client.fhir.upsert("550e8400-e29b-41d4-a716-446655440000", "Patient", {
|
|
@@ -145,8 +151,10 @@ export declare class FhirClient {
|
|
|
145
151
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
146
152
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
147
153
|
* @throws {@link phenoml.fhir.NotFoundError}
|
|
154
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
148
155
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
149
156
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
157
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
150
158
|
*
|
|
151
159
|
* @example
|
|
152
160
|
* await client.fhir.delete("550e8400-e29b-41d4-a716-446655440000", "Patient", {
|
|
@@ -180,8 +188,10 @@ export declare class FhirClient {
|
|
|
180
188
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
181
189
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
182
190
|
* @throws {@link phenoml.fhir.NotFoundError}
|
|
191
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
183
192
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
184
193
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
194
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
185
195
|
*
|
|
186
196
|
* @example
|
|
187
197
|
* await client.fhir.patch("550e8400-e29b-41d4-a716-446655440000", "Patient", {
|
|
@@ -262,8 +272,10 @@ export declare class FhirClient {
|
|
|
262
272
|
*
|
|
263
273
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
264
274
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
275
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
265
276
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
266
277
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
278
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
267
279
|
*
|
|
268
280
|
* @example
|
|
269
281
|
* await client.fhir.executeBundle("550e8400-e29b-41d4-a716-446655440000", {
|
|
@@ -39,8 +39,10 @@ export class FhirClient {
|
|
|
39
39
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
40
40
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
41
41
|
* @throws {@link phenoml.fhir.NotFoundError}
|
|
42
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
42
43
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
43
44
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
45
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
44
46
|
*
|
|
45
47
|
* @example
|
|
46
48
|
* await client.fhir.search("550e8400-e29b-41d4-a716-446655440000", "Patient", {
|
|
@@ -85,10 +87,14 @@ export class FhirClient {
|
|
|
85
87
|
throw new phenoml.fhir.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
86
88
|
case 404:
|
|
87
89
|
throw new phenoml.fhir.NotFoundError(_response.error.body, _response.rawResponse);
|
|
90
|
+
case 429:
|
|
91
|
+
throw new phenoml.fhir.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
88
92
|
case 500:
|
|
89
93
|
throw new phenoml.fhir.InternalServerError(_response.error.body, _response.rawResponse);
|
|
90
94
|
case 502:
|
|
91
95
|
throw new phenoml.fhir.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
96
|
+
case 503:
|
|
97
|
+
throw new phenoml.fhir.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
92
98
|
default:
|
|
93
99
|
throw new errors.phenomlError({
|
|
94
100
|
statusCode: _response.error.statusCode,
|
|
@@ -118,8 +124,10 @@ export class FhirClient {
|
|
|
118
124
|
*
|
|
119
125
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
120
126
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
127
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
121
128
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
122
129
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
130
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
123
131
|
*
|
|
124
132
|
* @example
|
|
125
133
|
* await client.fhir.create("550e8400-e29b-41d4-a716-446655440000", "Patient", {
|
|
@@ -175,10 +183,14 @@ export class FhirClient {
|
|
|
175
183
|
throw new phenoml.fhir.BadRequestError(_response.error.body, _response.rawResponse);
|
|
176
184
|
case 401:
|
|
177
185
|
throw new phenoml.fhir.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
186
|
+
case 429:
|
|
187
|
+
throw new phenoml.fhir.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
178
188
|
case 500:
|
|
179
189
|
throw new phenoml.fhir.InternalServerError(_response.error.body, _response.rawResponse);
|
|
180
190
|
case 502:
|
|
181
191
|
throw new phenoml.fhir.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
192
|
+
case 503:
|
|
193
|
+
throw new phenoml.fhir.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
182
194
|
default:
|
|
183
195
|
throw new errors.phenomlError({
|
|
184
196
|
statusCode: _response.error.statusCode,
|
|
@@ -208,8 +220,10 @@ export class FhirClient {
|
|
|
208
220
|
*
|
|
209
221
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
210
222
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
223
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
211
224
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
212
225
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
226
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
213
227
|
*
|
|
214
228
|
* @example
|
|
215
229
|
* await client.fhir.upsert("550e8400-e29b-41d4-a716-446655440000", "Patient", {
|
|
@@ -267,10 +281,14 @@ export class FhirClient {
|
|
|
267
281
|
throw new phenoml.fhir.BadRequestError(_response.error.body, _response.rawResponse);
|
|
268
282
|
case 401:
|
|
269
283
|
throw new phenoml.fhir.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
284
|
+
case 429:
|
|
285
|
+
throw new phenoml.fhir.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
270
286
|
case 500:
|
|
271
287
|
throw new phenoml.fhir.InternalServerError(_response.error.body, _response.rawResponse);
|
|
272
288
|
case 502:
|
|
273
289
|
throw new phenoml.fhir.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
290
|
+
case 503:
|
|
291
|
+
throw new phenoml.fhir.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
274
292
|
default:
|
|
275
293
|
throw new errors.phenomlError({
|
|
276
294
|
statusCode: _response.error.statusCode,
|
|
@@ -301,8 +319,10 @@ export class FhirClient {
|
|
|
301
319
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
302
320
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
303
321
|
* @throws {@link phenoml.fhir.NotFoundError}
|
|
322
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
304
323
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
305
324
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
325
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
306
326
|
*
|
|
307
327
|
* @example
|
|
308
328
|
* await client.fhir.delete("550e8400-e29b-41d4-a716-446655440000", "Patient", {
|
|
@@ -344,10 +364,14 @@ export class FhirClient {
|
|
|
344
364
|
throw new phenoml.fhir.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
345
365
|
case 404:
|
|
346
366
|
throw new phenoml.fhir.NotFoundError(_response.error.body, _response.rawResponse);
|
|
367
|
+
case 429:
|
|
368
|
+
throw new phenoml.fhir.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
347
369
|
case 500:
|
|
348
370
|
throw new phenoml.fhir.InternalServerError(_response.error.body, _response.rawResponse);
|
|
349
371
|
case 502:
|
|
350
372
|
throw new phenoml.fhir.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
373
|
+
case 503:
|
|
374
|
+
throw new phenoml.fhir.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
351
375
|
default:
|
|
352
376
|
throw new errors.phenomlError({
|
|
353
377
|
statusCode: _response.error.statusCode,
|
|
@@ -383,8 +407,10 @@ export class FhirClient {
|
|
|
383
407
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
384
408
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
385
409
|
* @throws {@link phenoml.fhir.NotFoundError}
|
|
410
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
386
411
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
387
412
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
413
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
388
414
|
*
|
|
389
415
|
* @example
|
|
390
416
|
* await client.fhir.patch("550e8400-e29b-41d4-a716-446655440000", "Patient", {
|
|
@@ -485,10 +511,14 @@ export class FhirClient {
|
|
|
485
511
|
throw new phenoml.fhir.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
486
512
|
case 404:
|
|
487
513
|
throw new phenoml.fhir.NotFoundError(_response.error.body, _response.rawResponse);
|
|
514
|
+
case 429:
|
|
515
|
+
throw new phenoml.fhir.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
488
516
|
case 500:
|
|
489
517
|
throw new phenoml.fhir.InternalServerError(_response.error.body, _response.rawResponse);
|
|
490
518
|
case 502:
|
|
491
519
|
throw new phenoml.fhir.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
520
|
+
case 503:
|
|
521
|
+
throw new phenoml.fhir.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
492
522
|
default:
|
|
493
523
|
throw new errors.phenomlError({
|
|
494
524
|
statusCode: _response.error.statusCode,
|
|
@@ -515,8 +545,10 @@ export class FhirClient {
|
|
|
515
545
|
*
|
|
516
546
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
517
547
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
548
|
+
* @throws {@link phenoml.fhir.TooManyRequestsError}
|
|
518
549
|
* @throws {@link phenoml.fhir.InternalServerError}
|
|
519
550
|
* @throws {@link phenoml.fhir.BadGatewayError}
|
|
551
|
+
* @throws {@link phenoml.fhir.ServiceUnavailableError}
|
|
520
552
|
*
|
|
521
553
|
* @example
|
|
522
554
|
* await client.fhir.executeBundle("550e8400-e29b-41d4-a716-446655440000", {
|
|
@@ -591,10 +623,14 @@ export class FhirClient {
|
|
|
591
623
|
throw new phenoml.fhir.BadRequestError(_response.error.body, _response.rawResponse);
|
|
592
624
|
case 401:
|
|
593
625
|
throw new phenoml.fhir.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
626
|
+
case 429:
|
|
627
|
+
throw new phenoml.fhir.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
594
628
|
case 500:
|
|
595
629
|
throw new phenoml.fhir.InternalServerError(_response.error.body, _response.rawResponse);
|
|
596
630
|
case 502:
|
|
597
631
|
throw new phenoml.fhir.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
632
|
+
case 503:
|
|
633
|
+
throw new phenoml.fhir.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
598
634
|
default:
|
|
599
635
|
throw new errors.phenomlError({
|
|
600
636
|
statusCode: _response.error.statusCode,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as errors from "../../../../errors/index.mjs";
|
|
3
|
+
export class ServiceUnavailableError extends errors.phenomlError {
|
|
4
|
+
constructor(body, rawResponse) {
|
|
5
|
+
super({
|
|
6
|
+
message: "ServiceUnavailableError",
|
|
7
|
+
statusCode: 503,
|
|
8
|
+
body: body,
|
|
9
|
+
rawResponse: rawResponse,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as core from "../../../../core/index.mjs";
|
|
2
|
+
import * as errors from "../../../../errors/index.mjs";
|
|
3
|
+
import type * as phenoml from "../../../index.mjs";
|
|
4
|
+
export declare class TooManyRequestsError extends errors.phenomlError {
|
|
5
|
+
constructor(body: phenoml.fhir.ErrorResponse, rawResponse?: core.RawResponse);
|
|
6
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as errors from "../../../../errors/index.mjs";
|
|
3
|
+
export class TooManyRequestsError extends errors.phenomlError {
|
|
4
|
+
constructor(body, rawResponse) {
|
|
5
|
+
super({
|
|
6
|
+
message: "TooManyRequestsError",
|
|
7
|
+
statusCode: 429,
|
|
8
|
+
body: body,
|
|
9
|
+
rawResponse: rawResponse,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -2,4 +2,6 @@ export * from "./BadGatewayError.mjs";
|
|
|
2
2
|
export * from "./BadRequestError.mjs";
|
|
3
3
|
export * from "./InternalServerError.mjs";
|
|
4
4
|
export * from "./NotFoundError.mjs";
|
|
5
|
+
export * from "./ServiceUnavailableError.mjs";
|
|
6
|
+
export * from "./TooManyRequestsError.mjs";
|
|
5
7
|
export * from "./UnauthorizedError.mjs";
|
|
@@ -2,4 +2,6 @@ export * from "./BadGatewayError.mjs";
|
|
|
2
2
|
export * from "./BadRequestError.mjs";
|
|
3
3
|
export * from "./InternalServerError.mjs";
|
|
4
4
|
export * from "./NotFoundError.mjs";
|
|
5
|
+
export * from "./ServiceUnavailableError.mjs";
|
|
6
|
+
export * from "./TooManyRequestsError.mjs";
|
|
5
7
|
export * from "./UnauthorizedError.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "10.0
|
|
1
|
+
export declare const SDK_VERSION = "10.1.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "10.0
|
|
1
|
+
export const SDK_VERSION = "10.1.0";
|