@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/src/client/client.ts
CHANGED
|
@@ -179,12 +179,14 @@ function fetcher(
|
|
|
179
179
|
);
|
|
180
180
|
const retryConfig: ConstructedRetryConfig = {
|
|
181
181
|
retries: config.retry?.retries ?? 3,
|
|
182
|
+
jitter: config.retry?.jitter ?? 20,
|
|
183
|
+
delay: config.retry?.delay ?? 100,
|
|
182
184
|
onRetry: config.retry?.onRetry,
|
|
183
185
|
// Using array instead of set because the length is too short for uniqueness to be important
|
|
184
186
|
retryOn: [...(config.retry?.retryOn ?? []), ...STATUS_CODES_TO_RETRY],
|
|
185
187
|
};
|
|
186
188
|
retryConfig.retryOn.push(...STATUS_CODES_TO_RETRY);
|
|
187
|
-
return retry(async (
|
|
189
|
+
return retry(async () => {
|
|
188
190
|
const response = await fetchImpl(
|
|
189
191
|
new Request(url, {
|
|
190
192
|
method: method.toUpperCase(),
|
|
@@ -201,13 +203,12 @@ function fetcher(
|
|
|
201
203
|
response.headers.get('content-type')?.includes('application/fhir+json'))
|
|
202
204
|
? JSON.parse(responseBody)
|
|
203
205
|
: null;
|
|
204
|
-
} catch (
|
|
206
|
+
} catch (_err) {
|
|
205
207
|
// ignore JSON.parse errors
|
|
206
208
|
responseJson = null;
|
|
207
209
|
}
|
|
208
210
|
const isError = !response.ok || response.status >= 400;
|
|
209
211
|
if (isError) {
|
|
210
|
-
headers['x-oystehr-fetch-attempts'] = `${attempt}`;
|
|
211
212
|
const errObj = {
|
|
212
213
|
message: responseJson?.message ?? responseJson ?? responseBody ?? response.statusText,
|
|
213
214
|
code: responseJson?.code ?? response.status,
|
|
@@ -221,6 +222,8 @@ function fetcher(
|
|
|
221
222
|
}
|
|
222
223
|
|
|
223
224
|
type ConstructedRetryConfig = Omit<NonNullable<OystehrConfig['retry']>, 'retryOn'> & {
|
|
225
|
+
jitter: NonNullable<NonNullable<OystehrConfig['retry']>['jitter']>;
|
|
226
|
+
delay: NonNullable<NonNullable<OystehrConfig['retry']>['delay']>;
|
|
224
227
|
retryOn: NonNullable<NonNullable<OystehrConfig['retry']>['retryOn']>;
|
|
225
228
|
};
|
|
226
229
|
async function retry<T>(work: (attempt: number) => Promise<T>, config: ConstructedRetryConfig): Promise<T> {
|
|
@@ -247,6 +250,8 @@ async function retry<T>(work: (attempt: number) => Promise<T>, config: Construct
|
|
|
247
250
|
if (!isRetryable) {
|
|
248
251
|
break;
|
|
249
252
|
}
|
|
253
|
+
const jitter = Math.floor(Math.random() * (config.jitter + 1));
|
|
254
|
+
await new Promise((resolve) => setTimeout(resolve, config.delay + jitter));
|
|
250
255
|
if (config.onRetry && attempt !== (config.retries ?? 0)) {
|
|
251
256
|
config.onRetry(attempt + 1);
|
|
252
257
|
}
|
package/src/config.ts
CHANGED
|
@@ -28,6 +28,14 @@ export interface OystehrConfig {
|
|
|
28
28
|
* Number of retries.
|
|
29
29
|
*/
|
|
30
30
|
retries: number;
|
|
31
|
+
/**
|
|
32
|
+
* Shift retries by up to this many milliseconds. Defaults to 20 milliseconds.
|
|
33
|
+
*/
|
|
34
|
+
jitter?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Wait this many milliseconds between retries. Defaults to 100 milliseconds.
|
|
37
|
+
*/
|
|
38
|
+
delay?: number;
|
|
31
39
|
/**
|
|
32
40
|
* Optional, non-async function to call when a request is retried.
|
|
33
41
|
* @param attempt
|
|
@@ -30,71 +30,79 @@ export class Application extends SDKResource {
|
|
|
30
30
|
* Access Policy Action: `App:ListAllApplications`
|
|
31
31
|
* Access Policy Resource: `App:Application`
|
|
32
32
|
*/
|
|
33
|
-
list
|
|
34
|
-
this.request('/application', 'get')(request);
|
|
33
|
+
list(request?: OystehrClientRequest): Promise<ApplicationListResponse> {
|
|
34
|
+
return this.request('/application', 'get')(request);
|
|
35
|
+
}
|
|
35
36
|
/**
|
|
36
37
|
* 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.
|
|
37
38
|
*
|
|
38
39
|
* Access Policy Action: `App:CreateApplication`
|
|
39
40
|
* Access Policy Resource: `App:Application`
|
|
40
41
|
*/
|
|
41
|
-
create
|
|
42
|
-
this.request('/application', 'post')(params, request);
|
|
42
|
+
create(params: ApplicationCreateParams, request?: OystehrClientRequest): Promise<ApplicationCreateResponse> {
|
|
43
|
+
return this.request('/application', 'post')(params, request);
|
|
44
|
+
}
|
|
43
45
|
/**
|
|
44
46
|
* 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.
|
|
45
47
|
*
|
|
46
48
|
* Access Policy Action: `App:GetApplication`
|
|
47
49
|
* Access Policy Resource: `App:Application`
|
|
48
50
|
*/
|
|
49
|
-
get
|
|
50
|
-
this.request('/application/{id}', 'get')(params, request);
|
|
51
|
+
get(params: ApplicationGetParams, request?: OystehrClientRequest): Promise<ApplicationGetResponse> {
|
|
52
|
+
return this.request('/application/{id}', 'get')(params, request);
|
|
53
|
+
}
|
|
51
54
|
/**
|
|
52
55
|
* 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.
|
|
53
56
|
*
|
|
54
57
|
* Access Policy Action: `App:UpdateApplication`
|
|
55
58
|
* Access Policy Resource: `App:Application`
|
|
56
59
|
*/
|
|
57
|
-
update
|
|
58
|
-
this.request('/application/{id}', 'patch')(params, request);
|
|
60
|
+
update(params: ApplicationUpdateParams, request?: OystehrClientRequest): Promise<ApplicationUpdateResponse> {
|
|
61
|
+
return this.request('/application/{id}', 'patch')(params, request);
|
|
62
|
+
}
|
|
59
63
|
/**
|
|
60
64
|
* 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.
|
|
61
65
|
*
|
|
62
66
|
* Access Policy Action: `App:DeleteApplication`
|
|
63
67
|
* Access Policy Resource: `App:Application`
|
|
64
68
|
*/
|
|
65
|
-
delete
|
|
66
|
-
this.request('/application/{id}', 'delete')(params, request);
|
|
69
|
+
delete(params: ApplicationDeleteParams, request?: OystehrClientRequest): Promise<void> {
|
|
70
|
+
return this.request('/application/{id}', 'delete')(params, request);
|
|
71
|
+
}
|
|
67
72
|
/**
|
|
68
73
|
* Rotate client's secrete associated with an application.
|
|
69
74
|
*
|
|
70
75
|
* Access Policy Action: `App:RotateApplicationSecret`
|
|
71
76
|
* Access Policy Resource: `App:Application`
|
|
72
77
|
*/
|
|
73
|
-
rotateSecret
|
|
78
|
+
rotateSecret(
|
|
74
79
|
params: ApplicationRotateSecretParams,
|
|
75
80
|
request?: OystehrClientRequest
|
|
76
|
-
): Promise<ApplicationRotateSecretResponse>
|
|
77
|
-
this.request('/application/{id}/rotate-secret', 'post')(params, request);
|
|
81
|
+
): Promise<ApplicationRotateSecretResponse> {
|
|
82
|
+
return this.request('/application/{id}/rotate-secret', 'post')(params, request);
|
|
83
|
+
}
|
|
78
84
|
/**
|
|
79
85
|
* Revokes user's refresh token issued for the application.
|
|
80
86
|
*
|
|
81
87
|
* Access Policy Action: `App:RevokeRefreshToken`
|
|
82
88
|
* Access Policy Resource: `App:Application`
|
|
83
89
|
*/
|
|
84
|
-
revokeRefreshToken
|
|
90
|
+
revokeRefreshToken(
|
|
85
91
|
params: ApplicationRevokeRefreshTokenParams,
|
|
86
92
|
request?: OystehrClientRequest
|
|
87
|
-
): Promise<ApplicationRevokeRefreshTokenResponse>
|
|
88
|
-
this.request('/application/{id}/revoke-refresh-token', 'post')(params, request);
|
|
93
|
+
): Promise<ApplicationRevokeRefreshTokenResponse> {
|
|
94
|
+
return this.request('/application/{id}/revoke-refresh-token', 'post')(params, request);
|
|
95
|
+
}
|
|
89
96
|
/**
|
|
90
97
|
* Revokes user's access token issued for the application.
|
|
91
98
|
*
|
|
92
99
|
* Access Policy Action: `App:RevokeAccessToken`
|
|
93
100
|
* Access Policy Resource: `App:Application`
|
|
94
101
|
*/
|
|
95
|
-
revokeAccessToken
|
|
102
|
+
revokeAccessToken(
|
|
96
103
|
params: ApplicationRevokeAccessTokenParams,
|
|
97
104
|
request?: OystehrClientRequest
|
|
98
|
-
): Promise<ApplicationRevokeAccessTokenResponse>
|
|
99
|
-
this.request('/application/{id}/revoke-access-token', 'post')(params, request);
|
|
105
|
+
): Promise<ApplicationRevokeAccessTokenResponse> {
|
|
106
|
+
return this.request('/application/{id}/revoke-access-token', 'post')(params, request);
|
|
107
|
+
}
|
|
100
108
|
}
|
|
@@ -19,8 +19,9 @@ export class Charge extends SDKResource {
|
|
|
19
19
|
* Action: `FHIR:Read`
|
|
20
20
|
* Access Policy Resources: `FHIR:Patient:*,FHIR:Encounter:*,FHIR:Coverage:*`
|
|
21
21
|
*/
|
|
22
|
-
issue
|
|
23
|
-
this.request('/payment/charge/issue', 'post')(params, request);
|
|
22
|
+
issue(params: ChargeIssueParams, request?: OystehrClientRequest): Promise<void> {
|
|
23
|
+
return this.request('/payment/charge/issue', 'post')(params, request);
|
|
24
|
+
}
|
|
24
25
|
/**
|
|
25
26
|
* Retrieve charge status for a specified encounter or charge item.
|
|
26
27
|
*
|
|
@@ -32,6 +33,7 @@ export class Charge extends SDKResource {
|
|
|
32
33
|
* Action: `FHIR:Read`
|
|
33
34
|
* Access Policy Resources: `FHIR:Patient:*,FHIR:Encounter:*,FHIR:Coverage:*`
|
|
34
35
|
*/
|
|
35
|
-
status
|
|
36
|
-
this.request('/payment/charge/status', 'post')(params, request);
|
|
36
|
+
status(params: ChargeStatusParams, request?: OystehrClientRequest): Promise<ChargeStatusResponse> {
|
|
37
|
+
return this.request('/payment/charge/status', 'post')(params, request);
|
|
38
|
+
}
|
|
37
39
|
}
|
|
@@ -36,16 +36,18 @@ export class Conversation extends SDKResource {
|
|
|
36
36
|
* Action: `FHIR:Update`
|
|
37
37
|
* Access Policy Resource: `FHIR:Encounter`
|
|
38
38
|
*/
|
|
39
|
-
create
|
|
40
|
-
this.request('/messaging/conversation', 'post')(params, request);
|
|
39
|
+
create(params: ConversationCreateParams, request?: OystehrClientRequest): Promise<ConversationCreateResponse> {
|
|
40
|
+
return this.request('/messaging/conversation', 'post')(params, request);
|
|
41
|
+
}
|
|
41
42
|
/**
|
|
42
43
|
* 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.
|
|
43
44
|
*
|
|
44
45
|
* Access Policy Action: `Messaging:GetConversationToken`
|
|
45
46
|
* Access Policy Resource: `Messaging:Conversation`.
|
|
46
47
|
*/
|
|
47
|
-
getToken
|
|
48
|
-
this.request('/messaging/conversation/token', 'get')(request);
|
|
48
|
+
getToken(request?: OystehrClientRequest): Promise<ConversationGetTokenResponse> {
|
|
49
|
+
return this.request('/messaging/conversation/token', 'get')(request);
|
|
50
|
+
}
|
|
49
51
|
/**
|
|
50
52
|
* 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.
|
|
51
53
|
*
|
|
@@ -57,8 +59,9 @@ export class Conversation extends SDKResource {
|
|
|
57
59
|
* Action: `FHIR:Update`
|
|
58
60
|
* Access Policy Resource: `FHIR:Encounter`
|
|
59
61
|
*/
|
|
60
|
-
addParticipant
|
|
61
|
-
this.request('/messaging/conversation/{conversationId}/participant', 'post')(params, request);
|
|
62
|
+
addParticipant(params: ConversationAddParticipantParams, request?: OystehrClientRequest): Promise<void> {
|
|
63
|
+
return this.request('/messaging/conversation/{conversationId}/participant', 'post')(params, request);
|
|
64
|
+
}
|
|
62
65
|
/**
|
|
63
66
|
* 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.
|
|
64
67
|
*
|
|
@@ -68,8 +71,9 @@ export class Conversation extends SDKResource {
|
|
|
68
71
|
* Action: `FHIR:Read`
|
|
69
72
|
* Access Policy Resource: `FHIR:Patient`, `FHIR:Practitioner`, or `FHIR:RelatedPerson`
|
|
70
73
|
*/
|
|
71
|
-
removeParticipant
|
|
72
|
-
this.request('/messaging/conversation/{conversationId}/participant', 'delete')(params, request);
|
|
74
|
+
removeParticipant(params: ConversationRemoveParticipantParams, request?: OystehrClientRequest): Promise<void> {
|
|
75
|
+
return this.request('/messaging/conversation/{conversationId}/participant', 'delete')(params, request);
|
|
76
|
+
}
|
|
73
77
|
/**
|
|
74
78
|
* 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.
|
|
75
79
|
*
|
|
@@ -77,6 +81,7 @@ export class Conversation extends SDKResource {
|
|
|
77
81
|
* Action: `Messaging:ConversationSendMessage`
|
|
78
82
|
* Access Policy Resource: `Messaging:Conversation`
|
|
79
83
|
*/
|
|
80
|
-
message
|
|
81
|
-
this.request('/messaging/conversation/{conversationId}/message', 'post')(params, request);
|
|
84
|
+
message(params: ConversationMessageParams, request?: OystehrClientRequest): Promise<void> {
|
|
85
|
+
return this.request('/messaging/conversation/{conversationId}/message', 'post')(params, request);
|
|
86
|
+
}
|
|
82
87
|
}
|
|
@@ -26,32 +26,36 @@ export class Developer extends SDKResource {
|
|
|
26
26
|
* Access Policy Action: `IAM:GetDeveloper`
|
|
27
27
|
* Access Policy Resource: `IAM:Developer`
|
|
28
28
|
*/
|
|
29
|
-
get
|
|
30
|
-
this.request('/developer/{id}', 'get')(params, request);
|
|
29
|
+
get(params: DeveloperGetParams, request?: OystehrClientRequest): Promise<DeveloperGetResponse> {
|
|
30
|
+
return this.request('/developer/{id}', 'get')(params, request);
|
|
31
|
+
}
|
|
31
32
|
/**
|
|
32
33
|
* 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.
|
|
33
34
|
*
|
|
34
35
|
* Access Policy Action: `IAM:UpdateDeveloper`
|
|
35
36
|
* Access Policy Resource: `IAM:Developer`
|
|
36
37
|
*/
|
|
37
|
-
update
|
|
38
|
-
this.request('/developer/{id}', 'patch')(params, request);
|
|
38
|
+
update(params: DeveloperUpdateParams, request?: OystehrClientRequest): Promise<DeveloperUpdateResponse> {
|
|
39
|
+
return this.request('/developer/{id}', 'patch')(params, request);
|
|
40
|
+
}
|
|
39
41
|
/**
|
|
40
42
|
* 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.
|
|
41
43
|
*
|
|
42
44
|
* Access Policy Action: `IAM:RemoveDeveloper`
|
|
43
45
|
* Access Policy Resource: `IAM:Developer`
|
|
44
46
|
*/
|
|
45
|
-
delete
|
|
46
|
-
this.request('/developer/{id}', 'delete')(params, request);
|
|
47
|
+
delete(params: DeveloperDeleteParams, request?: OystehrClientRequest): Promise<void> {
|
|
48
|
+
return this.request('/developer/{id}', 'delete')(params, request);
|
|
49
|
+
}
|
|
47
50
|
/**
|
|
48
51
|
* 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.
|
|
49
52
|
*
|
|
50
53
|
* Access Policy Action: `IAM:InviteDeveloper`
|
|
51
54
|
* Access Policy Resource: `IAM:Developer`
|
|
52
55
|
*/
|
|
53
|
-
invite
|
|
54
|
-
this.request('/developer/invite', 'post')(params, request);
|
|
56
|
+
invite(params: DeveloperInviteParams, request?: OystehrClientRequest): Promise<DeveloperInviteResponse> {
|
|
57
|
+
return this.request('/developer/invite', 'post')(params, request);
|
|
58
|
+
}
|
|
55
59
|
/**
|
|
56
60
|
* DEPRECATED. Please use [v2/list](https://api-reference.oystehr.com/reference/get_developer-v2-list) instead.
|
|
57
61
|
*
|
|
@@ -60,13 +64,16 @@ export class Developer extends SDKResource {
|
|
|
60
64
|
* Access Policy Action: `IAM:ListAllDevelopers`
|
|
61
65
|
* Access Policy Resource: `IAM:Developer`
|
|
62
66
|
*/
|
|
63
|
-
list
|
|
67
|
+
list(request?: OystehrClientRequest): Promise<DeveloperListResponse> {
|
|
68
|
+
return this.request('/developer', 'get')(request);
|
|
69
|
+
}
|
|
64
70
|
/**
|
|
65
71
|
* 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.
|
|
66
72
|
*
|
|
67
73
|
* Access Policy Action: `Project:ListAllUsers`
|
|
68
74
|
* Access Policy Resource: `Project:Settings`
|
|
69
75
|
*/
|
|
70
|
-
listV2
|
|
71
|
-
this.request('/developer/v2/list', 'get')(params, request);
|
|
76
|
+
listV2(params: DeveloperListV2Params, request?: OystehrClientRequest): Promise<DeveloperListV2Response> {
|
|
77
|
+
return this.request('/developer/v2/list', 'get')(params, request);
|
|
78
|
+
}
|
|
72
79
|
}
|
|
@@ -21,25 +21,31 @@ export class Erx extends SDKResource {
|
|
|
21
21
|
/**
|
|
22
22
|
* Retrieve patient properties from FHIR service and sync them with eRx service
|
|
23
23
|
*/
|
|
24
|
-
syncPatient
|
|
25
|
-
this.request('/erx/sync-patient/{patientId}', 'post')(params, request);
|
|
24
|
+
syncPatient(params: ErxSyncPatientParams, request?: OystehrClientRequest): Promise<ErxSyncPatientResponse> {
|
|
25
|
+
return this.request('/erx/sync-patient/{patientId}', 'post')(params, request);
|
|
26
|
+
}
|
|
26
27
|
/**
|
|
27
28
|
* Search for allergies
|
|
28
29
|
*/
|
|
29
|
-
allergySearch
|
|
30
|
-
this.request('/erx/allergy/search', 'get')(params, request);
|
|
30
|
+
allergySearch(params: ErxAllergySearchParams, request?: OystehrClientRequest): Promise<ErxAllergySearchResponse> {
|
|
31
|
+
return this.request('/erx/allergy/search', 'get')(params, request);
|
|
32
|
+
}
|
|
31
33
|
/**
|
|
32
34
|
* Search for medications. Provide at least one of code or name filters
|
|
33
35
|
*/
|
|
34
|
-
medicationSearch
|
|
36
|
+
medicationSearch(
|
|
35
37
|
params: ErxMedicationSearchParams,
|
|
36
38
|
request?: OystehrClientRequest
|
|
37
|
-
): Promise<ErxMedicationSearchResponse>
|
|
39
|
+
): Promise<ErxMedicationSearchResponse> {
|
|
40
|
+
return this.request('/erx/medication/search', 'get')(params, request);
|
|
41
|
+
}
|
|
38
42
|
/**
|
|
39
43
|
* Search for medications. Provide at least one of code or name filters
|
|
40
44
|
*/
|
|
41
|
-
medicationSearchV2
|
|
45
|
+
medicationSearchV2(
|
|
42
46
|
params: ErxMedicationSearchV2Params,
|
|
43
47
|
request?: OystehrClientRequest
|
|
44
|
-
): Promise<ErxMedicationSearchV2Response>
|
|
48
|
+
): Promise<ErxMedicationSearchV2Response> {
|
|
49
|
+
return this.request('/erx/v2/medication/search', 'get')(params, request);
|
|
50
|
+
}
|
|
45
51
|
}
|
|
@@ -30,53 +30,61 @@ export class M2m extends SDKResource {
|
|
|
30
30
|
* Access Policy Action: `App:ListAllM2MClients`
|
|
31
31
|
* Access Policy Resource: `IAM:M2MClient`
|
|
32
32
|
*/
|
|
33
|
-
list
|
|
33
|
+
list(request?: OystehrClientRequest): Promise<M2mListResponse> {
|
|
34
|
+
return this.request('/m2m', 'get')(request);
|
|
35
|
+
}
|
|
34
36
|
/**
|
|
35
37
|
* 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).
|
|
36
38
|
*
|
|
37
39
|
* Access Policy Action: `App:CreateM2MClient`
|
|
38
40
|
* Access Policy Resource: `IAM:M2MClient`
|
|
39
41
|
*/
|
|
40
|
-
create
|
|
41
|
-
this.request('/m2m', 'post')(params, request);
|
|
42
|
+
create(params: M2mCreateParams, request?: OystehrClientRequest): Promise<M2mCreateResponse> {
|
|
43
|
+
return this.request('/m2m', 'post')(params, request);
|
|
44
|
+
}
|
|
42
45
|
/**
|
|
43
46
|
* 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).
|
|
44
47
|
*
|
|
45
48
|
* Access Policy Action: `App:GetM2MClient`
|
|
46
49
|
* Access Policy Resource: `IAM:M2MClient`
|
|
47
50
|
*/
|
|
48
|
-
get
|
|
49
|
-
this.request('/m2m/{id}', 'get')(params, request);
|
|
51
|
+
get(params: M2mGetParams, request?: OystehrClientRequest): Promise<M2mGetResponse> {
|
|
52
|
+
return this.request('/m2m/{id}', 'get')(params, request);
|
|
53
|
+
}
|
|
50
54
|
/**
|
|
51
55
|
* 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).
|
|
52
56
|
*
|
|
53
57
|
* Access Policy Action: `App:UpdateM2MClient`
|
|
54
58
|
* Access Policy Resource: `IAM:M2MClient`
|
|
55
59
|
*/
|
|
56
|
-
update
|
|
57
|
-
this.request('/m2m/{id}', 'patch')(params, request);
|
|
60
|
+
update(params: M2mUpdateParams, request?: OystehrClientRequest): Promise<M2mUpdateResponse> {
|
|
61
|
+
return this.request('/m2m/{id}', 'patch')(params, request);
|
|
62
|
+
}
|
|
58
63
|
/**
|
|
59
64
|
* 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).
|
|
60
65
|
*
|
|
61
66
|
* Access Policy Action: `App:DeleteM2MClient`
|
|
62
67
|
* Access Policy Resource: `IAM:M2MClient`
|
|
63
68
|
*/
|
|
64
|
-
delete
|
|
65
|
-
this.request('/m2m/{id}', 'delete')(params, request);
|
|
69
|
+
delete(params: M2mDeleteParams, request?: OystehrClientRequest): Promise<void> {
|
|
70
|
+
return this.request('/m2m/{id}', 'delete')(params, request);
|
|
71
|
+
}
|
|
66
72
|
/**
|
|
67
73
|
* 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).
|
|
68
74
|
*
|
|
69
75
|
* Access Policy Action: `App:RotateM2MClientSecret`
|
|
70
76
|
* Access Policy Resource: `IAM:M2MClient`
|
|
71
77
|
*/
|
|
72
|
-
rotateSecret
|
|
73
|
-
this.request('/m2m/{id}/rotate-secret', 'post')(params, request);
|
|
78
|
+
rotateSecret(params: M2mRotateSecretParams, request?: OystehrClientRequest): Promise<M2mRotateSecretResponse> {
|
|
79
|
+
return this.request('/m2m/{id}/rotate-secret', 'post')(params, request);
|
|
80
|
+
}
|
|
74
81
|
/**
|
|
75
82
|
* 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).
|
|
76
83
|
*
|
|
77
84
|
* Access Policy Action: `App:ListAllM2MClients`
|
|
78
85
|
* Access Policy Resource: `IAM:M2MClient`
|
|
79
86
|
*/
|
|
80
|
-
listV2
|
|
81
|
-
this.request('/m2m/v2/list', 'get')(params, request);
|
|
87
|
+
listV2(params: M2mListV2Params, request?: OystehrClientRequest): Promise<M2mListV2Response> {
|
|
88
|
+
return this.request('/m2m/v2/list', 'get')(params, request);
|
|
89
|
+
}
|
|
82
90
|
}
|
|
@@ -11,6 +11,7 @@ export class Messaging extends SDKResource {
|
|
|
11
11
|
/**
|
|
12
12
|
* Get an information about the Messaging services configuration. This information includes phone number, phone number type and also rate limits of each service.
|
|
13
13
|
*/
|
|
14
|
-
getMessagingConfig
|
|
15
|
-
this.request('/messaging/config', 'get')(request);
|
|
14
|
+
getMessagingConfig(request?: OystehrClientRequest): Promise<MessagingGetMessagingConfigResponse> {
|
|
15
|
+
return this.request('/messaging/config', 'get')(request);
|
|
16
|
+
}
|
|
16
17
|
}
|
|
@@ -31,8 +31,9 @@ export class PaymentMethod extends SDKResource {
|
|
|
31
31
|
* Action: `FHIR:Read`
|
|
32
32
|
* Access Policy Resource: `FHIR:Patient`
|
|
33
33
|
*/
|
|
34
|
-
setUp
|
|
35
|
-
this.request('/payment/payment-method/setup', 'post')(params, request);
|
|
34
|
+
setUp(params: PaymentMethodSetUpParams, request?: OystehrClientRequest): Promise<PaymentMethodSetUpResponse> {
|
|
35
|
+
return this.request('/payment/payment-method/setup', 'post')(params, request);
|
|
36
|
+
}
|
|
36
37
|
/**
|
|
37
38
|
* Set a specified payment method for the user as default.
|
|
38
39
|
*
|
|
@@ -48,8 +49,9 @@ export class PaymentMethod extends SDKResource {
|
|
|
48
49
|
* Action: `FHIR:Read`
|
|
49
50
|
* Access Policy Resource: `FHIR:Patient`
|
|
50
51
|
*/
|
|
51
|
-
setDefault
|
|
52
|
-
this.request('/payment/payment-method/set-default', 'post')(params, request);
|
|
52
|
+
setDefault(params: PaymentMethodSetDefaultParams, request?: OystehrClientRequest): Promise<void> {
|
|
53
|
+
return this.request('/payment/payment-method/set-default', 'post')(params, request);
|
|
54
|
+
}
|
|
53
55
|
/**
|
|
54
56
|
* Delete a specified payment method for the beneficiary.
|
|
55
57
|
*
|
|
@@ -65,8 +67,9 @@ export class PaymentMethod extends SDKResource {
|
|
|
65
67
|
* Action: `FHIR:Read`
|
|
66
68
|
* Access Policy Resource: `FHIR:Patient`
|
|
67
69
|
*/
|
|
68
|
-
delete
|
|
69
|
-
this.request('/payment/payment-method', 'delete')(params, request);
|
|
70
|
+
delete(params: PaymentMethodDeleteParams, request?: OystehrClientRequest): Promise<void> {
|
|
71
|
+
return this.request('/payment/payment-method', 'delete')(params, request);
|
|
72
|
+
}
|
|
70
73
|
/**
|
|
71
74
|
* List all payment methods for the patient.
|
|
72
75
|
*
|
|
@@ -82,6 +85,7 @@ export class PaymentMethod extends SDKResource {
|
|
|
82
85
|
* Action: `FHIR:Read`
|
|
83
86
|
* Access Policy Resource: `FHIR:Patient`
|
|
84
87
|
*/
|
|
85
|
-
list
|
|
86
|
-
this.request('/payment/payment-method/list', 'post')(params, request);
|
|
88
|
+
list(params: PaymentMethodListParams, request?: OystehrClientRequest): Promise<PaymentMethodListResponse> {
|
|
89
|
+
return this.request('/payment/payment-method/list', 'post')(params, request);
|
|
90
|
+
}
|
|
87
91
|
}
|
|
@@ -14,13 +14,16 @@ export class Project extends SDKResource {
|
|
|
14
14
|
* Access Policy Action: `Project:GetProjectInfo`
|
|
15
15
|
* Access Policy Resource: `Project:Settings`
|
|
16
16
|
*/
|
|
17
|
-
get
|
|
17
|
+
get(request?: OystehrClientRequest): Promise<ProjectGetResponse> {
|
|
18
|
+
return this.request('/project', 'get')(request);
|
|
19
|
+
}
|
|
18
20
|
/**
|
|
19
21
|
* 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 .
|
|
20
22
|
*
|
|
21
23
|
* Access Policy Action: `Project:UpdateProjectInfo`
|
|
22
24
|
* Access Policy Resource: `Project:Settings`
|
|
23
25
|
*/
|
|
24
|
-
update
|
|
25
|
-
this.request('/project', 'patch')(params, request);
|
|
26
|
+
update(params: ProjectUpdateParams, request?: OystehrClientRequest): Promise<ProjectUpdateResponse> {
|
|
27
|
+
return this.request('/project', 'patch')(params, request);
|
|
28
|
+
}
|
|
26
29
|
}
|
|
@@ -25,10 +25,12 @@ export class Rcm extends SDKResource {
|
|
|
25
25
|
* nAccess Policy Action: `FHIR:Create`
|
|
26
26
|
* Access Policy Resource: `FHIR:CoverageEligibilityResponse`
|
|
27
27
|
*/
|
|
28
|
-
eligibilityCheck
|
|
28
|
+
eligibilityCheck(
|
|
29
29
|
params: RcmEligibilityCheckParams,
|
|
30
30
|
request?: OystehrClientRequest
|
|
31
|
-
): Promise<RcmEligibilityCheckResponse>
|
|
31
|
+
): Promise<RcmEligibilityCheckResponse> {
|
|
32
|
+
return this.request('/rcm/eligibility-check', 'post')(params, request);
|
|
33
|
+
}
|
|
32
34
|
/**
|
|
33
35
|
* Check [Validate Professional Claim](https://docs.oystehr.com/services/rcm/professional-claim-submission/).
|
|
34
36
|
*
|
|
@@ -38,11 +40,12 @@ export class Rcm extends SDKResource {
|
|
|
38
40
|
* Access Policy Action: `FHIR:Create`
|
|
39
41
|
* Access Policy Resource: `FHIR:AuditEvent`
|
|
40
42
|
*/
|
|
41
|
-
validateProfessionalClaim
|
|
43
|
+
validateProfessionalClaim(
|
|
42
44
|
params: RcmValidateProfessionalClaimParams,
|
|
43
45
|
request?: OystehrClientRequest
|
|
44
|
-
): Promise<RcmValidateProfessionalClaimResponse>
|
|
45
|
-
this.request('/rcm/professional-claim/validate', 'post')(params, request);
|
|
46
|
+
): Promise<RcmValidateProfessionalClaimResponse> {
|
|
47
|
+
return this.request('/rcm/professional-claim/validate', 'post')(params, request);
|
|
48
|
+
}
|
|
46
49
|
/**
|
|
47
50
|
* Check [Submit Professional Claim](https://docs.oystehr.com/services/rcm/professional-claim-submission/).
|
|
48
51
|
*
|
|
@@ -55,9 +58,10 @@ export class Rcm extends SDKResource {
|
|
|
55
58
|
* Access Policy Actions: `FHIR:Create, FHIR:Update`
|
|
56
59
|
* Access Policy Resource: `FHIR:Claim`
|
|
57
60
|
*/
|
|
58
|
-
submitProfessionalClaim
|
|
61
|
+
submitProfessionalClaim(
|
|
59
62
|
params: RcmSubmitProfessionalClaimParams,
|
|
60
63
|
request?: OystehrClientRequest
|
|
61
|
-
): Promise<RcmSubmitProfessionalClaimResponse>
|
|
62
|
-
this.request('/rcm/professional-claim/submit', 'post')(params, request);
|
|
64
|
+
): Promise<RcmSubmitProfessionalClaimResponse> {
|
|
65
|
+
return this.request('/rcm/professional-claim/submit', 'post')(params, request);
|
|
66
|
+
}
|
|
63
67
|
}
|
|
@@ -24,31 +24,36 @@ export class Role extends SDKResource {
|
|
|
24
24
|
* Access Policy Action: `IAM:ListAllRoles`
|
|
25
25
|
* Access Policy Resource: `IAM:Role`
|
|
26
26
|
*/
|
|
27
|
-
list
|
|
27
|
+
list(request?: OystehrClientRequest): Promise<RoleListResponse> {
|
|
28
|
+
return this.request('/iam/role', 'get')(request);
|
|
29
|
+
}
|
|
28
30
|
/**
|
|
29
31
|
* 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/).
|
|
30
32
|
*
|
|
31
33
|
* Access Policy Action: `IAM:CreateRole`
|
|
32
34
|
* Access Policy Resource: `IAM:Role`
|
|
33
35
|
*/
|
|
34
|
-
create
|
|
35
|
-
this.request('/iam/role', 'post')(params, request);
|
|
36
|
+
create(params: RoleCreateParams, request?: OystehrClientRequest): Promise<RoleCreateResponse> {
|
|
37
|
+
return this.request('/iam/role', 'post')(params, request);
|
|
38
|
+
}
|
|
36
39
|
/**
|
|
37
40
|
* 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/).
|
|
38
41
|
*
|
|
39
42
|
* Access Policy Action: `IAM:GetRole`
|
|
40
43
|
* Access Policy Resource: `IAM:Role`
|
|
41
44
|
*/
|
|
42
|
-
get
|
|
43
|
-
this.request('/iam/role/{roleId}', 'get')(params, request);
|
|
45
|
+
get(params: RoleGetParams, request?: OystehrClientRequest): Promise<RoleGetResponse> {
|
|
46
|
+
return this.request('/iam/role/{roleId}', 'get')(params, request);
|
|
47
|
+
}
|
|
44
48
|
/**
|
|
45
49
|
* 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/).
|
|
46
50
|
*
|
|
47
51
|
* Access Policy Action: `IAM:UpdateRole`
|
|
48
52
|
* Access Policy Resource: `IAM:Role`
|
|
49
53
|
*/
|
|
50
|
-
update
|
|
51
|
-
this.request('/iam/role/{roleId}', 'patch')(params, request);
|
|
54
|
+
update(params: RoleUpdateParams, request?: OystehrClientRequest): Promise<RoleUpdateResponse> {
|
|
55
|
+
return this.request('/iam/role/{roleId}', 'patch')(params, request);
|
|
56
|
+
}
|
|
52
57
|
/**
|
|
53
58
|
* 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/).
|
|
54
59
|
*
|
|
@@ -56,6 +61,7 @@ export class Role extends SDKResource {
|
|
|
56
61
|
* Access Policy Resource: `IAM:Role`
|
|
57
62
|
* Will fail if any entities hold the Role or if Role is assigned as the default patient role for the project
|
|
58
63
|
*/
|
|
59
|
-
delete
|
|
60
|
-
this.request('/iam/role/{roleId}', 'delete')(params, request);
|
|
64
|
+
delete(params: RoleDeleteParams, request?: OystehrClientRequest): Promise<void> {
|
|
65
|
+
return this.request('/iam/role/{roleId}', 'delete')(params, request);
|
|
66
|
+
}
|
|
61
67
|
}
|