@oystehr/sdk 4.1.2 → 4.1.3

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 (72) 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/fax.cjs.map +1 -1
  4. package/dist/cjs/resources/classes/fax.d.ts +2 -2
  5. package/dist/cjs/resources/classes/fhir-ext.cjs +15 -2
  6. package/dist/cjs/resources/classes/fhir-ext.cjs.map +1 -1
  7. package/dist/cjs/resources/classes/lab.cjs +1 -1
  8. package/dist/cjs/resources/classes/lab.cjs.map +1 -1
  9. package/dist/cjs/resources/classes/lab.d.ts +4 -4
  10. package/dist/cjs/resources/classes/m2m.cjs +9 -0
  11. package/dist/cjs/resources/classes/m2m.cjs.map +1 -1
  12. package/dist/cjs/resources/classes/m2m.d.ts +8 -1
  13. package/dist/cjs/resources/types/ErxCheckPractitionerEnrollmentResponse.d.ts +4 -0
  14. package/dist/cjs/resources/types/ErxEnrollPractitionerParams.d.ts +1 -0
  15. package/dist/cjs/resources/types/FaxOnboardResponse.d.ts +9 -0
  16. package/dist/cjs/resources/types/LabOrderSubmitResponse.d.ts +14 -0
  17. package/dist/cjs/resources/types/LabRouteCreateResponse.d.ts +9 -0
  18. package/dist/cjs/resources/types/LabRouteDeleteParams.d.ts +8 -0
  19. package/dist/cjs/resources/types/M2mMeResponse.d.ts +5 -0
  20. package/dist/cjs/resources/types/M2mUpdateParams.d.ts +4 -0
  21. package/dist/cjs/resources/types/UserUpdateParams.d.ts +5 -1
  22. package/dist/cjs/resources/types/ZambdaCreateParams.d.ts +6 -2
  23. package/dist/cjs/resources/types/ZambdaFunction.d.ts +5 -1
  24. package/dist/cjs/resources/types/ZambdaUpdateParams.d.ts +5 -1
  25. package/dist/cjs/resources/types/fhir.d.ts +3 -0
  26. package/dist/cjs/resources/types/index.d.ts +4 -0
  27. package/dist/esm/index.min.js +1 -1
  28. package/dist/esm/index.min.js.map +1 -1
  29. package/dist/esm/resources/classes/fax.d.ts +2 -2
  30. package/dist/esm/resources/classes/fax.js.map +1 -1
  31. package/dist/esm/resources/classes/fhir-ext.js +15 -2
  32. package/dist/esm/resources/classes/fhir-ext.js.map +1 -1
  33. package/dist/esm/resources/classes/lab.d.ts +4 -4
  34. package/dist/esm/resources/classes/lab.js +1 -1
  35. package/dist/esm/resources/classes/lab.js.map +1 -1
  36. package/dist/esm/resources/classes/m2m.d.ts +8 -1
  37. package/dist/esm/resources/classes/m2m.js +9 -0
  38. package/dist/esm/resources/classes/m2m.js.map +1 -1
  39. package/dist/esm/resources/types/ErxCheckPractitionerEnrollmentResponse.d.ts +4 -0
  40. package/dist/esm/resources/types/ErxEnrollPractitionerParams.d.ts +1 -0
  41. package/dist/esm/resources/types/FaxOnboardResponse.d.ts +9 -0
  42. package/dist/esm/resources/types/LabOrderSubmitResponse.d.ts +14 -0
  43. package/dist/esm/resources/types/LabRouteCreateResponse.d.ts +9 -0
  44. package/dist/esm/resources/types/LabRouteDeleteParams.d.ts +8 -0
  45. package/dist/esm/resources/types/M2mMeResponse.d.ts +5 -0
  46. package/dist/esm/resources/types/M2mUpdateParams.d.ts +4 -0
  47. package/dist/esm/resources/types/UserUpdateParams.d.ts +5 -1
  48. package/dist/esm/resources/types/ZambdaCreateParams.d.ts +6 -2
  49. package/dist/esm/resources/types/ZambdaFunction.d.ts +5 -1
  50. package/dist/esm/resources/types/ZambdaUpdateParams.d.ts +5 -1
  51. package/dist/esm/resources/types/fhir.d.ts +3 -0
  52. package/dist/esm/resources/types/index.d.ts +4 -0
  53. package/package.json +2 -2
  54. package/src/resources/classes/fax.ts +2 -2
  55. package/src/resources/classes/fhir-ext.ts +17 -2
  56. package/src/resources/classes/lab.ts +5 -3
  57. package/src/resources/classes/m2m.ts +10 -0
  58. package/src/resources/types/ErxCheckPractitionerEnrollmentResponse.ts +4 -0
  59. package/src/resources/types/ErxEnrollPractitionerParams.ts +1 -0
  60. package/src/resources/types/FaxOnboardResponse.ts +11 -0
  61. package/src/resources/types/LabOrderSubmitResponse.ts +16 -0
  62. package/src/resources/types/LabRouteCreateResponse.ts +11 -0
  63. package/src/resources/types/LabRouteDeleteParams.ts +8 -0
  64. package/src/resources/types/M2mMeResponse.ts +7 -0
  65. package/src/resources/types/M2mUpdateParams.ts +4 -0
  66. package/src/resources/types/UserUpdateParams.ts +5 -1
  67. package/src/resources/types/ZambdaCreateParams.ts +6 -2
  68. package/src/resources/types/ZambdaFunction.ts +5 -1
  69. package/src/resources/types/ZambdaUpdateParams.ts +5 -1
  70. package/src/resources/types/fhir.ts +3 -0
  71. package/src/resources/types/index.ts +4 -0
  72. package/dist/esm/node_modules/tslib/package.json +0 -1
