@oystehr/sdk 3.0.3 → 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.
Files changed (141) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/config.d.ts +8 -0
  3. package/dist/cjs/index.cjs +811 -640
  4. package/dist/cjs/index.cjs.map +1 -1
  5. package/dist/cjs/index.min.cjs +1 -1
  6. package/dist/cjs/index.min.cjs.map +1 -1
  7. package/dist/cjs/resources/classes/application.d.ts +8 -8
  8. package/dist/cjs/resources/classes/charge.d.ts +2 -2
  9. package/dist/cjs/resources/classes/conversation.d.ts +5 -5
  10. package/dist/cjs/resources/classes/developer.d.ts +6 -6
  11. package/dist/cjs/resources/classes/erx.d.ts +8 -4
  12. package/dist/cjs/resources/classes/m2m.d.ts +7 -7
  13. package/dist/cjs/resources/classes/messaging.d.ts +1 -1
  14. package/dist/cjs/resources/classes/paymentMethod.d.ts +4 -4
  15. package/dist/cjs/resources/classes/project.d.ts +2 -2
  16. package/dist/cjs/resources/classes/rcm.d.ts +3 -3
  17. package/dist/cjs/resources/classes/role.d.ts +5 -5
  18. package/dist/cjs/resources/classes/secret.d.ts +4 -4
  19. package/dist/cjs/resources/classes/telemed.d.ts +2 -2
  20. package/dist/cjs/resources/classes/transactionalSMS.d.ts +1 -1
  21. package/dist/cjs/resources/classes/user.d.ts +7 -7
  22. package/dist/cjs/resources/classes/version.d.ts +1 -1
  23. package/dist/cjs/resources/classes/z3.d.ts +7 -7
  24. package/dist/cjs/resources/classes/zambda.d.ts +8 -8
  25. package/dist/cjs/resources/classes/zambdaLogStream.d.ts +3 -3
  26. package/dist/cjs/resources/types/ConversationAddParticipantParams.d.ts +1 -1
  27. package/dist/cjs/resources/types/ConversationCreateResponse.d.ts +1 -1
  28. package/dist/cjs/resources/types/ConversationRemoveParticipantParams.d.ts +1 -1
  29. package/dist/cjs/resources/types/ErxMedicationSearchV2Params.d.ts +4 -0
  30. package/dist/cjs/resources/types/ErxMedicationSearchV2Response.d.ts +38 -0
  31. package/dist/cjs/resources/types/TelemedCreateMeetingParams.d.ts +1 -1
  32. package/dist/cjs/resources/types/TelemedCreateMeetingResponse.d.ts +1 -1
  33. package/dist/cjs/resources/types/Z3ListObjectsParams.d.ts +1 -0
  34. package/dist/cjs/resources/types/index.d.ts +2 -0
  35. package/dist/esm/client/client.js +14 -11
  36. package/dist/esm/client/client.js.map +1 -1
  37. package/dist/esm/config.d.ts +8 -0
  38. package/dist/esm/index.min.js +1 -1
  39. package/dist/esm/index.min.js.map +1 -1
  40. package/dist/esm/node_modules/tslib/tslib.es6.js +1 -1
  41. package/dist/esm/node_modules/tslib/tslib.es6.js.map +1 -1
  42. package/dist/esm/resources/classes/application.d.ts +8 -8
  43. package/dist/esm/resources/classes/application.js +72 -56
  44. package/dist/esm/resources/classes/application.js.map +1 -1
  45. package/dist/esm/resources/classes/charge.d.ts +2 -2
  46. package/dist/esm/resources/classes/charge.js +28 -24
  47. package/dist/esm/resources/classes/charge.js.map +1 -1
  48. package/dist/esm/resources/classes/conversation.d.ts +5 -5
  49. package/dist/esm/resources/classes/conversation.js +59 -49
  50. package/dist/esm/resources/classes/conversation.js.map +1 -1
  51. package/dist/esm/resources/classes/developer.d.ts +6 -6
  52. package/dist/esm/resources/classes/developer.js +56 -44
  53. package/dist/esm/resources/classes/developer.js.map +1 -1
  54. package/dist/esm/resources/classes/erx.d.ts +8 -4
  55. package/dist/esm/resources/classes/erx.js +24 -12
  56. package/dist/esm/resources/classes/erx.js.map +1 -1
  57. package/dist/esm/resources/classes/fhir-ext.js +7 -1
  58. package/dist/esm/resources/classes/fhir-ext.js.map +1 -1
  59. package/dist/esm/resources/classes/m2m.d.ts +7 -7
  60. package/dist/esm/resources/classes/m2m.js +65 -51
  61. package/dist/esm/resources/classes/m2m.js.map +1 -1
  62. package/dist/esm/resources/classes/messaging.d.ts +1 -1
  63. package/dist/esm/resources/classes/messaging.js +6 -4
  64. package/dist/esm/resources/classes/messaging.js.map +1 -1
  65. package/dist/esm/resources/classes/paymentMethod.d.ts +4 -4
  66. package/dist/esm/resources/classes/paymentMethod.js +72 -64
  67. package/dist/esm/resources/classes/paymentMethod.js.map +1 -1
  68. package/dist/esm/resources/classes/project.d.ts +2 -2
  69. package/dist/esm/resources/classes/project.js +18 -14
  70. package/dist/esm/resources/classes/project.js.map +1 -1
  71. package/dist/esm/resources/classes/rcm.d.ts +3 -3
  72. package/dist/esm/resources/classes/rcm.js +39 -33
  73. package/dist/esm/resources/classes/rcm.js.map +1 -1
  74. package/dist/esm/resources/classes/role.d.ts +5 -5
  75. package/dist/esm/resources/classes/role.js +46 -36
  76. package/dist/esm/resources/classes/role.js.map +1 -1
  77. package/dist/esm/resources/classes/secret.d.ts +4 -4
  78. package/dist/esm/resources/classes/secret.js +36 -28
  79. package/dist/esm/resources/classes/secret.js.map +1 -1
  80. package/dist/esm/resources/classes/telemed.d.ts +2 -2
  81. package/dist/esm/resources/classes/telemed.js +27 -23
  82. package/dist/esm/resources/classes/telemed.js.map +1 -1
  83. package/dist/esm/resources/classes/transactionalSMS.d.ts +1 -1
  84. package/dist/esm/resources/classes/transactionalSMS.js +18 -16
  85. package/dist/esm/resources/classes/transactionalSMS.js.map +1 -1
  86. package/dist/esm/resources/classes/user.d.ts +7 -7
  87. package/dist/esm/resources/classes/user.js +64 -50
  88. package/dist/esm/resources/classes/user.js.map +1 -1
  89. package/dist/esm/resources/classes/version.d.ts +1 -1
  90. package/dist/esm/resources/classes/version.js +6 -4
  91. package/dist/esm/resources/classes/version.js.map +1 -1
  92. package/dist/esm/resources/classes/z3.d.ts +7 -7
  93. package/dist/esm/resources/classes/z3.js +55 -43
  94. package/dist/esm/resources/classes/z3.js.map +1 -1
  95. package/dist/esm/resources/classes/zambda.d.ts +8 -8
  96. package/dist/esm/resources/classes/zambda.js +71 -55
  97. package/dist/esm/resources/classes/zambda.js.map +1 -1
  98. package/dist/esm/resources/classes/zambdaLogStream.d.ts +3 -3
  99. package/dist/esm/resources/classes/zambdaLogStream.js +27 -21
  100. package/dist/esm/resources/classes/zambdaLogStream.js.map +1 -1
  101. package/dist/esm/resources/types/ConversationAddParticipantParams.d.ts +1 -1
  102. package/dist/esm/resources/types/ConversationCreateResponse.d.ts +1 -1
  103. package/dist/esm/resources/types/ConversationRemoveParticipantParams.d.ts +1 -1
  104. package/dist/esm/resources/types/ErxMedicationSearchV2Params.d.ts +4 -0
  105. package/dist/esm/resources/types/ErxMedicationSearchV2Response.d.ts +38 -0
  106. package/dist/esm/resources/types/TelemedCreateMeetingParams.d.ts +1 -1
  107. package/dist/esm/resources/types/TelemedCreateMeetingResponse.d.ts +1 -1
  108. package/dist/esm/resources/types/Z3ListObjectsParams.d.ts +1 -0
  109. package/dist/esm/resources/types/index.d.ts +2 -0
  110. package/package.json +3 -3
  111. package/src/client/client.ts +8 -3
  112. package/src/config.ts +8 -0
  113. package/src/resources/classes/application.ts +27 -19
  114. package/src/resources/classes/charge.ts +6 -4
  115. package/src/resources/classes/conversation.ts +15 -10
  116. package/src/resources/classes/developer.ts +18 -11
  117. package/src/resources/classes/erx.ts +21 -6
  118. package/src/resources/classes/fhir-ext.ts +8 -2
  119. package/src/resources/classes/m2m.ts +21 -13
  120. package/src/resources/classes/messaging.ts +3 -2
  121. package/src/resources/classes/paymentMethod.ts +12 -8
  122. package/src/resources/classes/project.ts +6 -3
  123. package/src/resources/classes/rcm.ts +12 -8
  124. package/src/resources/classes/role.ts +15 -9
  125. package/src/resources/classes/secret.ts +12 -7
  126. package/src/resources/classes/telemed.ts +7 -7
  127. package/src/resources/classes/transactionalSMS.ts +3 -2
  128. package/src/resources/classes/user.ts +21 -12
  129. package/src/resources/classes/version.ts +3 -1
  130. package/src/resources/classes/z3.ts +19 -14
  131. package/src/resources/classes/zambda.ts +25 -15
  132. package/src/resources/classes/zambdaLogStream.ts +9 -8
  133. package/src/resources/types/ConversationAddParticipantParams.ts +1 -1
  134. package/src/resources/types/ConversationCreateResponse.ts +1 -1
  135. package/src/resources/types/ConversationRemoveParticipantParams.ts +1 -1
  136. package/src/resources/types/ErxMedicationSearchV2Params.ts +6 -0
  137. package/src/resources/types/ErxMedicationSearchV2Response.ts +40 -0
  138. package/src/resources/types/TelemedCreateMeetingParams.ts +1 -1
  139. package/src/resources/types/TelemedCreateMeetingResponse.ts +1 -1
  140. package/src/resources/types/Z3ListObjectsParams.ts +1 -0
  141. package/src/resources/types/index.ts +2 -0
