@oystehr/sdk 3.0.6 → 3.0.8

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 (192) hide show
  1. package/README.md +28 -12
  2. package/dist/cjs/client/client.d.ts +1 -1
  3. package/dist/cjs/config.d.ts +5 -0
  4. package/dist/cjs/errors/index.d.ts +4 -1
  5. package/dist/cjs/index.cjs +313 -155
  6. package/dist/cjs/index.cjs.map +1 -1
  7. package/dist/cjs/index.min.cjs +1 -1
  8. package/dist/cjs/index.min.cjs.map +1 -1
  9. package/dist/cjs/resources/classes/application.d.ts +6 -5
  10. package/dist/cjs/resources/classes/charge.d.ts +1 -0
  11. package/dist/cjs/resources/classes/conversation.d.ts +6 -5
  12. package/dist/cjs/resources/classes/developer.d.ts +14 -6
  13. package/dist/cjs/resources/classes/erx.d.ts +9 -0
  14. package/dist/cjs/resources/classes/fax.d.ts +4 -3
  15. package/dist/cjs/resources/classes/fhir.d.ts +1 -0
  16. package/dist/cjs/resources/classes/index.d.ts +1 -1
  17. package/dist/cjs/resources/classes/m2m.d.ts +15 -7
  18. package/dist/cjs/resources/classes/messaging.d.ts +1 -0
  19. package/dist/cjs/resources/classes/paymentMethod.d.ts +1 -0
  20. package/dist/cjs/resources/classes/project.d.ts +10 -2
  21. package/dist/cjs/resources/classes/rcm.d.ts +4 -3
  22. package/dist/cjs/resources/classes/role.d.ts +6 -5
  23. package/dist/cjs/resources/classes/secret.d.ts +1 -0
  24. package/dist/cjs/resources/classes/telemed.d.ts +2 -1
  25. package/dist/cjs/resources/classes/transactionalSMS.d.ts +2 -1
  26. package/dist/cjs/resources/classes/user.d.ts +15 -7
  27. package/dist/cjs/resources/classes/version.d.ts +1 -0
  28. package/dist/cjs/resources/classes/z3.d.ts +7 -6
  29. package/dist/cjs/resources/classes/zambda.d.ts +9 -8
  30. package/dist/cjs/resources/classes/zambdaLogStream.d.ts +4 -3
  31. package/dist/cjs/resources/types/AccessPolicy.d.ts +8 -3
  32. package/dist/cjs/resources/types/ChargeIssueParams.d.ts +1 -1
  33. package/dist/cjs/resources/types/ChargeStatusParams.d.ts +1 -1
  34. package/dist/cjs/resources/types/DeveloperInviteResponse.d.ts +0 -4
  35. package/dist/cjs/resources/types/DeveloperListV2Params.d.ts +2 -2
  36. package/dist/cjs/resources/types/FaxSendParams.d.ts +1 -1
  37. package/dist/cjs/resources/types/M2mListV2Params.d.ts +2 -2
  38. package/dist/cjs/resources/types/M2mRotateSecretResponse.d.ts +1 -1
  39. package/dist/cjs/resources/types/RcmEligibilityCheckParams.d.ts +1 -1
  40. package/dist/cjs/resources/types/RoleUpdateParams.d.ts +0 -4
  41. package/dist/cjs/resources/types/TelemedCreateMeetingParams.d.ts +1 -1
  42. package/dist/cjs/resources/types/UserListV2Params.d.ts +2 -2
  43. package/dist/cjs/resources/types/ZambdaCreateParams.d.ts +1 -1
  44. package/dist/cjs/resources/types/ZambdaFunction.d.ts +1 -1
  45. package/dist/cjs/resources/types/ZambdaUpdateParams.d.ts +2 -2
  46. package/dist/cjs/resources/types/index.d.ts +2 -2
  47. package/dist/cjs/tests/setup/constants.d.ts +2 -6
  48. package/dist/cjs/tests/setup/global.d.ts +1 -0
  49. package/dist/esm/client/client.d.ts +1 -1
  50. package/dist/esm/client/client.js +4 -4
  51. package/dist/esm/client/client.js.map +1 -1
  52. package/dist/esm/config.d.ts +5 -0
  53. package/dist/esm/errors/index.d.ts +4 -1
  54. package/dist/esm/errors/index.js +18 -2
  55. package/dist/esm/errors/index.js.map +1 -1
  56. package/dist/esm/index.min.js +1 -1
  57. package/dist/esm/index.min.js.map +1 -1
  58. package/dist/esm/resources/classes/application.d.ts +6 -5
  59. package/dist/esm/resources/classes/application.js +20 -13
  60. package/dist/esm/resources/classes/application.js.map +1 -1
  61. package/dist/esm/resources/classes/charge.d.ts +1 -0
  62. package/dist/esm/resources/classes/charge.js +9 -2
  63. package/dist/esm/resources/classes/charge.js.map +1 -1
  64. package/dist/esm/resources/classes/conversation.d.ts +6 -5
  65. package/dist/esm/resources/classes/conversation.js +17 -10
  66. package/dist/esm/resources/classes/conversation.js.map +1 -1
  67. package/dist/esm/resources/classes/developer.d.ts +14 -6
  68. package/dist/esm/resources/classes/developer.js +18 -11
  69. package/dist/esm/resources/classes/developer.js.map +1 -1
  70. package/dist/esm/resources/classes/erx.d.ts +9 -0
  71. package/dist/esm/resources/classes/erx.js +13 -6
  72. package/dist/esm/resources/classes/erx.js.map +1 -1
  73. package/dist/esm/resources/classes/fax.d.ts +4 -3
  74. package/dist/esm/resources/classes/fax.js +13 -6
  75. package/dist/esm/resources/classes/fax.js.map +1 -1
  76. package/dist/esm/resources/classes/fhir.d.ts +1 -0
  77. package/dist/esm/resources/classes/fhir.js +3 -0
  78. package/dist/esm/resources/classes/fhir.js.map +1 -1
  79. package/dist/esm/resources/classes/index.d.ts +1 -1
  80. package/dist/esm/resources/classes/index.js +6 -1
  81. package/dist/esm/resources/classes/index.js.map +1 -1
  82. package/dist/esm/resources/classes/m2m.d.ts +15 -7
  83. package/dist/esm/resources/classes/m2m.js +20 -13
  84. package/dist/esm/resources/classes/m2m.js.map +1 -1
  85. package/dist/esm/resources/classes/messaging.d.ts +1 -0
  86. package/dist/esm/resources/classes/messaging.js +8 -1
  87. package/dist/esm/resources/classes/messaging.js.map +1 -1
  88. package/dist/esm/resources/classes/paymentMethod.d.ts +1 -0
  89. package/dist/esm/resources/classes/paymentMethod.js +11 -4
  90. package/dist/esm/resources/classes/paymentMethod.js.map +1 -1
  91. package/dist/esm/resources/classes/project.d.ts +10 -2
  92. package/dist/esm/resources/classes/project.js +10 -3
  93. package/dist/esm/resources/classes/project.js.map +1 -1
  94. package/dist/esm/resources/classes/rcm.d.ts +4 -3
  95. package/dist/esm/resources/classes/rcm.js +13 -6
  96. package/dist/esm/resources/classes/rcm.js.map +1 -1
  97. package/dist/esm/resources/classes/role.d.ts +6 -5
  98. package/dist/esm/resources/classes/role.js +17 -10
  99. package/dist/esm/resources/classes/role.js.map +1 -1
  100. package/dist/esm/resources/classes/secret.d.ts +1 -0
  101. package/dist/esm/resources/classes/secret.js +11 -4
  102. package/dist/esm/resources/classes/secret.js.map +1 -1
  103. package/dist/esm/resources/classes/telemed.d.ts +2 -1
  104. package/dist/esm/resources/classes/telemed.js +10 -3
  105. package/dist/esm/resources/classes/telemed.js.map +1 -1
  106. package/dist/esm/resources/classes/transactionalSMS.d.ts +2 -1
  107. package/dist/esm/resources/classes/transactionalSMS.js +9 -2
  108. package/dist/esm/resources/classes/transactionalSMS.js.map +1 -1
  109. package/dist/esm/resources/classes/user.d.ts +15 -7
  110. package/dist/esm/resources/classes/user.js +20 -13
  111. package/dist/esm/resources/classes/user.js.map +1 -1
  112. package/dist/esm/resources/classes/version.d.ts +1 -0
  113. package/dist/esm/resources/classes/version.js +8 -1
  114. package/dist/esm/resources/classes/version.js.map +1 -1
  115. package/dist/esm/resources/classes/z3-ext.js +9 -5
  116. package/dist/esm/resources/classes/z3-ext.js.map +1 -1
  117. package/dist/esm/resources/classes/z3.d.ts +7 -6
  118. package/dist/esm/resources/classes/z3.js +19 -12
  119. package/dist/esm/resources/classes/z3.js.map +1 -1
  120. package/dist/esm/resources/classes/zambda-ext.js +5 -1
  121. package/dist/esm/resources/classes/zambda-ext.js.map +1 -1
  122. package/dist/esm/resources/classes/zambda.d.ts +9 -8
  123. package/dist/esm/resources/classes/zambda.js +23 -16
  124. package/dist/esm/resources/classes/zambda.js.map +1 -1
  125. package/dist/esm/resources/classes/zambdaLogStream.d.ts +4 -3
  126. package/dist/esm/resources/classes/zambdaLogStream.js +13 -6
  127. package/dist/esm/resources/classes/zambdaLogStream.js.map +1 -1
  128. package/dist/esm/resources/types/AccessPolicy.d.ts +8 -3
  129. package/dist/esm/resources/types/ChargeIssueParams.d.ts +1 -1
  130. package/dist/esm/resources/types/ChargeStatusParams.d.ts +1 -1
  131. package/dist/esm/resources/types/DeveloperInviteResponse.d.ts +0 -4
  132. package/dist/esm/resources/types/DeveloperListV2Params.d.ts +2 -2
  133. package/dist/esm/resources/types/FaxSendParams.d.ts +1 -1
  134. package/dist/esm/resources/types/M2mListV2Params.d.ts +2 -2
  135. package/dist/esm/resources/types/M2mRotateSecretResponse.d.ts +1 -1
  136. package/dist/esm/resources/types/RcmEligibilityCheckParams.d.ts +1 -1
  137. package/dist/esm/resources/types/RoleUpdateParams.d.ts +0 -4
  138. package/dist/esm/resources/types/TelemedCreateMeetingParams.d.ts +1 -1
  139. package/dist/esm/resources/types/UserListV2Params.d.ts +2 -2
  140. package/dist/esm/resources/types/ZambdaCreateParams.d.ts +1 -1
  141. package/dist/esm/resources/types/ZambdaFunction.d.ts +1 -1
  142. package/dist/esm/resources/types/ZambdaUpdateParams.d.ts +2 -2
  143. package/dist/esm/resources/types/index.d.ts +2 -2
  144. package/dist/esm/tests/setup/constants.d.ts +2 -6
  145. package/dist/esm/tests/setup/global.d.ts +1 -0
  146. package/package.json +3 -3
  147. package/src/client/client.ts +6 -6
  148. package/src/config.ts +5 -0
  149. package/src/errors/index.ts +18 -2
  150. package/src/resources/classes/application.ts +24 -13
  151. package/src/resources/classes/charge.ts +5 -2
  152. package/src/resources/classes/conversation.ts +25 -10
  153. package/src/resources/classes/developer.ts +32 -12
  154. package/src/resources/classes/erx.ts +31 -6
  155. package/src/resources/classes/fax.ts +9 -6
  156. package/src/resources/classes/fhir.ts +3 -0
  157. package/src/resources/classes/index.ts +5 -2
  158. package/src/resources/classes/m2m.ts +31 -14
  159. package/src/resources/classes/messaging.ts +4 -1
  160. package/src/resources/classes/paymentMethod.ts +7 -4
  161. package/src/resources/classes/project.ts +24 -4
  162. package/src/resources/classes/rcm.ts +9 -6
  163. package/src/resources/classes/role.ts +13 -10
  164. package/src/resources/classes/secret.ts +7 -4
  165. package/src/resources/classes/telemed.ts +10 -3
  166. package/src/resources/classes/transactionalSMS.ts +5 -2
  167. package/src/resources/classes/user.ts +34 -14
  168. package/src/resources/classes/version.ts +4 -1
  169. package/src/resources/classes/z3-ext.ts +10 -4
  170. package/src/resources/classes/z3.ts +15 -12
  171. package/src/resources/classes/zambda-ext.ts +5 -1
  172. package/src/resources/classes/zambda.ts +19 -16
  173. package/src/resources/classes/zambdaLogStream.ts +13 -6
  174. package/src/resources/types/AccessPolicy.ts +12 -3
  175. package/src/resources/types/ChargeIssueParams.ts +1 -1
  176. package/src/resources/types/ChargeStatusParams.ts +1 -1
  177. package/src/resources/types/DeveloperInviteResponse.ts +0 -4
  178. package/src/resources/types/DeveloperListV2Params.ts +2 -2
  179. package/src/resources/types/FaxSendParams.ts +1 -1
  180. package/src/resources/types/M2mListV2Params.ts +2 -2
  181. package/src/resources/types/M2mRotateSecretResponse.ts +1 -1
  182. package/src/resources/types/RcmEligibilityCheckParams.ts +1 -1
  183. package/src/resources/types/RoleUpdateParams.ts +0 -4
  184. package/src/resources/types/TelemedCreateMeetingParams.ts +1 -1
  185. package/src/resources/types/UserListV2Params.ts +2 -2
  186. package/src/resources/types/ZambdaCreateParams.ts +1 -1
  187. package/src/resources/types/ZambdaFunction.ts +1 -1
  188. package/src/resources/types/ZambdaUpdateParams.ts +2 -2
  189. package/src/resources/types/index.ts +2 -2
  190. package/dist/esm/node_modules/tslib/package.json +0 -1
  191. package/dist/esm/node_modules/tslib/tslib.es6.js +0 -34
  192. package/dist/esm/node_modules/tslib/tslib.es6.js.map +0 -1
