@oystehr/sdk 3.0.4 → 3.0.5
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 +3 -3
- package/dist/cjs/config.d.ts +8 -0
- package/dist/cjs/index.cjs +806 -642
- 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 +8 -8
- package/dist/cjs/resources/classes/charge.d.ts +2 -2
- package/dist/cjs/resources/classes/conversation.d.ts +5 -5
- package/dist/cjs/resources/classes/developer.d.ts +6 -6
- package/dist/cjs/resources/classes/erx.d.ts +4 -4
- package/dist/cjs/resources/classes/m2m.d.ts +7 -7
- package/dist/cjs/resources/classes/messaging.d.ts +1 -1
- package/dist/cjs/resources/classes/paymentMethod.d.ts +4 -4
- package/dist/cjs/resources/classes/project.d.ts +2 -2
- package/dist/cjs/resources/classes/rcm.d.ts +3 -3
- package/dist/cjs/resources/classes/role.d.ts +5 -5
- package/dist/cjs/resources/classes/secret.d.ts +4 -4
- package/dist/cjs/resources/classes/telemed.d.ts +2 -2
- package/dist/cjs/resources/classes/transactionalSMS.d.ts +1 -1
- package/dist/cjs/resources/classes/user.d.ts +7 -7
- package/dist/cjs/resources/classes/version.d.ts +1 -1
- package/dist/cjs/resources/classes/z3.d.ts +7 -7
- package/dist/cjs/resources/classes/zambda.d.ts +8 -8
- package/dist/cjs/resources/classes/zambdaLogStream.d.ts +3 -3
- package/dist/cjs/resources/types/ConversationAddParticipantParams.d.ts +1 -1
- package/dist/cjs/resources/types/ConversationCreateResponse.d.ts +1 -1
- package/dist/cjs/resources/types/ConversationRemoveParticipantParams.d.ts +1 -1
- package/dist/cjs/resources/types/TelemedCreateMeetingParams.d.ts +1 -1
- package/dist/cjs/resources/types/TelemedCreateMeetingResponse.d.ts +1 -1
- package/dist/cjs/tests/setup/constants.d.ts +1 -1
- package/dist/esm/client/client.js +14 -11
- package/dist/esm/client/client.js.map +1 -1
- package/dist/esm/config.d.ts +8 -0
- 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 +8 -8
- package/dist/esm/resources/classes/application.js +72 -56
- package/dist/esm/resources/classes/application.js.map +1 -1
- package/dist/esm/resources/classes/charge.d.ts +2 -2
- package/dist/esm/resources/classes/charge.js +28 -24
- package/dist/esm/resources/classes/charge.js.map +1 -1
- package/dist/esm/resources/classes/conversation.d.ts +5 -5
- package/dist/esm/resources/classes/conversation.js +59 -49
- package/dist/esm/resources/classes/conversation.js.map +1 -1
- package/dist/esm/resources/classes/developer.d.ts +6 -6
- package/dist/esm/resources/classes/developer.js +56 -44
- package/dist/esm/resources/classes/developer.js.map +1 -1
- package/dist/esm/resources/classes/erx.d.ts +4 -4
- package/dist/esm/resources/classes/erx.js +24 -16
- package/dist/esm/resources/classes/erx.js.map +1 -1
- package/dist/esm/resources/classes/fhir-ext.js +3 -0
- package/dist/esm/resources/classes/fhir-ext.js.map +1 -1
- package/dist/esm/resources/classes/m2m.d.ts +7 -7
- package/dist/esm/resources/classes/m2m.js +65 -51
- package/dist/esm/resources/classes/m2m.js.map +1 -1
- package/dist/esm/resources/classes/messaging.d.ts +1 -1
- package/dist/esm/resources/classes/messaging.js +6 -4
- package/dist/esm/resources/classes/messaging.js.map +1 -1
- package/dist/esm/resources/classes/paymentMethod.d.ts +4 -4
- package/dist/esm/resources/classes/paymentMethod.js +72 -64
- package/dist/esm/resources/classes/paymentMethod.js.map +1 -1
- package/dist/esm/resources/classes/project.d.ts +2 -2
- package/dist/esm/resources/classes/project.js +18 -14
- package/dist/esm/resources/classes/project.js.map +1 -1
- package/dist/esm/resources/classes/rcm.d.ts +3 -3
- package/dist/esm/resources/classes/rcm.js +39 -33
- package/dist/esm/resources/classes/rcm.js.map +1 -1
- package/dist/esm/resources/classes/role.d.ts +5 -5
- package/dist/esm/resources/classes/role.js +46 -36
- package/dist/esm/resources/classes/role.js.map +1 -1
- package/dist/esm/resources/classes/secret.d.ts +4 -4
- package/dist/esm/resources/classes/secret.js +36 -28
- package/dist/esm/resources/classes/secret.js.map +1 -1
- package/dist/esm/resources/classes/telemed.d.ts +2 -2
- package/dist/esm/resources/classes/telemed.js +27 -23
- package/dist/esm/resources/classes/telemed.js.map +1 -1
- package/dist/esm/resources/classes/transactionalSMS.d.ts +1 -1
- package/dist/esm/resources/classes/transactionalSMS.js +18 -16
- package/dist/esm/resources/classes/transactionalSMS.js.map +1 -1
- package/dist/esm/resources/classes/user.d.ts +7 -7
- package/dist/esm/resources/classes/user.js +64 -50
- package/dist/esm/resources/classes/user.js.map +1 -1
- package/dist/esm/resources/classes/version.d.ts +1 -1
- package/dist/esm/resources/classes/version.js +6 -4
- package/dist/esm/resources/classes/version.js.map +1 -1
- package/dist/esm/resources/classes/z3.d.ts +7 -7
- package/dist/esm/resources/classes/z3.js +55 -43
- package/dist/esm/resources/classes/z3.js.map +1 -1
- package/dist/esm/resources/classes/zambda.d.ts +8 -8
- package/dist/esm/resources/classes/zambda.js +71 -55
- package/dist/esm/resources/classes/zambda.js.map +1 -1
- package/dist/esm/resources/classes/zambdaLogStream.d.ts +3 -3
- package/dist/esm/resources/classes/zambdaLogStream.js +27 -21
- package/dist/esm/resources/classes/zambdaLogStream.js.map +1 -1
- package/dist/esm/resources/types/ConversationAddParticipantParams.d.ts +1 -1
- package/dist/esm/resources/types/ConversationCreateResponse.d.ts +1 -1
- package/dist/esm/resources/types/ConversationRemoveParticipantParams.d.ts +1 -1
- package/dist/esm/resources/types/TelemedCreateMeetingParams.d.ts +1 -1
- package/dist/esm/resources/types/TelemedCreateMeetingResponse.d.ts +1 -1
- package/dist/esm/tests/setup/constants.d.ts +1 -1
- package/package.json +3 -3
- package/src/client/client.ts +8 -3
- package/src/config.ts +8 -0
- package/src/resources/classes/application.ts +27 -19
- package/src/resources/classes/charge.ts +6 -4
- package/src/resources/classes/conversation.ts +15 -10
- package/src/resources/classes/developer.ts +18 -11
- package/src/resources/classes/erx.ts +14 -8
- package/src/resources/classes/fhir-ext.ts +3 -0
- package/src/resources/classes/m2m.ts +21 -13
- package/src/resources/classes/messaging.ts +3 -2
- package/src/resources/classes/paymentMethod.ts +12 -8
- package/src/resources/classes/project.ts +6 -3
- package/src/resources/classes/rcm.ts +12 -8
- package/src/resources/classes/role.ts +15 -9
- package/src/resources/classes/secret.ts +12 -7
- package/src/resources/classes/telemed.ts +7 -7
- package/src/resources/classes/transactionalSMS.ts +3 -2
- package/src/resources/classes/user.ts +21 -12
- package/src/resources/classes/version.ts +3 -1
- package/src/resources/classes/z3.ts +19 -14
- package/src/resources/classes/zambda.ts +25 -15
- package/src/resources/classes/zambdaLogStream.ts +9 -8
- package/src/resources/types/ConversationAddParticipantParams.ts +1 -1
- package/src/resources/types/ConversationCreateResponse.ts +1 -1
- package/src/resources/types/ConversationRemoveParticipantParams.ts +1 -1
- package/src/resources/types/TelemedCreateMeetingParams.ts +1 -1
- package/src/resources/types/TelemedCreateMeetingResponse.ts +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -130,7 +130,7 @@ function isInternalClientRequest(request) {
|
|
|
130
130
|
}
|
|
131
131
|
function fetcher(baseUrlThunk, configThunk, path, methodParam) {
|
|
132
132
|
return (params, request) => __awaiter(this, void 0, void 0, function* () {
|
|
133
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
133
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
134
134
|
// this function supports multiple signatures. fetcher(baseUrl, path, method)(params, request) or fetcher(baseUrl, path, method)(request)
|
|
135
135
|
// or fetcher(baseUrl, path, method)(params) or fetcher(baseUrl, path, method)(). the types for this are handled by Client<Path, Methods>
|
|
136
136
|
// and this is the backend implementation behind it. the heuristic we're using is that if the first param is an object with an accessToken
|
|
@@ -190,13 +190,15 @@ function fetcher(baseUrlThunk, configThunk, path, methodParam) {
|
|
|
190
190
|
}, accessToken ? { Authorization: `Bearer ${accessToken}` } : {}, (requestCtx === null || requestCtx === void 0 ? void 0 : requestCtx.ifMatch) ? { 'If-Match': requestCtx.ifMatch } : {}, { 'x-oystehr-request-id': (_f = requestCtx === null || requestCtx === void 0 ? void 0 : requestCtx.requestId) !== null && _f !== void 0 ? _f : uuid.v4() });
|
|
191
191
|
const retryConfig = {
|
|
192
192
|
retries: (_h = (_g = config.retry) === null || _g === void 0 ? void 0 : _g.retries) !== null && _h !== void 0 ? _h : 3,
|
|
193
|
-
|
|
193
|
+
jitter: (_k = (_j = config.retry) === null || _j === void 0 ? void 0 : _j.jitter) !== null && _k !== void 0 ? _k : 20,
|
|
194
|
+
delay: (_m = (_l = config.retry) === null || _l === void 0 ? void 0 : _l.delay) !== null && _m !== void 0 ? _m : 100,
|
|
195
|
+
onRetry: (_o = config.retry) === null || _o === void 0 ? void 0 : _o.onRetry,
|
|
194
196
|
// Using array instead of set because the length is too short for uniqueness to be important
|
|
195
|
-
retryOn: [...((
|
|
197
|
+
retryOn: [...((_q = (_p = config.retry) === null || _p === void 0 ? void 0 : _p.retryOn) !== null && _q !== void 0 ? _q : []), ...STATUS_CODES_TO_RETRY],
|
|
196
198
|
};
|
|
197
199
|
retryConfig.retryOn.push(...STATUS_CODES_TO_RETRY);
|
|
198
|
-
return retry((
|
|
199
|
-
var
|
|
200
|
+
return retry(() => __awaiter(this, void 0, void 0, function* () {
|
|
201
|
+
var _r, _s, _t, _u, _v, _w;
|
|
200
202
|
const response = yield fetchImpl(new Request(url, {
|
|
201
203
|
method: method.toUpperCase(),
|
|
202
204
|
body,
|
|
@@ -207,21 +209,20 @@ function fetcher(baseUrlThunk, configThunk, path, methodParam) {
|
|
|
207
209
|
try {
|
|
208
210
|
responseJson =
|
|
209
211
|
responseBody &&
|
|
210
|
-
(((
|
|
211
|
-
((
|
|
212
|
+
(((_r = response.headers.get('content-type')) === null || _r === void 0 ? void 0 : _r.includes('application/json')) ||
|
|
213
|
+
((_s = response.headers.get('content-type')) === null || _s === void 0 ? void 0 : _s.includes('application/fhir+json')))
|
|
212
214
|
? JSON.parse(responseBody)
|
|
213
215
|
: null;
|
|
214
216
|
}
|
|
215
|
-
catch (
|
|
217
|
+
catch (_err) {
|
|
216
218
|
// ignore JSON.parse errors
|
|
217
219
|
responseJson = null;
|
|
218
220
|
}
|
|
219
221
|
const isError = !response.ok || response.status >= 400;
|
|
220
222
|
if (isError) {
|
|
221
|
-
headers['x-oystehr-fetch-attempts'] = `${attempt}`;
|
|
222
223
|
const errObj = {
|
|
223
|
-
message: (
|
|
224
|
-
code: (
|
|
224
|
+
message: (_v = (_u = (_t = responseJson === null || responseJson === void 0 ? void 0 : responseJson.message) !== null && _t !== void 0 ? _t : responseJson) !== null && _u !== void 0 ? _u : responseBody) !== null && _v !== void 0 ? _v : response.statusText,
|
|
225
|
+
code: (_w = responseJson === null || responseJson === void 0 ? void 0 : responseJson.code) !== null && _w !== void 0 ? _w : response.status,
|
|
225
226
|
response,
|
|
226
227
|
};
|
|
227
228
|
throw errObj;
|
|
@@ -258,6 +259,8 @@ function retry(work, config) {
|
|
|
258
259
|
if (!isRetryable) {
|
|
259
260
|
break;
|
|
260
261
|
}
|
|
262
|
+
const jitter = Math.floor(Math.random() * (config.jitter + 1));
|
|
263
|
+
yield new Promise((resolve) => setTimeout(resolve, config.delay + jitter));
|
|
261
264
|
if (config.onRetry && attempt !== ((_b = config.retries) !== null && _b !== void 0 ? _b : 0)) {
|
|
262
265
|
config.onRetry(attempt + 1);
|
|
263
266
|
}
|
|
@@ -319,62 +322,78 @@ function addParamsToSearch(params, search) {
|
|
|
319
322
|
class Application extends SDKResource {
|
|
320
323
|
constructor(config) {
|
|
321
324
|
super(config);
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* 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
|
+
*
|
|
329
|
+
* Access Policy Action: `App:ListAllApplications`
|
|
330
|
+
* Access Policy Resource: `App:Application`
|
|
331
|
+
*/
|
|
332
|
+
list(request) {
|
|
333
|
+
return this.request('/application', 'get')(request);
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* 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.
|
|
337
|
+
*
|
|
338
|
+
* Access Policy Action: `App:CreateApplication`
|
|
339
|
+
* Access Policy Resource: `App:Application`
|
|
340
|
+
*/
|
|
341
|
+
create(params, request) {
|
|
342
|
+
return this.request('/application', 'post')(params, request);
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* 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.
|
|
346
|
+
*
|
|
347
|
+
* Access Policy Action: `App:GetApplication`
|
|
348
|
+
* Access Policy Resource: `App:Application`
|
|
349
|
+
*/
|
|
350
|
+
get(params, request) {
|
|
351
|
+
return this.request('/application/{id}', 'get')(params, request);
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* 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.
|
|
355
|
+
*
|
|
356
|
+
* Access Policy Action: `App:UpdateApplication`
|
|
357
|
+
* Access Policy Resource: `App:Application`
|
|
358
|
+
*/
|
|
359
|
+
update(params, request) {
|
|
360
|
+
return this.request('/application/{id}', 'patch')(params, request);
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* 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.
|
|
364
|
+
*
|
|
365
|
+
* Access Policy Action: `App:DeleteApplication`
|
|
366
|
+
* Access Policy Resource: `App:Application`
|
|
367
|
+
*/
|
|
368
|
+
delete(params, request) {
|
|
369
|
+
return this.request('/application/{id}', 'delete')(params, request);
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Rotate client's secrete associated with an application.
|
|
373
|
+
*
|
|
374
|
+
* Access Policy Action: `App:RotateApplicationSecret`
|
|
375
|
+
* Access Policy Resource: `App:Application`
|
|
376
|
+
*/
|
|
377
|
+
rotateSecret(params, request) {
|
|
378
|
+
return this.request('/application/{id}/rotate-secret', 'post')(params, request);
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Revokes user's refresh token issued for the application.
|
|
382
|
+
*
|
|
383
|
+
* Access Policy Action: `App:RevokeRefreshToken`
|
|
384
|
+
* Access Policy Resource: `App:Application`
|
|
385
|
+
*/
|
|
386
|
+
revokeRefreshToken(params, request) {
|
|
387
|
+
return this.request('/application/{id}/revoke-refresh-token', 'post')(params, request);
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Revokes user's access token issued for the application.
|
|
391
|
+
*
|
|
392
|
+
* Access Policy Action: `App:RevokeAccessToken`
|
|
393
|
+
* Access Policy Resource: `App:Application`
|
|
394
|
+
*/
|
|
395
|
+
revokeAccessToken(params, request) {
|
|
396
|
+
return this.request('/application/{id}/revoke-access-token', 'post')(params, request);
|
|
378
397
|
}
|
|
379
398
|
}
|
|
380
399
|
|
|
@@ -382,30 +401,34 @@ class Application extends SDKResource {
|
|
|
382
401
|
class Charge extends SDKResource {
|
|
383
402
|
constructor(config) {
|
|
384
403
|
super(config);
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Charge patient's default payment method for a specified encounter or charge item.
|
|
407
|
+
*
|
|
408
|
+
* Access Policy Requirements:
|
|
409
|
+
* Action: `Payment:Issue`
|
|
410
|
+
* Access Policy Resource: `Payment:Charge`
|
|
411
|
+
* Actions: `FHIR:Read,FHIR:Create,FHIR:Update`
|
|
412
|
+
* Access Policy Resource: `FHIR:ChargeItem:*,`FHIR:PaymentReconciliation:*`
|
|
413
|
+
* Action: `FHIR:Read`
|
|
414
|
+
* Access Policy Resources: `FHIR:Patient:*,FHIR:Encounter:*,FHIR:Coverage:*`
|
|
415
|
+
*/
|
|
416
|
+
issue(params, request) {
|
|
417
|
+
return this.request('/payment/charge/issue', 'post')(params, request);
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Retrieve charge status for a specified encounter or charge item.
|
|
421
|
+
*
|
|
422
|
+
* Access Policy Requirements:
|
|
423
|
+
* Action: `Payment:Status`
|
|
424
|
+
* Access Policy Resource: `Payment:Charge`
|
|
425
|
+
* Actions: `FHIR:Read,FHIR:Create,FHIR:Update`
|
|
426
|
+
* Access Policy Resource: `FHIR:ChargeItem:*,`FHIR:PaymentReconciliation:*`
|
|
427
|
+
* Action: `FHIR:Read`
|
|
428
|
+
* Access Policy Resources: `FHIR:Patient:*,FHIR:Encounter:*,FHIR:Coverage:*`
|
|
429
|
+
*/
|
|
430
|
+
status(params, request) {
|
|
431
|
+
return this.request('/payment/charge/status', 'post')(params, request);
|
|
409
432
|
}
|
|
410
433
|
}
|
|
411
434
|
|
|
@@ -447,55 +470,65 @@ class Conversation extends SDKResource {
|
|
|
447
470
|
* @returns conversationId
|
|
448
471
|
*/
|
|
449
472
|
this.getConversationIdFromEncounter = getConversationIdFromEncounter;
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* 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
|
+
*
|
|
477
|
+
* Access Policy Requirements:
|
|
478
|
+
* Action: `Messaging:CreateConversation`
|
|
479
|
+
* Access Policy Resource: `Messaging:Conversation`
|
|
480
|
+
* Action: `FHIR:Create`
|
|
481
|
+
* Access Policy Resource: `FHIR:Encounter`
|
|
482
|
+
* Action: `FHIR:Update`
|
|
483
|
+
* Access Policy Resource: `FHIR:Encounter`
|
|
484
|
+
*/
|
|
485
|
+
create(params, request) {
|
|
486
|
+
return this.request('/messaging/conversation', 'post')(params, request);
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* 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.
|
|
490
|
+
*
|
|
491
|
+
* Access Policy Action: `Messaging:GetConversationToken`
|
|
492
|
+
* Access Policy Resource: `Messaging:Conversation`.
|
|
493
|
+
*/
|
|
494
|
+
getToken(request) {
|
|
495
|
+
return this.request('/messaging/conversation/token', 'get')(request);
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* 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.
|
|
499
|
+
*
|
|
500
|
+
* Access Policy Requirements:
|
|
501
|
+
* Action: `Messaging:ConversationAddParticipant`
|
|
502
|
+
* Access Policy Resource: `Messaging:Conversation`
|
|
503
|
+
* Action: `FHIR:Read`
|
|
504
|
+
* Access Policy Resource: `FHIR:Encounter`
|
|
505
|
+
* Action: `FHIR:Update`
|
|
506
|
+
* Access Policy Resource: `FHIR:Encounter`
|
|
507
|
+
*/
|
|
508
|
+
addParticipant(params, request) {
|
|
509
|
+
return this.request('/messaging/conversation/{conversationId}/participant', 'post')(params, request);
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* 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.
|
|
513
|
+
*
|
|
514
|
+
* Access Policy Requirements:
|
|
515
|
+
* Action: `Messaging:ConversationRemoveParticipant`
|
|
516
|
+
* Access Policy Resource: `Messaging:Conversation`
|
|
517
|
+
* Action: `FHIR:Read`
|
|
518
|
+
* Access Policy Resource: `FHIR:Patient`, `FHIR:Practitioner`, or `FHIR:RelatedPerson`
|
|
519
|
+
*/
|
|
520
|
+
removeParticipant(params, request) {
|
|
521
|
+
return this.request('/messaging/conversation/{conversationId}/participant', 'delete')(params, request);
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* 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.
|
|
525
|
+
*
|
|
526
|
+
* Access Policy Requirements:
|
|
527
|
+
* Action: `Messaging:ConversationSendMessage`
|
|
528
|
+
* Access Policy Resource: `Messaging:Conversation`
|
|
529
|
+
*/
|
|
530
|
+
message(params, request) {
|
|
531
|
+
return this.request('/messaging/conversation/{conversationId}/message', 'post')(params, request);
|
|
499
532
|
}
|
|
500
533
|
}
|
|
501
534
|
|
|
@@ -503,50 +536,62 @@ class Conversation extends SDKResource {
|
|
|
503
536
|
class Developer extends SDKResource {
|
|
504
537
|
constructor(config) {
|
|
505
538
|
super(config);
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* 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
|
+
*
|
|
543
|
+
* Access Policy Action: `IAM:GetDeveloper`
|
|
544
|
+
* Access Policy Resource: `IAM:Developer`
|
|
545
|
+
*/
|
|
546
|
+
get(params, request) {
|
|
547
|
+
return this.request('/developer/{id}', 'get')(params, request);
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* 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.
|
|
551
|
+
*
|
|
552
|
+
* Access Policy Action: `IAM:UpdateDeveloper`
|
|
553
|
+
* Access Policy Resource: `IAM:Developer`
|
|
554
|
+
*/
|
|
555
|
+
update(params, request) {
|
|
556
|
+
return this.request('/developer/{id}', 'patch')(params, request);
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* 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.
|
|
560
|
+
*
|
|
561
|
+
* Access Policy Action: `IAM:RemoveDeveloper`
|
|
562
|
+
* Access Policy Resource: `IAM:Developer`
|
|
563
|
+
*/
|
|
564
|
+
delete(params, request) {
|
|
565
|
+
return this.request('/developer/{id}', 'delete')(params, request);
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* 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.
|
|
569
|
+
*
|
|
570
|
+
* Access Policy Action: `IAM:InviteDeveloper`
|
|
571
|
+
* Access Policy Resource: `IAM:Developer`
|
|
572
|
+
*/
|
|
573
|
+
invite(params, request) {
|
|
574
|
+
return this.request('/developer/invite', 'post')(params, request);
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* DEPRECATED. Please use [v2/list](https://api-reference.oystehr.com/reference/get_developer-v2-list) instead.
|
|
578
|
+
*
|
|
579
|
+
* Get a list of all Developers who are part of 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.
|
|
580
|
+
*
|
|
581
|
+
* Access Policy Action: `IAM:ListAllDevelopers`
|
|
582
|
+
* Access Policy Resource: `IAM:Developer`
|
|
583
|
+
*/
|
|
584
|
+
list(request) {
|
|
585
|
+
return this.request('/developer', 'get')(request);
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* 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.
|
|
589
|
+
*
|
|
590
|
+
* Access Policy Action: `Project:ListAllUsers`
|
|
591
|
+
* Access Policy Resource: `Project:Settings`
|
|
592
|
+
*/
|
|
593
|
+
listV2(params, request) {
|
|
594
|
+
return this.request('/developer/v2/list', 'get')(params, request);
|
|
550
595
|
}
|
|
551
596
|
}
|
|
552
597
|
|
|
@@ -554,22 +599,30 @@ class Developer extends SDKResource {
|
|
|
554
599
|
class Erx extends SDKResource {
|
|
555
600
|
constructor(config) {
|
|
556
601
|
super(config);
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* Retrieve patient properties from FHIR service and sync them with eRx service
|
|
605
|
+
*/
|
|
606
|
+
syncPatient(params, request) {
|
|
607
|
+
return this.request('/erx/sync-patient/{patientId}', 'post')(params, request);
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* Search for allergies
|
|
611
|
+
*/
|
|
612
|
+
allergySearch(params, request) {
|
|
613
|
+
return this.request('/erx/allergy/search', 'get')(params, request);
|
|
614
|
+
}
|
|
615
|
+
/**
|
|
616
|
+
* Search for medications. Provide at least one of code or name filters
|
|
617
|
+
*/
|
|
618
|
+
medicationSearch(params, request) {
|
|
619
|
+
return this.request('/erx/medication/search', 'get')(params, request);
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* Search for medications. Provide at least one of code or name filters
|
|
623
|
+
*/
|
|
624
|
+
medicationSearchV2(params, request) {
|
|
625
|
+
return this.request('/erx/v2/medication/search', 'get')(params, request);
|
|
573
626
|
}
|
|
574
627
|
}
|
|
575
628
|
|
|
@@ -651,6 +704,9 @@ function batchInputRequestToBundleEntryItem(request) {
|
|
|
651
704
|
return { name, value };
|
|
652
705
|
})
|
|
653
706
|
.reduce((acc, { name, value }) => {
|
|
707
|
+
if (!name) {
|
|
708
|
+
return acc;
|
|
709
|
+
}
|
|
654
710
|
if (!acc[name]) {
|
|
655
711
|
acc[name] = [];
|
|
656
712
|
}
|
|
@@ -772,57 +828,71 @@ class Fhir extends SDKResource {
|
|
|
772
828
|
class M2m extends SDKResource {
|
|
773
829
|
constructor(config) {
|
|
774
830
|
super(config);
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
831
|
+
}
|
|
832
|
+
/**
|
|
833
|
+
* DEPRECATED. Please use [v2/list](https://api-reference.oystehr.com/reference/get_m2m-v2-list) instead.
|
|
834
|
+
*
|
|
835
|
+
* Get a list of all M2M Clients. [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).
|
|
836
|
+
*
|
|
837
|
+
* Access Policy Action: `App:ListAllM2MClients`
|
|
838
|
+
* Access Policy Resource: `IAM:M2MClient`
|
|
839
|
+
*/
|
|
840
|
+
list(request) {
|
|
841
|
+
return this.request('/m2m', 'get')(request);
|
|
842
|
+
}
|
|
843
|
+
/**
|
|
844
|
+
* 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).
|
|
845
|
+
*
|
|
846
|
+
* Access Policy Action: `App:CreateM2MClient`
|
|
847
|
+
* Access Policy Resource: `IAM:M2MClient`
|
|
848
|
+
*/
|
|
849
|
+
create(params, request) {
|
|
850
|
+
return this.request('/m2m', 'post')(params, request);
|
|
851
|
+
}
|
|
852
|
+
/**
|
|
853
|
+
* 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).
|
|
854
|
+
*
|
|
855
|
+
* Access Policy Action: `App:GetM2MClient`
|
|
856
|
+
* Access Policy Resource: `IAM:M2MClient`
|
|
857
|
+
*/
|
|
858
|
+
get(params, request) {
|
|
859
|
+
return this.request('/m2m/{id}', 'get')(params, request);
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* 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).
|
|
863
|
+
*
|
|
864
|
+
* Access Policy Action: `App:UpdateM2MClient`
|
|
865
|
+
* Access Policy Resource: `IAM:M2MClient`
|
|
866
|
+
*/
|
|
867
|
+
update(params, request) {
|
|
868
|
+
return this.request('/m2m/{id}', 'patch')(params, request);
|
|
869
|
+
}
|
|
870
|
+
/**
|
|
871
|
+
* 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).
|
|
872
|
+
*
|
|
873
|
+
* Access Policy Action: `App:DeleteM2MClient`
|
|
874
|
+
* Access Policy Resource: `IAM:M2MClient`
|
|
875
|
+
*/
|
|
876
|
+
delete(params, request) {
|
|
877
|
+
return this.request('/m2m/{id}', 'delete')(params, request);
|
|
878
|
+
}
|
|
879
|
+
/**
|
|
880
|
+
* 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).
|
|
881
|
+
*
|
|
882
|
+
* Access Policy Action: `App:RotateM2MClientSecret`
|
|
883
|
+
* Access Policy Resource: `IAM:M2MClient`
|
|
884
|
+
*/
|
|
885
|
+
rotateSecret(params, request) {
|
|
886
|
+
return this.request('/m2m/{id}/rotate-secret', 'post')(params, request);
|
|
887
|
+
}
|
|
888
|
+
/**
|
|
889
|
+
* 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).
|
|
890
|
+
*
|
|
891
|
+
* Access Policy Action: `App:ListAllM2MClients`
|
|
892
|
+
* Access Policy Resource: `IAM:M2MClient`
|
|
893
|
+
*/
|
|
894
|
+
listV2(params, request) {
|
|
895
|
+
return this.request('/m2m/v2/list', 'get')(params, request);
|
|
826
896
|
}
|
|
827
897
|
}
|
|
828
898
|
|
|
@@ -830,10 +900,12 @@ class M2m extends SDKResource {
|
|
|
830
900
|
class Messaging extends SDKResource {
|
|
831
901
|
constructor(config) {
|
|
832
902
|
super(config);
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
903
|
+
}
|
|
904
|
+
/**
|
|
905
|
+
* Get an information about the Messaging services configuration. This information includes phone number, phone number type and also rate limits of each service.
|
|
906
|
+
*/
|
|
907
|
+
getMessagingConfig(request) {
|
|
908
|
+
return this.request('/messaging/config', 'get')(request);
|
|
837
909
|
}
|
|
838
910
|
}
|
|
839
911
|
|
|
@@ -841,70 +913,78 @@ class Messaging extends SDKResource {
|
|
|
841
913
|
class PaymentMethod extends SDKResource {
|
|
842
914
|
constructor(config) {
|
|
843
915
|
super(config);
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
916
|
+
}
|
|
917
|
+
/**
|
|
918
|
+
* Enter a new credit card or other payment method for the user.
|
|
919
|
+
*
|
|
920
|
+
* Access Policy Requirements:
|
|
921
|
+
* Action: `Payment:Setup`
|
|
922
|
+
* Access Policy Resource: `Payment:PaymentMethod`
|
|
923
|
+
* Actions: `FHIR:Read,FHIR:Create,FHIR:Update`
|
|
924
|
+
* Access Policy Resource: `FHIR:Coverage:*`
|
|
925
|
+
* Action: `FHIR:Read,FHIR:Create,FHIR:Update`
|
|
926
|
+
* Access Policy Resource: `FHIR:Account:*`
|
|
927
|
+
*
|
|
928
|
+
* Also need to be able to read the patients' details. For example:
|
|
929
|
+
* Action: `FHIR:Read`
|
|
930
|
+
* Access Policy Resource: `FHIR:Patient`
|
|
931
|
+
*/
|
|
932
|
+
setUp(params, request) {
|
|
933
|
+
return this.request('/payment/payment-method/setup', 'post')(params, request);
|
|
934
|
+
}
|
|
935
|
+
/**
|
|
936
|
+
* Set a specified payment method for the user as default.
|
|
937
|
+
*
|
|
938
|
+
* Access Policy Requirements:
|
|
939
|
+
* Action: `Payment:SetDefault`
|
|
940
|
+
* Access Policy Resource: `Payment:PaymentMethod`
|
|
941
|
+
* Actions: `FHIR:Read,FHIR:Create,FHIR:Update`
|
|
942
|
+
* Access Policy Resource: `FHIR:Coverage:*`
|
|
943
|
+
* Action: `FHIR:Read,FHIR:Create,FHIR:Update`
|
|
944
|
+
* Access Policy Resource: `FHIR:Account:*`
|
|
945
|
+
*
|
|
946
|
+
* Also need to be able to read the patients' details. For example:
|
|
947
|
+
* Action: `FHIR:Read`
|
|
948
|
+
* Access Policy Resource: `FHIR:Patient`
|
|
949
|
+
*/
|
|
950
|
+
setDefault(params, request) {
|
|
951
|
+
return this.request('/payment/payment-method/set-default', 'post')(params, request);
|
|
952
|
+
}
|
|
953
|
+
/**
|
|
954
|
+
* Delete a specified payment method for the beneficiary.
|
|
955
|
+
*
|
|
956
|
+
* Access Policy Requirements:
|
|
957
|
+
* Action: `Payment:Delete`
|
|
958
|
+
* Access Policy Resource: `Payment:PaymentMethod`
|
|
959
|
+
* Actions: `FHIR:Read,FHIR:Create,FHIR:Update`
|
|
960
|
+
* Access Policy Resource: `FHIR:Coverage:*`
|
|
961
|
+
* Action: `FHIR:Read,FHIR:Create,FHIR:Update`
|
|
962
|
+
* Access Policy Resource: `FHIR:Account:*`
|
|
963
|
+
*
|
|
964
|
+
* Also need to be able to read the patients' details. For example:
|
|
965
|
+
* Action: `FHIR:Read`
|
|
966
|
+
* Access Policy Resource: `FHIR:Patient`
|
|
967
|
+
*/
|
|
968
|
+
delete(params, request) {
|
|
969
|
+
return this.request('/payment/payment-method', 'delete')(params, request);
|
|
970
|
+
}
|
|
971
|
+
/**
|
|
972
|
+
* List all payment methods for the patient.
|
|
973
|
+
*
|
|
974
|
+
* Access Policy Requirements:
|
|
975
|
+
* Action: `Payment:Setup`
|
|
976
|
+
* Access Policy Resource: `Payment:PaymentMethod`
|
|
977
|
+
* Actions: `FHIR:Read,FHIR:Create,FHIR:Update`
|
|
978
|
+
* Access Policy Resource: `FHIR:Coverage:*`
|
|
979
|
+
* Action: `FHIR:Read,FHIR:Create,FHIR:Update`
|
|
980
|
+
* Access Policy Resource: `FHIR:Account:*`
|
|
981
|
+
*
|
|
982
|
+
* Also need to be able to read the patients' details. For example:
|
|
983
|
+
* Action: `FHIR:Read`
|
|
984
|
+
* Access Policy Resource: `FHIR:Patient`
|
|
985
|
+
*/
|
|
986
|
+
list(params, request) {
|
|
987
|
+
return this.request('/payment/payment-method/list', 'post')(params, request);
|
|
908
988
|
}
|
|
909
989
|
}
|
|
910
990
|
|
|
@@ -912,20 +992,24 @@ class PaymentMethod extends SDKResource {
|
|
|
912
992
|
class Project extends SDKResource {
|
|
913
993
|
constructor(config) {
|
|
914
994
|
super(config);
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
995
|
+
}
|
|
996
|
+
/**
|
|
997
|
+
* 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 .
|
|
998
|
+
*
|
|
999
|
+
* Access Policy Action: `Project:GetProjectInfo`
|
|
1000
|
+
* Access Policy Resource: `Project:Settings`
|
|
1001
|
+
*/
|
|
1002
|
+
get(request) {
|
|
1003
|
+
return this.request('/project', 'get')(request);
|
|
1004
|
+
}
|
|
1005
|
+
/**
|
|
1006
|
+
* 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 .
|
|
1007
|
+
*
|
|
1008
|
+
* Access Policy Action: `Project:UpdateProjectInfo`
|
|
1009
|
+
* Access Policy Resource: `Project:Settings`
|
|
1010
|
+
*/
|
|
1011
|
+
update(params, request) {
|
|
1012
|
+
return this.request('/project', 'patch')(params, request);
|
|
929
1013
|
}
|
|
930
1014
|
}
|
|
931
1015
|
|
|
@@ -933,39 +1017,45 @@ class Project extends SDKResource {
|
|
|
933
1017
|
class Rcm extends SDKResource {
|
|
934
1018
|
constructor(config) {
|
|
935
1019
|
super(config);
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
1020
|
+
}
|
|
1021
|
+
/**
|
|
1022
|
+
* Check [Insurance Eligibility](https://docs.oystehr.com/services/rcm/eligibility/).
|
|
1023
|
+
*
|
|
1024
|
+
* Access Policy Action: `RCM:CheckInsuranceEligibility`
|
|
1025
|
+
* Access Policy Resource: `RCM:InsuranceEligibility`
|
|
1026
|
+
*
|
|
1027
|
+
* nAccess Policy Action: `FHIR:Create`
|
|
1028
|
+
* Access Policy Resource: `FHIR:CoverageEligibilityResponse`
|
|
1029
|
+
*/
|
|
1030
|
+
eligibilityCheck(params, request) {
|
|
1031
|
+
return this.request('/rcm/eligibility-check', 'post')(params, request);
|
|
1032
|
+
}
|
|
1033
|
+
/**
|
|
1034
|
+
* Check [Validate Professional Claim](https://docs.oystehr.com/services/rcm/professional-claim-submission/).
|
|
1035
|
+
*
|
|
1036
|
+
* Access Policy Action: `RCM:ValidateProfessionalClaim`
|
|
1037
|
+
* Access Policy Resource: `RCM:Claim`
|
|
1038
|
+
*
|
|
1039
|
+
* Access Policy Action: `FHIR:Create`
|
|
1040
|
+
* Access Policy Resource: `FHIR:AuditEvent`
|
|
1041
|
+
*/
|
|
1042
|
+
validateProfessionalClaim(params, request) {
|
|
1043
|
+
return this.request('/rcm/professional-claim/validate', 'post')(params, request);
|
|
1044
|
+
}
|
|
1045
|
+
/**
|
|
1046
|
+
* Check [Submit Professional Claim](https://docs.oystehr.com/services/rcm/professional-claim-submission/).
|
|
1047
|
+
*
|
|
1048
|
+
* Access Policy Action: `RCM:SubmitProfessionalClaim`
|
|
1049
|
+
* Access Policy Resource: `RCM:Claim`
|
|
1050
|
+
*
|
|
1051
|
+
* Access Policy Action: `FHIR:Create`
|
|
1052
|
+
* Access Policy Resource: `FHIR:AuditEvent`
|
|
1053
|
+
*
|
|
1054
|
+
* Access Policy Actions: `FHIR:Create, FHIR:Update`
|
|
1055
|
+
* Access Policy Resource: `FHIR:Claim`
|
|
1056
|
+
*/
|
|
1057
|
+
submitProfessionalClaim(params, request) {
|
|
1058
|
+
return this.request('/rcm/professional-claim/submit', 'post')(params, request);
|
|
969
1059
|
}
|
|
970
1060
|
}
|
|
971
1061
|
|
|
@@ -973,42 +1063,52 @@ class Rcm extends SDKResource {
|
|
|
973
1063
|
class Role extends SDKResource {
|
|
974
1064
|
constructor(config) {
|
|
975
1065
|
super(config);
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1066
|
+
}
|
|
1067
|
+
/**
|
|
1068
|
+
* 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/).
|
|
1069
|
+
*
|
|
1070
|
+
* Access Policy Action: `IAM:ListAllRoles`
|
|
1071
|
+
* Access Policy Resource: `IAM:Role`
|
|
1072
|
+
*/
|
|
1073
|
+
list(request) {
|
|
1074
|
+
return this.request('/iam/role', 'get')(request);
|
|
1075
|
+
}
|
|
1076
|
+
/**
|
|
1077
|
+
* 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/).
|
|
1078
|
+
*
|
|
1079
|
+
* Access Policy Action: `IAM:CreateRole`
|
|
1080
|
+
* Access Policy Resource: `IAM:Role`
|
|
1081
|
+
*/
|
|
1082
|
+
create(params, request) {
|
|
1083
|
+
return this.request('/iam/role', 'post')(params, request);
|
|
1084
|
+
}
|
|
1085
|
+
/**
|
|
1086
|
+
* 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/).
|
|
1087
|
+
*
|
|
1088
|
+
* Access Policy Action: `IAM:GetRole`
|
|
1089
|
+
* Access Policy Resource: `IAM:Role`
|
|
1090
|
+
*/
|
|
1091
|
+
get(params, request) {
|
|
1092
|
+
return this.request('/iam/role/{roleId}', 'get')(params, request);
|
|
1093
|
+
}
|
|
1094
|
+
/**
|
|
1095
|
+
* 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/).
|
|
1096
|
+
*
|
|
1097
|
+
* Access Policy Action: `IAM:UpdateRole`
|
|
1098
|
+
* Access Policy Resource: `IAM:Role`
|
|
1099
|
+
*/
|
|
1100
|
+
update(params, request) {
|
|
1101
|
+
return this.request('/iam/role/{roleId}', 'patch')(params, request);
|
|
1102
|
+
}
|
|
1103
|
+
/**
|
|
1104
|
+
* 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/).
|
|
1105
|
+
*
|
|
1106
|
+
* Access Policy Action: `IAM:DeleteRole`
|
|
1107
|
+
* Access Policy Resource: `IAM:Role`
|
|
1108
|
+
* Will fail if any entities hold the Role or if Role is assigned as the default patient role for the project
|
|
1109
|
+
*/
|
|
1110
|
+
delete(params, request) {
|
|
1111
|
+
return this.request('/iam/role/{roleId}', 'delete')(params, request);
|
|
1012
1112
|
}
|
|
1013
1113
|
}
|
|
1014
1114
|
|
|
@@ -1016,34 +1116,42 @@ class Role extends SDKResource {
|
|
|
1016
1116
|
class Secret extends SDKResource {
|
|
1017
1117
|
constructor(config) {
|
|
1018
1118
|
super(config);
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1119
|
+
}
|
|
1120
|
+
/**
|
|
1121
|
+
* Get a list of all secrets in the Project.
|
|
1122
|
+
*
|
|
1123
|
+
* Access Policy Action: `Zambda:ListAllSecrets`
|
|
1124
|
+
* Access Policy Resource: `Zambda:Secret`
|
|
1125
|
+
*/
|
|
1126
|
+
list(request) {
|
|
1127
|
+
return this.request('/secret', 'get')(request);
|
|
1128
|
+
}
|
|
1129
|
+
/**
|
|
1130
|
+
* Create a secret for a project. If the secret is already defined, update it.
|
|
1131
|
+
*
|
|
1132
|
+
* Access Policy Action: `Zambda:CreateSecret`
|
|
1133
|
+
* Access Policy Resource: `Zambda:Secret`
|
|
1134
|
+
*/
|
|
1135
|
+
set(params, request) {
|
|
1136
|
+
return this.request('/secret', 'post')(params, request);
|
|
1137
|
+
}
|
|
1138
|
+
/**
|
|
1139
|
+
* Get the secret with the provided name.
|
|
1140
|
+
*
|
|
1141
|
+
* Access Policy Action: `Zambda:GetSecret`
|
|
1142
|
+
* Access Policy Resource: `Zambda:Secret`
|
|
1143
|
+
*/
|
|
1144
|
+
get(params, request) {
|
|
1145
|
+
return this.request('/secret/{name}', 'get')(params, request);
|
|
1146
|
+
}
|
|
1147
|
+
/**
|
|
1148
|
+
* Delete the secret with the provided name.
|
|
1149
|
+
*
|
|
1150
|
+
* Access Policy Action: `Zambda:DeleteSecret`
|
|
1151
|
+
* Access Policy Resource: `Zambda:Secret`
|
|
1152
|
+
*/
|
|
1153
|
+
delete(params, request) {
|
|
1154
|
+
return this.request('/secret/{name}', 'delete')(params, request);
|
|
1047
1155
|
}
|
|
1048
1156
|
}
|
|
1049
1157
|
|
|
@@ -1051,29 +1159,33 @@ class Secret extends SDKResource {
|
|
|
1051
1159
|
class Telemed extends SDKResource {
|
|
1052
1160
|
constructor(config) {
|
|
1053
1161
|
super(config);
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1162
|
+
}
|
|
1163
|
+
/**
|
|
1164
|
+
* Create a [telemedicine video meeting](https://docs.oystehr.com/services/telemed/).
|
|
1165
|
+
*
|
|
1166
|
+
* Access Policy Requirements:
|
|
1167
|
+
* Action: `Telemed:CreateMeeting`
|
|
1168
|
+
* Access Policy Resource: `Telemed:Meeting`
|
|
1169
|
+
* Action: `FHIR:Create`
|
|
1170
|
+
* Access Policy Resource: `FHIR:Encounter`
|
|
1171
|
+
* Action: `FHIR:Update`
|
|
1172
|
+
* Access Policy Resource: `FHIR:Encounter`
|
|
1173
|
+
*/
|
|
1174
|
+
createMeeting(params, request) {
|
|
1175
|
+
return this.request('/telemed/v2/meeting', 'post')(params, request);
|
|
1176
|
+
}
|
|
1177
|
+
/**
|
|
1178
|
+
* Get Meeting and Attendee objects necessary to join a telemedicine video meeting.
|
|
1179
|
+
*
|
|
1180
|
+
* Access Policy Requirements:
|
|
1181
|
+
* Action: `Telemed:JoinMeeting`
|
|
1182
|
+
* Access Policy Resource: `Telemed:Meeting`
|
|
1183
|
+
* To use M2M token to join as anonymous user:
|
|
1184
|
+
* Action: `Telemed:AddAnonymousToMeeting`
|
|
1185
|
+
* Access Policy Resource: `Telemed:Meeting`
|
|
1186
|
+
*/
|
|
1187
|
+
joinMeeting(params, request) {
|
|
1188
|
+
return this.request('/telemed/v2/meeting/{encounterId}/join', 'get')(params, request);
|
|
1077
1189
|
}
|
|
1078
1190
|
}
|
|
1079
1191
|
|
|
@@ -1081,22 +1193,24 @@ class Telemed extends SDKResource {
|
|
|
1081
1193
|
class TransactionalSMS extends SDKResource {
|
|
1082
1194
|
constructor(config) {
|
|
1083
1195
|
super(config);
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1196
|
+
}
|
|
1197
|
+
/**
|
|
1198
|
+
* 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.
|
|
1199
|
+
*
|
|
1200
|
+
* Access Policy Requirements:
|
|
1201
|
+
* Action: `Messaging:SendTransactionalSMS`
|
|
1202
|
+
* Access Policy Resource: `Messaging:TransactionalSMS`
|
|
1203
|
+
* Action: `FHIR:Create`
|
|
1204
|
+
* Access Policy Resource: `FHIR:Communication`
|
|
1205
|
+
* Action: `FHIR:Update`
|
|
1206
|
+
* Access Policy Resource: `FHIR:Communication`
|
|
1207
|
+
*
|
|
1208
|
+
* You also need Read access for the resource to which you are sending a message. For example:
|
|
1209
|
+
* Action: `FHIR:Read`
|
|
1210
|
+
* Access Policy Resource: `FHIR:Patient`
|
|
1211
|
+
*/
|
|
1212
|
+
send(params, request) {
|
|
1213
|
+
return this.request('/messaging/transactional-sms/send', 'post')(params, request);
|
|
1100
1214
|
}
|
|
1101
1215
|
}
|
|
1102
1216
|
|
|
@@ -1104,56 +1218,70 @@ class TransactionalSMS extends SDKResource {
|
|
|
1104
1218
|
class User extends SDKResource {
|
|
1105
1219
|
constructor(config) {
|
|
1106
1220
|
super(config);
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1221
|
+
}
|
|
1222
|
+
/**
|
|
1223
|
+
* 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.
|
|
1224
|
+
*
|
|
1225
|
+
* Fetch details about the calling User. This endpoint has no access policy requirements, it is available to all authenticated Users.
|
|
1226
|
+
*/
|
|
1227
|
+
me(request) {
|
|
1228
|
+
return this.request('/user/me', 'get')(request);
|
|
1229
|
+
}
|
|
1230
|
+
/**
|
|
1231
|
+
* 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.
|
|
1232
|
+
*
|
|
1233
|
+
* Access Policy Action: `App:GetUser`
|
|
1234
|
+
* Access Policy Resource: `App:User`
|
|
1235
|
+
*/
|
|
1236
|
+
get(params, request) {
|
|
1237
|
+
return this.request('/user/{id}', 'get')(params, request);
|
|
1238
|
+
}
|
|
1239
|
+
/**
|
|
1240
|
+
* 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.
|
|
1241
|
+
*
|
|
1242
|
+
* Access Policy Action: `App:UpdateUser`
|
|
1243
|
+
* Access Policy Resource: `App:User`
|
|
1244
|
+
*/
|
|
1245
|
+
update(params, request) {
|
|
1246
|
+
return this.request('/user/{id}', 'patch')(params, request);
|
|
1247
|
+
}
|
|
1248
|
+
/**
|
|
1249
|
+
* 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.
|
|
1250
|
+
*
|
|
1251
|
+
* Access Policy Action: `App:DeleteUser`
|
|
1252
|
+
* Access Policy Resource: `App:User`
|
|
1253
|
+
*/
|
|
1254
|
+
delete(params, request) {
|
|
1255
|
+
return this.request('/user/{id}', 'delete')(params, request);
|
|
1256
|
+
}
|
|
1257
|
+
/**
|
|
1258
|
+
* 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.
|
|
1259
|
+
*
|
|
1260
|
+
* Access Policy Action: `App:CreateUser`
|
|
1261
|
+
* Access Policy Resource: `App:User`
|
|
1262
|
+
*/
|
|
1263
|
+
invite(params, request) {
|
|
1264
|
+
return this.request('/user/invite', 'post')(params, request);
|
|
1265
|
+
}
|
|
1266
|
+
/**
|
|
1267
|
+
* DEPRECATED. Please use [v2/list](https://api-reference.oystehr.com/reference/get_user-v2-list) instead.
|
|
1268
|
+
*
|
|
1269
|
+
* Get all Users in 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.
|
|
1270
|
+
*
|
|
1271
|
+
* Access Policy Action: `App:ListAllUsers`
|
|
1272
|
+
* Access Policy Resource: `App:User`
|
|
1273
|
+
*/
|
|
1274
|
+
list(request) {
|
|
1275
|
+
return this.request('/user', 'get')(request);
|
|
1276
|
+
}
|
|
1277
|
+
/**
|
|
1278
|
+
* 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.
|
|
1279
|
+
*
|
|
1280
|
+
* Access Policy Action: `Project:ListAllUsers`
|
|
1281
|
+
* Access Policy Resource: `Project:Settings`
|
|
1282
|
+
*/
|
|
1283
|
+
listV2(params, request) {
|
|
1284
|
+
return this.request('/user/v2/list', 'get')(params, request);
|
|
1157
1285
|
}
|
|
1158
1286
|
}
|
|
1159
1287
|
|
|
@@ -1161,10 +1289,12 @@ class User extends SDKResource {
|
|
|
1161
1289
|
class Version extends SDKResource {
|
|
1162
1290
|
constructor(config) {
|
|
1163
1291
|
super(config);
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1292
|
+
}
|
|
1293
|
+
/**
|
|
1294
|
+
* Get project API version. This endpoint is public so there are no access policy requirements.
|
|
1295
|
+
*/
|
|
1296
|
+
get(request) {
|
|
1297
|
+
return this.request('/version', 'get')(request);
|
|
1168
1298
|
}
|
|
1169
1299
|
}
|
|
1170
1300
|
|
|
@@ -1260,53 +1390,65 @@ class Z3 extends SDKResource {
|
|
|
1260
1390
|
this.downloadFile = downloadFile;
|
|
1261
1391
|
/**
|
|
1262
1392
|
* This helper performs a `getPresignedUrl` request for Z3 URLs of the forms
|
|
1263
|
-
* `https://projects-api.oystehr.com/v1/z3/<bucket>/<key>`
|
|
1393
|
+
* `https://projects-api.oystehr.com/v1/z3/<bucket>/<key>` or `z3://<bucket>/<key>`
|
|
1264
1394
|
* instead of the standard SDK `Z3GetPresignedUrlParams`.
|
|
1265
1395
|
* @param params url and action
|
|
1266
1396
|
*/
|
|
1267
1397
|
this.getPresignedUrlForZ3Url = getPresignedUrlForZ3Url;
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1398
|
+
}
|
|
1399
|
+
/**
|
|
1400
|
+
* List all Z3 Buckets. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.
|
|
1401
|
+
*
|
|
1402
|
+
* Access Policy Action: `Z3:ListBuckets`
|
|
1403
|
+
* Access Policy Resource: `Z3:BucketName`
|
|
1404
|
+
*/
|
|
1405
|
+
listBuckets(request) {
|
|
1406
|
+
return this.request('/z3', 'get')(request);
|
|
1407
|
+
}
|
|
1408
|
+
/**
|
|
1409
|
+
* 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.
|
|
1410
|
+
*
|
|
1411
|
+
* Access Policy Action: `Z3:CreateBucket`
|
|
1412
|
+
* Access Policy Resource: `Z3:BucketName`
|
|
1413
|
+
*/
|
|
1414
|
+
createBucket(params, request) {
|
|
1415
|
+
return this.request('/z3/{bucketName}', 'put')(params, request);
|
|
1416
|
+
}
|
|
1417
|
+
/**
|
|
1418
|
+
* 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.
|
|
1419
|
+
*
|
|
1420
|
+
* Access Policy Action: `Z3:DeleteBucket`
|
|
1421
|
+
* Access Policy Resource: `Z3:BucketName`
|
|
1422
|
+
*/
|
|
1423
|
+
deleteBucket(params, request) {
|
|
1424
|
+
return this.request('/z3/{bucketName}', 'delete')(params, request);
|
|
1425
|
+
}
|
|
1426
|
+
/**
|
|
1427
|
+
* 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.
|
|
1428
|
+
*
|
|
1429
|
+
* Access Policy Action: `Z3:ListObjects`
|
|
1430
|
+
* Access Policy Resource: `Z3:BucketName:ObjectPath`
|
|
1431
|
+
*/
|
|
1432
|
+
listObjects(params, request) {
|
|
1433
|
+
return this.request('/z3/{bucketName}/{objectPath+}', 'get')(params, request);
|
|
1434
|
+
}
|
|
1435
|
+
/**
|
|
1436
|
+
* 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.
|
|
1437
|
+
*
|
|
1438
|
+
* Access Policy Action: `Z3:PutObject` or `Z3:GetObject`
|
|
1439
|
+
* Access Policy Resource: `Z3:BucketName:ObjectPath`
|
|
1440
|
+
*/
|
|
1441
|
+
getPresignedUrl(params, request) {
|
|
1442
|
+
return this.request('/z3/{bucketName}/{objectPath+}', 'post')(params, request);
|
|
1443
|
+
}
|
|
1444
|
+
/**
|
|
1445
|
+
* 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.
|
|
1446
|
+
*
|
|
1447
|
+
* Access Policy Action: `Z3:DeleteObject`
|
|
1448
|
+
* Access Policy Resource: `Z3:BucketName:ObjectPath`
|
|
1449
|
+
*/
|
|
1450
|
+
deleteObject(params, request) {
|
|
1451
|
+
return this.request('/z3/{bucketName}/{objectPath+}', 'delete')(params, request);
|
|
1310
1452
|
}
|
|
1311
1453
|
}
|
|
1312
1454
|
|
|
@@ -1325,61 +1467,77 @@ class Zambda extends SDKResource {
|
|
|
1325
1467
|
constructor(config) {
|
|
1326
1468
|
super(config);
|
|
1327
1469
|
this.uploadFile = uploadFile;
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1470
|
+
}
|
|
1471
|
+
/**
|
|
1472
|
+
* 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.
|
|
1473
|
+
*
|
|
1474
|
+
* Access Policy Action: `Zambda:ListAllFunctions`
|
|
1475
|
+
* Access Policy Resource: `Zambda:Function`
|
|
1476
|
+
*/
|
|
1477
|
+
list(request) {
|
|
1478
|
+
return this.request('/zambda', 'get')(request);
|
|
1479
|
+
}
|
|
1480
|
+
/**
|
|
1481
|
+
* 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.
|
|
1482
|
+
*
|
|
1483
|
+
* Access Policy Action: `Zambda:CreateFunction`
|
|
1484
|
+
* Access Policy Resource: `Zambda:Function`
|
|
1485
|
+
*/
|
|
1486
|
+
create(params, request) {
|
|
1487
|
+
return this.request('/zambda', 'post')(params, request);
|
|
1488
|
+
}
|
|
1489
|
+
/**
|
|
1490
|
+
* 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.
|
|
1491
|
+
*
|
|
1492
|
+
* Access Policy Action: `Zambda:GetFunction`
|
|
1493
|
+
* Access Policy Resource: `Zambda:Function`
|
|
1494
|
+
*/
|
|
1495
|
+
get(params, request) {
|
|
1496
|
+
return this.request('/zambda/{id}', 'get')(params, request);
|
|
1497
|
+
}
|
|
1498
|
+
/**
|
|
1499
|
+
* 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.
|
|
1500
|
+
*
|
|
1501
|
+
* Access Policy Action: `Zambda:UpdateFunction`
|
|
1502
|
+
* Access Policy Resource: `Zambda:Function`
|
|
1503
|
+
*/
|
|
1504
|
+
update(params, request) {
|
|
1505
|
+
return this.request('/zambda/{id}', 'patch')(params, request);
|
|
1506
|
+
}
|
|
1507
|
+
/**
|
|
1508
|
+
* 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.
|
|
1509
|
+
*
|
|
1510
|
+
* Access Policy Action: `Zambda:DeleteFunction`
|
|
1511
|
+
* Access Policy Resource: `Zambda:Function`
|
|
1512
|
+
*/
|
|
1513
|
+
delete(params, request) {
|
|
1514
|
+
return this.request('/zambda/{id}', 'delete')(params, request);
|
|
1515
|
+
}
|
|
1516
|
+
/**
|
|
1517
|
+
* 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.
|
|
1518
|
+
*
|
|
1519
|
+
* Access Policy Action: `Zambda:InvokeFunction`
|
|
1520
|
+
* Access Policy Resource: `Zambda:Function`
|
|
1521
|
+
*/
|
|
1522
|
+
execute(params, request) {
|
|
1523
|
+
return this.request('/zambda/{id}/execute', 'post')(params, request);
|
|
1524
|
+
}
|
|
1525
|
+
/**
|
|
1526
|
+
* 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.
|
|
1527
|
+
*
|
|
1528
|
+
* Execute a zambda that has method http_open. This endpoint is public so there are no access policy requirements.
|
|
1529
|
+
*/
|
|
1530
|
+
executePublic(params, request) {
|
|
1531
|
+
return this.request('/zambda/{id}/execute-public', 'post')(params, request);
|
|
1532
|
+
}
|
|
1533
|
+
/**
|
|
1534
|
+
* 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.
|
|
1535
|
+
*
|
|
1536
|
+
* Access Policy Action: `Zambda:UpdateFunction`
|
|
1537
|
+
* Access Policy Resource: `Zambda:Function`
|
|
1538
|
+
*/
|
|
1539
|
+
s3Upload(params, request) {
|
|
1540
|
+
return this.request('/zambda/{id}/s3-upload', 'post')(params, request);
|
|
1383
1541
|
}
|
|
1384
1542
|
}
|
|
1385
1543
|
|
|
@@ -1387,27 +1545,33 @@ class Zambda extends SDKResource {
|
|
|
1387
1545
|
class ZambdaLogStream extends SDKResource {
|
|
1388
1546
|
constructor(config) {
|
|
1389
1547
|
super(config);
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1548
|
+
}
|
|
1549
|
+
/**
|
|
1550
|
+
* 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.
|
|
1551
|
+
*
|
|
1552
|
+
* Access Policy Action: `Zambda:ReadLogs`
|
|
1553
|
+
* Access Policy Resource: `Zambda:Function`
|
|
1554
|
+
*/
|
|
1555
|
+
list(params, request) {
|
|
1556
|
+
return this.request('/zambda/{id}/logStream', 'post')(params, request);
|
|
1557
|
+
}
|
|
1558
|
+
/**
|
|
1559
|
+
* 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.
|
|
1560
|
+
*
|
|
1561
|
+
* Access Policy Action: `Zambda:ReadLogs`
|
|
1562
|
+
* Access Policy Resource: `Zambda:Function`
|
|
1563
|
+
*/
|
|
1564
|
+
search(params, request) {
|
|
1565
|
+
return this.request('/zambda/{id}/logStream/search', 'post')(params, request);
|
|
1566
|
+
}
|
|
1567
|
+
/**
|
|
1568
|
+
* 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.
|
|
1569
|
+
*
|
|
1570
|
+
* Access Policy Action: `Zambda:ReadLogs`
|
|
1571
|
+
* Access Policy Resource: `Zambda:Function`
|
|
1572
|
+
*/
|
|
1573
|
+
get(params, request) {
|
|
1574
|
+
return this.request('/zambda/{id}/logStream/{logStreamName}', 'post')(params, request);
|
|
1411
1575
|
}
|
|
1412
1576
|
}
|
|
1413
1577
|
|