@@ -5,6 +5,8 @@ import {
5
5
  ErxAllergySearchResponse,
6
6
  ErxMedicationSearchParams,
7
7
  ErxMedicationSearchResponse,
8
+ ErxMedicationSearchV2Params,
9
+ ErxMedicationSearchV2Response,
8
10
  ErxSyncPatientParams,
9
11
  ErxSyncPatientResponse,
10
12
  OystehrClientRequest,
@@ -19,18 +21,31 @@ export class Erx extends SDKResource {
19
21
  /**
20
22
  * Retrieve patient properties from FHIR service and sync them with eRx service
21
23
  */
22
- syncPatient = (params: ErxSyncPatientParams, request?: OystehrClientRequest): Promise<ErxSyncPatientResponse> =>
23
- 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
+ }
24
27
  /**
25
28
  * Search for allergies
26
29
  */
27
- allergySearch = (params: ErxAllergySearchParams, request?: OystehrClientRequest): Promise<ErxAllergySearchResponse> =>
28
- 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
+ }
29
33
  /**
30
34
  * Search for medications. Provide at least one of code or name filters
31
35
  */
32
- medicationSearch = (
36
+ medicationSearch(
33
37
  params: ErxMedicationSearchParams,
34
38
  request?: OystehrClientRequest
35
- ): Promise<ErxMedicationSearchResponse> => this.request('/erx/medication/search', 'get')(params, request);
39
+ ): Promise<ErxMedicationSearchResponse> {
40
+ return this.request('/erx/medication/search', 'get')(params, request);
41
+ }
42
+ /**
43
+ * Search for medications. Provide at least one of code or name filters
44
+ */
45
+ medicationSearchV2(
46
+ params: ErxMedicationSearchV2Params,
47
+ request?: OystehrClientRequest
48
+ ): Promise<ErxMedicationSearchV2Response> {
49
+ return this.request('/erx/v2/medication/search', 'get')(params, request);
50
+ }
36
51
  }