@@ -2,37 +2,38 @@ import { ApplicationCreateParams, ApplicationCreateResponse, ApplicationDeletePa
2
2
  import { SDKResource } from '../../client/client';
3
3
  import { OystehrConfig } from '../../config';
4
4
  export declare class Application extends SDKResource {
5
+ #private;
5
6
  constructor(config: OystehrConfig);
6
7
  /**
7
- * Get a list of Applications. [Applications](https://docs.oystehr.com/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.
8
+ * Get a list of Applications. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.
8
9
  *
9
10
  * Access Policy Action: `App:ListAllApplications`
10
11
  * Access Policy Resource: `App:Application`
11
12
  */
12
13
  list(request?: OystehrClientRequest): Promise<ApplicationListResponse>;
13
14
  /**
14
- * 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.
15
+ * Create a new Application. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.
15
16
  *
16
17
  * Access Policy Action: `App:CreateApplication`
17
18
  * Access Policy Resource: `App:Application`
18
19
  */
19
20
  create(params: ApplicationCreateParams, request?: OystehrClientRequest): Promise<ApplicationCreateResponse>;
20
21
  /**
21
- * 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.
22
+ * Get the Application with the provided ID. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.
22
23
  *
23
24
  * Access Policy Action: `App:GetApplication`
24
25
  * Access Policy Resource: `App:Application`
25
26
  */
26
27
  get(params: ApplicationGetParams, request?: OystehrClientRequest): Promise<ApplicationGetResponse>;
27
28
  /**
28
- * 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.
29
+ * Update the Application with the provided ID. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.
29
30
  *
30
31
  * Access Policy Action: `App:UpdateApplication`
31
32
  * Access Policy Resource: `App:Application`
32
33
  */
33
34
  update(params: ApplicationUpdateParams, request?: OystehrClientRequest): Promise<ApplicationUpdateResponse>;
34
35
  /**
35
- * 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.
36
+ * Delete the Application with the provided ID. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.
36
37
  *
37
38
  * Access Policy Action: `App:DeleteApplication`
38
39
  * Access Policy Resource: `App:Application`
@@ -1,54 +1,57 @@
1
+ import { __classPrivateFieldGet } from '../../node_modules/tslib/tslib.es6.js';
1
2
  import { SDKResource } from '../../client/client.js';
2
3
 
3
4
  // AUTOGENERATED -- DO NOT EDIT
5
+ var _Application_instances, _Application_baseUrlThunk;
4
6
  class Application extends SDKResource {
5
7
  constructor(config) {
6
8
  super(config);
9
+ _Application_instances.add(this);
7
10
  }
8
11
  /**
9
- * Get a list of Applications. [Applications](https://docs.oystehr.com/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.
12
+ * Get a list of Applications. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.
10
13
  *
11
14
  * Access Policy Action: `App:ListAllApplications`
12
15
  * Access Policy Resource: `App:Application`
13
16
  */
14
17
  list(request) {
15
- return this.request('/application', 'get')(request);
18
+ return this.request('/application', 'get', __classPrivateFieldGet(this, _Application_instances, "m", _Application_baseUrlThunk).bind(this))(request);
16
19
  }
17
20
  /**
18
- * 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.
21
+ * Create a new Application. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.
19
22
  *
20
23
  * Access Policy Action: `App:CreateApplication`
21
24
  * Access Policy Resource: `App:Application`
22
25
  */
23
26
  create(params, request) {
24
- return this.request('/application', 'post')(params, request);
27
+ return this.request('/application', 'post', __classPrivateFieldGet(this, _Application_instances, "m", _Application_baseUrlThunk).bind(this))(params, request);
25
28
  }
26
29
  /**
27
- * 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.
30
+ * Get the Application with the provided ID. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.
28
31
  *
29
32
  * Access Policy Action: `App:GetApplication`
30
33
  * Access Policy Resource: `App:Application`
31
34
  */
32
35
  get(params, request) {
33
- return this.request('/application/{id}', 'get')(params, request);
36
+ return this.request('/application/{id}', 'get', __classPrivateFieldGet(this, _Application_instances, "m", _Application_baseUrlThunk).bind(this))(params, request);
34
37
  }
35
38
  /**
36
- * 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.
39
+ * Update the Application with the provided ID. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.
37
40
  *
38
41
  * Access Policy Action: `App:UpdateApplication`
39
42
  * Access Policy Resource: `App:Application`
40
43
  */
41
44
  update(params, request) {
42
- return this.request('/application/{id}', 'patch')(params, request);
45
+ return this.request('/application/{id}', 'patch', __classPrivateFieldGet(this, _Application_instances, "m", _Application_baseUrlThunk).bind(this))(params, request);
43
46
  }
44
47
  /**
45
- * 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.
48
+ * Delete the Application with the provided ID. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.
46
49
  *
47
50
  * Access Policy Action: `App:DeleteApplication`
48
51
  * Access Policy Resource: `App:Application`
49
52
  */
50
53
  delete(params, request) {
51
- return this.request('/application/{id}', 'delete')(params, request);
54
+ return this.request('/application/{id}', 'delete', __classPrivateFieldGet(this, _Application_instances, "m", _Application_baseUrlThunk).bind(this))(params, request);
52
55
  }
53
56
  /**
54
57
  * Rotate client's secrete associated with an application.
@@ -57,7 +60,7 @@ class Application extends SDKResource {
57
60
  * Access Policy Resource: `App:Application`
58
61
  */
59
62
  rotateSecret(params, request) {
60
- return this.request('/application/{id}/rotate-secret', 'post')(params, request);
63
+ return this.request('/application/{id}/rotate-secret', 'post', __classPrivateFieldGet(this, _Application_instances, "m", _Application_baseUrlThunk).bind(this))(params, request);
61
64
  }
62
65
  /**
63
66
  * Revokes user's refresh token issued for the application.
@@ -66,7 +69,7 @@ class Application extends SDKResource {
66
69
  * Access Policy Resource: `App:Application`
67
70
  */
68
71
  revokeRefreshToken(params, request) {
69
- return this.request('/application/{id}/revoke-refresh-token', 'post')(params, request);
72
+ return this.request('/application/{id}/revoke-refresh-token', 'post', __classPrivateFieldGet(this, _Application_instances, "m", _Application_baseUrlThunk).bind(this))(params, request);
70
73
  }
71
74
  /**
72
75
  * Revokes user's access token issued for the application.
@@ -75,9 +78,13 @@ class Application extends SDKResource {
75
78
  * Access Policy Resource: `App:Application`
76
79
  */
77
80
  revokeAccessToken(params, request) {
78
- return this.request('/application/{id}/revoke-access-token', 'post')(params, request);
81
+ return this.request('/application/{id}/revoke-access-token', 'post', __classPrivateFieldGet(this, _Application_instances, "m", _Application_baseUrlThunk).bind(this))(params, request);
79
82
  }
80
83
  }
84
+ _Application_instances = new WeakSet(), _Application_baseUrlThunk = function _Application_baseUrlThunk() {
85
+ var _a, _b;
86
+ return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
87
+ };
81
88
 
82
89
  export { Application };
83
90
  //# sourceMappingURL=application.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"application.js","sources":["../../../../src/resources/classes/application.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n ApplicationCreateParams,\n ApplicationCreateResponse,\n ApplicationDeleteParams,\n ApplicationGetParams,\n ApplicationGetResponse,\n ApplicationListResponse,\n ApplicationRevokeAccessTokenParams,\n ApplicationRevokeAccessTokenResponse,\n ApplicationRevokeRefreshTokenParams,\n ApplicationRevokeRefreshTokenResponse,\n ApplicationRotateSecretParams,\n ApplicationRotateSecretResponse,\n ApplicationUpdateParams,\n ApplicationUpdateResponse,\n OystehrClientRequest,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Application extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n /**\n * Get a list of Applications. [Applications](https://docs.oystehr.com/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.\n *\n * Access Policy Action: `App:ListAllApplications`\n * Access Policy Resource: `App:Application`\n */\n list(request?: OystehrClientRequest): Promise<ApplicationListResponse> {\n return this.request('/application', 'get')(request);\n }\n /**\n * 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.\n *\n * Access Policy Action: `App:CreateApplication`\n * Access Policy Resource: `App:Application`\n */\n create(params: ApplicationCreateParams, request?: OystehrClientRequest): Promise<ApplicationCreateResponse> {\n return this.request('/application', 'post')(params, request);\n }\n /**\n * 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.\n *\n * Access Policy Action: `App:GetApplication`\n * Access Policy Resource: `App:Application`\n */\n get(params: ApplicationGetParams, request?: OystehrClientRequest): Promise<ApplicationGetResponse> {\n return this.request('/application/{id}', 'get')(params, request);\n }\n /**\n * 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.\n *\n * Access Policy Action: `App:UpdateApplication`\n * Access Policy Resource: `App:Application`\n */\n update(params: ApplicationUpdateParams, request?: OystehrClientRequest): Promise<ApplicationUpdateResponse> {\n return this.request('/application/{id}', 'patch')(params, request);\n }\n /**\n * 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.\n *\n * Access Policy Action: `App:DeleteApplication`\n * Access Policy Resource: `App:Application`\n */\n delete(params: ApplicationDeleteParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/application/{id}', 'delete')(params, request);\n }\n /**\n * Rotate client's secrete associated with an application.\n *\n * Access Policy Action: `App:RotateApplicationSecret`\n * Access Policy Resource: `App:Application`\n */\n rotateSecret(\n params: ApplicationRotateSecretParams,\n request?: OystehrClientRequest\n ): Promise<ApplicationRotateSecretResponse> {\n return this.request('/application/{id}/rotate-secret', 'post')(params, request);\n }\n /**\n * Revokes user's refresh token issued for the application.\n *\n * Access Policy Action: `App:RevokeRefreshToken`\n * Access Policy Resource: `App:Application`\n */\n revokeRefreshToken(\n params: ApplicationRevokeRefreshTokenParams,\n request?: OystehrClientRequest\n ): Promise<ApplicationRevokeRefreshTokenResponse> {\n return this.request('/application/{id}/revoke-refresh-token', 'post')(params, request);\n }\n /**\n * Revokes user's access token issued for the application.\n *\n * Access Policy Action: `App:RevokeAccessToken`\n * Access Policy Resource: `App:Application`\n */\n revokeAccessToken(\n params: ApplicationRevokeAccessTokenParams,\n request?: OystehrClientRequest\n ): Promise<ApplicationRevokeAccessTokenResponse> {\n return this.request('/application/{id}/revoke-access-token', 'post')(params, request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AAsBM,MAAO,WAAY,SAAQ,WAAW,CAAA;AAC1C,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;AACD;;;;;AAKG;AACH,IAAA,IAAI,CAAC,OAA8B,EAAA;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;KACrD;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA+B,EAAE,OAA8B,EAAA;AACpE,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC9D;AACD;;;;;AAKG;IACH,GAAG,CAAC,MAA4B,EAAE,OAA8B,EAAA;AAC9D,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAClE;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA+B,EAAE,OAA8B,EAAA;AACpE,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpE;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA+B,EAAE,OAA8B,EAAA;AACpE,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,QAAQ,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACrE;AACD;;;;;AAKG;IACH,YAAY,CACV,MAAqC,EACrC,OAA8B,EAAA;AAE9B,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,iCAAiC,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACjF;AACD;;;;;AAKG;IACH,kBAAkB,CAChB,MAA2C,EAC3C,OAA8B,EAAA;AAE9B,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,wCAAwC,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACxF;AACD;;;;;AAKG;IACH,iBAAiB,CACf,MAA0C,EAC1C,OAA8B,EAAA;AAE9B,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,uCAAuC,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACvF;AACF;;;;"}
1
+ {"version":3,"file":"application.js","sources":["../../../../src/resources/classes/application.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n ApplicationCreateParams,\n ApplicationCreateResponse,\n ApplicationDeleteParams,\n ApplicationGetParams,\n ApplicationGetResponse,\n ApplicationListResponse,\n ApplicationRevokeAccessTokenParams,\n ApplicationRevokeAccessTokenResponse,\n ApplicationRevokeRefreshTokenParams,\n ApplicationRevokeRefreshTokenResponse,\n ApplicationRotateSecretParams,\n ApplicationRotateSecretResponse,\n ApplicationUpdateParams,\n ApplicationUpdateResponse,\n OystehrClientRequest,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Application extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n /**\n * Get a list of Applications. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.\n *\n * Access Policy Action: `App:ListAllApplications`\n * Access Policy Resource: `App:Application`\n */\n list(request?: OystehrClientRequest): Promise<ApplicationListResponse> {\n return this.request('/application', 'get', this.#baseUrlThunk.bind(this))(request);\n }\n /**\n * Create a new Application. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.\n *\n * Access Policy Action: `App:CreateApplication`\n * Access Policy Resource: `App:Application`\n */\n create(params: ApplicationCreateParams, request?: OystehrClientRequest): Promise<ApplicationCreateResponse> {\n return this.request('/application', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Get the Application with the provided ID. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.\n *\n * Access Policy Action: `App:GetApplication`\n * Access Policy Resource: `App:Application`\n */\n get(params: ApplicationGetParams, request?: OystehrClientRequest): Promise<ApplicationGetResponse> {\n return this.request('/application/{id}', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Update the Application with the provided ID. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.\n *\n * Access Policy Action: `App:UpdateApplication`\n * Access Policy Resource: `App:Application`\n */\n update(params: ApplicationUpdateParams, request?: OystehrClientRequest): Promise<ApplicationUpdateResponse> {\n return this.request('/application/{id}', 'patch', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Delete the Application with the provided ID. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr.\n *\n * Access Policy Action: `App:DeleteApplication`\n * Access Policy Resource: `App:Application`\n */\n delete(params: ApplicationDeleteParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/application/{id}', 'delete', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Rotate client's secrete associated with an application.\n *\n * Access Policy Action: `App:RotateApplicationSecret`\n * Access Policy Resource: `App:Application`\n */\n rotateSecret(\n params: ApplicationRotateSecretParams,\n request?: OystehrClientRequest\n ): Promise<ApplicationRotateSecretResponse> {\n return this.request('/application/{id}/rotate-secret', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Revokes user's refresh token issued for the application.\n *\n * Access Policy Action: `App:RevokeRefreshToken`\n * Access Policy Resource: `App:Application`\n */\n revokeRefreshToken(\n params: ApplicationRevokeRefreshTokenParams,\n request?: OystehrClientRequest\n ): Promise<ApplicationRevokeRefreshTokenResponse> {\n return this.request(\n '/application/{id}/revoke-refresh-token',\n 'post',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Revokes user's access token issued for the application.\n *\n * Access Policy Action: `App:RevokeAccessToken`\n * Access Policy Resource: `App:Application`\n */\n revokeAccessToken(\n params: ApplicationRevokeAccessTokenParams,\n request?: OystehrClientRequest\n ): Promise<ApplicationRevokeAccessTokenResponse> {\n return this.request(\n '/application/{id}/revoke-access-token',\n 'post',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n}\n"],"names":[],"mappings":";;;AAAA;;AAsBM,MAAO,WAAY,SAAQ,WAAW,CAAA;AAC1C,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;;KACf;AAID;;;;;AAKG;AACH,IAAA,IAAI,CAAC,OAA8B,EAAA;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,KAAK,EAAE,sBAAA,CAAA,IAAI,yDAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KACpF;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA+B,EAAE,OAA8B,EAAA;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,EAAE,sBAAA,CAAA,IAAI,EAAA,sBAAA,EAAA,GAAA,EAAA,yBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC7F;AACD;;;;;AAKG;IACH,GAAG,CAAC,MAA4B,EAAE,OAA8B,EAAA;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,KAAK,EAAE,sBAAA,CAAA,IAAI,EAAA,sBAAA,EAAA,GAAA,EAAA,yBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACjG;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA+B,EAAE,OAA8B,EAAA;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,OAAO,EAAE,sBAAA,CAAA,IAAI,EAAA,sBAAA,EAAA,GAAA,EAAA,yBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnG;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA+B,EAAE,OAA8B,EAAA;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,QAAQ,EAAE,sBAAA,CAAA,IAAI,EAAA,sBAAA,EAAA,GAAA,EAAA,yBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpG;AACD;;;;;AAKG;IACH,YAAY,CACV,MAAqC,EACrC,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,iCAAiC,EAAE,MAAM,EAAE,sBAAA,CAAA,IAAI,EAAA,sBAAA,EAAA,GAAA,EAAA,yBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChH;AACD;;;;;AAKG;IACH,kBAAkB,CAChB,MAA2C,EAC3C,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CACjB,wCAAwC,EACxC,MAAM,EACN,sBAAA,CAAA,IAAI,EAAA,sBAAA,EAAA,GAAA,EAAA,yBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAC9B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpB;AACD;;;;;AAKG;IACH,iBAAiB,CACf,MAA0C,EAC1C,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CACjB,uCAAuC,EACvC,MAAM,EACN,sBAAA,CAAA,IAAI,EAAA,sBAAA,EAAA,GAAA,EAAA,yBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAC9B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpB;AACF,CAAA;;;AA3FG,IAAA,OAAO,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAG,eAAe,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,mCAAmC,CAAC;AACxF,CAAC;;;;"}
@@ -2,6 +2,7 @@ import { ChargeIssueParams, ChargeStatusParams, ChargeStatusResponse, OystehrCli
2
2
  import { SDKResource } from '../../client/client';
3
3
  import { OystehrConfig } from '../../config';
4
4
  export declare class Charge extends SDKResource {
5
+ #private;
5
6
  constructor(config: OystehrConfig);
6
7
  /**
7
8
  * Charge patient's default payment method for a specified encounter or charge item.
@@ -1,9 +1,12 @@
1
+ import { __classPrivateFieldGet } from '../../node_modules/tslib/tslib.es6.js';
1
2
  import { SDKResource } from '../../client/client.js';
2
3
 
3
4
  // AUTOGENERATED -- DO NOT EDIT
5
+ var _Charge_instances, _Charge_baseUrlThunk;
4
6
  class Charge extends SDKResource {
5
7
  constructor(config) {
6
8
  super(config);
9
+ _Charge_instances.add(this);
7
10
  }
8
11
  /**
9
12
  * Charge patient's default payment method for a specified encounter or charge item.
@@ -17,7 +20,7 @@ class Charge extends SDKResource {
17
20
  * Access Policy Resources: `FHIR:Patient:*,FHIR:Encounter:*,FHIR:Coverage:*`
18
21
  */
19
22
  issue(params, request) {
20
- return this.request('/payment/charge/issue', 'post')(params, request);
23
+ return this.request('/payment/charge/issue', 'post', __classPrivateFieldGet(this, _Charge_instances, "m", _Charge_baseUrlThunk).bind(this))(params, request);
21
24
  }
22
25
  /**
23
26
  * Retrieve charge status for a specified encounter or charge item.
@@ -31,9 +34,13 @@ class Charge extends SDKResource {
31
34
  * Access Policy Resources: `FHIR:Patient:*,FHIR:Encounter:*,FHIR:Coverage:*`
32
35
  */
33
36
  status(params, request) {
34
- return this.request('/payment/charge/status', 'post')(params, request);
37
+ return this.request('/payment/charge/status', 'post', __classPrivateFieldGet(this, _Charge_instances, "m", _Charge_baseUrlThunk).bind(this))(params, request);
35
38
  }
36
39
  }
40
+ _Charge_instances = new WeakSet(), _Charge_baseUrlThunk = function _Charge_baseUrlThunk() {
41
+ var _a, _b;
42
+ return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
43
+ };
37
44
 
38
45
  export { Charge };
39
46
  //# sourceMappingURL=charge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"charge.js","sources":["../../../../src/resources/classes/charge.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport { ChargeIssueParams, ChargeStatusParams, ChargeStatusResponse, OystehrClientRequest } from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Charge extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n /**\n * Charge patient's default payment method for a specified encounter or charge item.\n *\n * Access Policy Requirements:\n * Action: `Payment:Issue`\n * Access Policy Resource: `Payment:Charge`\n * Actions: `FHIR:Read,FHIR:Create,FHIR:Update`\n * Access Policy Resource: `FHIR:ChargeItem:*,`FHIR:PaymentReconciliation:*`\n * Action: `FHIR:Read`\n * Access Policy Resources: `FHIR:Patient:*,FHIR:Encounter:*,FHIR:Coverage:*`\n */\n issue(params: ChargeIssueParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/payment/charge/issue', 'post')(params, request);\n }\n /**\n * Retrieve charge status for a specified encounter or charge item.\n *\n * Access Policy Requirements:\n * Action: `Payment:Status`\n * Access Policy Resource: `Payment:Charge`\n * Actions: `FHIR:Read,FHIR:Create,FHIR:Update`\n * Access Policy Resource: `FHIR:ChargeItem:*,`FHIR:PaymentReconciliation:*`\n * Action: `FHIR:Read`\n * Access Policy Resources: `FHIR:Patient:*,FHIR:Encounter:*,FHIR:Coverage:*`\n */\n status(params: ChargeStatusParams, request?: OystehrClientRequest): Promise<ChargeStatusResponse> {\n return this.request('/payment/charge/status', 'post')(params, request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AAMM,MAAO,MAAO,SAAQ,WAAW,CAAA;AACrC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;AACD;;;;;;;;;;AAUG;IACH,KAAK,CAAC,MAAyB,EAAE,OAA8B,EAAA;AAC7D,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACvE;AACD;;;;;;;;;;AAUG;IACH,MAAM,CAAC,MAA0B,EAAE,OAA8B,EAAA;AAC/D,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACxE;AACF;;;;"}
1
+ {"version":3,"file":"charge.js","sources":["../../../../src/resources/classes/charge.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport { ChargeIssueParams, ChargeStatusParams, ChargeStatusResponse, OystehrClientRequest } from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Charge extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n /**\n * Charge patient's default payment method for a specified encounter or charge item.\n *\n * Access Policy Requirements:\n * Action: `Payment:Issue`\n * Access Policy Resource: `Payment:Charge`\n * Actions: `FHIR:Read,FHIR:Create,FHIR:Update`\n * Access Policy Resource: `FHIR:ChargeItem:*,`FHIR:PaymentReconciliation:*`\n * Action: `FHIR:Read`\n * Access Policy Resources: `FHIR:Patient:*,FHIR:Encounter:*,FHIR:Coverage:*`\n */\n issue(params: ChargeIssueParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/payment/charge/issue', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Retrieve charge status for a specified encounter or charge item.\n *\n * Access Policy Requirements:\n * Action: `Payment:Status`\n * Access Policy Resource: `Payment:Charge`\n * Actions: `FHIR:Read,FHIR:Create,FHIR:Update`\n * Access Policy Resource: `FHIR:ChargeItem:*,`FHIR:PaymentReconciliation:*`\n * Action: `FHIR:Read`\n * Access Policy Resources: `FHIR:Patient:*,FHIR:Encounter:*,FHIR:Coverage:*`\n */\n status(params: ChargeStatusParams, request?: OystehrClientRequest): Promise<ChargeStatusResponse> {\n return this.request('/payment/charge/status', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":[],"mappings":";;;AAAA;;AAMM,MAAO,MAAO,SAAQ,WAAW,CAAA;AACrC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;;KACf;AAID;;;;;;;;;;AAUG;IACH,KAAK,CAAC,MAAyB,EAAE,OAA8B,EAAA;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,uBAAuB,EAAE,MAAM,EAAE,sBAAA,CAAA,IAAI,EAAA,iBAAA,EAAA,GAAA,EAAA,oBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACtG;AACD;;;;;;;;;;AAUG;IACH,MAAM,CAAC,MAA0B,EAAE,OAA8B,EAAA;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,MAAM,EAAE,sBAAA,CAAA,IAAI,EAAA,iBAAA,EAAA,GAAA,EAAA,oBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACvG;AACF,CAAA;;;AA9BG,IAAA,OAAO,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAG,eAAe,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,mCAAmC,CAAC;AACxF,CAAC;;;;"}
@@ -3,6 +3,7 @@ import { SDKResource } from '../../client/client';
3
3
  import { OystehrConfig } from '../../config';
4
4
  import * as ext from './conversation-ext';
5
5
  export declare class Conversation extends SDKResource {
6
+ #private;
6
7
  constructor(config: OystehrConfig);
7
8
  ENCOUNTER_VS_EXTENSION_URL: string;
8
9
  ENCOUNTER_VS_EXTENSION_RELATIVE_URL: string;
@@ -13,7 +14,7 @@ export declare class Conversation extends SDKResource {
13
14
  */
14
15
  getConversationIdFromEncounter: typeof ext.getConversationIdFromEncounter;
15
16
  /**
16
- * Create a new Conversation. [Conversations](https://docs.oystehr.com/services/messaging/conversations/) allow you to build multi-channel bi-directional messaging workflows. For example, you might create a Conversation where a provider messages with a patient through a web app, and the patient receives and responds to messages via SMS on their phone.
17
+ * Create a new Conversation. [Conversations](https://docs.oystehr.com/oystehr/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.
17
18
  *
18
19
  * Access Policy Requirements:
19
20
  * Action: `Messaging:CreateConversation`
@@ -25,14 +26,14 @@ export declare class Conversation extends SDKResource {
25
26
  */
26
27
  create(params: ConversationCreateParams, request?: OystehrClientRequest): Promise<ConversationCreateResponse>;
27
28
  /**
28
- * 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.
29
+ * Get a Conversation Token. Conversation Tokens are used to join the Conversation with the Twilio Conversations SDKs. [Conversations](https://docs.oystehr.com/oystehr/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.
29
30
  *
30
31
  * Access Policy Action: `Messaging:GetConversationToken`
31
32
  * Access Policy Resource: `Messaging:Conversation`.
32
33
  */
33
34
  getToken(request?: OystehrClientRequest): Promise<ConversationGetTokenResponse>;
34
35
  /**
35
- * 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.
36
+ * Add a participant to a Conversation. [Conversations](https://docs.oystehr.com/oystehr/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.
36
37
  *
37
38
  * Access Policy Requirements:
38
39
  * Action: `Messaging:ConversationAddParticipant`
@@ -44,7 +45,7 @@ export declare class Conversation extends SDKResource {
44
45
  */
45
46
  addParticipant(params: ConversationAddParticipantParams, request?: OystehrClientRequest): Promise<void>;
46
47
  /**
47
- * 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.
48
+ * Remove a participant from a Conversation. [Conversations](https://docs.oystehr.com/oystehr/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.
48
49
  *
49
50
  * Access Policy Requirements:
50
51
  * Action: `Messaging:ConversationRemoveParticipant`
@@ -54,7 +55,7 @@ export declare class Conversation extends SDKResource {
54
55
  */
55
56
  removeParticipant(params: ConversationRemoveParticipantParams, request?: OystehrClientRequest): Promise<void>;
56
57
  /**
57
- * 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.
58
+ * Send a message to a Conversation. [Conversations](https://docs.oystehr.com/oystehr/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.
58
59
  *
59
60
  * Access Policy Requirements:
60
61
  * Action: `Messaging:ConversationSendMessage`
@@ -1,10 +1,13 @@
1
+ import { __classPrivateFieldGet } from '../../node_modules/tslib/tslib.es6.js';
1
2
  import { SDKResource } from '../../client/client.js';
2
3
  import { ENCOUNTER_VS_EXTENSION_URL, ENCOUNTER_VS_EXTENSION_RELATIVE_URL, getConversationIdFromEncounter } from './conversation-ext.js';
3
4
 
4
5
  // AUTOGENERATED -- DO NOT EDIT
6
+ var _Conversation_instances, _Conversation_baseUrlThunk;
5
7
  class Conversation extends SDKResource {
6
8
  constructor(config) {
7
9
  super(config);
10
+ _Conversation_instances.add(this);
8
11
  this.ENCOUNTER_VS_EXTENSION_URL = ENCOUNTER_VS_EXTENSION_URL;
9
12
  this.ENCOUNTER_VS_EXTENSION_RELATIVE_URL = ENCOUNTER_VS_EXTENSION_RELATIVE_URL;
10
13
  /**
@@ -15,7 +18,7 @@ class Conversation extends SDKResource {
15
18
  this.getConversationIdFromEncounter = getConversationIdFromEncounter;
16
19
  }
17
20
  /**
18
- * Create a new Conversation. [Conversations](https://docs.oystehr.com/services/messaging/conversations/) allow you to build multi-channel bi-directional messaging workflows. For example, you might create a Conversation where a provider messages with a patient through a web app, and the patient receives and responds to messages via SMS on their phone.
21
+ * Create a new Conversation. [Conversations](https://docs.oystehr.com/oystehr/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.
19
22
  *
20
23
  * Access Policy Requirements:
21
24
  * Action: `Messaging:CreateConversation`
@@ -26,19 +29,19 @@ class Conversation extends SDKResource {
26
29
  * Access Policy Resource: `FHIR:Encounter`
27
30
  */
28
31
  create(params, request) {
29
- return this.request('/messaging/conversation', 'post')(params, request);
32
+ return this.request('/messaging/conversation', 'post', __classPrivateFieldGet(this, _Conversation_instances, "m", _Conversation_baseUrlThunk).bind(this))(params, request);
30
33
  }
31
34
  /**
32
- * 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.
35
+ * Get a Conversation Token. Conversation Tokens are used to join the Conversation with the Twilio Conversations SDKs. [Conversations](https://docs.oystehr.com/oystehr/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.
33
36
  *
34
37
  * Access Policy Action: `Messaging:GetConversationToken`
35
38
  * Access Policy Resource: `Messaging:Conversation`.
36
39
  */
37
40
  getToken(request) {
38
- return this.request('/messaging/conversation/token', 'get')(request);
41
+ return this.request('/messaging/conversation/token', 'get', __classPrivateFieldGet(this, _Conversation_instances, "m", _Conversation_baseUrlThunk).bind(this))(request);
39
42
  }
40
43
  /**
41
- * 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.
44
+ * Add a participant to a Conversation. [Conversations](https://docs.oystehr.com/oystehr/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.
42
45
  *
43
46
  * Access Policy Requirements:
44
47
  * Action: `Messaging:ConversationAddParticipant`
@@ -49,10 +52,10 @@ class Conversation extends SDKResource {
49
52
  * Access Policy Resource: `FHIR:Encounter`
50
53
  */
51
54
  addParticipant(params, request) {
52
- return this.request('/messaging/conversation/{conversationId}/participant', 'post')(params, request);
55
+ return this.request('/messaging/conversation/{conversationId}/participant', 'post', __classPrivateFieldGet(this, _Conversation_instances, "m", _Conversation_baseUrlThunk).bind(this))(params, request);
53
56
  }
54
57
  /**
55
- * 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.
58
+ * Remove a participant from a Conversation. [Conversations](https://docs.oystehr.com/oystehr/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.
56
59
  *
57
60
  * Access Policy Requirements:
58
61
  * Action: `Messaging:ConversationRemoveParticipant`
@@ -61,19 +64,23 @@ class Conversation extends SDKResource {
61
64
  * Access Policy Resource: `FHIR:Patient`, `FHIR:Practitioner`, or `FHIR:RelatedPerson`
62
65
  */
63
66
  removeParticipant(params, request) {
64
- return this.request('/messaging/conversation/{conversationId}/participant', 'delete')(params, request);
67
+ return this.request('/messaging/conversation/{conversationId}/participant', 'delete', __classPrivateFieldGet(this, _Conversation_instances, "m", _Conversation_baseUrlThunk).bind(this))(params, request);
65
68
  }
66
69
  /**
67
- * 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.
70
+ * Send a message to a Conversation. [Conversations](https://docs.oystehr.com/oystehr/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.
68
71
  *
69
72
  * Access Policy Requirements:
70
73
  * Action: `Messaging:ConversationSendMessage`
71
74
  * Access Policy Resource: `Messaging:Conversation`
72
75
  */
73
76
  message(params, request) {
74
- return this.request('/messaging/conversation/{conversationId}/message', 'post')(params, request);
77
+ return this.request('/messaging/conversation/{conversationId}/message', 'post', __classPrivateFieldGet(this, _Conversation_instances, "m", _Conversation_baseUrlThunk).bind(this))(params, request);
75
78
  }
76
79
  }
80
+ _Conversation_instances = new WeakSet(), _Conversation_baseUrlThunk = function _Conversation_baseUrlThunk() {
81
+ var _a, _b;
82
+ return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
83
+ };
77
84
 
78
85
  export { Conversation };
79
86
  //# sourceMappingURL=conversation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"conversation.js","sources":["../../../../src/resources/classes/conversation.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n ConversationAddParticipantParams,\n ConversationCreateParams,\n ConversationCreateResponse,\n ConversationGetTokenResponse,\n ConversationMessageParams,\n ConversationRemoveParticipantParams,\n OystehrClientRequest,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\nimport * as ext from './conversation-ext';\n\nexport class Conversation extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n ENCOUNTER_VS_EXTENSION_URL = ext.ENCOUNTER_VS_EXTENSION_URL;\n ENCOUNTER_VS_EXTENSION_RELATIVE_URL = ext.ENCOUNTER_VS_EXTENSION_RELATIVE_URL;\n /**\n * Helper function to get a conversationId from an encounter created as an Oystehr Conversation\n * @param encounter well-formed FHIR R4B or R5 Encounter\n * @returns conversationId\n */\n getConversationIdFromEncounter = ext.getConversationIdFromEncounter;\n /**\n * Create a new Conversation. [Conversations](https://docs.oystehr.com/services/messaging/conversations/) allow you to build multi-channel bi-directional messaging workflows. For example, you might create a Conversation where a provider messages with a patient through a web app, and the patient receives and responds to messages via SMS on their phone.\n *\n * Access Policy Requirements:\n * Action: `Messaging:CreateConversation`\n * Access Policy Resource: `Messaging:Conversation`\n * Action: `FHIR:Create`\n * Access Policy Resource: `FHIR:Encounter`\n * Action: `FHIR:Update`\n * Access Policy Resource: `FHIR:Encounter`\n */\n create(params: ConversationCreateParams, request?: OystehrClientRequest): Promise<ConversationCreateResponse> {\n return this.request('/messaging/conversation', 'post')(params, request);\n }\n /**\n * 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.\n *\n * Access Policy Action: `Messaging:GetConversationToken`\n * Access Policy Resource: `Messaging:Conversation`.\n */\n getToken(request?: OystehrClientRequest): Promise<ConversationGetTokenResponse> {\n return this.request('/messaging/conversation/token', 'get')(request);\n }\n /**\n * 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.\n *\n * Access Policy Requirements:\n * Action: `Messaging:ConversationAddParticipant`\n * Access Policy Resource: `Messaging:Conversation`\n * Action: `FHIR:Read`\n * Access Policy Resource: `FHIR:Encounter`\n * Action: `FHIR:Update`\n * Access Policy Resource: `FHIR:Encounter`\n */\n addParticipant(params: ConversationAddParticipantParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/messaging/conversation/{conversationId}/participant', 'post')(params, request);\n }\n /**\n * 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.\n *\n * Access Policy Requirements:\n * Action: `Messaging:ConversationRemoveParticipant`\n * Access Policy Resource: `Messaging:Conversation`\n * Action: `FHIR:Read`\n * Access Policy Resource: `FHIR:Patient`, `FHIR:Practitioner`, or `FHIR:RelatedPerson`\n */\n removeParticipant(params: ConversationRemoveParticipantParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/messaging/conversation/{conversationId}/participant', 'delete')(params, request);\n }\n /**\n * 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.\n *\n * Access Policy Requirements:\n * Action: `Messaging:ConversationSendMessage`\n * Access Policy Resource: `Messaging:Conversation`\n */\n message(params: ConversationMessageParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/messaging/conversation/{conversationId}/message', 'post')(params, request);\n }\n}\n"],"names":["ext.ENCOUNTER_VS_EXTENSION_URL","ext.ENCOUNTER_VS_EXTENSION_RELATIVE_URL","ext.getConversationIdFromEncounter"],"mappings":";;;AAAA;AAeM,MAAO,YAAa,SAAQ,WAAW,CAAA;AAC3C,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;AAEhB,QAAA,IAAA,CAAA,0BAA0B,GAAGA,0BAA8B,CAAC;AAC5D,QAAA,IAAA,CAAA,mCAAmC,GAAGC,mCAAuC,CAAC;AAC9E;;;;AAIG;AACH,QAAA,IAAA,CAAA,8BAA8B,GAAGC,8BAAkC,CAAC;KARnE;AASD;;;;;;;;;;AAUG;IACH,MAAM,CAAC,MAAgC,EAAE,OAA8B,EAAA;AACrE,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,yBAAyB,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACzE;AACD;;;;;AAKG;AACH,IAAA,QAAQ,CAAC,OAA8B,EAAA;QACrC,OAAO,IAAI,CAAC,OAAO,CAAC,+BAA+B,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;KACtE;AACD;;;;;;;;;;AAUG;IACH,cAAc,CAAC,MAAwC,EAAE,OAA8B,EAAA;AACrF,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,sDAAsD,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACtG;AACD;;;;;;;;AAQG;IACH,iBAAiB,CAAC,MAA2C,EAAE,OAA8B,EAAA;AAC3F,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,sDAAsD,EAAE,QAAQ,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACxG;AACD;;;;;;AAMG;IACH,OAAO,CAAC,MAAiC,EAAE,OAA8B,EAAA;AACvE,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,kDAAkD,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAClG;AACF;;;;"}
1
+ {"version":3,"file":"conversation.js","sources":["../../../../src/resources/classes/conversation.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n ConversationAddParticipantParams,\n ConversationCreateParams,\n ConversationCreateResponse,\n ConversationGetTokenResponse,\n ConversationMessageParams,\n ConversationRemoveParticipantParams,\n OystehrClientRequest,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\nimport * as ext from './conversation-ext';\n\nexport class Conversation extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n ENCOUNTER_VS_EXTENSION_URL = ext.ENCOUNTER_VS_EXTENSION_URL;\n ENCOUNTER_VS_EXTENSION_RELATIVE_URL = ext.ENCOUNTER_VS_EXTENSION_RELATIVE_URL;\n /**\n * Helper function to get a conversationId from an encounter created as an Oystehr Conversation\n * @param encounter well-formed FHIR R4B or R5 Encounter\n * @returns conversationId\n */\n getConversationIdFromEncounter = ext.getConversationIdFromEncounter;\n /**\n * Create a new Conversation. [Conversations](https://docs.oystehr.com/oystehr/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.\n *\n * Access Policy Requirements:\n * Action: `Messaging:CreateConversation`\n * Access Policy Resource: `Messaging:Conversation`\n * Action: `FHIR:Create`\n * Access Policy Resource: `FHIR:Encounter`\n * Action: `FHIR:Update`\n * Access Policy Resource: `FHIR:Encounter`\n */\n create(params: ConversationCreateParams, request?: OystehrClientRequest): Promise<ConversationCreateResponse> {\n return this.request('/messaging/conversation', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Get a Conversation Token. Conversation Tokens are used to join the Conversation with the Twilio Conversations SDKs. [Conversations](https://docs.oystehr.com/oystehr/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.\n *\n * Access Policy Action: `Messaging:GetConversationToken`\n * Access Policy Resource: `Messaging:Conversation`.\n */\n getToken(request?: OystehrClientRequest): Promise<ConversationGetTokenResponse> {\n return this.request('/messaging/conversation/token', 'get', this.#baseUrlThunk.bind(this))(request);\n }\n /**\n * Add a participant to a Conversation. [Conversations](https://docs.oystehr.com/oystehr/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.\n *\n * Access Policy Requirements:\n * Action: `Messaging:ConversationAddParticipant`\n * Access Policy Resource: `Messaging:Conversation`\n * Action: `FHIR:Read`\n * Access Policy Resource: `FHIR:Encounter`\n * Action: `FHIR:Update`\n * Access Policy Resource: `FHIR:Encounter`\n */\n addParticipant(params: ConversationAddParticipantParams, request?: OystehrClientRequest): Promise<void> {\n return this.request(\n '/messaging/conversation/{conversationId}/participant',\n 'post',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Remove a participant from a Conversation. [Conversations](https://docs.oystehr.com/oystehr/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.\n *\n * Access Policy Requirements:\n * Action: `Messaging:ConversationRemoveParticipant`\n * Access Policy Resource: `Messaging:Conversation`\n * Action: `FHIR:Read`\n * Access Policy Resource: `FHIR:Patient`, `FHIR:Practitioner`, or `FHIR:RelatedPerson`\n */\n removeParticipant(params: ConversationRemoveParticipantParams, request?: OystehrClientRequest): Promise<void> {\n return this.request(\n '/messaging/conversation/{conversationId}/participant',\n 'delete',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n /**\n * Send a message to a Conversation. [Conversations](https://docs.oystehr.com/oystehr/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.\n *\n * Access Policy Requirements:\n * Action: `Messaging:ConversationSendMessage`\n * Access Policy Resource: `Messaging:Conversation`\n */\n message(params: ConversationMessageParams, request?: OystehrClientRequest): Promise<void> {\n return this.request(\n '/messaging/conversation/{conversationId}/message',\n 'post',\n this.#baseUrlThunk.bind(this)\n )(params, request);\n }\n}\n"],"names":["ext.ENCOUNTER_VS_EXTENSION_URL","ext.ENCOUNTER_VS_EXTENSION_RELATIVE_URL","ext.getConversationIdFromEncounter"],"mappings":";;;;AAAA;;AAeM,MAAO,YAAa,SAAQ,WAAW,CAAA;AAC3C,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;;AAKhB,QAAA,IAAA,CAAA,0BAA0B,GAAGA,0BAA8B,CAAC;AAC5D,QAAA,IAAA,CAAA,mCAAmC,GAAGC,mCAAuC,CAAC;AAC9E;;;;AAIG;AACH,QAAA,IAAA,CAAA,8BAA8B,GAAGC,8BAAkC,CAAC;KAXnE;AAYD;;;;;;;;;;AAUG;IACH,MAAM,CAAC,MAAgC,EAAE,OAA8B,EAAA;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,yBAAyB,EAAE,MAAM,EAAE,sBAAA,CAAA,IAAI,EAAA,uBAAA,EAAA,GAAA,EAAA,0BAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACxG;AACD;;;;;AAKG;AACH,IAAA,QAAQ,CAAC,OAA8B,EAAA;QACrC,OAAO,IAAI,CAAC,OAAO,CAAC,+BAA+B,EAAE,KAAK,EAAE,sBAAA,CAAA,IAAI,2DAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KACrG;AACD;;;;;;;;;;AAUG;IACH,cAAc,CAAC,MAAwC,EAAE,OAA8B,EAAA;QACrF,OAAO,IAAI,CAAC,OAAO,CACjB,sDAAsD,EACtD,MAAM,EACN,sBAAA,CAAA,IAAI,EAAA,uBAAA,EAAA,GAAA,EAAA,0BAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAC9B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpB;AACD;;;;;;;;AAQG;IACH,iBAAiB,CAAC,MAA2C,EAAE,OAA8B,EAAA;QAC3F,OAAO,IAAI,CAAC,OAAO,CACjB,sDAAsD,EACtD,QAAQ,EACR,sBAAA,CAAA,IAAI,EAAA,uBAAA,EAAA,GAAA,EAAA,0BAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAC9B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpB;AACD;;;;;;AAMG;IACH,OAAO,CAAC,MAAiC,EAAE,OAA8B,EAAA;QACvE,OAAO,IAAI,CAAC,OAAO,CACjB,kDAAkD,EAClD,MAAM,EACN,sBAAA,CAAA,IAAI,EAAA,uBAAA,EAAA,GAAA,EAAA,0BAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAC9B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpB;AACF,CAAA;;;AAjFG,IAAA,OAAO,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAG,eAAe,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,mCAAmC,CAAC;AACxF,CAAC;;;;"}
@@ -2,30 +2,31 @@ import { DeveloperDeleteParams, DeveloperGetParams, DeveloperGetResponse, Develo
2
2
  import { SDKResource } from '../../client/client';
3
3
  import { OystehrConfig } from '../../config';
4
4
  export declare class Developer extends SDKResource {
5
+ #private;
5
6
  constructor(config: OystehrConfig);
6
7
  /**
7
- * Get the Developer with the provided ID. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/services/project/). [Developers](https://docs.oystehr.com/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.
8
+ * Get the Developer with the provided ID. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.
8
9
  *
9
10
  * Access Policy Action: `IAM:GetDeveloper`
10
11
  * Access Policy Resource: `IAM:Developer`
11
12
  */
12
13
  get(params: DeveloperGetParams, request?: OystehrClientRequest): Promise<DeveloperGetResponse>;
13
14
  /**
14
- * 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.
15
+ * 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/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.
15
16
  *
16
17
  * Access Policy Action: `IAM:UpdateDeveloper`
17
18
  * Access Policy Resource: `IAM:Developer`
18
19
  */
19
20
  update(params: DeveloperUpdateParams, request?: OystehrClientRequest): Promise<DeveloperUpdateResponse>;
20
21
  /**
21
- * 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.
22
+ * 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/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.
22
23
  *
23
24
  * Access Policy Action: `IAM:RemoveDeveloper`
24
25
  * Access Policy Resource: `IAM:Developer`
25
26
  */
26
27
  delete(params: DeveloperDeleteParams, request?: OystehrClientRequest): Promise<void>;
27
28
  /**
28
- * 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.
29
+ * 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/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.
29
30
  *
30
31
  * Access Policy Action: `IAM:InviteDeveloper`
31
32
  * Access Policy Resource: `IAM:Developer`
@@ -34,17 +35,24 @@ export declare class Developer extends SDKResource {
34
35
  /**
35
36
  * DEPRECATED. Please use [v2/list](https://api-reference.oystehr.com/reference/get_developer-v2-list) instead.
36
37
  *
37
- * Get a list of all Developers who are part of the Project. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/services/project/). [Developers](https://docs.oystehr.com/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.
38
+ * Get a list of all Developers who are part of the Project. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.
38
39
  *
39
40
  * Access Policy Action: `IAM:ListAllDevelopers`
40
41
  * Access Policy Resource: `IAM:Developer`
41
42
  */
42
43
  list(request?: OystehrClientRequest): Promise<DeveloperListResponse>;
43
44
  /**
44
- * 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.
45
+ * Get Developers in the Project with pagination, sort, sort Order and filtering. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
45
46
  *
46
47
  * Access Policy Action: `Project:ListAllUsers`
47
48
  * Access Policy Resource: `Project:Settings`
48
49
  */
49
50
  listV2(params: DeveloperListV2Params, request?: OystehrClientRequest): Promise<DeveloperListV2Response>;
51
+ /**
52
+ * 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.
53
+ *
54
+ * Access Policy Action: `Project:ListAllUsers`
55
+ * Access Policy Resource: `Project:Settings`
56
+ */
57
+ listV2(request?: OystehrClientRequest): Promise<DeveloperListV2Response>;
50
58
  }
@@ -1,56 +1,59 @@
1
+ import { __classPrivateFieldGet } from '../../node_modules/tslib/tslib.es6.js';
1
2
  import { SDKResource } from '../../client/client.js';
2
3
 
3
4
  // AUTOGENERATED -- DO NOT EDIT
5
+ var _Developer_instances, _Developer_baseUrlThunk;
4
6
  class Developer extends SDKResource {
5
7
  constructor(config) {
6
8
  super(config);
9
+ _Developer_instances.add(this);
7
10
  }
8
11
  /**
9
- * Get the Developer with the provided ID. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/services/project/). [Developers](https://docs.oystehr.com/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.
12
+ * Get the Developer with the provided ID. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.
10
13
  *
11
14
  * Access Policy Action: `IAM:GetDeveloper`
12
15
  * Access Policy Resource: `IAM:Developer`
13
16
  */
14
17
  get(params, request) {
15
- return this.request('/developer/{id}', 'get')(params, request);
18
+ return this.request('/developer/{id}', 'get', __classPrivateFieldGet(this, _Developer_instances, "m", _Developer_baseUrlThunk).bind(this))(params, request);
16
19
  }
17
20
  /**
18
- * 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.
21
+ * 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/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.
19
22
  *
20
23
  * Access Policy Action: `IAM:UpdateDeveloper`
21
24
  * Access Policy Resource: `IAM:Developer`
22
25
  */
23
26
  update(params, request) {
24
- return this.request('/developer/{id}', 'patch')(params, request);
27
+ return this.request('/developer/{id}', 'patch', __classPrivateFieldGet(this, _Developer_instances, "m", _Developer_baseUrlThunk).bind(this))(params, request);
25
28
  }
26
29
  /**
27
- * 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.
30
+ * 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/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.
28
31
  *
29
32
  * Access Policy Action: `IAM:RemoveDeveloper`
30
33
  * Access Policy Resource: `IAM:Developer`
31
34
  */
32
35
  delete(params, request) {
33
- return this.request('/developer/{id}', 'delete')(params, request);
36
+ return this.request('/developer/{id}', 'delete', __classPrivateFieldGet(this, _Developer_instances, "m", _Developer_baseUrlThunk).bind(this))(params, request);
34
37
  }
35
38
  /**
36
- * 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.
39
+ * 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/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.
37
40
  *
38
41
  * Access Policy Action: `IAM:InviteDeveloper`
39
42
  * Access Policy Resource: `IAM:Developer`
40
43
  */
41
44
  invite(params, request) {
42
- return this.request('/developer/invite', 'post')(params, request);
45
+ return this.request('/developer/invite', 'post', __classPrivateFieldGet(this, _Developer_instances, "m", _Developer_baseUrlThunk).bind(this))(params, request);
43
46
  }
44
47
  /**
45
48
  * DEPRECATED. Please use [v2/list](https://api-reference.oystehr.com/reference/get_developer-v2-list) instead.
46
49
  *
47
- * Get a list of all Developers who are part of the Project. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/services/project/). [Developers](https://docs.oystehr.com/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.
50
+ * Get a list of all Developers who are part of the Project. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level.
48
51
  *
49
52
  * Access Policy Action: `IAM:ListAllDevelopers`
50
53
  * Access Policy Resource: `IAM:Developer`
51
54
  */
52
55
  list(request) {
53
- return this.request('/developer', 'get')(request);
56
+ return this.request('/developer', 'get', __classPrivateFieldGet(this, _Developer_instances, "m", _Developer_baseUrlThunk).bind(this))(request);
54
57
  }
55
58
  /**
56
59
  * 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.
@@ -59,9 +62,13 @@ class Developer extends SDKResource {
59
62
  * Access Policy Resource: `Project:Settings`
60
63
  */
61
64
  listV2(params, request) {
62
- return this.request('/developer/v2/list', 'get')(params, request);
65
+ return this.request('/developer/v2/list', 'get', __classPrivateFieldGet(this, _Developer_instances, "m", _Developer_baseUrlThunk).bind(this))(params, request);
63
66
  }
64
67
  }
68
+ _Developer_instances = new WeakSet(), _Developer_baseUrlThunk = function _Developer_baseUrlThunk() {
69
+ var _a, _b;
70
+ return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['projectApiUrl']) !== null && _b !== void 0 ? _b : 'https://project-api.zapehr.com/v1';
71
+ };
65
72
 
66
73
  export { Developer };
67
74
  //# sourceMappingURL=developer.js.map