@oystehr/sdk 3.0.6 → 3.0.7
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 +24 -8
- package/dist/cjs/client/client.d.ts +1 -1
- package/dist/cjs/config.d.ts +5 -0
- package/dist/cjs/errors/index.d.ts +4 -1
- package/dist/cjs/index.cjs +210 -97
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.min.cjs +1 -1
- package/dist/cjs/index.min.cjs.map +1 -1
- package/dist/cjs/resources/classes/application.d.ts +1 -0
- package/dist/cjs/resources/classes/charge.d.ts +1 -0
- package/dist/cjs/resources/classes/conversation.d.ts +1 -0
- package/dist/cjs/resources/classes/developer.d.ts +1 -0
- package/dist/cjs/resources/classes/erx.d.ts +1 -0
- package/dist/cjs/resources/classes/fax.d.ts +1 -0
- package/dist/cjs/resources/classes/fhir.d.ts +1 -0
- package/dist/cjs/resources/classes/index.d.ts +1 -1
- package/dist/cjs/resources/classes/m2m.d.ts +1 -0
- package/dist/cjs/resources/classes/messaging.d.ts +1 -0
- package/dist/cjs/resources/classes/paymentMethod.d.ts +1 -0
- package/dist/cjs/resources/classes/project.d.ts +1 -0
- package/dist/cjs/resources/classes/rcm.d.ts +1 -0
- package/dist/cjs/resources/classes/role.d.ts +1 -0
- package/dist/cjs/resources/classes/secret.d.ts +1 -0
- package/dist/cjs/resources/classes/telemed.d.ts +1 -0
- package/dist/cjs/resources/classes/transactionalSMS.d.ts +1 -0
- package/dist/cjs/resources/classes/user.d.ts +1 -0
- package/dist/cjs/resources/classes/version.d.ts +1 -0
- package/dist/cjs/resources/classes/z3.d.ts +1 -0
- package/dist/cjs/resources/classes/zambda.d.ts +1 -0
- package/dist/cjs/resources/classes/zambdaLogStream.d.ts +1 -0
- package/dist/cjs/resources/types/DeveloperInviteResponse.d.ts +0 -4
- package/dist/cjs/resources/types/index.d.ts +2 -2
- package/dist/cjs/tests/setup/constants.d.ts +2 -6
- package/dist/cjs/tests/setup/global.d.ts +1 -0
- package/dist/esm/client/client.d.ts +1 -1
- package/dist/esm/client/client.js +4 -4
- package/dist/esm/client/client.js.map +1 -1
- package/dist/esm/config.d.ts +5 -0
- package/dist/esm/errors/index.d.ts +4 -1
- package/dist/esm/errors/index.js +18 -2
- package/dist/esm/errors/index.js.map +1 -1
- package/dist/esm/index.min.js +1 -1
- package/dist/esm/index.min.js.map +1 -1
- package/dist/esm/resources/classes/application.d.ts +1 -0
- package/dist/esm/resources/classes/application.js +12 -8
- package/dist/esm/resources/classes/application.js.map +1 -1
- package/dist/esm/resources/classes/charge.d.ts +1 -0
- package/dist/esm/resources/classes/charge.js +6 -2
- package/dist/esm/resources/classes/charge.js.map +1 -1
- package/dist/esm/resources/classes/conversation.d.ts +1 -0
- package/dist/esm/resources/classes/conversation.js +9 -5
- package/dist/esm/resources/classes/conversation.js.map +1 -1
- package/dist/esm/resources/classes/developer.d.ts +1 -0
- package/dist/esm/resources/classes/developer.js +10 -6
- package/dist/esm/resources/classes/developer.js.map +1 -1
- package/dist/esm/resources/classes/erx.d.ts +1 -0
- package/dist/esm/resources/classes/erx.js +10 -6
- package/dist/esm/resources/classes/erx.js.map +1 -1
- package/dist/esm/resources/classes/fax.d.ts +1 -0
- package/dist/esm/resources/classes/fax.js +7 -3
- package/dist/esm/resources/classes/fax.js.map +1 -1
- package/dist/esm/resources/classes/fhir.d.ts +1 -0
- package/dist/esm/resources/classes/fhir.js +4 -0
- package/dist/esm/resources/classes/fhir.js.map +1 -1
- package/dist/esm/resources/classes/index.d.ts +1 -1
- package/dist/esm/resources/classes/index.js +6 -1
- package/dist/esm/resources/classes/index.js.map +1 -1
- package/dist/esm/resources/classes/m2m.d.ts +1 -0
- package/dist/esm/resources/classes/m2m.js +11 -7
- package/dist/esm/resources/classes/m2m.js.map +1 -1
- package/dist/esm/resources/classes/messaging.d.ts +1 -0
- package/dist/esm/resources/classes/messaging.js +5 -1
- package/dist/esm/resources/classes/messaging.js.map +1 -1
- package/dist/esm/resources/classes/paymentMethod.d.ts +1 -0
- package/dist/esm/resources/classes/paymentMethod.js +8 -4
- package/dist/esm/resources/classes/paymentMethod.js.map +1 -1
- package/dist/esm/resources/classes/project.d.ts +1 -0
- package/dist/esm/resources/classes/project.js +6 -2
- package/dist/esm/resources/classes/project.js.map +1 -1
- package/dist/esm/resources/classes/rcm.d.ts +1 -0
- package/dist/esm/resources/classes/rcm.js +7 -3
- package/dist/esm/resources/classes/rcm.js.map +1 -1
- package/dist/esm/resources/classes/role.d.ts +1 -0
- package/dist/esm/resources/classes/role.js +9 -5
- package/dist/esm/resources/classes/role.js.map +1 -1
- package/dist/esm/resources/classes/secret.d.ts +1 -0
- package/dist/esm/resources/classes/secret.js +8 -4
- package/dist/esm/resources/classes/secret.js.map +1 -1
- package/dist/esm/resources/classes/telemed.d.ts +1 -0
- package/dist/esm/resources/classes/telemed.js +6 -2
- package/dist/esm/resources/classes/telemed.js.map +1 -1
- package/dist/esm/resources/classes/transactionalSMS.d.ts +1 -0
- package/dist/esm/resources/classes/transactionalSMS.js +5 -1
- package/dist/esm/resources/classes/transactionalSMS.js.map +1 -1
- package/dist/esm/resources/classes/user.d.ts +1 -0
- package/dist/esm/resources/classes/user.js +11 -7
- package/dist/esm/resources/classes/user.js.map +1 -1
- package/dist/esm/resources/classes/version.d.ts +1 -0
- package/dist/esm/resources/classes/version.js +5 -1
- package/dist/esm/resources/classes/version.js.map +1 -1
- package/dist/esm/resources/classes/z3-ext.js +9 -5
- package/dist/esm/resources/classes/z3-ext.js.map +1 -1
- package/dist/esm/resources/classes/z3.d.ts +1 -0
- package/dist/esm/resources/classes/z3.js +10 -6
- package/dist/esm/resources/classes/z3.js.map +1 -1
- package/dist/esm/resources/classes/zambda-ext.js +5 -1
- package/dist/esm/resources/classes/zambda-ext.js.map +1 -1
- package/dist/esm/resources/classes/zambda.d.ts +1 -0
- package/dist/esm/resources/classes/zambda.js +12 -8
- package/dist/esm/resources/classes/zambda.js.map +1 -1
- package/dist/esm/resources/classes/zambdaLogStream.d.ts +1 -0
- package/dist/esm/resources/classes/zambdaLogStream.js +7 -3
- package/dist/esm/resources/classes/zambdaLogStream.js.map +1 -1
- package/dist/esm/resources/types/DeveloperInviteResponse.d.ts +0 -4
- package/dist/esm/resources/types/index.d.ts +2 -2
- package/dist/esm/tests/setup/constants.d.ts +2 -6
- package/dist/esm/tests/setup/global.d.ts +1 -0
- package/package.json +3 -3
- package/src/client/client.ts +6 -6
- package/src/config.ts +5 -0
- package/src/errors/index.ts +18 -2
- package/src/resources/classes/application.ts +15 -8
- package/src/resources/classes/charge.ts +5 -2
- package/src/resources/classes/conversation.ts +20 -5
- package/src/resources/classes/developer.ts +9 -6
- package/src/resources/classes/erx.ts +9 -6
- package/src/resources/classes/fax.ts +6 -3
- package/src/resources/classes/fhir.ts +3 -0
- package/src/resources/classes/index.ts +5 -2
- package/src/resources/classes/m2m.ts +10 -7
- package/src/resources/classes/messaging.ts +4 -1
- package/src/resources/classes/paymentMethod.ts +7 -4
- package/src/resources/classes/project.ts +5 -2
- package/src/resources/classes/rcm.ts +6 -3
- package/src/resources/classes/role.ts +8 -5
- package/src/resources/classes/secret.ts +7 -4
- package/src/resources/classes/telemed.ts +5 -2
- package/src/resources/classes/transactionalSMS.ts +4 -1
- package/src/resources/classes/user.ts +10 -7
- package/src/resources/classes/version.ts +4 -1
- package/src/resources/classes/z3-ext.ts +10 -4
- package/src/resources/classes/z3.ts +9 -6
- package/src/resources/classes/zambda-ext.ts +5 -1
- package/src/resources/classes/zambda.ts +11 -8
- package/src/resources/classes/zambdaLogStream.ts +10 -3
- package/src/resources/types/DeveloperInviteResponse.ts +0 -4
- package/src/resources/types/index.ts +2 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var uuid = require('uuid');
|
|
4
4
|
|
|
5
5
|
class OystehrSdkError extends Error {
|
|
6
|
-
constructor({ message, code }) {
|
|
7
|
-
super(message);
|
|
6
|
+
constructor({ message, code, cause }) {
|
|
7
|
+
super(message, { cause });
|
|
8
8
|
Object.setPrototypeOf(this, OystehrSdkError.prototype);
|
|
9
9
|
this.code = code;
|
|
10
10
|
this.name = 'OystehrSdkError';
|
|
@@ -12,6 +12,14 @@ class OystehrSdkError extends Error {
|
|
|
12
12
|
toString() {
|
|
13
13
|
return `${this.name}: ${this.message} (code: ${this.code})`;
|
|
14
14
|
}
|
|
15
|
+
toJSON() {
|
|
16
|
+
return {
|
|
17
|
+
name: this.name,
|
|
18
|
+
message: this.message,
|
|
19
|
+
code: this.code,
|
|
20
|
+
cause: this.cause,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
15
23
|
}
|
|
16
24
|
function transformOperationOutcomeToErrorMessage(cause) {
|
|
17
25
|
var _a;
|
|
@@ -36,6 +44,14 @@ class OystehrFHIRError extends OystehrSdkError {
|
|
|
36
44
|
this.cause = error;
|
|
37
45
|
this.name = 'OystehrFHIRError';
|
|
38
46
|
}
|
|
47
|
+
toJSON() {
|
|
48
|
+
return {
|
|
49
|
+
name: this.name,
|
|
50
|
+
message: this.message,
|
|
51
|
+
code: this.code,
|
|
52
|
+
cause: this.cause,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
39
55
|
}
|
|
40
56
|
|
|
41
57
|
/******************************************************************************
|
|
@@ -87,23 +103,22 @@ class SDKResource {
|
|
|
87
103
|
constructor(config) {
|
|
88
104
|
this.config = config;
|
|
89
105
|
}
|
|
90
|
-
request(path, method) {
|
|
106
|
+
request(path, method, baseUrlThunk) {
|
|
91
107
|
return (params, request) => __awaiter(this, void 0, void 0, function* () {
|
|
92
|
-
const baseUrlThunk = () => { var _a; return (_a = this.config.projectApiUrl) !== null && _a !== void 0 ? _a : defaultProjectApiUrl; };
|
|
93
108
|
const configThunk = () => this.config;
|
|
94
109
|
try {
|
|
95
110
|
return yield fetcher(baseUrlThunk, configThunk, path, method)(params, request);
|
|
96
111
|
}
|
|
97
112
|
catch (err) {
|
|
98
113
|
const error = err;
|
|
99
|
-
throw new OystehrSdkError({ message: error.message, code: error.code });
|
|
114
|
+
throw new OystehrSdkError({ message: error.message, code: error.code, cause: error.cause });
|
|
100
115
|
}
|
|
101
116
|
});
|
|
102
117
|
}
|
|
103
118
|
fhirRequest(path, method) {
|
|
104
119
|
return (params, request) => __awaiter(this, void 0, void 0, function* () {
|
|
105
120
|
try {
|
|
106
|
-
const baseUrlThunk = () => { var _a; return (_a = this.config.fhirApiUrl) !== null &&
|
|
121
|
+
const baseUrlThunk = () => { var _a, _b; return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a.fhirApiUrl) !== null && _b !== void 0 ? _b : defaultFhirApiUrl; };
|
|
107
122
|
const configThunk = () => this.config;
|
|
108
123
|
// must await here to catch
|
|
109
124
|
return yield fetcher(baseUrlThunk, configThunk, path, method)(params, request);
|
|
@@ -115,6 +130,7 @@ class SDKResource {
|
|
|
115
130
|
throw new OystehrSdkError({
|
|
116
131
|
message: fullError.message,
|
|
117
132
|
code: fullError.code,
|
|
133
|
+
cause: fullError.cause,
|
|
118
134
|
});
|
|
119
135
|
}
|
|
120
136
|
throw new OystehrFHIRError({
|
|
@@ -323,6 +339,10 @@ class Application extends SDKResource {
|
|
|
323
339
|
constructor(config) {
|
|
324
340
|
super(config);
|
|
325
341
|
}
|
|
342
|
+
baseUrlThunk() {
|
|
343
|
+
var _a, _b;
|
|
344
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
345
|
+
}
|
|
326
346
|
/**
|
|
327
347
|
* Get a list of Applications. [Applications](https://docs.oystehr.com/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.
|
|
328
348
|
*
|
|
@@ -330,7 +350,7 @@ class Application extends SDKResource {
|
|
|
330
350
|
* Access Policy Resource: `App:Application`
|
|
331
351
|
*/
|
|
332
352
|
list(request) {
|
|
333
|
-
return this.request('/application', 'get')(request);
|
|
353
|
+
return this.request('/application', 'get', this.baseUrlThunk.bind(this))(request);
|
|
334
354
|
}
|
|
335
355
|
/**
|
|
336
356
|
* Create a new Application. [Applications](https://docs.oystehr.com/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.
|
|
@@ -339,7 +359,7 @@ class Application extends SDKResource {
|
|
|
339
359
|
* Access Policy Resource: `App:Application`
|
|
340
360
|
*/
|
|
341
361
|
create(params, request) {
|
|
342
|
-
return this.request('/application', 'post')(params, request);
|
|
362
|
+
return this.request('/application', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
343
363
|
}
|
|
344
364
|
/**
|
|
345
365
|
* Get the Application with the provided ID. [Applications](https://docs.oystehr.com/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.
|
|
@@ -348,7 +368,7 @@ class Application extends SDKResource {
|
|
|
348
368
|
* Access Policy Resource: `App:Application`
|
|
349
369
|
*/
|
|
350
370
|
get(params, request) {
|
|
351
|
-
return this.request('/application/{id}', 'get')(params, request);
|
|
371
|
+
return this.request('/application/{id}', 'get', this.baseUrlThunk.bind(this))(params, request);
|
|
352
372
|
}
|
|
353
373
|
/**
|
|
354
374
|
* Update the Application with the provided ID. [Applications](https://docs.oystehr.com/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.
|
|
@@ -357,7 +377,7 @@ class Application extends SDKResource {
|
|
|
357
377
|
* Access Policy Resource: `App:Application`
|
|
358
378
|
*/
|
|
359
379
|
update(params, request) {
|
|
360
|
-
return this.request('/application/{id}', 'patch')(params, request);
|
|
380
|
+
return this.request('/application/{id}', 'patch', this.baseUrlThunk.bind(this))(params, request);
|
|
361
381
|
}
|
|
362
382
|
/**
|
|
363
383
|
* Delete the Application with the provided ID. [Applications](https://docs.oystehr.com/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.
|
|
@@ -366,7 +386,7 @@ class Application extends SDKResource {
|
|
|
366
386
|
* Access Policy Resource: `App:Application`
|
|
367
387
|
*/
|
|
368
388
|
delete(params, request) {
|
|
369
|
-
return this.request('/application/{id}', 'delete')(params, request);
|
|
389
|
+
return this.request('/application/{id}', 'delete', this.baseUrlThunk.bind(this))(params, request);
|
|
370
390
|
}
|
|
371
391
|
/**
|
|
372
392
|
* Rotate client's secrete associated with an application.
|
|
@@ -375,7 +395,7 @@ class Application extends SDKResource {
|
|
|
375
395
|
* Access Policy Resource: `App:Application`
|
|
376
396
|
*/
|
|
377
397
|
rotateSecret(params, request) {
|
|
378
|
-
return this.request('/application/{id}/rotate-secret', 'post')(params, request);
|
|
398
|
+
return this.request('/application/{id}/rotate-secret', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
379
399
|
}
|
|
380
400
|
/**
|
|
381
401
|
* Revokes user's refresh token issued for the application.
|
|
@@ -384,7 +404,7 @@ class Application extends SDKResource {
|
|
|
384
404
|
* Access Policy Resource: `App:Application`
|
|
385
405
|
*/
|
|
386
406
|
revokeRefreshToken(params, request) {
|
|
387
|
-
return this.request('/application/{id}/revoke-refresh-token', 'post')(params, request);
|
|
407
|
+
return this.request('/application/{id}/revoke-refresh-token', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
388
408
|
}
|
|
389
409
|
/**
|
|
390
410
|
* Revokes user's access token issued for the application.
|
|
@@ -393,7 +413,7 @@ class Application extends SDKResource {
|
|
|
393
413
|
* Access Policy Resource: `App:Application`
|
|
394
414
|
*/
|
|
395
415
|
revokeAccessToken(params, request) {
|
|
396
|
-
return this.request('/application/{id}/revoke-access-token', 'post')(params, request);
|
|
416
|
+
return this.request('/application/{id}/revoke-access-token', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
397
417
|
}
|
|
398
418
|
}
|
|
399
419
|
|
|
@@ -402,6 +422,10 @@ class Charge extends SDKResource {
|
|
|
402
422
|
constructor(config) {
|
|
403
423
|
super(config);
|
|
404
424
|
}
|
|
425
|
+
baseUrlThunk() {
|
|
426
|
+
var _a, _b;
|
|
427
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
428
|
+
}
|
|
405
429
|
/**
|
|
406
430
|
* Charge patient's default payment method for a specified encounter or charge item.
|
|
407
431
|
*
|
|
@@ -414,7 +438,7 @@ class Charge extends SDKResource {
|
|
|
414
438
|
* Access Policy Resources: `FHIR:Patient:*,FHIR:Encounter:*,FHIR:Coverage:*`
|
|
415
439
|
*/
|
|
416
440
|
issue(params, request) {
|
|
417
|
-
return this.request('/payment/charge/issue', 'post')(params, request);
|
|
441
|
+
return this.request('/payment/charge/issue', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
418
442
|
}
|
|
419
443
|
/**
|
|
420
444
|
* Retrieve charge status for a specified encounter or charge item.
|
|
@@ -428,7 +452,7 @@ class Charge extends SDKResource {
|
|
|
428
452
|
* Access Policy Resources: `FHIR:Patient:*,FHIR:Encounter:*,FHIR:Coverage:*`
|
|
429
453
|
*/
|
|
430
454
|
status(params, request) {
|
|
431
|
-
return this.request('/payment/charge/status', 'post')(params, request);
|
|
455
|
+
return this.request('/payment/charge/status', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
432
456
|
}
|
|
433
457
|
}
|
|
434
458
|
|
|
@@ -471,6 +495,10 @@ class Conversation extends SDKResource {
|
|
|
471
495
|
*/
|
|
472
496
|
this.getConversationIdFromEncounter = getConversationIdFromEncounter;
|
|
473
497
|
}
|
|
498
|
+
baseUrlThunk() {
|
|
499
|
+
var _a, _b;
|
|
500
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
501
|
+
}
|
|
474
502
|
/**
|
|
475
503
|
* Create a new Conversation. [Conversations](https://docs.oystehr.com/services/messaging/conversations/) allow you to build multi-channel bi-directional messaging workflows. For example, you might create a Conversation where a provider messages with a patient through a web app, and the patient receives and responds to messages via SMS on their phone.
|
|
476
504
|
*
|
|
@@ -483,7 +511,7 @@ class Conversation extends SDKResource {
|
|
|
483
511
|
* Access Policy Resource: `FHIR:Encounter`
|
|
484
512
|
*/
|
|
485
513
|
create(params, request) {
|
|
486
|
-
return this.request('/messaging/conversation', 'post')(params, request);
|
|
514
|
+
return this.request('/messaging/conversation', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
487
515
|
}
|
|
488
516
|
/**
|
|
489
517
|
* Get a Conversation Token. Conversation Tokens are used to join the Conversation with the Twilio Conversations SDKs. [Conversations](https://docs.oystehr.com/services/messaging/conversations/) allow you to build multi-channel bi-directional messaging workflows. For example, you might create a Conversation where a provider messages with a patient through a web app, and the patient receives and responds to messages via SMS on their phone.
|
|
@@ -492,7 +520,7 @@ class Conversation extends SDKResource {
|
|
|
492
520
|
* Access Policy Resource: `Messaging:Conversation`.
|
|
493
521
|
*/
|
|
494
522
|
getToken(request) {
|
|
495
|
-
return this.request('/messaging/conversation/token', 'get')(request);
|
|
523
|
+
return this.request('/messaging/conversation/token', 'get', this.baseUrlThunk.bind(this))(request);
|
|
496
524
|
}
|
|
497
525
|
/**
|
|
498
526
|
* Add a participant to a Conversation. [Conversations](https://docs.oystehr.com/services/messaging/conversations/) allow you to build multi-channel bi-directional messaging workflows. For example, you might create a Conversation where a provider messages with a patient through a web app, and the patient receives and responds to messages via SMS on their phone.
|
|
@@ -506,7 +534,7 @@ class Conversation extends SDKResource {
|
|
|
506
534
|
* Access Policy Resource: `FHIR:Encounter`
|
|
507
535
|
*/
|
|
508
536
|
addParticipant(params, request) {
|
|
509
|
-
return this.request('/messaging/conversation/{conversationId}/participant', 'post')(params, request);
|
|
537
|
+
return this.request('/messaging/conversation/{conversationId}/participant', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
510
538
|
}
|
|
511
539
|
/**
|
|
512
540
|
* Remove a participant from a Conversation. [Conversations](https://docs.oystehr.com/services/messaging/conversations/) allow you to build multi-channel bi-directional messaging workflows. For example, you might create a Conversation where a provider messages with a patient through a web app, and the patient receives and responds to messages via SMS on their phone.
|
|
@@ -518,7 +546,7 @@ class Conversation extends SDKResource {
|
|
|
518
546
|
* Access Policy Resource: `FHIR:Patient`, `FHIR:Practitioner`, or `FHIR:RelatedPerson`
|
|
519
547
|
*/
|
|
520
548
|
removeParticipant(params, request) {
|
|
521
|
-
return this.request('/messaging/conversation/{conversationId}/participant', 'delete')(params, request);
|
|
549
|
+
return this.request('/messaging/conversation/{conversationId}/participant', 'delete', this.baseUrlThunk.bind(this))(params, request);
|
|
522
550
|
}
|
|
523
551
|
/**
|
|
524
552
|
* Send a message to a Conversation. [Conversations](https://docs.oystehr.com/services/messaging/conversations/) allow you to build multi-channel bi-directional messaging workflows. For example, you might create a Conversation where a provider messages with a patient through a web app, and the patient receives and responds to messages via SMS on their phone.
|
|
@@ -528,7 +556,7 @@ class Conversation extends SDKResource {
|
|
|
528
556
|
* Access Policy Resource: `Messaging:Conversation`
|
|
529
557
|
*/
|
|
530
558
|
message(params, request) {
|
|
531
|
-
return this.request('/messaging/conversation/{conversationId}/message', 'post')(params, request);
|
|
559
|
+
return this.request('/messaging/conversation/{conversationId}/message', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
532
560
|
}
|
|
533
561
|
}
|
|
534
562
|
|
|
@@ -537,6 +565,10 @@ class Developer extends SDKResource {
|
|
|
537
565
|
constructor(config) {
|
|
538
566
|
super(config);
|
|
539
567
|
}
|
|
568
|
+
baseUrlThunk() {
|
|
569
|
+
var _a, _b;
|
|
570
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
571
|
+
}
|
|
540
572
|
/**
|
|
541
573
|
* Get the Developer with the provided ID. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/services/project/). [Developers](https://docs.oystehr.com/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.
|
|
542
574
|
*
|
|
@@ -544,7 +576,7 @@ class Developer extends SDKResource {
|
|
|
544
576
|
* Access Policy Resource: `IAM:Developer`
|
|
545
577
|
*/
|
|
546
578
|
get(params, request) {
|
|
547
|
-
return this.request('/developer/{id}', 'get')(params, request);
|
|
579
|
+
return this.request('/developer/{id}', 'get', this.baseUrlThunk.bind(this))(params, request);
|
|
548
580
|
}
|
|
549
581
|
/**
|
|
550
582
|
* Update the Developer with the provided ID. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/services/project/). [Developers](https://docs.oystehr.com/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.
|
|
@@ -553,7 +585,7 @@ class Developer extends SDKResource {
|
|
|
553
585
|
* Access Policy Resource: `IAM:Developer`
|
|
554
586
|
*/
|
|
555
587
|
update(params, request) {
|
|
556
|
-
return this.request('/developer/{id}', 'patch')(params, request);
|
|
588
|
+
return this.request('/developer/{id}', 'patch', this.baseUrlThunk.bind(this))(params, request);
|
|
557
589
|
}
|
|
558
590
|
/**
|
|
559
591
|
* Remove the Developer with the provided ID from the project. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/services/project/). [Developers](https://docs.oystehr.com/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.
|
|
@@ -562,7 +594,7 @@ class Developer extends SDKResource {
|
|
|
562
594
|
* Access Policy Resource: `IAM:Developer`
|
|
563
595
|
*/
|
|
564
596
|
delete(params, request) {
|
|
565
|
-
return this.request('/developer/{id}', 'delete')(params, request);
|
|
597
|
+
return this.request('/developer/{id}', 'delete', this.baseUrlThunk.bind(this))(params, request);
|
|
566
598
|
}
|
|
567
599
|
/**
|
|
568
600
|
* Invite a new Developer to the Project. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/services/project/). [Developers](https://docs.oystehr.com/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.
|
|
@@ -571,7 +603,7 @@ class Developer extends SDKResource {
|
|
|
571
603
|
* Access Policy Resource: `IAM:Developer`
|
|
572
604
|
*/
|
|
573
605
|
invite(params, request) {
|
|
574
|
-
return this.request('/developer/invite', 'post')(params, request);
|
|
606
|
+
return this.request('/developer/invite', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
575
607
|
}
|
|
576
608
|
/**
|
|
577
609
|
* DEPRECATED. Please use [v2/list](https://api-reference.oystehr.com/reference/get_developer-v2-list) instead.
|
|
@@ -582,7 +614,7 @@ class Developer extends SDKResource {
|
|
|
582
614
|
* Access Policy Resource: `IAM:Developer`
|
|
583
615
|
*/
|
|
584
616
|
list(request) {
|
|
585
|
-
return this.request('/developer', 'get')(request);
|
|
617
|
+
return this.request('/developer', 'get', this.baseUrlThunk.bind(this))(request);
|
|
586
618
|
}
|
|
587
619
|
/**
|
|
588
620
|
* Get Developers in the Project with pagination, sort, sort Order and filtering. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
|
|
@@ -591,7 +623,7 @@ class Developer extends SDKResource {
|
|
|
591
623
|
* Access Policy Resource: `Project:Settings`
|
|
592
624
|
*/
|
|
593
625
|
listV2(params, request) {
|
|
594
|
-
return this.request('/developer/v2/list', 'get')(params, request);
|
|
626
|
+
return this.request('/developer/v2/list', 'get', this.baseUrlThunk.bind(this))(params, request);
|
|
595
627
|
}
|
|
596
628
|
}
|
|
597
629
|
|
|
@@ -600,41 +632,45 @@ class Erx extends SDKResource {
|
|
|
600
632
|
constructor(config) {
|
|
601
633
|
super(config);
|
|
602
634
|
}
|
|
635
|
+
baseUrlThunk() {
|
|
636
|
+
var _a, _b;
|
|
637
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
638
|
+
}
|
|
603
639
|
/**
|
|
604
640
|
* Retrieve patient properties from FHIR service and sync them with eRx service
|
|
605
641
|
*/
|
|
606
642
|
syncPatient(params, request) {
|
|
607
|
-
return this.request('/erx/sync-patient/{patientId}', 'post')(params, request);
|
|
643
|
+
return this.request('/erx/sync-patient/{patientId}', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
608
644
|
}
|
|
609
645
|
/**
|
|
610
646
|
* Search for allergies
|
|
611
647
|
*/
|
|
612
648
|
allergySearch(params, request) {
|
|
613
|
-
return this.request('/erx/allergy/search', 'get')(params, request);
|
|
649
|
+
return this.request('/erx/allergy/search', 'get', this.baseUrlThunk.bind(this))(params, request);
|
|
614
650
|
}
|
|
615
651
|
/**
|
|
616
652
|
* Cancel photon order
|
|
617
653
|
*/
|
|
618
654
|
cancelOrder(params, request) {
|
|
619
|
-
return this.request('/erx/cancel-order', 'post')(params, request);
|
|
655
|
+
return this.request('/erx/cancel-order', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
620
656
|
}
|
|
621
657
|
/**
|
|
622
658
|
* Cancel photon prescription
|
|
623
659
|
*/
|
|
624
660
|
cancelPrescription(params, request) {
|
|
625
|
-
return this.request('/erx/cancel-prescription', 'post')(params, request);
|
|
661
|
+
return this.request('/erx/cancel-prescription', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
626
662
|
}
|
|
627
663
|
/**
|
|
628
664
|
* Search for medications. Provide at least one of code or name filters
|
|
629
665
|
*/
|
|
630
666
|
medicationSearch(params, request) {
|
|
631
|
-
return this.request('/erx/medication/search', 'get')(params, request);
|
|
667
|
+
return this.request('/erx/medication/search', 'get', this.baseUrlThunk.bind(this))(params, request);
|
|
632
668
|
}
|
|
633
669
|
/**
|
|
634
670
|
* Search for medications. Provide at least one of code or name filters
|
|
635
671
|
*/
|
|
636
672
|
medicationSearchV2(params, request) {
|
|
637
|
-
return this.request('/erx/v2/medication/search', 'get')(params, request);
|
|
673
|
+
return this.request('/erx/v2/medication/search', 'get', this.baseUrlThunk.bind(this))(params, request);
|
|
638
674
|
}
|
|
639
675
|
}
|
|
640
676
|
|
|
@@ -643,6 +679,10 @@ class Fax extends SDKResource {
|
|
|
643
679
|
constructor(config) {
|
|
644
680
|
super(config);
|
|
645
681
|
}
|
|
682
|
+
baseUrlThunk() {
|
|
683
|
+
var _a, _b;
|
|
684
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['faxApiUrl']) !== null && _b !== void 0 ? _b : 'https://fax-api.zapehr.com/v1';
|
|
685
|
+
}
|
|
646
686
|
/**
|
|
647
687
|
* Offboard a fax number. Oystehr's [offboard](https://docs.oystehr.com/services/fax/number/) feature makes it easy to stop using the fax service and release the project's assigned fax number with a single API call. Please note there is no way to guarantee getting the same number back again, so if you think this can break your project in any way we recommend not offboarding and avoid sending faxes until you're sure.
|
|
648
688
|
*
|
|
@@ -651,7 +691,7 @@ class Fax extends SDKResource {
|
|
|
651
691
|
* Access Policy Resource: `Fax:Number`
|
|
652
692
|
*/
|
|
653
693
|
offboard(request) {
|
|
654
|
-
return this.request('/
|
|
694
|
+
return this.request('/offboard', 'post', this.baseUrlThunk.bind(this))(request);
|
|
655
695
|
}
|
|
656
696
|
/**
|
|
657
697
|
* Onboard a fax number. Oystehr's [onboard](https://docs.oystehr.com/services/fax/number/) feature makes it easy to start using the fax service and purchase a new fax number for your project with a single API call.
|
|
@@ -661,7 +701,7 @@ class Fax extends SDKResource {
|
|
|
661
701
|
* Access Policy Resource: `Fax:Number`
|
|
662
702
|
*/
|
|
663
703
|
onboard(request) {
|
|
664
|
-
return this.request('/
|
|
704
|
+
return this.request('/onboard', 'post', this.baseUrlThunk.bind(this))(request);
|
|
665
705
|
}
|
|
666
706
|
/**
|
|
667
707
|
* Send a fax. Oystehr's [fax sending](https://docs.oystehr.com/services/fax/send/) feature makes it easy to send a fax to a chosen recipient with a single API call. You can use this feature to send referrals, medical records, prescriptions, and other documents that require fax transmission e.g. for HIPAA compliance.
|
|
@@ -671,7 +711,7 @@ class Fax extends SDKResource {
|
|
|
671
711
|
* Access Policy Resource: `Fax:Fax`
|
|
672
712
|
*/
|
|
673
713
|
send(params, request) {
|
|
674
|
-
return this.request('/
|
|
714
|
+
return this.request('/send', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
675
715
|
}
|
|
676
716
|
}
|
|
677
717
|
|
|
@@ -871,6 +911,10 @@ class Fhir extends SDKResource {
|
|
|
871
911
|
this.formatAddress = formatAddress;
|
|
872
912
|
this.formatHumanName = formatHumanName;
|
|
873
913
|
}
|
|
914
|
+
baseUrlThunk() {
|
|
915
|
+
var _a, _b;
|
|
916
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['fhirApiUrl']) !== null && _b !== void 0 ? _b : 'https://fhir-api.zapehr.com';
|
|
917
|
+
}
|
|
874
918
|
}
|
|
875
919
|
|
|
876
920
|
// AUTOGENERATED -- DO NOT EDIT
|
|
@@ -878,6 +922,10 @@ class M2m extends SDKResource {
|
|
|
878
922
|
constructor(config) {
|
|
879
923
|
super(config);
|
|
880
924
|
}
|
|
925
|
+
baseUrlThunk() {
|
|
926
|
+
var _a, _b;
|
|
927
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
928
|
+
}
|
|
881
929
|
/**
|
|
882
930
|
* DEPRECATED. Please use [v2/list](https://api-reference.oystehr.com/reference/get_m2m-v2-list) instead.
|
|
883
931
|
*
|
|
@@ -887,7 +935,7 @@ class M2m extends SDKResource {
|
|
|
887
935
|
* Access Policy Resource: `IAM:M2MClient`
|
|
888
936
|
*/
|
|
889
937
|
list(request) {
|
|
890
|
-
return this.request('/m2m', 'get')(request);
|
|
938
|
+
return this.request('/m2m', 'get', this.baseUrlThunk.bind(this))(request);
|
|
891
939
|
}
|
|
892
940
|
/**
|
|
893
941
|
* Create a new M2M Client. [M2M Clients](https://docs.oystehr.com/services/iam/m2m-clients) are used to access Oystehr APIs from scripts and server-side code like [Zambda Functions](https://docs.oystehr.com/services/zambda).
|
|
@@ -896,7 +944,7 @@ class M2m extends SDKResource {
|
|
|
896
944
|
* Access Policy Resource: `IAM:M2MClient`
|
|
897
945
|
*/
|
|
898
946
|
create(params, request) {
|
|
899
|
-
return this.request('/m2m', 'post')(params, request);
|
|
947
|
+
return this.request('/m2m', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
900
948
|
}
|
|
901
949
|
/**
|
|
902
950
|
* Get the M2M Client with the provided ID. [M2M Clients](https://docs.oystehr.com/services/iam/m2m-clients) are used to access Oystehr APIs from scripts and server-side code like [Zambda Functions](https://docs.oystehr.com/services/zambda).
|
|
@@ -905,7 +953,7 @@ class M2m extends SDKResource {
|
|
|
905
953
|
* Access Policy Resource: `IAM:M2MClient`
|
|
906
954
|
*/
|
|
907
955
|
get(params, request) {
|
|
908
|
-
return this.request('/m2m/{id}', 'get')(params, request);
|
|
956
|
+
return this.request('/m2m/{id}', 'get', this.baseUrlThunk.bind(this))(params, request);
|
|
909
957
|
}
|
|
910
958
|
/**
|
|
911
959
|
* Update the M2M Client with the provided ID. [M2M Clients](https://docs.oystehr.com/services/iam/m2m-clients) are used to access Oystehr APIs from scripts and server-side code like [Zambda Functions](https://docs.oystehr.com/services/zambda).
|
|
@@ -914,7 +962,7 @@ class M2m extends SDKResource {
|
|
|
914
962
|
* Access Policy Resource: `IAM:M2MClient`
|
|
915
963
|
*/
|
|
916
964
|
update(params, request) {
|
|
917
|
-
return this.request('/m2m/{id}', 'patch')(params, request);
|
|
965
|
+
return this.request('/m2m/{id}', 'patch', this.baseUrlThunk.bind(this))(params, request);
|
|
918
966
|
}
|
|
919
967
|
/**
|
|
920
968
|
* Delete the M2M Client with the provided ID. [M2M Clients](https://docs.oystehr.com/services/iam/m2m-clients) are used to access Oystehr APIs from scripts and server-side code like [Zambda Functions](https://docs.oystehr.com/services/zambda).
|
|
@@ -923,7 +971,7 @@ class M2m extends SDKResource {
|
|
|
923
971
|
* Access Policy Resource: `IAM:M2MClient`
|
|
924
972
|
*/
|
|
925
973
|
delete(params, request) {
|
|
926
|
-
return this.request('/m2m/{id}', 'delete')(params, request);
|
|
974
|
+
return this.request('/m2m/{id}', 'delete', this.baseUrlThunk.bind(this))(params, request);
|
|
927
975
|
}
|
|
928
976
|
/**
|
|
929
977
|
* Rotate the client secret for the M2M Client with the provided ID. [M2M Clients](https://docs.oystehr.com/services/iam/m2m-clients) are used to access Oystehr APIs from scripts and server-side code like [Zambda Functions](https://docs.oystehr.com/services/zambda).
|
|
@@ -932,7 +980,7 @@ class M2m extends SDKResource {
|
|
|
932
980
|
* Access Policy Resource: `IAM:M2MClient`
|
|
933
981
|
*/
|
|
934
982
|
rotateSecret(params, request) {
|
|
935
|
-
return this.request('/m2m/{id}/rotate-secret', 'post')(params, request);
|
|
983
|
+
return this.request('/m2m/{id}/rotate-secret', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
936
984
|
}
|
|
937
985
|
/**
|
|
938
986
|
* Get M2M clients in the Project with pagination, sort, sort Order and filtering. [M2M Clients](https://docs.oystehr.com/services/iam/m2m-clients) are used to access Oystehr APIs from scripts and server-side code like [Zambda Functions](https://docs.oystehr.com/services/zambda).
|
|
@@ -941,7 +989,7 @@ class M2m extends SDKResource {
|
|
|
941
989
|
* Access Policy Resource: `IAM:M2MClient`
|
|
942
990
|
*/
|
|
943
991
|
listV2(params, request) {
|
|
944
|
-
return this.request('/m2m/v2/list', 'get')(params, request);
|
|
992
|
+
return this.request('/m2m/v2/list', 'get', this.baseUrlThunk.bind(this))(params, request);
|
|
945
993
|
}
|
|
946
994
|
}
|
|
947
995
|
|
|
@@ -950,11 +998,15 @@ class Messaging extends SDKResource {
|
|
|
950
998
|
constructor(config) {
|
|
951
999
|
super(config);
|
|
952
1000
|
}
|
|
1001
|
+
baseUrlThunk() {
|
|
1002
|
+
var _a, _b;
|
|
1003
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
1004
|
+
}
|
|
953
1005
|
/**
|
|
954
1006
|
* Get an information about the Messaging services configuration. This information includes phone number, phone number type and also rate limits of each service.
|
|
955
1007
|
*/
|
|
956
1008
|
getMessagingConfig(request) {
|
|
957
|
-
return this.request('/messaging/config', 'get')(request);
|
|
1009
|
+
return this.request('/messaging/config', 'get', this.baseUrlThunk.bind(this))(request);
|
|
958
1010
|
}
|
|
959
1011
|
}
|
|
960
1012
|
|
|
@@ -963,6 +1015,10 @@ class PaymentMethod extends SDKResource {
|
|
|
963
1015
|
constructor(config) {
|
|
964
1016
|
super(config);
|
|
965
1017
|
}
|
|
1018
|
+
baseUrlThunk() {
|
|
1019
|
+
var _a, _b;
|
|
1020
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
1021
|
+
}
|
|
966
1022
|
/**
|
|
967
1023
|
* Enter a new credit card or other payment method for the user.
|
|
968
1024
|
*
|
|
@@ -979,7 +1035,7 @@ class PaymentMethod extends SDKResource {
|
|
|
979
1035
|
* Access Policy Resource: `FHIR:Patient`
|
|
980
1036
|
*/
|
|
981
1037
|
setUp(params, request) {
|
|
982
|
-
return this.request('/payment/payment-method/setup', 'post')(params, request);
|
|
1038
|
+
return this.request('/payment/payment-method/setup', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
983
1039
|
}
|
|
984
1040
|
/**
|
|
985
1041
|
* Set a specified payment method for the user as default.
|
|
@@ -997,7 +1053,7 @@ class PaymentMethod extends SDKResource {
|
|
|
997
1053
|
* Access Policy Resource: `FHIR:Patient`
|
|
998
1054
|
*/
|
|
999
1055
|
setDefault(params, request) {
|
|
1000
|
-
return this.request('/payment/payment-method/set-default', 'post')(params, request);
|
|
1056
|
+
return this.request('/payment/payment-method/set-default', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
1001
1057
|
}
|
|
1002
1058
|
/**
|
|
1003
1059
|
* Delete a specified payment method for the beneficiary.
|
|
@@ -1015,7 +1071,7 @@ class PaymentMethod extends SDKResource {
|
|
|
1015
1071
|
* Access Policy Resource: `FHIR:Patient`
|
|
1016
1072
|
*/
|
|
1017
1073
|
delete(params, request) {
|
|
1018
|
-
return this.request('/payment/payment-method', 'delete')(params, request);
|
|
1074
|
+
return this.request('/payment/payment-method', 'delete', this.baseUrlThunk.bind(this))(params, request);
|
|
1019
1075
|
}
|
|
1020
1076
|
/**
|
|
1021
1077
|
* List all payment methods for the patient.
|
|
@@ -1033,7 +1089,7 @@ class PaymentMethod extends SDKResource {
|
|
|
1033
1089
|
* Access Policy Resource: `FHIR:Patient`
|
|
1034
1090
|
*/
|
|
1035
1091
|
list(params, request) {
|
|
1036
|
-
return this.request('/payment/payment-method/list', 'post')(params, request);
|
|
1092
|
+
return this.request('/payment/payment-method/list', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
1037
1093
|
}
|
|
1038
1094
|
}
|
|
1039
1095
|
|
|
@@ -1042,6 +1098,10 @@ class Project extends SDKResource {
|
|
|
1042
1098
|
constructor(config) {
|
|
1043
1099
|
super(config);
|
|
1044
1100
|
}
|
|
1101
|
+
baseUrlThunk() {
|
|
1102
|
+
var _a, _b;
|
|
1103
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
1104
|
+
}
|
|
1045
1105
|
/**
|
|
1046
1106
|
* Get the Project settings for a Project. Developers must specify a [project ID](https://docs.oystehr.com/core-documentation/authenticating-api-requests/#x-zapehr-project-id-header) in the header. A Project is the logically-isolated instance of Oystehr that segments your data from other Projects. [Projects](https://docs.oystehr.com/services/project/) are completely independent from each other, having their own separate [FHIR store](https://docs.oystehr.com/services/fhir/basics/), [Applications](https://docs.oystehr.com/services/app/applications/), [Users](https://docs.oystehr.com/services/app/users/), etc .
|
|
1047
1107
|
*
|
|
@@ -1049,7 +1109,7 @@ class Project extends SDKResource {
|
|
|
1049
1109
|
* Access Policy Resource: `Project:Settings`
|
|
1050
1110
|
*/
|
|
1051
1111
|
get(request) {
|
|
1052
|
-
return this.request('/project', 'get')(request);
|
|
1112
|
+
return this.request('/project', 'get', this.baseUrlThunk.bind(this))(request);
|
|
1053
1113
|
}
|
|
1054
1114
|
/**
|
|
1055
1115
|
* Update the Project settings for the Project that corresponds to the project-id in the request header. A [Project](https://docs.oystehr.com/services/project/) is the logically-isolated instance of Oystehr that segments your data from other Projects. Projects are completely independent from each other, having their own separate [FHIR store](https://docs.oystehr.com/services/fhir/basics/), [Applications](https://docs.oystehr.com/services/app/applications/), [Users](https://docs.oystehr.com/services/app/users/), etc .
|
|
@@ -1058,7 +1118,7 @@ class Project extends SDKResource {
|
|
|
1058
1118
|
* Access Policy Resource: `Project:Settings`
|
|
1059
1119
|
*/
|
|
1060
1120
|
update(params, request) {
|
|
1061
|
-
return this.request('/project', 'patch')(params, request);
|
|
1121
|
+
return this.request('/project', 'patch', this.baseUrlThunk.bind(this))(params, request);
|
|
1062
1122
|
}
|
|
1063
1123
|
}
|
|
1064
1124
|
|
|
@@ -1067,6 +1127,10 @@ class Rcm extends SDKResource {
|
|
|
1067
1127
|
constructor(config) {
|
|
1068
1128
|
super(config);
|
|
1069
1129
|
}
|
|
1130
|
+
baseUrlThunk() {
|
|
1131
|
+
var _a, _b;
|
|
1132
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
1133
|
+
}
|
|
1070
1134
|
/**
|
|
1071
1135
|
* Check [Insurance Eligibility](https://docs.oystehr.com/services/rcm/eligibility/).
|
|
1072
1136
|
*
|
|
@@ -1077,7 +1141,7 @@ class Rcm extends SDKResource {
|
|
|
1077
1141
|
* Access Policy Resource: `FHIR:CoverageEligibilityResponse`
|
|
1078
1142
|
*/
|
|
1079
1143
|
eligibilityCheck(params, request) {
|
|
1080
|
-
return this.request('/rcm/eligibility-check', 'post')(params, request);
|
|
1144
|
+
return this.request('/rcm/eligibility-check', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
1081
1145
|
}
|
|
1082
1146
|
/**
|
|
1083
1147
|
* Check [Validate Professional Claim](https://docs.oystehr.com/services/rcm/professional-claim-submission/).
|
|
@@ -1089,7 +1153,7 @@ class Rcm extends SDKResource {
|
|
|
1089
1153
|
* Access Policy Resource: `FHIR:AuditEvent`
|
|
1090
1154
|
*/
|
|
1091
1155
|
validateProfessionalClaim(params, request) {
|
|
1092
|
-
return this.request('/rcm/professional-claim/validate', 'post')(params, request);
|
|
1156
|
+
return this.request('/rcm/professional-claim/validate', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
1093
1157
|
}
|
|
1094
1158
|
/**
|
|
1095
1159
|
* Check [Submit Professional Claim](https://docs.oystehr.com/services/rcm/professional-claim-submission/).
|
|
@@ -1104,7 +1168,7 @@ class Rcm extends SDKResource {
|
|
|
1104
1168
|
* Access Policy Resource: `FHIR:Claim`
|
|
1105
1169
|
*/
|
|
1106
1170
|
submitProfessionalClaim(params, request) {
|
|
1107
|
-
return this.request('/rcm/professional-claim/submit', 'post')(params, request);
|
|
1171
|
+
return this.request('/rcm/professional-claim/submit', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
1108
1172
|
}
|
|
1109
1173
|
}
|
|
1110
1174
|
|
|
@@ -1113,6 +1177,10 @@ class Role extends SDKResource {
|
|
|
1113
1177
|
constructor(config) {
|
|
1114
1178
|
super(config);
|
|
1115
1179
|
}
|
|
1180
|
+
baseUrlThunk() {
|
|
1181
|
+
var _a, _b;
|
|
1182
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
1183
|
+
}
|
|
1116
1184
|
/**
|
|
1117
1185
|
* Get a list of all Roles. A [Role](https://docs.oystehr.com/services/iam/roles/) defines an access policy that can be assigned to any number of [Developers](https://docs.oystehr.com/services/iam/developers/), [Users](https://docs.oystehr.com/services/app/users/), and [M2M Clients](https://docs.oystehr.com/services/iam/m2m-clients/).
|
|
1118
1186
|
*
|
|
@@ -1120,7 +1188,7 @@ class Role extends SDKResource {
|
|
|
1120
1188
|
* Access Policy Resource: `IAM:Role`
|
|
1121
1189
|
*/
|
|
1122
1190
|
list(request) {
|
|
1123
|
-
return this.request('/iam/role', 'get')(request);
|
|
1191
|
+
return this.request('/iam/role', 'get', this.baseUrlThunk.bind(this))(request);
|
|
1124
1192
|
}
|
|
1125
1193
|
/**
|
|
1126
1194
|
* Create a new Role. A [Role](https://docs.oystehr.com/services/iam/roles/) defines an access policy that can be assigned to any number of [Developers](https://docs.oystehr.com/services/iam/developers/), [Users](https://docs.oystehr.com/services/app/users/), and [M2M Clients](https://docs.oystehr.com/services/iam/m2m-clients/).
|
|
@@ -1129,7 +1197,7 @@ class Role extends SDKResource {
|
|
|
1129
1197
|
* Access Policy Resource: `IAM:Role`
|
|
1130
1198
|
*/
|
|
1131
1199
|
create(params, request) {
|
|
1132
|
-
return this.request('/iam/role', 'post')(params, request);
|
|
1200
|
+
return this.request('/iam/role', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
1133
1201
|
}
|
|
1134
1202
|
/**
|
|
1135
1203
|
* Get the Role with the provided ID. A [Role](https://docs.oystehr.com/services/iam/roles/) defines an access policy that can be assigned to any number of [Developers](https://docs.oystehr.com/services/iam/developers/), [Users](https://docs.oystehr.com/services/app/users/), and [M2M Clients](https://docs.oystehr.com/services/iam/m2m-clients/).
|
|
@@ -1138,7 +1206,7 @@ class Role extends SDKResource {
|
|
|
1138
1206
|
* Access Policy Resource: `IAM:Role`
|
|
1139
1207
|
*/
|
|
1140
1208
|
get(params, request) {
|
|
1141
|
-
return this.request('/iam/role/{roleId}', 'get')(params, request);
|
|
1209
|
+
return this.request('/iam/role/{roleId}', 'get', this.baseUrlThunk.bind(this))(params, request);
|
|
1142
1210
|
}
|
|
1143
1211
|
/**
|
|
1144
1212
|
* Update the Role with the provided ID. A [Role](https://docs.oystehr.com/services/iam/roles/) defines an access policy that can be assigned to any number of [Developers](https://docs.oystehr.com/services/iam/developers/), [Users](https://docs.oystehr.com/services/app/users/), and [M2M Clients](https://docs.oystehr.com/services/iam/m2m-clients/).
|
|
@@ -1147,7 +1215,7 @@ class Role extends SDKResource {
|
|
|
1147
1215
|
* Access Policy Resource: `IAM:Role`
|
|
1148
1216
|
*/
|
|
1149
1217
|
update(params, request) {
|
|
1150
|
-
return this.request('/iam/role/{roleId}', 'patch')(params, request);
|
|
1218
|
+
return this.request('/iam/role/{roleId}', 'patch', this.baseUrlThunk.bind(this))(params, request);
|
|
1151
1219
|
}
|
|
1152
1220
|
/**
|
|
1153
1221
|
* Delete the Role with the provided ID. A [Role](https://docs.oystehr.com/services/iam/roles/) defines an access policy that can be assigned to any number of [Developers](https://docs.oystehr.com/services/iam/developers/), [Users](https://docs.oystehr.com/services/app/users/), and [M2M Clients](https://docs.oystehr.com/services/iam/m2m-clients/).
|
|
@@ -1157,7 +1225,7 @@ class Role extends SDKResource {
|
|
|
1157
1225
|
* Will fail if any entities hold the Role or if Role is assigned as the default patient role for the project
|
|
1158
1226
|
*/
|
|
1159
1227
|
delete(params, request) {
|
|
1160
|
-
return this.request('/iam/role/{roleId}', 'delete')(params, request);
|
|
1228
|
+
return this.request('/iam/role/{roleId}', 'delete', this.baseUrlThunk.bind(this))(params, request);
|
|
1161
1229
|
}
|
|
1162
1230
|
}
|
|
1163
1231
|
|
|
@@ -1166,6 +1234,10 @@ class Secret extends SDKResource {
|
|
|
1166
1234
|
constructor(config) {
|
|
1167
1235
|
super(config);
|
|
1168
1236
|
}
|
|
1237
|
+
baseUrlThunk() {
|
|
1238
|
+
var _a, _b;
|
|
1239
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
1240
|
+
}
|
|
1169
1241
|
/**
|
|
1170
1242
|
* Get a list of all secrets in the Project.
|
|
1171
1243
|
*
|
|
@@ -1173,7 +1245,7 @@ class Secret extends SDKResource {
|
|
|
1173
1245
|
* Access Policy Resource: `Zambda:Secret`
|
|
1174
1246
|
*/
|
|
1175
1247
|
list(request) {
|
|
1176
|
-
return this.request('/secret', 'get')(request);
|
|
1248
|
+
return this.request('/secret', 'get', this.baseUrlThunk.bind(this))(request);
|
|
1177
1249
|
}
|
|
1178
1250
|
/**
|
|
1179
1251
|
* Create a secret for a project. If the secret is already defined, update it.
|
|
@@ -1182,7 +1254,7 @@ class Secret extends SDKResource {
|
|
|
1182
1254
|
* Access Policy Resource: `Zambda:Secret`
|
|
1183
1255
|
*/
|
|
1184
1256
|
set(params, request) {
|
|
1185
|
-
return this.request('/secret', 'post')(params, request);
|
|
1257
|
+
return this.request('/secret', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
1186
1258
|
}
|
|
1187
1259
|
/**
|
|
1188
1260
|
* Get the secret with the provided name.
|
|
@@ -1191,7 +1263,7 @@ class Secret extends SDKResource {
|
|
|
1191
1263
|
* Access Policy Resource: `Zambda:Secret`
|
|
1192
1264
|
*/
|
|
1193
1265
|
get(params, request) {
|
|
1194
|
-
return this.request('/secret/{name}', 'get')(params, request);
|
|
1266
|
+
return this.request('/secret/{name}', 'get', this.baseUrlThunk.bind(this))(params, request);
|
|
1195
1267
|
}
|
|
1196
1268
|
/**
|
|
1197
1269
|
* Delete the secret with the provided name.
|
|
@@ -1200,7 +1272,7 @@ class Secret extends SDKResource {
|
|
|
1200
1272
|
* Access Policy Resource: `Zambda:Secret`
|
|
1201
1273
|
*/
|
|
1202
1274
|
delete(params, request) {
|
|
1203
|
-
return this.request('/secret/{name}', 'delete')(params, request);
|
|
1275
|
+
return this.request('/secret/{name}', 'delete', this.baseUrlThunk.bind(this))(params, request);
|
|
1204
1276
|
}
|
|
1205
1277
|
}
|
|
1206
1278
|
|
|
@@ -1209,6 +1281,10 @@ class Telemed extends SDKResource {
|
|
|
1209
1281
|
constructor(config) {
|
|
1210
1282
|
super(config);
|
|
1211
1283
|
}
|
|
1284
|
+
baseUrlThunk() {
|
|
1285
|
+
var _a, _b;
|
|
1286
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
1287
|
+
}
|
|
1212
1288
|
/**
|
|
1213
1289
|
* Create a [telemedicine video meeting](https://docs.oystehr.com/services/telemed/).
|
|
1214
1290
|
*
|
|
@@ -1221,7 +1297,7 @@ class Telemed extends SDKResource {
|
|
|
1221
1297
|
* Access Policy Resource: `FHIR:Encounter`
|
|
1222
1298
|
*/
|
|
1223
1299
|
createMeeting(params, request) {
|
|
1224
|
-
return this.request('/telemed/v2/meeting', 'post')(params, request);
|
|
1300
|
+
return this.request('/telemed/v2/meeting', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
1225
1301
|
}
|
|
1226
1302
|
/**
|
|
1227
1303
|
* Get Meeting and Attendee objects necessary to join a telemedicine video meeting.
|
|
@@ -1234,7 +1310,7 @@ class Telemed extends SDKResource {
|
|
|
1234
1310
|
* Access Policy Resource: `Telemed:Meeting`
|
|
1235
1311
|
*/
|
|
1236
1312
|
joinMeeting(params, request) {
|
|
1237
|
-
return this.request('/telemed/v2/meeting/{encounterId}/join', 'get')(params, request);
|
|
1313
|
+
return this.request('/telemed/v2/meeting/{encounterId}/join', 'get', this.baseUrlThunk.bind(this))(params, request);
|
|
1238
1314
|
}
|
|
1239
1315
|
}
|
|
1240
1316
|
|
|
@@ -1243,6 +1319,10 @@ class TransactionalSMS extends SDKResource {
|
|
|
1243
1319
|
constructor(config) {
|
|
1244
1320
|
super(config);
|
|
1245
1321
|
}
|
|
1322
|
+
baseUrlThunk() {
|
|
1323
|
+
var _a, _b;
|
|
1324
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
1325
|
+
}
|
|
1246
1326
|
/**
|
|
1247
1327
|
* Send an SMS to any phone number. Oystehr's [Transactional SMS](https://docs.oystehr.com/services/messaging/transactional-sms/) feature makes it easy to send a text message to your [Users](https://docs.oystehr.com/services/app/users/) with a single API call. You can use this feature to send appointment reminders, prescription refill reminders, discharge information, and more.
|
|
1248
1328
|
*
|
|
@@ -1259,7 +1339,7 @@ class TransactionalSMS extends SDKResource {
|
|
|
1259
1339
|
* Access Policy Resource: `FHIR:Patient`
|
|
1260
1340
|
*/
|
|
1261
1341
|
send(params, request) {
|
|
1262
|
-
return this.request('/messaging/transactional-sms/send', 'post')(params, request);
|
|
1342
|
+
return this.request('/messaging/transactional-sms/send', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
1263
1343
|
}
|
|
1264
1344
|
}
|
|
1265
1345
|
|
|
@@ -1268,13 +1348,17 @@ class User extends SDKResource {
|
|
|
1268
1348
|
constructor(config) {
|
|
1269
1349
|
super(config);
|
|
1270
1350
|
}
|
|
1351
|
+
baseUrlThunk() {
|
|
1352
|
+
var _a, _b;
|
|
1353
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
1354
|
+
}
|
|
1271
1355
|
/**
|
|
1272
1356
|
* Get your own User details. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
|
|
1273
1357
|
*
|
|
1274
1358
|
* Fetch details about the calling User. This endpoint has no access policy requirements, it is available to all authenticated Users.
|
|
1275
1359
|
*/
|
|
1276
1360
|
me(request) {
|
|
1277
|
-
return this.request('/user/me', 'get')(request);
|
|
1361
|
+
return this.request('/user/me', 'get', this.baseUrlThunk.bind(this))(request);
|
|
1278
1362
|
}
|
|
1279
1363
|
/**
|
|
1280
1364
|
* Get the User with the provided ID. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
|
|
@@ -1283,7 +1367,7 @@ class User extends SDKResource {
|
|
|
1283
1367
|
* Access Policy Resource: `App:User`
|
|
1284
1368
|
*/
|
|
1285
1369
|
get(params, request) {
|
|
1286
|
-
return this.request('/user/{id}', 'get')(params, request);
|
|
1370
|
+
return this.request('/user/{id}', 'get', this.baseUrlThunk.bind(this))(params, request);
|
|
1287
1371
|
}
|
|
1288
1372
|
/**
|
|
1289
1373
|
* Update the User with the provided ID. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
|
|
@@ -1292,7 +1376,7 @@ class User extends SDKResource {
|
|
|
1292
1376
|
* Access Policy Resource: `App:User`
|
|
1293
1377
|
*/
|
|
1294
1378
|
update(params, request) {
|
|
1295
|
-
return this.request('/user/{id}', 'patch')(params, request);
|
|
1379
|
+
return this.request('/user/{id}', 'patch', this.baseUrlThunk.bind(this))(params, request);
|
|
1296
1380
|
}
|
|
1297
1381
|
/**
|
|
1298
1382
|
* Delete the User with the provided ID. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
|
|
@@ -1301,7 +1385,7 @@ class User extends SDKResource {
|
|
|
1301
1385
|
* Access Policy Resource: `App:User`
|
|
1302
1386
|
*/
|
|
1303
1387
|
delete(params, request) {
|
|
1304
|
-
return this.request('/user/{id}', 'delete')(params, request);
|
|
1388
|
+
return this.request('/user/{id}', 'delete', this.baseUrlThunk.bind(this))(params, request);
|
|
1305
1389
|
}
|
|
1306
1390
|
/**
|
|
1307
1391
|
* Invite a User to the Project. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
|
|
@@ -1310,7 +1394,7 @@ class User extends SDKResource {
|
|
|
1310
1394
|
* Access Policy Resource: `App:User`
|
|
1311
1395
|
*/
|
|
1312
1396
|
invite(params, request) {
|
|
1313
|
-
return this.request('/user/invite', 'post')(params, request);
|
|
1397
|
+
return this.request('/user/invite', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
1314
1398
|
}
|
|
1315
1399
|
/**
|
|
1316
1400
|
* DEPRECATED. Please use [v2/list](https://api-reference.oystehr.com/reference/get_user-v2-list) instead.
|
|
@@ -1321,7 +1405,7 @@ class User extends SDKResource {
|
|
|
1321
1405
|
* Access Policy Resource: `App:User`
|
|
1322
1406
|
*/
|
|
1323
1407
|
list(request) {
|
|
1324
|
-
return this.request('/user', 'get')(request);
|
|
1408
|
+
return this.request('/user', 'get', this.baseUrlThunk.bind(this))(request);
|
|
1325
1409
|
}
|
|
1326
1410
|
/**
|
|
1327
1411
|
* Get Users in the Project with pagination, sort, sort Order and filtering. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
|
|
@@ -1330,7 +1414,7 @@ class User extends SDKResource {
|
|
|
1330
1414
|
* Access Policy Resource: `Project:Settings`
|
|
1331
1415
|
*/
|
|
1332
1416
|
listV2(params, request) {
|
|
1333
|
-
return this.request('/user/v2/list', 'get')(params, request);
|
|
1417
|
+
return this.request('/user/v2/list', 'get', this.baseUrlThunk.bind(this))(params, request);
|
|
1334
1418
|
}
|
|
1335
1419
|
}
|
|
1336
1420
|
|
|
@@ -1339,14 +1423,22 @@ class Version extends SDKResource {
|
|
|
1339
1423
|
constructor(config) {
|
|
1340
1424
|
super(config);
|
|
1341
1425
|
}
|
|
1426
|
+
baseUrlThunk() {
|
|
1427
|
+
var _a, _b;
|
|
1428
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
1429
|
+
}
|
|
1342
1430
|
/**
|
|
1343
1431
|
* Get project API version. This endpoint is public so there are no access policy requirements.
|
|
1344
1432
|
*/
|
|
1345
1433
|
get(request) {
|
|
1346
|
-
return this.request('/version', 'get')(request);
|
|
1434
|
+
return this.request('/version', 'get', this.baseUrlThunk.bind(this))(request);
|
|
1347
1435
|
}
|
|
1348
1436
|
}
|
|
1349
1437
|
|
|
1438
|
+
function baseUrlThunk$1() {
|
|
1439
|
+
var _a, _b;
|
|
1440
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
1441
|
+
}
|
|
1350
1442
|
/**
|
|
1351
1443
|
* Uploads a file to the bucket and key. Files should be Blobs.
|
|
1352
1444
|
*
|
|
@@ -1354,7 +1446,7 @@ class Version extends SDKResource {
|
|
|
1354
1446
|
*/
|
|
1355
1447
|
function uploadFile$1({ bucketName, 'objectPath+': key, file, }) {
|
|
1356
1448
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1357
|
-
const uploadUrl = yield this.request('/z3/{bucketName}/{objectPath+}', 'post')({
|
|
1449
|
+
const uploadUrl = yield this.request('/z3/{bucketName}/{objectPath+}', 'post', baseUrlThunk$1.bind(this))({
|
|
1358
1450
|
action: 'upload',
|
|
1359
1451
|
bucketName,
|
|
1360
1452
|
'objectPath+': key,
|
|
@@ -1372,7 +1464,7 @@ function uploadFile$1({ bucketName, 'objectPath+': key, file, }) {
|
|
|
1372
1464
|
*/
|
|
1373
1465
|
function downloadFile({ bucketName, 'objectPath+': key, }) {
|
|
1374
1466
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1375
|
-
const uploadUrl = yield this.request('/z3/{bucketName}/{objectPath+}', 'post')({
|
|
1467
|
+
const uploadUrl = yield this.request('/z3/{bucketName}/{objectPath+}', 'post', baseUrlThunk$1.bind(this))({
|
|
1376
1468
|
action: 'download',
|
|
1377
1469
|
bucketName,
|
|
1378
1470
|
'objectPath+': key,
|
|
@@ -1394,7 +1486,7 @@ function downloadFile({ bucketName, 'objectPath+': key, }) {
|
|
|
1394
1486
|
* @param params url and action
|
|
1395
1487
|
*/
|
|
1396
1488
|
function getPresignedUrlForZ3Url(params) {
|
|
1397
|
-
var _a;
|
|
1489
|
+
var _a, _b;
|
|
1398
1490
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1399
1491
|
let bucket;
|
|
1400
1492
|
let key;
|
|
@@ -1405,7 +1497,7 @@ function getPresignedUrlForZ3Url(params) {
|
|
|
1405
1497
|
bucket = url.hostname;
|
|
1406
1498
|
key = z3PathParts.join('/');
|
|
1407
1499
|
}
|
|
1408
|
-
else if (url.href.startsWith((_a = this.config.projectApiUrl) !== null &&
|
|
1500
|
+
else if (url.href.startsWith((_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : defaultProjectApiUrl)) {
|
|
1409
1501
|
// remove leading `/v1/z3`
|
|
1410
1502
|
const httpsPathParts = url.pathname.split('/').slice(3);
|
|
1411
1503
|
bucket = httpsPathParts[0];
|
|
@@ -1419,7 +1511,7 @@ function getPresignedUrlForZ3Url(params) {
|
|
|
1419
1511
|
bucketName: bucket,
|
|
1420
1512
|
'objectPath+': key,
|
|
1421
1513
|
};
|
|
1422
|
-
return this.request('/z3/{bucketName}/{objectPath+}', 'post')(requestParams);
|
|
1514
|
+
return this.request('/z3/{bucketName}/{objectPath+}', 'post', baseUrlThunk$1.bind(this))(requestParams);
|
|
1423
1515
|
});
|
|
1424
1516
|
}
|
|
1425
1517
|
|
|
@@ -1445,6 +1537,10 @@ class Z3 extends SDKResource {
|
|
|
1445
1537
|
*/
|
|
1446
1538
|
this.getPresignedUrlForZ3Url = getPresignedUrlForZ3Url;
|
|
1447
1539
|
}
|
|
1540
|
+
baseUrlThunk() {
|
|
1541
|
+
var _a, _b;
|
|
1542
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
1543
|
+
}
|
|
1448
1544
|
/**
|
|
1449
1545
|
* List all Z3 Buckets. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.
|
|
1450
1546
|
*
|
|
@@ -1452,7 +1548,7 @@ class Z3 extends SDKResource {
|
|
|
1452
1548
|
* Access Policy Resource: `Z3:BucketName`
|
|
1453
1549
|
*/
|
|
1454
1550
|
listBuckets(request) {
|
|
1455
|
-
return this.request('/z3', 'get')(request);
|
|
1551
|
+
return this.request('/z3', 'get', this.baseUrlThunk.bind(this))(request);
|
|
1456
1552
|
}
|
|
1457
1553
|
/**
|
|
1458
1554
|
* Create a Z3 Bucket with the provided name. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.
|
|
@@ -1461,7 +1557,7 @@ class Z3 extends SDKResource {
|
|
|
1461
1557
|
* Access Policy Resource: `Z3:BucketName`
|
|
1462
1558
|
*/
|
|
1463
1559
|
createBucket(params, request) {
|
|
1464
|
-
return this.request('/z3/{bucketName}', 'put')(params, request);
|
|
1560
|
+
return this.request('/z3/{bucketName}', 'put', this.baseUrlThunk.bind(this))(params, request);
|
|
1465
1561
|
}
|
|
1466
1562
|
/**
|
|
1467
1563
|
* Delete the Z3 Bucket with the provided name. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.
|
|
@@ -1470,7 +1566,7 @@ class Z3 extends SDKResource {
|
|
|
1470
1566
|
* Access Policy Resource: `Z3:BucketName`
|
|
1471
1567
|
*/
|
|
1472
1568
|
deleteBucket(params, request) {
|
|
1473
|
-
return this.request('/z3/{bucketName}', 'delete')(params, request);
|
|
1569
|
+
return this.request('/z3/{bucketName}', 'delete', this.baseUrlThunk.bind(this))(params, request);
|
|
1474
1570
|
}
|
|
1475
1571
|
/**
|
|
1476
1572
|
* List all Z3 Objects at the provided path in the Bucket with the provided name [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.
|
|
@@ -1479,7 +1575,7 @@ class Z3 extends SDKResource {
|
|
|
1479
1575
|
* Access Policy Resource: `Z3:BucketName:ObjectPath`
|
|
1480
1576
|
*/
|
|
1481
1577
|
listObjects(params, request) {
|
|
1482
|
-
return this.request('/z3/{bucketName}/{objectPath+}', 'get')(params, request);
|
|
1578
|
+
return this.request('/z3/{bucketName}/{objectPath+}', 'get', this.baseUrlThunk.bind(this))(params, request);
|
|
1483
1579
|
}
|
|
1484
1580
|
/**
|
|
1485
1581
|
* Get a link for downloading or uploading a Z3 Object to the provided path in the Bucket with the provided name. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.
|
|
@@ -1488,7 +1584,7 @@ class Z3 extends SDKResource {
|
|
|
1488
1584
|
* Access Policy Resource: `Z3:BucketName:ObjectPath`
|
|
1489
1585
|
*/
|
|
1490
1586
|
getPresignedUrl(params, request) {
|
|
1491
|
-
return this.request('/z3/{bucketName}/{objectPath+}', 'post')(params, request);
|
|
1587
|
+
return this.request('/z3/{bucketName}/{objectPath+}', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
1492
1588
|
}
|
|
1493
1589
|
/**
|
|
1494
1590
|
* Delete the Z3 Object at the provided path in the Bucket with the provided name. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.
|
|
@@ -1497,13 +1593,17 @@ class Z3 extends SDKResource {
|
|
|
1497
1593
|
* Access Policy Resource: `Z3:BucketName:ObjectPath`
|
|
1498
1594
|
*/
|
|
1499
1595
|
deleteObject(params, request) {
|
|
1500
|
-
return this.request('/z3/{bucketName}/{objectPath+}', 'delete')(params, request);
|
|
1596
|
+
return this.request('/z3/{bucketName}/{objectPath+}', 'delete', this.baseUrlThunk.bind(this))(params, request);
|
|
1501
1597
|
}
|
|
1502
1598
|
}
|
|
1503
1599
|
|
|
1600
|
+
function baseUrlThunk() {
|
|
1601
|
+
var _a, _b;
|
|
1602
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
1603
|
+
}
|
|
1504
1604
|
function uploadFile({ id, file, filename, }) {
|
|
1505
1605
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1506
|
-
const uploadUrl = yield this.request('/zambda/{id}/s3-upload', 'post')({ id, filename });
|
|
1606
|
+
const uploadUrl = yield this.request('/zambda/{id}/s3-upload', 'post', baseUrlThunk.bind(this))({ id, filename });
|
|
1507
1607
|
yield fetch(uploadUrl.signedUrl, {
|
|
1508
1608
|
method: 'PUT',
|
|
1509
1609
|
body: file,
|
|
@@ -1517,6 +1617,10 @@ class Zambda extends SDKResource {
|
|
|
1517
1617
|
super(config);
|
|
1518
1618
|
this.uploadFile = uploadFile;
|
|
1519
1619
|
}
|
|
1620
|
+
baseUrlThunk() {
|
|
1621
|
+
var _a, _b;
|
|
1622
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
1623
|
+
}
|
|
1520
1624
|
/**
|
|
1521
1625
|
* Get a list of all Zambda Functions in the Project. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
|
|
1522
1626
|
*
|
|
@@ -1524,7 +1628,7 @@ class Zambda extends SDKResource {
|
|
|
1524
1628
|
* Access Policy Resource: `Zambda:Function`
|
|
1525
1629
|
*/
|
|
1526
1630
|
list(request) {
|
|
1527
|
-
return this.request('/zambda', 'get')(request);
|
|
1631
|
+
return this.request('/zambda', 'get', this.baseUrlThunk.bind(this))(request);
|
|
1528
1632
|
}
|
|
1529
1633
|
/**
|
|
1530
1634
|
* Create a new Zambda Function. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
|
|
@@ -1533,7 +1637,7 @@ class Zambda extends SDKResource {
|
|
|
1533
1637
|
* Access Policy Resource: `Zambda:Function`
|
|
1534
1638
|
*/
|
|
1535
1639
|
create(params, request) {
|
|
1536
|
-
return this.request('/zambda', 'post')(params, request);
|
|
1640
|
+
return this.request('/zambda', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
1537
1641
|
}
|
|
1538
1642
|
/**
|
|
1539
1643
|
* Get the Zambda Function with the provided ID or name. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
|
|
@@ -1542,7 +1646,7 @@ class Zambda extends SDKResource {
|
|
|
1542
1646
|
* Access Policy Resource: `Zambda:Function`
|
|
1543
1647
|
*/
|
|
1544
1648
|
get(params, request) {
|
|
1545
|
-
return this.request('/zambda/{id}', 'get')(params, request);
|
|
1649
|
+
return this.request('/zambda/{id}', 'get', this.baseUrlThunk.bind(this))(params, request);
|
|
1546
1650
|
}
|
|
1547
1651
|
/**
|
|
1548
1652
|
* Update the Zambda Function with the provided ID or name. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
|
|
@@ -1551,7 +1655,7 @@ class Zambda extends SDKResource {
|
|
|
1551
1655
|
* Access Policy Resource: `Zambda:Function`
|
|
1552
1656
|
*/
|
|
1553
1657
|
update(params, request) {
|
|
1554
|
-
return this.request('/zambda/{id}', 'patch')(params, request);
|
|
1658
|
+
return this.request('/zambda/{id}', 'patch', this.baseUrlThunk.bind(this))(params, request);
|
|
1555
1659
|
}
|
|
1556
1660
|
/**
|
|
1557
1661
|
* Delete the Zambda Function with the provided ID or name. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
|
|
@@ -1560,7 +1664,7 @@ class Zambda extends SDKResource {
|
|
|
1560
1664
|
* Access Policy Resource: `Zambda:Function`
|
|
1561
1665
|
*/
|
|
1562
1666
|
delete(params, request) {
|
|
1563
|
-
return this.request('/zambda/{id}', 'delete')(params, request);
|
|
1667
|
+
return this.request('/zambda/{id}', 'delete', this.baseUrlThunk.bind(this))(params, request);
|
|
1564
1668
|
}
|
|
1565
1669
|
/**
|
|
1566
1670
|
* Execute the [Authenticated Zambda Function](https://docs.oystehr.com/services/zambda/types/authenticated/) with the provided ID. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
|
|
@@ -1569,7 +1673,7 @@ class Zambda extends SDKResource {
|
|
|
1569
1673
|
* Access Policy Resource: `Zambda:Function`
|
|
1570
1674
|
*/
|
|
1571
1675
|
execute(params, request) {
|
|
1572
|
-
return this.request('/zambda/{id}/execute', 'post')(params, request);
|
|
1676
|
+
return this.request('/zambda/{id}/execute', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
1573
1677
|
}
|
|
1574
1678
|
/**
|
|
1575
1679
|
* Execute the [Public Zambda Function](https://docs.oystehr.com/services/zambda/types/public/) with the provided ID. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
|
|
@@ -1577,7 +1681,7 @@ class Zambda extends SDKResource {
|
|
|
1577
1681
|
* Execute a zambda that has method http_open. This endpoint is public so there are no access policy requirements.
|
|
1578
1682
|
*/
|
|
1579
1683
|
executePublic(params, request) {
|
|
1580
|
-
return this.request('/zambda/{id}/execute-public', 'post')(params, request);
|
|
1684
|
+
return this.request('/zambda/{id}/execute-public', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
1581
1685
|
}
|
|
1582
1686
|
/**
|
|
1583
1687
|
* Returns a URL that is used to deploy code to the Zambda Function with the provided ID. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
|
|
@@ -1586,7 +1690,7 @@ class Zambda extends SDKResource {
|
|
|
1586
1690
|
* Access Policy Resource: `Zambda:Function`
|
|
1587
1691
|
*/
|
|
1588
1692
|
s3Upload(params, request) {
|
|
1589
|
-
return this.request('/zambda/{id}/s3-upload', 'post')(params, request);
|
|
1693
|
+
return this.request('/zambda/{id}/s3-upload', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
1590
1694
|
}
|
|
1591
1695
|
}
|
|
1592
1696
|
|
|
@@ -1595,6 +1699,10 @@ class ZambdaLogStream extends SDKResource {
|
|
|
1595
1699
|
constructor(config) {
|
|
1596
1700
|
super(config);
|
|
1597
1701
|
}
|
|
1702
|
+
baseUrlThunk() {
|
|
1703
|
+
var _a, _b;
|
|
1704
|
+
return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
|
|
1705
|
+
}
|
|
1598
1706
|
/**
|
|
1599
1707
|
* Get the log streams for the Zambda Function with the provided ID. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
|
|
1600
1708
|
*
|
|
@@ -1602,7 +1710,7 @@ class ZambdaLogStream extends SDKResource {
|
|
|
1602
1710
|
* Access Policy Resource: `Zambda:Function`
|
|
1603
1711
|
*/
|
|
1604
1712
|
list(params, request) {
|
|
1605
|
-
return this.request('/zambda/{id}/logStream', 'post')(params, request);
|
|
1713
|
+
return this.request('/zambda/{id}/logStream', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
1606
1714
|
}
|
|
1607
1715
|
/**
|
|
1608
1716
|
* Get all logs for the Zambda Function with the provided ID, filtered by any of: text in messages, minimum start date, and/or maximum end date. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
|
|
@@ -1611,7 +1719,7 @@ class ZambdaLogStream extends SDKResource {
|
|
|
1611
1719
|
* Access Policy Resource: `Zambda:Function`
|
|
1612
1720
|
*/
|
|
1613
1721
|
search(params, request) {
|
|
1614
|
-
return this.request('/zambda/{id}/logStream/search', 'post')(params, request);
|
|
1722
|
+
return this.request('/zambda/{id}/logStream/search', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
1615
1723
|
}
|
|
1616
1724
|
/**
|
|
1617
1725
|
* Get the logs from the specified log stream for the Zambda Function with the provided ID. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
|
|
@@ -1620,14 +1728,19 @@ class ZambdaLogStream extends SDKResource {
|
|
|
1620
1728
|
* Access Policy Resource: `Zambda:Function`
|
|
1621
1729
|
*/
|
|
1622
1730
|
get(params, request) {
|
|
1623
|
-
return this.request('/zambda/{id}/logStream/{logStreamName}', 'post')(params, request);
|
|
1731
|
+
return this.request('/zambda/{id}/logStream/{logStreamName}', 'post', this.baseUrlThunk.bind(this))(params, request);
|
|
1624
1732
|
}
|
|
1625
1733
|
}
|
|
1626
1734
|
|
|
1627
1735
|
// AUTOGENERATED -- DO NOT EDIT
|
|
1628
1736
|
let Oystehr$1 = class Oystehr {
|
|
1629
1737
|
constructor(config) {
|
|
1738
|
+
var _a, _b, _c;
|
|
1739
|
+
var _d, _e, _f;
|
|
1630
1740
|
this.config = config;
|
|
1741
|
+
(_a = (_d = this.config).services) !== null && _a !== void 0 ? _a : (_d.services = {});
|
|
1742
|
+
(_b = (_e = this.config.services).projectApiUrl) !== null && _b !== void 0 ? _b : (_e.projectApiUrl = config.projectApiUrl);
|
|
1743
|
+
(_c = (_f = this.config.services).fhirApiUrl) !== null && _c !== void 0 ? _c : (_f.fhirApiUrl = config.fhirApiUrl);
|
|
1631
1744
|
this.application = new Application(config);
|
|
1632
1745
|
this.developer = new Developer(config);
|
|
1633
1746
|
this.m2m = new M2m(config);
|
|
@@ -1639,7 +1752,6 @@ let Oystehr$1 = class Oystehr {
|
|
|
1639
1752
|
this.project = new Project(config);
|
|
1640
1753
|
this.rcm = new Rcm(config);
|
|
1641
1754
|
this.erx = new Erx(config);
|
|
1642
|
-
this.fax = new Fax(config);
|
|
1643
1755
|
this.role = new Role(config);
|
|
1644
1756
|
this.secret = new Secret(config);
|
|
1645
1757
|
this.telemed = new Telemed(config);
|
|
@@ -1648,6 +1760,7 @@ let Oystehr$1 = class Oystehr {
|
|
|
1648
1760
|
this.z3 = new Z3(config);
|
|
1649
1761
|
this.zambda = new Zambda(config);
|
|
1650
1762
|
this.zambdaLogStream = new ZambdaLogStream(config);
|
|
1763
|
+
this.fax = new Fax(config);
|
|
1651
1764
|
this.fhir = new Fhir(config);
|
|
1652
1765
|
}
|
|
1653
1766
|
};
|