@@ -160,9 +160,15 @@ function batchInputRequestToBundleEntryItem<T extends FhirResource>(
160
160
  return { name, value };
161
161
  })
162
162
  .reduce((acc, { name, value }) => {
163
- acc[name] = value;
163
+ if (!name) {
164
+ return acc;
165
+ }
166
+ if (!acc[name]) {
167
+ acc[name] = [];
168
+ }
169
+ acc[name].push(value);
164
170
  return acc;
165
- }, {} as Record<string, string>);
171
+ }, {} as Record<string, string[]>);
166
172
  const search = new URLSearchParams();
167
173
  addParamsToSearch(params, search);
168
174
  baseRequest.request.url = `${resource}?${search.toString()}`;
@@ -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 = (request?: OystehrClientRequest): Promise<M2mListResponse> => this.request('/m2m', 'get')(request);
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 = (params: M2mCreateParams, request?: OystehrClientRequest): Promise<M2mCreateResponse> =>
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 = (params: M2mGetParams, request?: OystehrClientRequest): Promise<M2mGetResponse> =>
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 = (params: M2mUpdateParams, request?: OystehrClientRequest): Promise<M2mUpdateResponse> =>
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 = (params: M2mDeleteParams, request?: OystehrClientRequest): Promise<void> =>
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 = (params: M2mRotateSecretParams, request?: OystehrClientRequest): Promise<M2mRotateSecretResponse> =>
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 = (params: M2mListV2Params, request?: OystehrClientRequest): Promise<M2mListV2Response> =>
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 = (request?: OystehrClientRequest): Promise<MessagingGetMessagingConfigResponse> =>
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 = (params: PaymentMethodSetUpParams, request?: OystehrClientRequest): Promise<PaymentMethodSetUpResponse> =>
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 = (params: PaymentMethodSetDefaultParams, request?: OystehrClientRequest): Promise<void> =>
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 = (params: PaymentMethodDeleteParams, request?: OystehrClientRequest): Promise<void> =>
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 = (params: PaymentMethodListParams, request?: OystehrClientRequest): Promise<PaymentMethodListResponse> =>
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 = (request?: OystehrClientRequest): Promise<ProjectGetResponse> => this.request('/project', 'get')(request);
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 = (params: ProjectUpdateParams, request?: OystehrClientRequest): Promise<ProjectUpdateResponse> =>
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> => this.request('/rcm/eligibility-check', 'post')(params, request);
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 = (request?: OystehrClientRequest): Promise<RoleListResponse> => this.request('/iam/role', 'get')(request);
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 = (params: RoleCreateParams, request?: OystehrClientRequest): Promise<RoleCreateResponse> =>
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 = (params: RoleGetParams, request?: OystehrClientRequest): Promise<RoleGetResponse> =>
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 = (params: RoleUpdateParams, request?: OystehrClientRequest): Promise<RoleUpdateResponse> =>
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 = (params: RoleDeleteParams, request?: OystehrClientRequest): Promise<void> =>
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
  }