@@ -6,7 +6,9 @@ import {
6
6
  LabOrderableItemQuestionnaireGetParams,
7
7
  LabOrderableItemQuestionnaireGetResponse,
8
8
  LabOrderSubmitParams,
9
+ LabOrderSubmitResponse,
9
10
  LabRouteCreateParams,
11
+ LabRouteCreateResponse,
10
12
  LabRouteDeleteParams,
11
13
  LabRouteListResponse,
12
14
  OystehrClientRequest,
@@ -38,7 +40,7 @@ export class Lab extends SDKResource {
38
40
  * Action: `Lab:CreateRoute`
39
41
  * Access Policy Resource: `Lab:Route`
40
42
  */
41
- routeCreate(params: LabRouteCreateParams, request?: OystehrClientRequest): Promise<void> {
43
+ routeCreate(params: LabRouteCreateParams, request?: OystehrClientRequest): Promise<LabRouteCreateResponse> {
42
44
  return this.request('/route', 'post', this.#baseUrlThunk.bind(this))(params, request);
43
45
  }
44
46
  /**
@@ -101,13 +103,13 @@ export class Lab extends SDKResource {
101
103
  )(params, request);
102
104
  }
103
105
  /**
104
- * 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.
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.
105
107
  *
106
108
  * Access Policy Requirements:
107
109
  * Action: `Lab:SubmitOrder`
108
110
  * Access Policy Resource: `Lab:Order`
109
111
  */
110
- orderSubmit(params: LabOrderSubmitParams, request?: OystehrClientRequest): Promise<void> {
112
+ orderSubmit(params: LabOrderSubmitParams, request?: OystehrClientRequest): Promise<LabOrderSubmitResponse> {
111
113
  return this.request('/submit', 'post', this.#baseUrlThunk.bind(this))(params, request);
112
114
  }
113
115
  }
@@ -9,6 +9,7 @@ import {
9
9
  M2mListResponse,
10
10
  M2mListV2Params,
11
11
  M2mListV2Response,
12
+ M2mMeResponse,
12
13
  M2mRotateSecretParams,
13
14
  M2mRotateSecretResponse,
14
15
  M2mUpdateParams,
@@ -45,6 +46,15 @@ export class M2m extends SDKResource {
45
46
  create(params: M2mCreateParams, request?: OystehrClientRequest): Promise<M2mCreateResponse> {
46
47
  return this.request('/m2m', 'post', this.#baseUrlThunk.bind(this))(params, request);
47
48
  }
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).
51
+ *
52
+ * Access Policy Action: `App:GetM2MClient`
53
+ * Access Policy Resource: `IAM:M2MClient`
54
+ */
55
+ me(request?: OystehrClientRequest): Promise<M2mMeResponse> {
56
+ return this.request('/m2m/me', 'get', this.#baseUrlThunk.bind(this))(request);
57
+ }
48
58
  /**
49
59
  * Get the M2M Client with the provided ID. [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
60
  *
@@ -24,4 +24,8 @@ export interface ErxCheckPractitionerEnrollmentResponse {
24
24
  * Whether the practitioner has enrolled in two-factor authentication with the upstream eRx provider.
25
25
  */
26
26
  twoFactorEnrolled: boolean;
27
+ /**
28
+ * Whether the practitioner is enrolled as a prescribing practitioner.
29
+ */
30
+ isPrescribing: boolean;
27
31
  }
@@ -2,4 +2,5 @@
2
2
 
3
3
  export interface ErxEnrollPractitionerParams {
4
4
  practitionerId: string;
5
+ isPrescribing?: boolean;
5
6
  }
@@ -0,0 +1,11 @@
1
+ // AUTOGENERATED -- DO NOT EDIT
2
+
3
+ /**
4
+ * Fax number onboarded successfully.
5
+ */
6
+ export interface FaxOnboardResponse {
7
+ /**
8
+ * The fax number that was purchased and assigned to your project in E.164 format.
9
+ */
10
+ faxNumber: string;
11
+ }
@@ -0,0 +1,16 @@
1
+ // AUTOGENERATED -- DO NOT EDIT
2
+
3
+ import { DocumentReference } from 'fhir/r4b';
4
+ /**
5
+ * Order submitted successfully. eReq and ABN may be available
6
+ */
7
+ export interface LabOrderSubmitResponse {
8
+ /**
9
+ * Lab generated electronic requisition document (eReq). To be sent with samples.
10
+ */
11
+ eRequisitionDocumentReference?: DocumentReference;
12
+ /**
13
+ * Advance Beneficiary Notice (ABN). To be signed by patient.
14
+ */
15
+ abnDocumentReference?: DocumentReference;
16
+ }
@@ -0,0 +1,11 @@
1
+ // AUTOGENERATED -- DO NOT EDIT
2
+
3
+ /**
4
+ * Route created successfully.
5
+ */
6
+ export interface LabRouteCreateResponse {
7
+ /**
8
+ * Unique identifier of the created Route.
9
+ */
10
+ routeGuid: string;
11
+ }
@@ -2,5 +2,13 @@
2
2
 
3
3
  export interface LabRouteDeleteParams {
4
4
  primaryId?: string;
5
+ /**
6
+ * Provided by the lab, indicates a financial relationship between the lab and the customer.
7
+ */
8
+ accountNumber: string;
9
+ /**
10
+ * Unique identifier of a lab. Searchable via orderable item Search.
11
+ */
12
+ labGuid: string;
5
13
  routeGuid: string;
6
14
  }
@@ -0,0 +1,7 @@
1
+ // AUTOGENERATED -- DO NOT EDIT
2
+
3
+ import { M2m } from './M2m';
4
+ /**
5
+ * M2M Client
6
+ */
7
+ export type M2mMeResponse = M2m;
@@ -20,5 +20,9 @@ export interface M2mUpdateParams {
20
20
  * An URL of JWK set used for getting an access token by signed authentication JWT
21
21
  */
22
22
  jwksUrl?: string;
23
+ /**
24
+ * A relative reference to a FHIR relative reference of the format Patient/{uuidV4}. Resource type must be one of Patient, Practitioner, Device.
25
+ */
26
+ profile?: string;
23
27
  id: string;
24
28
  }
@@ -5,8 +5,12 @@ import { AccessPolicy } from './AccessPolicy';
5
5
  export interface UserUpdateParams {
6
6
  accessPolicy?: AccessPolicy;
7
7
  /**
8
- * A list of Role IDs to assign to the user. If the accessPolicy property is not provided this property is required and may not be empty.
8
+ * A list of Role IDs to assign to the user.
9
9
  */
10
10
  roles?: string[];
11
+ /**
12
+ * A FHIR relative reference of the format Patient/{uuidV4}. Resource type must be one of Patient, Practitioner, Device.
13
+ */
14
+ profile?: string;
11
15
  id: string;
12
16
  }
@@ -13,9 +13,9 @@ export interface ZambdaCreateParams {
13
13
  triggerMethod?: 'http_auth' | 'http_open' | 'subscription' | 'cron';
14
14
  schedule?: ZambdaSchedule;
15
15
  /**
16
- * The runtime to use for the Zambda Function. This property is optional and defaults to "nodejs20.x".
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: 'nodejs18.x' | '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,4 +24,8 @@ 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;
27
31
  }
@@ -11,7 +11,7 @@ export interface ZambdaFunction {
11
11
  /**
12
12
  * The runtime of the Zambda Function.
13
13
  */
14
- runtime?: string;
14
+ runtime: string;
15
15
  /**
16
16
  * The Zambda Function status provides information about the Functions state including whether it is ready to be invoked.
17
17
  */
@@ -46,4 +46,8 @@ 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;
49
53
  }
@@ -13,7 +13,7 @@ export interface ZambdaUpdateParams {
13
13
  triggerMethod?: 'http_auth' | 'http_open' | 'subscription' | 'cron';
14
14
  schedule?: ZambdaSchedule;
15
15
  /**
16
- * The runtime to use for the Zambda Function. This property is optional and defaults to "nodejs20.x".
16
+ * The runtime to use for the Zambda Function.
17
17
  */
18
18
  runtime?: 'nodejs18.x' | 'nodejs20.x' | 'nodejs22.x' | 'python3.13' | 'python3.12' | 'java21' | 'dotnet9' | 'ruby3.3';
19
19
  /**
@@ -24,5 +24,9 @@ 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;
27
31
  id: string;
28
32
  }
@@ -94,6 +94,7 @@ export interface BatchInputDeleteRequest extends BatchInputBaseRequest {
94
94
 
95
95
  export interface BatchInputPutRequest<F extends FhirResource> extends BatchInputBaseRequest {
96
96
  method: 'PUT';
97
+ ifMatch?: string;
97
98
  resource: F;
98
99
  }
99
100
 
@@ -105,11 +106,13 @@ export interface BatchInputPostRequest<F extends FhirResource> extends BatchInpu
105
106
 
106
107
  export interface BatchInputBinaryPatchRequest<F extends FhirResource> extends BatchInputBaseRequest {
107
108
  method: 'PATCH';
109
+ ifMatch?: string;
108
110
  resource: Binary<F>;
109
111
  }
110
112
 
111
113
  export interface BatchInputJSONPatchRequest extends BatchInputBaseRequest {
112
114
  method: 'PATCH';
115
+ ifMatch?: string;
113
116
  operations: Operation[];
114
117
  }
115
118
 
@@ -57,6 +57,7 @@ export * from './DeveloperListV2Response';
57
57
  export * from './M2mListResponse';
58
58
  export * from './M2mCreateParams';
59
59
  export * from './M2mCreateResponse';
60
+ export * from './M2mMeResponse';
60
61
  export * from './M2mGetParams';
61
62
  export * from './M2mGetResponse';
62
63
  export * from './M2mUpdateParams';
@@ -165,16 +166,19 @@ export * from './ZambdaLogStreamSearchParams';
165
166
  export * from './ZambdaLogStreamSearchResponse';
166
167
  export * from './ZambdaLogStreamGetParams';
167
168
  export * from './ZambdaLogStreamGetResponse';
169
+ export * from './FaxOnboardResponse';
168
170
  export * from './FaxSendParams';
169
171
  export * from './FaxSendResponse';
170
172
  export * from './LabRouteListResponse';
171
173
  export * from './LabRouteCreateParams';
174
+ export * from './LabRouteCreateResponse';
172
175
  export * from './LabRouteDeleteParams';
173
176
  export * from './LabOrderableItemListParams';
174
177
  export * from './LabOrderableItemListResponse';
175
178
  export * from './LabOrderableItemQuestionnaireGetParams';
176
179
  export * from './LabOrderableItemQuestionnaireGetResponse';
177
180
  export * from './LabOrderSubmitParams';
181
+ export * from './LabOrderSubmitResponse';
178
182
  export * from './ErxSearchAllergensParams';
179
183
  export * from './ErxSearchAllergensResponse';
180
184
  export * from './ErxSearchMedicationsParams';
@@ -1 +0,0 @@
1
- {"type": "module"}