@oystehr/sdk 4.1.3 → 4.1.6

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.
Files changed (54) hide show
  1. package/dist/cjs/index.min.cjs +1 -1
  2. package/dist/cjs/index.min.cjs.map +1 -1
  3. package/dist/cjs/resources/classes/erx.cjs +27 -3
  4. package/dist/cjs/resources/classes/erx.cjs.map +1 -1
  5. package/dist/cjs/resources/classes/erx.d.ts +29 -3
  6. package/dist/cjs/resources/classes/fax.cjs +10 -0
  7. package/dist/cjs/resources/classes/fax.cjs.map +1 -1
  8. package/dist/cjs/resources/classes/fax.d.ts +9 -1
  9. package/dist/cjs/resources/classes/lab.cjs +1 -1
  10. package/dist/cjs/resources/classes/lab.cjs.map +1 -1
  11. package/dist/cjs/resources/classes/lab.d.ts +1 -1
  12. package/dist/cjs/resources/classes/m2m.cjs +1 -1
  13. package/dist/cjs/resources/classes/m2m.cjs.map +1 -1
  14. package/dist/cjs/resources/classes/m2m.d.ts +1 -1
  15. package/dist/cjs/resources/types/Application.d.ts +4 -0
  16. package/dist/cjs/resources/types/FaxGetConfigurationResponse.d.ts +13 -0
  17. package/dist/cjs/resources/types/LabOrderSubmitParams.d.ts +6 -2
  18. package/dist/cjs/resources/types/ZambdaCreateParams.d.ts +1 -5
  19. package/dist/cjs/resources/types/ZambdaFunction.d.ts +0 -4
  20. package/dist/cjs/resources/types/ZambdaUpdateParams.d.ts +1 -5
  21. package/dist/cjs/resources/types/index.d.ts +1 -0
  22. package/dist/esm/index.min.js +1 -1
  23. package/dist/esm/index.min.js.map +1 -1
  24. package/dist/esm/resources/classes/erx.d.ts +29 -3
  25. package/dist/esm/resources/classes/erx.js +27 -3
  26. package/dist/esm/resources/classes/erx.js.map +1 -1
  27. package/dist/esm/resources/classes/fax.d.ts +9 -1
  28. package/dist/esm/resources/classes/fax.js +10 -0
  29. package/dist/esm/resources/classes/fax.js.map +1 -1
  30. package/dist/esm/resources/classes/lab.d.ts +1 -1
  31. package/dist/esm/resources/classes/lab.js +1 -1
  32. package/dist/esm/resources/classes/lab.js.map +1 -1
  33. package/dist/esm/resources/classes/m2m.d.ts +1 -1
  34. package/dist/esm/resources/classes/m2m.js +1 -1
  35. package/dist/esm/resources/classes/m2m.js.map +1 -1
  36. package/dist/esm/resources/types/Application.d.ts +4 -0
  37. package/dist/esm/resources/types/FaxGetConfigurationResponse.d.ts +13 -0
  38. package/dist/esm/resources/types/LabOrderSubmitParams.d.ts +6 -2
  39. package/dist/esm/resources/types/ZambdaCreateParams.d.ts +1 -5
  40. package/dist/esm/resources/types/ZambdaFunction.d.ts +0 -4
  41. package/dist/esm/resources/types/ZambdaUpdateParams.d.ts +1 -5
  42. package/dist/esm/resources/types/index.d.ts +1 -0
  43. package/package.json +2 -2
  44. package/src/resources/classes/erx.ts +31 -3
  45. package/src/resources/classes/fax.ts +17 -1
  46. package/src/resources/classes/lab.ts +1 -1
  47. package/src/resources/classes/m2m.ts +1 -1
  48. package/src/resources/types/Application.ts +4 -0
  49. package/src/resources/types/FaxGetConfigurationResponse.ts +15 -0
  50. package/src/resources/types/LabOrderSubmitParams.ts +6 -2
  51. package/src/resources/types/ZambdaCreateParams.ts +1 -5
  52. package/src/resources/types/ZambdaFunction.ts +0 -4
  53. package/src/resources/types/ZambdaUpdateParams.ts +1 -5
  54. package/src/resources/types/index.ts +1 -0