@@ -22,29 +22,34 @@ export class Secret extends SDKResource {
22
22
  * Access Policy Action: `Zambda:ListAllSecrets`
23
23
  * Access Policy Resource: `Zambda:Secret`
24
24
  */
25
- list = (request?: OystehrClientRequest): Promise<SecretListResponse> => this.request('/secret', 'get')(request);
25
+ list(request?: OystehrClientRequest): Promise<SecretListResponse> {
26
+ return this.request('/secret', 'get')(request);
27
+ }
26
28
  /**
27
29
  * Create a secret for a project. If the secret is already defined, update it.
28
30
  *
29
31
  * Access Policy Action: `Zambda:CreateSecret`
30
32
  * Access Policy Resource: `Zambda:Secret`
31
33
  */
32
- set = (params: SecretSetParams, request?: OystehrClientRequest): Promise<SecretSetResponse> =>
33
- this.request('/secret', 'post')(params, request);
34
+ set(params: SecretSetParams, request?: OystehrClientRequest): Promise<SecretSetResponse> {
35
+ return this.request('/secret', 'post')(params, request);
36
+ }
34
37
  /**
35
38
  * Get the secret with the provided name.
36
39
  *
37
40
  * Access Policy Action: `Zambda:GetSecret`
38
41
  * Access Policy Resource: `Zambda:Secret`
39
42
  */
40
- get = (params: SecretGetParams, request?: OystehrClientRequest): Promise<SecretGetResponse> =>
41
- this.request('/secret/{name}', 'get')(params, request);
43
+ get(params: SecretGetParams, request?: OystehrClientRequest): Promise<SecretGetResponse> {
44
+ return this.request('/secret/{name}', 'get')(params, request);
45
+ }
42
46
  /**
43
47
  * Delete the secret with the provided name.
44
48
  *
45
49
  * Access Policy Action: `Zambda:DeleteSecret`
46
50
  * Access Policy Resource: `Zambda:Secret`
47
51
  */
48
- delete = (params: SecretDeleteParams, request?: OystehrClientRequest): Promise<void> =>
49
- this.request('/secret/{name}', 'delete')(params, request);
52
+ delete(params: SecretDeleteParams, request?: OystehrClientRequest): Promise<void> {
53
+ return this.request('/secret/{name}', 'delete')(params, request);
54
+ }
50
55
  }
@@ -25,10 +25,12 @@ export class Telemed extends SDKResource {
25
25
  * Action: `FHIR:Update`
26
26
  * Access Policy Resource: `FHIR:Encounter`
27
27
  */
28
- createMeeting = (
28
+ createMeeting(
29
29
  params: TelemedCreateMeetingParams,
30
30
  request?: OystehrClientRequest
31
- ): Promise<TelemedCreateMeetingResponse> => this.request('/telemed/v2/meeting', 'post')(params, request);
31
+ ): Promise<TelemedCreateMeetingResponse> {
32
+ return this.request('/telemed/v2/meeting', 'post')(params, request);
33
+ }
32
34
  /**
33
35
  * Get Meeting and Attendee objects necessary to join a telemedicine video meeting.
34
36
  *
@@ -39,9 +41,7 @@ export class Telemed extends SDKResource {
39
41
  * Action: `Telemed:AddAnonymousToMeeting`
40
42
  * Access Policy Resource: `Telemed:Meeting`
41
43
  */
42
- joinMeeting = (
43
- params: TelemedJoinMeetingParams,
44
- request?: OystehrClientRequest
45
- ): Promise<TelemedJoinMeetingResponse> =>
46
- this.request('/telemed/v2/meeting/{encounterId}/join', 'get')(params, request);
44
+ joinMeeting(params: TelemedJoinMeetingParams, request?: OystehrClientRequest): Promise<TelemedJoinMeetingResponse> {
45
+ return this.request('/telemed/v2/meeting/{encounterId}/join', 'get')(params, request);
46
+ }
47
47
  }
@@ -23,6 +23,7 @@ export class TransactionalSMS extends SDKResource {
23
23
  * Action: `FHIR:Read`
24
24
  * Access Policy Resource: `FHIR:Patient`
25
25
  */
26
- send = (params: TransactionalSMSSendParams, request?: OystehrClientRequest): Promise<TransactionalSMSSendResponse> =>
27
- this.request('/messaging/transactional-sms/send', 'post')(params, request);
26
+ send(params: TransactionalSMSSendParams, request?: OystehrClientRequest): Promise<TransactionalSMSSendResponse> {
27
+ return this.request('/messaging/transactional-sms/send', 'post')(params, request);
28
+ }
28
29
  }