@@ -34,6 +34,8 @@ export class Erx extends SDKResource {
34
34
  }
35
35
  /**
36
36
  * Search for allergens.
37
+ * Action: `eRx:SearchAllergen`
38
+ * Access Policy Resource: `eRx:Allergen`
37
39
  */
38
40
  searchAllergens(
39
41
  params: ErxSearchAllergensParams,
@@ -43,6 +45,8 @@ export class Erx extends SDKResource {
43
45
  }
44
46
  /**
45
47
  * Search for medications.
48
+ * Action: `eRx:SearchMedication`
49
+ * Access Policy Resource: `eRx:Medication`
46
50
  */
47
51
  searchMedications(
48
52
  params: ErxSearchMedicationsParams,
@@ -52,12 +56,16 @@ export class Erx extends SDKResource {
52
56
  }
53
57
  /**
54
58
  * Get eRx configuration for project.
59
+ * Action: `eRx:GetConfiguration`
60
+ * Access Policy Resource: `eRx:Configuration`
55
61
  */
56
62
  getConfiguration(request?: OystehrClientRequest): Promise<ErxGetConfigurationResponse> {
57
63
  return this.request('/config', 'get', this.#baseUrlThunk.bind(this))(request);
58
64
  }
59
65
  /**
60
- * Checks for drug-allergy interactions for a patient. This endpoint requires the patient's allergies to be synced with the upstream eRx provider.
66
+ * Check for drug-allergy interactions for a patient. This endpoint requires the patient's allergies to be synced with the upstream eRx provider.
67
+ * Action: `eRx:Check`
68
+ * Access Policy Resource: `eRx:Interaction`
61
69
  */
62
70
  checkAllergyInteractions(
63
71
  params: ErxCheckAllergyInteractionsParams,
@@ -70,7 +78,9 @@ export class Erx extends SDKResource {
70
78
  )(params, request);
71
79
  }
72
80
  /**
73
- * Checks for drug-drug interactions for a patient. This endpoint requires the patient's medications to be synced with the upstream eRx provider.
81
+ * Check for drug-drug interactions for a patient. This endpoint requires the patient's medications to be synced with the upstream eRx provider.
82
+ * Action: `eRx:Check`
83
+ * Access Policy Resource: `eRx:Interaction`
74
84
  */
75
85
  checkMedicationInteractions(
76
86
  params: ErxCheckMedicationInteractionsParams,
@@ -83,7 +93,9 @@ export class Erx extends SDKResource {
83
93
  )(params, request);
84
94
  }
85
95
  /**
86
- * Checks for drug-allergy and drug-drug interactions with a specific drug for a patient. This endpoint requires the patient's allergies and medications to be synced with the upstream eRx provider.
96
+ * Check for drug-allergy and drug-drug interactions with a specific drug for a patient. This endpoint requires the patient's allergies and medications to be synced with the upstream eRx provider.
97
+ * Action: `eRx:Check`
98
+ * Access Policy Resource: `eRx:Interaction`
87
99
  */
88
100
  checkPrecheckInteractions(
89
101
  params: ErxCheckPrecheckInteractionsParams,
@@ -97,6 +109,8 @@ export class Erx extends SDKResource {
97
109
  }
98
110
  /**
99
111
  * Cancel prescription for patient.
112
+ * Action: `eRx:CancelPrescription`
113
+ * Access Policy Resource: `eRx:Prescription`
100
114
  */
101
115
  cancelPrescription(params: ErxCancelPrescriptionParams, request?: OystehrClientRequest): Promise<void> {
102
116
  return this.request(
@@ -107,12 +121,16 @@ export class Erx extends SDKResource {
107
121
  }
108
122
  /**
109
123
  * Syncs demographic, allergy, and medication data for a patient with the upstream eRx provider.
124
+ * Action: `eRx:SyncPatient`
125
+ * Access Policy Resource: `eRx:Patient`
110
126
  */
111
127
  syncPatient(params: ErxSyncPatientParams, request?: OystehrClientRequest): Promise<void> {
112
128
  return this.request('/patient/{patientId}/sync', 'post', this.#baseUrlThunk.bind(this))(params, request);
113
129
  }
114
130
  /**
115
131
  * Create an SSO link for a practitioner. This link can be used to log in to the eRx service as the specified practitioner.
132
+ * Action: `eRx:Connect`
133
+ * Access Policy Resource: `eRx:SSO`
116
134
  */
117
135
  connectPractitioner(
118
136
  params: ErxConnectPractitionerParams,
@@ -120,10 +138,14 @@ export class Erx extends SDKResource {
120
138
  ): Promise<ErxConnectPractitionerResponse>;
121
139
  /**
122
140
  * Create an SSO link for a practitioner. This link can be used to log in to the eRx service as the specified practitioner.
141
+ * Action: `eRx:Connect`
142
+ * Access Policy Resource: `eRx:SSO`
123
143
  */
124
144
  connectPractitioner(request?: OystehrClientRequest): Promise<ErxConnectPractitionerResponse>;
125
145
  /**
126
146
  * Create an SSO link for a practitioner. This link can be used to log in to the eRx service as the specified practitioner.
147
+ * Action: `eRx:Connect`
148
+ * Access Policy Resource: `eRx:SSO`
127
149
  */
128
150
  connectPractitioner(
129
151
  params?: ErxConnectPractitionerParams | OystehrClientRequest,
@@ -133,6 +155,8 @@ export class Erx extends SDKResource {
133
155
  }
134
156
  /**
135
157
  * Check eRx enrollment for a practitioner.
158
+ * Action: `eRx:Read`
159
+ * Access Policy Resource: `eRx:Enrollment`
136
160
  */
137
161
  checkPractitionerEnrollment(
138
162
  params: ErxCheckPractitionerEnrollmentParams,
@@ -142,12 +166,16 @@ export class Erx extends SDKResource {
142
166
  }
143
167
  /**
144
168
  * Enroll a practitioner in the eRx service.
169
+ * Action: `eRx:Create`
170
+ * Access Policy Resource: `eRx:Enrollment`
145
171
  */
146
172
  enrollPractitioner(params: ErxEnrollPractitionerParams, request?: OystehrClientRequest): Promise<void> {
147
173
  return this.request('/practitioner/{practitionerId}', 'post', this.#baseUrlThunk.bind(this))(params, request);
148
174
  }
149
175
  /**
150
176
  * Unenroll a practitioner from the eRx service.
177
+ * Action: `eRx:Delete`
178
+ * Access Policy Resource: `eRx:Enrollment`
151
179
  */
152
180
  unenrollPractitioner(params: ErxUnenrollPractitionerParams, request?: OystehrClientRequest): Promise<void> {
153
181
  return this.request('/practitioner/{practitionerId}', 'delete', this.#baseUrlThunk.bind(this))(params, request);
@@ -1,6 +1,12 @@
1
1
  // AUTOGENERATED -- DO NOT EDIT
2
2
 
3
- import { FaxOnboardResponse, FaxSendParams, FaxSendResponse, OystehrClientRequest } from '../..';
3
+ import {
4
+ FaxGetConfigurationResponse,
5
+ FaxOnboardResponse,
6
+ FaxSendParams,
7
+ FaxSendResponse,
8
+ OystehrClientRequest,
9
+ } from '../..';
4
10
  import { SDKResource } from '../../client/client';
5
11
  import { OystehrConfig } from '../../config';
6
12
 
@@ -31,6 +37,16 @@ export class Fax extends SDKResource {
31
37
  onboard(request?: OystehrClientRequest): Promise<FaxOnboardResponse> {
32
38
  return this.request('/onboard', 'post', this.#baseUrlThunk.bind(this))(request);
33
39
  }
40
+ /**
41
+ * Get fax service configuration.
42
+ *
43
+ * Access Policy Requirements:
44
+ * Action: `Fax:GetConfiguration`
45
+ * Access Policy Resource: `Fax:Configuration`
46
+ */
47
+ getConfiguration(request?: OystehrClientRequest): Promise<FaxGetConfigurationResponse> {
48
+ return this.request('/config', 'get', this.#baseUrlThunk.bind(this))(request);
49
+ }
34
50
  /**
35
51
  * Send a fax. Oystehr's [fax sending](https://docs.oystehr.com/oystehr/services/fax/send/) feature makes it easy to send a fax to a chosen recipient with a single API call. You can use this feature to send referrals, medical records, prescriptions, and other documents that require fax transmission e.g. for HIPAA compliance.
36
52
  *
@@ -103,7 +103,7 @@ export class Lab extends SDKResource {
103
103
  )(params, request);
104
104
  }
105
105
  /**
106
- * Submit a lab order. Oystehr's [Submit Lab](https://docs.oystehr.com/oystehr/services/lab/submit-an-order/) feature allows users to submit a well configured ServiceRequest to an external lab. In order to successfully submit an order, a [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#create-route) to and Organization representing that lab must exist. If the lab requires its own requisition document (eReq) or an Advance Beneficiary Notice (ABN), the appropriate DocumentReferences will be included in the response.
106
+ * Submit a lab order. Oystehr's [Submit Lab](https://docs.oystehr.com/oystehr/services/lab/submit-an-order/) feature allows users to submit an order consisting of one or more well-configured ServiceRequests to an external lab. In order to successfully submit an order, a [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#create-route) to and Organization representing that lab must exist. If the lab requires its own requisition document (eReq) or an Advance Beneficiary Notice (ABN), the appropriate DocumentReferences will be included in the response.
107
107
  *
108
108
  * Access Policy Requirements:
109
109
  * Action: `Lab:SubmitOrder`
@@ -47,7 +47,7 @@ export class M2m extends SDKResource {
47
47
  return this.request('/m2m', 'post', this.#baseUrlThunk.bind(this))(params, request);
48
48
  }
49
49
  /**
50
- * Get information about the calling M2M Client [M2M Clients](https://docs.oystehr.com/oystehr/services/iam/m2m-clients) are used to access Oystehr APIs from scripts and server-side code like [Zambda Functions](https://docs.oystehr.com/oystehr/services/zambda).
50
+ * Get information about the calling M2M Client. [M2M Clients](https://docs.oystehr.com/oystehr/services/iam/m2m-clients) are used to access Oystehr APIs from scripts and server-side code like [Zambda Functions](https://docs.oystehr.com/oystehr/services/zambda).
51
51
  *
52
52
  * Access Policy Action: `App:GetM2MClient`
53
53
  * Access Policy Resource: `IAM:M2MClient`
@@ -10,6 +10,10 @@ export interface Application {
10
10
  * The Application's OAuth 2.0 client identifier.
11
11
  */
12
12
  clientId: string;
13
+ /**
14
+ * The Application's connection name for use with frontend components.
15
+ */
16
+ connectionName?: string;
13
17
  /**
14
18
  * A description of the application to help you differentiate it from other applications in the project. This value is not displayed to end users.
15
19
  */
@@ -0,0 +1,15 @@
1
+ // AUTOGENERATED -- DO NOT EDIT
2
+
3
+ /**
4
+ * Successfully retrieved fax service configuration.
5
+ */
6
+ export interface FaxGetConfigurationResponse {
7
+ /**
8
+ * True if the project is configured with the fax service.
9
+ */
10
+ configured: boolean;
11
+ /**
12
+ * An array of fax numbers assigned to your project in E.164 format.
13
+ */
14
+ faxNumbers?: string[];
15
+ }
@@ -7,7 +7,11 @@ export interface LabOrderSubmitParams {
7
7
  */
8
8
  accountNumber: string;
9
9
  /**
10
- * Valid ServiceRequest FHIR resource representing an order. See [Submit Lab](https://docs.oystehr.com/oystehr/services/lab/submit-an-order/) for more details.
10
+ * Reference to a valid ServiceRequest FHIR resource representing an order. See [Submit Lab](https://docs.oystehr.com/oystehr/services/lab/submit-an-order/) for more details.
11
11
  */
12
- serviceRequest: string;
12
+ serviceRequest: string | string[];
13
+ /**
14
+ * A client-provided string used to identify all tests in an order. See [Submit Lab](https://docs.oystehr.com/oystehr/services/lab/submit-an-order/#client-provided-order-number/) for more details.
15
+ */
16
+ orderNumber?: string;
13
17
  }
@@ -15,7 +15,7 @@ export interface ZambdaCreateParams {
15
15
  /**
16
16
  * The runtime to use for the Zambda Function.
17
17
  */
18
- runtime: 'nodejs18.x' | 'nodejs20.x' | 'nodejs22.x' | 'python3.13' | 'python3.12' | 'java21' | 'dotnet9' | 'ruby3.3';
18
+ runtime: 'nodejs20.x' | 'nodejs22.x' | 'python3.13' | 'python3.12' | 'java21' | 'dotnet9' | 'ruby3.3';
19
19
  /**
20
20
  * The amount of memory in MB to allocate to the Zambda Function. If not specified, a system default (1024MB) will be used. Min: 128MB, Max: 10240MB.
21
21
  */
@@ -24,8 +24,4 @@ export interface ZambdaCreateParams {
24
24
  * The timeout for the Zambda Function in seconds. If not specified, a system default (27 seconds) will be used. Min: 1s, Max: 900s (15 minutes). Note: For 'http_auth' and 'http_open' trigger methods, the timeout cannot exceed 27 seconds due to API Gateway limitations.
25
25
  */
26
26
  timeoutInSeconds?: number;
27
- /**
28
- * The ID of the IAM role that the Zambda Function will assume when it is invoked.
29
- */
30
- executionRoleId?: string;
31
27
  }
@@ -46,8 +46,4 @@ export interface ZambdaFunction {
46
46
  * The timeout for the Zambda Function in seconds. If not specified, a system default (27 seconds) will be used. Min: 1s, Max: 900s (15 minutes). Note: For 'http_auth' and 'http_open' trigger methods, the timeout cannot exceed 27 seconds due to API Gateway limitations.
47
47
  */
48
48
  timeoutInSeconds?: number;
49
- /**
50
- * The ID of the IAM role that the Zambda Function will assume when it is invoked.
51
- */
52
- executionRoleId?: string;
53
49
  }
@@ -15,7 +15,7 @@ export interface ZambdaUpdateParams {
15
15
  /**
16
16
  * The runtime to use for the Zambda Function.
17
17
  */
18
- runtime?: 'nodejs18.x' | 'nodejs20.x' | 'nodejs22.x' | 'python3.13' | 'python3.12' | 'java21' | 'dotnet9' | 'ruby3.3';
18
+ runtime?: 'nodejs20.x' | 'nodejs22.x' | 'python3.13' | 'python3.12' | 'java21' | 'dotnet9' | 'ruby3.3';
19
19
  /**
20
20
  * The amount of memory in MB to allocate to the Zambda Function. If not specified, a system default (1024MB) will be used. Min: 128MB, Max: 10240MB.
21
21
  */
@@ -24,9 +24,5 @@ export interface ZambdaUpdateParams {
24
24
  * The timeout for the Zambda Function in seconds. If not specified, a system default (27 seconds) will be used. Min: 1s, Max: 900s (15 minutes). Note: For 'http_auth' and 'http_open' trigger methods, the timeout cannot exceed 27 seconds due to API Gateway limitations.
25
25
  */
26
26
  timeoutInSeconds?: number;
27
- /**
28
- * The ID of the IAM role that the Zambda Function will assume when it is invoked.
29
- */
30
- executionRoleId?: string;
31
27
  id: string;
32
28
  }
@@ -167,6 +167,7 @@ export * from './ZambdaLogStreamSearchResponse';
167
167
  export * from './ZambdaLogStreamGetParams';
168
168
  export * from './ZambdaLogStreamGetResponse';
169
169
  export * from './FaxOnboardResponse';
170
+ export * from './FaxGetConfigurationResponse';
170
171
  export * from './FaxSendParams';
171
172
  export * from './FaxSendResponse';
172
173
  export * from './LabRouteListResponse';