@@ -26,39 +26,45 @@ export class User extends SDKResource {
26
26
  *
27
27
  * Fetch details about the calling User. This endpoint has no access policy requirements, it is available to all authenticated Users.
28
28
  */
29
- me = (request?: OystehrClientRequest): Promise<UserMeResponse> => this.request('/user/me', 'get')(request);
29
+ me(request?: OystehrClientRequest): Promise<UserMeResponse> {
30
+ return this.request('/user/me', 'get')(request);
31
+ }
30
32
  /**
31
33
  * 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.
32
34
  *
33
35
  * Access Policy Action: `App:GetUser`
34
36
  * Access Policy Resource: `App:User`
35
37
  */
36
- get = (params: UserGetParams, request?: OystehrClientRequest): Promise<UserGetResponse> =>
37
- this.request('/user/{id}', 'get')(params, request);
38
+ get(params: UserGetParams, request?: OystehrClientRequest): Promise<UserGetResponse> {
39
+ return this.request('/user/{id}', 'get')(params, request);
40
+ }
38
41
  /**
39
42
  * 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.
40
43
  *
41
44
  * Access Policy Action: `App:UpdateUser`
42
45
  * Access Policy Resource: `App:User`
43
46
  */
44
- update = (params: UserUpdateParams, request?: OystehrClientRequest): Promise<UserUpdateResponse> =>
45
- this.request('/user/{id}', 'patch')(params, request);
47
+ update(params: UserUpdateParams, request?: OystehrClientRequest): Promise<UserUpdateResponse> {
48
+ return this.request('/user/{id}', 'patch')(params, request);
49
+ }
46
50
  /**
47
51
  * 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.
48
52
  *
49
53
  * Access Policy Action: `App:DeleteUser`
50
54
  * Access Policy Resource: `App:User`
51
55
  */
52
- delete = (params: UserDeleteParams, request?: OystehrClientRequest): Promise<void> =>
53
- this.request('/user/{id}', 'delete')(params, request);
56
+ delete(params: UserDeleteParams, request?: OystehrClientRequest): Promise<void> {
57
+ return this.request('/user/{id}', 'delete')(params, request);
58
+ }
54
59
  /**
55
60
  * 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.
56
61
  *
57
62
  * Access Policy Action: `App:CreateUser`
58
63
  * Access Policy Resource: `App:User`
59
64
  */
60
- invite = (params: UserInviteParams, request?: OystehrClientRequest): Promise<UserInviteResponse> =>
61
- this.request('/user/invite', 'post')(params, request);
65
+ invite(params: UserInviteParams, request?: OystehrClientRequest): Promise<UserInviteResponse> {
66
+ return this.request('/user/invite', 'post')(params, request);
67
+ }
62
68
  /**
63
69
  * DEPRECATED. Please use [v2/list](https://api-reference.oystehr.com/reference/get_user-v2-list) instead.
64
70
  *
@@ -67,13 +73,16 @@ export class User extends SDKResource {
67
73
  * Access Policy Action: `App:ListAllUsers`
68
74
  * Access Policy Resource: `App:User`
69
75
  */
70
- list = (request?: OystehrClientRequest): Promise<UserListResponse> => this.request('/user', 'get')(request);
76
+ list(request?: OystehrClientRequest): Promise<UserListResponse> {
77
+ return this.request('/user', 'get')(request);
78
+ }
71
79
  /**
72
80
  * 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.
73
81
  *
74
82
  * Access Policy Action: `Project:ListAllUsers`
75
83
  * Access Policy Resource: `Project:Settings`
76
84
  */
77
- listV2 = (params: UserListV2Params, request?: OystehrClientRequest): Promise<UserListV2Response> =>
78
- this.request('/user/v2/list', 'get')(params, request);
85
+ listV2(params: UserListV2Params, request?: OystehrClientRequest): Promise<UserListV2Response> {
86
+ return this.request('/user/v2/list', 'get')(params, request);
87
+ }
79
88
  }
@@ -11,5 +11,7 @@ export class Version extends SDKResource {
11
11
  /**
12
12
  * Get project API version. This endpoint is public so there are no access policy requirements.
13
13
  */
14
- get = (request?: OystehrClientRequest): Promise<VersionGetResponse> => this.request('/version', 'get')(request);
14
+ get(request?: OystehrClientRequest): Promise<VersionGetResponse> {
15
+ return this.request('/version', 'get')(request);
16
+ }
15
17
  }
@@ -32,7 +32,7 @@ export class Z3 extends SDKResource {
32
32
  downloadFile = ext.downloadFile;
33
33
  /**
34
34
  * This helper performs a `getPresignedUrl` request for Z3 URLs of the forms
35
- * `https://projects-api.oystehr.com/v1/z3/<bucket>/<key>` * or `z3://<bucket>/<key>`
35
+ * `https://projects-api.oystehr.com/v1/z3/<bucket>/<key>` or `z3://<bucket>/<key>`
36
36
  * instead of the standard SDK `Z3GetPresignedUrlParams`.
37
37
  * @param params url and action
38
38
  */
@@ -43,47 +43,52 @@ export class Z3 extends SDKResource {
43
43
  * Access Policy Action: `Z3:ListBuckets`
44
44
  * Access Policy Resource: `Z3:BucketName`
45
45
  */
46
- listBuckets = (request?: OystehrClientRequest): Promise<Z3ListBucketsResponse> => this.request('/z3', 'get')(request);
46
+ listBuckets(request?: OystehrClientRequest): Promise<Z3ListBucketsResponse> {
47
+ return this.request('/z3', 'get')(request);
48
+ }
47
49
  /**
48
50
  * 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.
49
51
  *
50
52
  * Access Policy Action: `Z3:CreateBucket`
51
53
  * Access Policy Resource: `Z3:BucketName`
52
54
  */
53
- createBucket = (params: Z3CreateBucketParams, request?: OystehrClientRequest): Promise<Z3CreateBucketResponse> =>
54
- this.request('/z3/{bucketName}', 'put')(params, request);
55
+ createBucket(params: Z3CreateBucketParams, request?: OystehrClientRequest): Promise<Z3CreateBucketResponse> {
56
+ return this.request('/z3/{bucketName}', 'put')(params, request);
57
+ }
55
58
  /**
56
59
  * 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.
57
60
  *
58
61
  * Access Policy Action: `Z3:DeleteBucket`
59
62
  * Access Policy Resource: `Z3:BucketName`
60
63
  */
61
- deleteBucket = (params: Z3DeleteBucketParams, request?: OystehrClientRequest): Promise<void> =>
62
- this.request('/z3/{bucketName}', 'delete')(params, request);
64
+ deleteBucket(params: Z3DeleteBucketParams, request?: OystehrClientRequest): Promise<void> {
65
+ return this.request('/z3/{bucketName}', 'delete')(params, request);
66
+ }
63
67
  /**
64
68
  * 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.
65
69
  *
66
70
  * Access Policy Action: `Z3:ListObjects`
67
71
  * Access Policy Resource: `Z3:BucketName:ObjectPath`
68
72
  */
69
- listObjects = (params: Z3ListObjectsParams, request?: OystehrClientRequest): Promise<Z3ListObjectsResponse> =>
70
- this.request('/z3/{bucketName}/{objectPath+}', 'get')(params, request);
73
+ listObjects(params: Z3ListObjectsParams, request?: OystehrClientRequest): Promise<Z3ListObjectsResponse> {
74
+ return this.request('/z3/{bucketName}/{objectPath+}', 'get')(params, request);
75
+ }
71
76
  /**
72
77
  * 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.
73
78
  *
74
79
  * Access Policy Action: `Z3:PutObject` or `Z3:GetObject`
75
80
  * Access Policy Resource: `Z3:BucketName:ObjectPath`
76
81
  */
77
- getPresignedUrl = (
78
- params: Z3GetPresignedUrlParams,
79
- request?: OystehrClientRequest
80
- ): Promise<Z3GetPresignedUrlResponse> => this.request('/z3/{bucketName}/{objectPath+}', 'post')(params, request);
82
+ getPresignedUrl(params: Z3GetPresignedUrlParams, request?: OystehrClientRequest): Promise<Z3GetPresignedUrlResponse> {
83
+ return this.request('/z3/{bucketName}/{objectPath+}', 'post')(params, request);
84
+ }
81
85
  /**
82
86
  * 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.
83
87
  *
84
88
  * Access Policy Action: `Z3:DeleteObject`
85
89
  * Access Policy Resource: `Z3:BucketName:ObjectPath`
86
90
  */
87
- deleteObject = (params: Z3DeleteObjectParams, request?: OystehrClientRequest): Promise<void> =>
88
- this.request('/z3/{bucketName}/{objectPath+}', 'delete')(params, request);
91
+ deleteObject(params: Z3DeleteObjectParams, request?: OystehrClientRequest): Promise<void> {
92
+ return this.request('/z3/{bucketName}/{objectPath+}', 'delete')(params, request);
93
+ }
89
94
  }