@oystehr/sdk 3.0.5 → 3.0.7

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 (167) hide show
  1. package/README.md +24 -8
  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 +255 -92
  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 +1 -0
  10. package/dist/cjs/resources/classes/charge.d.ts +1 -0
  11. package/dist/cjs/resources/classes/conversation.d.ts +1 -0
  12. package/dist/cjs/resources/classes/developer.d.ts +1 -0
  13. package/dist/cjs/resources/classes/erx.d.ts +10 -1
  14. package/dist/cjs/resources/classes/fax.d.ts +31 -0
  15. package/dist/cjs/resources/classes/fhir.d.ts +1 -0
  16. package/dist/cjs/resources/classes/index.d.ts +2 -0
  17. package/dist/cjs/resources/classes/m2m.d.ts +1 -0
  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 +1 -0
  21. package/dist/cjs/resources/classes/rcm.d.ts +2 -1
  22. package/dist/cjs/resources/classes/role.d.ts +1 -0
  23. package/dist/cjs/resources/classes/secret.d.ts +1 -0
  24. package/dist/cjs/resources/classes/telemed.d.ts +1 -0
  25. package/dist/cjs/resources/classes/transactionalSMS.d.ts +1 -0
  26. package/dist/cjs/resources/classes/user.d.ts +1 -0
  27. package/dist/cjs/resources/classes/version.d.ts +1 -0
  28. package/dist/cjs/resources/classes/z3.d.ts +1 -0
  29. package/dist/cjs/resources/classes/zambda.d.ts +1 -0
  30. package/dist/cjs/resources/classes/zambdaLogStream.d.ts +1 -0
  31. package/dist/cjs/resources/types/DeveloperInviteResponse.d.ts +0 -4
  32. package/dist/cjs/resources/types/ErxCancelOrderParams.d.ts +6 -0
  33. package/dist/cjs/resources/types/ErxCancelOrderResponse.d.ts +6 -0
  34. package/dist/cjs/resources/types/ErxCancelPrescriptionParams.d.ts +6 -0
  35. package/dist/cjs/resources/types/ErxCancelPrescriptionResponse.d.ts +6 -0
  36. package/dist/cjs/resources/types/FaxSendParams.d.ts +18 -0
  37. package/dist/cjs/resources/types/FaxSendResponse.d.ts +10 -0
  38. package/dist/cjs/resources/types/index.d.ts +6 -0
  39. package/dist/cjs/tests/setup/constants.d.ts +2 -6
  40. package/dist/cjs/tests/setup/global.d.ts +1 -0
  41. package/dist/esm/client/client.d.ts +1 -1
  42. package/dist/esm/client/client.js +4 -4
  43. package/dist/esm/client/client.js.map +1 -1
  44. package/dist/esm/config.d.ts +5 -0
  45. package/dist/esm/errors/index.d.ts +4 -1
  46. package/dist/esm/errors/index.js +18 -2
  47. package/dist/esm/errors/index.js.map +1 -1
  48. package/dist/esm/index.min.js +1 -1
  49. package/dist/esm/index.min.js.map +1 -1
  50. package/dist/esm/resources/classes/application.d.ts +1 -0
  51. package/dist/esm/resources/classes/application.js +12 -8
  52. package/dist/esm/resources/classes/application.js.map +1 -1
  53. package/dist/esm/resources/classes/charge.d.ts +1 -0
  54. package/dist/esm/resources/classes/charge.js +6 -2
  55. package/dist/esm/resources/classes/charge.js.map +1 -1
  56. package/dist/esm/resources/classes/conversation.d.ts +1 -0
  57. package/dist/esm/resources/classes/conversation.js +9 -5
  58. package/dist/esm/resources/classes/conversation.js.map +1 -1
  59. package/dist/esm/resources/classes/developer.d.ts +1 -0
  60. package/dist/esm/resources/classes/developer.js +10 -6
  61. package/dist/esm/resources/classes/developer.js.map +1 -1
  62. package/dist/esm/resources/classes/erx.d.ts +10 -1
  63. package/dist/esm/resources/classes/erx.js +20 -4
  64. package/dist/esm/resources/classes/erx.js.map +1 -1
  65. package/dist/esm/resources/classes/fax.d.ts +31 -0
  66. package/dist/esm/resources/classes/fax.js +45 -0
  67. package/dist/esm/resources/classes/fax.js.map +1 -0
  68. package/dist/esm/resources/classes/fhir.d.ts +1 -0
  69. package/dist/esm/resources/classes/fhir.js +4 -0
  70. package/dist/esm/resources/classes/fhir.js.map +1 -1
  71. package/dist/esm/resources/classes/index.d.ts +2 -0
  72. package/dist/esm/resources/classes/index.js +7 -0
  73. package/dist/esm/resources/classes/index.js.map +1 -1
  74. package/dist/esm/resources/classes/m2m.d.ts +1 -0
  75. package/dist/esm/resources/classes/m2m.js +11 -7
  76. package/dist/esm/resources/classes/m2m.js.map +1 -1
  77. package/dist/esm/resources/classes/messaging.d.ts +1 -0
  78. package/dist/esm/resources/classes/messaging.js +5 -1
  79. package/dist/esm/resources/classes/messaging.js.map +1 -1
  80. package/dist/esm/resources/classes/paymentMethod.d.ts +1 -0
  81. package/dist/esm/resources/classes/paymentMethod.js +8 -4
  82. package/dist/esm/resources/classes/paymentMethod.js.map +1 -1
  83. package/dist/esm/resources/classes/project.d.ts +1 -0
  84. package/dist/esm/resources/classes/project.js +6 -2
  85. package/dist/esm/resources/classes/project.js.map +1 -1
  86. package/dist/esm/resources/classes/rcm.d.ts +2 -1
  87. package/dist/esm/resources/classes/rcm.js +8 -4
  88. package/dist/esm/resources/classes/rcm.js.map +1 -1
  89. package/dist/esm/resources/classes/role.d.ts +1 -0
  90. package/dist/esm/resources/classes/role.js +9 -5
  91. package/dist/esm/resources/classes/role.js.map +1 -1
  92. package/dist/esm/resources/classes/secret.d.ts +1 -0
  93. package/dist/esm/resources/classes/secret.js +8 -4
  94. package/dist/esm/resources/classes/secret.js.map +1 -1
  95. package/dist/esm/resources/classes/telemed.d.ts +1 -0
  96. package/dist/esm/resources/classes/telemed.js +6 -2
  97. package/dist/esm/resources/classes/telemed.js.map +1 -1
  98. package/dist/esm/resources/classes/transactionalSMS.d.ts +1 -0
  99. package/dist/esm/resources/classes/transactionalSMS.js +5 -1
  100. package/dist/esm/resources/classes/transactionalSMS.js.map +1 -1
  101. package/dist/esm/resources/classes/user.d.ts +1 -0
  102. package/dist/esm/resources/classes/user.js +11 -7
  103. package/dist/esm/resources/classes/user.js.map +1 -1
  104. package/dist/esm/resources/classes/version.d.ts +1 -0
  105. package/dist/esm/resources/classes/version.js +5 -1
  106. package/dist/esm/resources/classes/version.js.map +1 -1
  107. package/dist/esm/resources/classes/z3-ext.js +9 -5
  108. package/dist/esm/resources/classes/z3-ext.js.map +1 -1
  109. package/dist/esm/resources/classes/z3.d.ts +1 -0
  110. package/dist/esm/resources/classes/z3.js +10 -6
  111. package/dist/esm/resources/classes/z3.js.map +1 -1
  112. package/dist/esm/resources/classes/zambda-ext.js +5 -1
  113. package/dist/esm/resources/classes/zambda-ext.js.map +1 -1
  114. package/dist/esm/resources/classes/zambda.d.ts +1 -0
  115. package/dist/esm/resources/classes/zambda.js +12 -8
  116. package/dist/esm/resources/classes/zambda.js.map +1 -1
  117. package/dist/esm/resources/classes/zambdaLogStream.d.ts +1 -0
  118. package/dist/esm/resources/classes/zambdaLogStream.js +7 -3
  119. package/dist/esm/resources/classes/zambdaLogStream.js.map +1 -1
  120. package/dist/esm/resources/types/DeveloperInviteResponse.d.ts +0 -4
  121. package/dist/esm/resources/types/ErxCancelOrderParams.d.ts +6 -0
  122. package/dist/esm/resources/types/ErxCancelOrderResponse.d.ts +6 -0
  123. package/dist/esm/resources/types/ErxCancelPrescriptionParams.d.ts +6 -0
  124. package/dist/esm/resources/types/ErxCancelPrescriptionResponse.d.ts +6 -0
  125. package/dist/esm/resources/types/FaxSendParams.d.ts +18 -0
  126. package/dist/esm/resources/types/FaxSendResponse.d.ts +10 -0
  127. package/dist/esm/resources/types/index.d.ts +6 -0
  128. package/dist/esm/tests/setup/constants.d.ts +2 -6
  129. package/dist/esm/tests/setup/global.d.ts +1 -0
  130. package/package.json +4 -4
  131. package/src/client/client.ts +6 -6
  132. package/src/config.ts +5 -0
  133. package/src/errors/index.ts +18 -2
  134. package/src/resources/classes/application.ts +15 -8
  135. package/src/resources/classes/charge.ts +5 -2
  136. package/src/resources/classes/conversation.ts +20 -5
  137. package/src/resources/classes/developer.ts +9 -6
  138. package/src/resources/classes/erx.ts +26 -4
  139. package/src/resources/classes/fax.ts +44 -0
  140. package/src/resources/classes/fhir.ts +3 -0
  141. package/src/resources/classes/index.ts +6 -0
  142. package/src/resources/classes/m2m.ts +10 -7
  143. package/src/resources/classes/messaging.ts +4 -1
  144. package/src/resources/classes/paymentMethod.ts +7 -4
  145. package/src/resources/classes/project.ts +5 -2
  146. package/src/resources/classes/rcm.ts +7 -4
  147. package/src/resources/classes/role.ts +8 -5
  148. package/src/resources/classes/secret.ts +7 -4
  149. package/src/resources/classes/telemed.ts +5 -2
  150. package/src/resources/classes/transactionalSMS.ts +4 -1
  151. package/src/resources/classes/user.ts +10 -7
  152. package/src/resources/classes/version.ts +4 -1
  153. package/src/resources/classes/z3-ext.ts +10 -4
  154. package/src/resources/classes/z3.ts +9 -6
  155. package/src/resources/classes/zambda-ext.ts +5 -1
  156. package/src/resources/classes/zambda.ts +11 -8
  157. package/src/resources/classes/zambdaLogStream.ts +10 -3
  158. package/src/resources/types/DeveloperInviteResponse.ts +0 -4
  159. package/src/resources/types/ErxCancelOrderParams.ts +8 -0
  160. package/src/resources/types/ErxCancelOrderResponse.ts +8 -0
  161. package/src/resources/types/ErxCancelPrescriptionParams.ts +8 -0
  162. package/src/resources/types/ErxCancelPrescriptionResponse.ts +8 -0
  163. package/src/resources/types/FaxSendParams.ts +20 -0
  164. package/src/resources/types/FaxSendResponse.ts +12 -0
  165. package/src/resources/types/index.ts +6 -0
  166. /package/dist/cjs/tests/{common.d.ts → integrational/common.d.ts} +0 -0
  167. /package/dist/esm/tests/{common.d.ts → integrational/common.d.ts} +0 -0
@@ -3,6 +3,7 @@ import { SDKResource } from '../../client/client';
3
3
  import { OystehrConfig } from '../../config';
4
4
  export declare class Application extends SDKResource {
5
5
  constructor(config: OystehrConfig);
6
+ baseUrlThunk(): string;
6
7
  /**
7
8
  * 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
9
  *
@@ -5,6 +5,10 @@ class Application extends SDKResource {
5
5
  constructor(config) {
6
6
  super(config);
7
7
  }
8
+ baseUrlThunk() {
9
+ var _a, _b;
10
+ 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';
11
+ }
8
12
  /**
9
13
  * 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.
10
14
  *
@@ -12,7 +16,7 @@ class Application extends SDKResource {
12
16
  * Access Policy Resource: `App:Application`
13
17
  */
14
18
  list(request) {
15
- return this.request('/application', 'get')(request);
19
+ return this.request('/application', 'get', this.baseUrlThunk.bind(this))(request);
16
20
  }
17
21
  /**
18
22
  * 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,7 +25,7 @@ class Application extends SDKResource {
21
25
  * Access Policy Resource: `App:Application`
22
26
  */
23
27
  create(params, request) {
24
- return this.request('/application', 'post')(params, request);
28
+ return this.request('/application', 'post', this.baseUrlThunk.bind(this))(params, request);
25
29
  }
26
30
  /**
27
31
  * 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,7 +34,7 @@ class Application extends SDKResource {
30
34
  * Access Policy Resource: `App:Application`
31
35
  */
32
36
  get(params, request) {
33
- return this.request('/application/{id}', 'get')(params, request);
37
+ return this.request('/application/{id}', 'get', this.baseUrlThunk.bind(this))(params, request);
34
38
  }
35
39
  /**
36
40
  * 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,7 +43,7 @@ class Application extends SDKResource {
39
43
  * Access Policy Resource: `App:Application`
40
44
  */
41
45
  update(params, request) {
42
- return this.request('/application/{id}', 'patch')(params, request);
46
+ return this.request('/application/{id}', 'patch', this.baseUrlThunk.bind(this))(params, request);
43
47
  }
44
48
  /**
45
49
  * 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,7 +52,7 @@ class Application extends SDKResource {
48
52
  * Access Policy Resource: `App:Application`
49
53
  */
50
54
  delete(params, request) {
51
- return this.request('/application/{id}', 'delete')(params, request);
55
+ return this.request('/application/{id}', 'delete', this.baseUrlThunk.bind(this))(params, request);
52
56
  }
53
57
  /**
54
58
  * Rotate client's secrete associated with an application.
@@ -57,7 +61,7 @@ class Application extends SDKResource {
57
61
  * Access Policy Resource: `App:Application`
58
62
  */
59
63
  rotateSecret(params, request) {
60
- return this.request('/application/{id}/rotate-secret', 'post')(params, request);
64
+ return this.request('/application/{id}/rotate-secret', 'post', this.baseUrlThunk.bind(this))(params, request);
61
65
  }
62
66
  /**
63
67
  * Revokes user's refresh token issued for the application.
@@ -66,7 +70,7 @@ class Application extends SDKResource {
66
70
  * Access Policy Resource: `App:Application`
67
71
  */
68
72
  revokeRefreshToken(params, request) {
69
- return this.request('/application/{id}/revoke-refresh-token', 'post')(params, request);
73
+ return this.request('/application/{id}/revoke-refresh-token', 'post', this.baseUrlThunk.bind(this))(params, request);
70
74
  }
71
75
  /**
72
76
  * Revokes user's access token issued for the application.
@@ -75,7 +79,7 @@ class Application extends SDKResource {
75
79
  * Access Policy Resource: `App:Application`
76
80
  */
77
81
  revokeAccessToken(params, request) {
78
- return this.request('/application/{id}/revoke-access-token', 'post')(params, request);
82
+ return this.request('/application/{id}/revoke-access-token', 'post', this.baseUrlThunk.bind(this))(params, request);
79
83
  }
80
84
  }
81
85
 
@@ -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/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/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/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/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/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('/application/{id}/revoke-access-token', 'post', this.baseUrlThunk.bind(this))(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;IACD,YAAY,GAAA;;AACV,QAAA,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;KACvF;AACD;;;;;AAKG;AACH,IAAA,IAAI,CAAC,OAA8B,EAAA;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KACnF;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA+B,EAAE,OAA8B,EAAA;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC5F;AACD;;;;;AAKG;IACH,GAAG,CAAC,MAA4B,EAAE,OAA8B,EAAA;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChG;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA+B,EAAE,OAA8B,EAAA;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAClG;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA+B,EAAE,OAA8B,EAAA;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnG;AACD;;;;;AAKG;IACH,YAAY,CACV,MAAqC,EACrC,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,iCAAiC,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/G;AACD;;;;;AAKG;IACH,kBAAkB,CAChB,MAA2C,EAC3C,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CACjB,wCAAwC,EACxC,MAAM,EACN,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAC7B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpB;AACD;;;;;AAKG;IACH,iBAAiB,CACf,MAA0C,EAC1C,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,uCAAuC,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACrH;AACF;;;;"}
@@ -3,6 +3,7 @@ import { SDKResource } from '../../client/client';
3
3
  import { OystehrConfig } from '../../config';
4
4
  export declare class Charge extends SDKResource {
5
5
  constructor(config: OystehrConfig);
6
+ baseUrlThunk(): string;
6
7
  /**
7
8
  * Charge patient's default payment method for a specified encounter or charge item.
8
9
  *
@@ -5,6 +5,10 @@ class Charge extends SDKResource {
5
5
  constructor(config) {
6
6
  super(config);
7
7
  }
8
+ baseUrlThunk() {
9
+ var _a, _b;
10
+ 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';
11
+ }
8
12
  /**
9
13
  * Charge patient's default payment method for a specified encounter or charge item.
10
14
  *
@@ -17,7 +21,7 @@ class Charge extends SDKResource {
17
21
  * Access Policy Resources: `FHIR:Patient:*,FHIR:Encounter:*,FHIR:Coverage:*`
18
22
  */
19
23
  issue(params, request) {
20
- return this.request('/payment/charge/issue', 'post')(params, request);
24
+ return this.request('/payment/charge/issue', 'post', this.baseUrlThunk.bind(this))(params, request);
21
25
  }
22
26
  /**
23
27
  * Retrieve charge status for a specified encounter or charge item.
@@ -31,7 +35,7 @@ class Charge extends SDKResource {
31
35
  * Access Policy Resources: `FHIR:Patient:*,FHIR:Encounter:*,FHIR:Coverage:*`
32
36
  */
33
37
  status(params, request) {
34
- return this.request('/payment/charge/status', 'post')(params, request);
38
+ return this.request('/payment/charge/status', 'post', this.baseUrlThunk.bind(this))(params, request);
35
39
  }
36
40
  }
37
41
 
@@ -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;IACD,YAAY,GAAA;;AACV,QAAA,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;KACvF;AACD;;;;;;;;;;AAUG;IACH,KAAK,CAAC,MAAyB,EAAE,OAA8B,EAAA;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,uBAAuB,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACrG;AACD;;;;;;;;;;AAUG;IACH,MAAM,CAAC,MAA0B,EAAE,OAA8B,EAAA;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACtG;AACF;;;;"}
@@ -4,6 +4,7 @@ import { OystehrConfig } from '../../config';
4
4
  import * as ext from './conversation-ext';
5
5
  export declare class Conversation extends SDKResource {
6
6
  constructor(config: OystehrConfig);
7
+ baseUrlThunk(): string;
7
8
  ENCOUNTER_VS_EXTENSION_URL: string;
8
9
  ENCOUNTER_VS_EXTENSION_RELATIVE_URL: string;
9
10
  /**
@@ -14,6 +14,10 @@ class Conversation extends SDKResource {
14
14
  */
15
15
  this.getConversationIdFromEncounter = getConversationIdFromEncounter;
16
16
  }
17
+ baseUrlThunk() {
18
+ var _a, _b;
19
+ 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';
20
+ }
17
21
  /**
18
22
  * 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.
19
23
  *
@@ -26,7 +30,7 @@ class Conversation extends SDKResource {
26
30
  * Access Policy Resource: `FHIR:Encounter`
27
31
  */
28
32
  create(params, request) {
29
- return this.request('/messaging/conversation', 'post')(params, request);
33
+ return this.request('/messaging/conversation', 'post', this.baseUrlThunk.bind(this))(params, request);
30
34
  }
31
35
  /**
32
36
  * 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,7 +39,7 @@ class Conversation extends SDKResource {
35
39
  * Access Policy Resource: `Messaging:Conversation`.
36
40
  */
37
41
  getToken(request) {
38
- return this.request('/messaging/conversation/token', 'get')(request);
42
+ return this.request('/messaging/conversation/token', 'get', this.baseUrlThunk.bind(this))(request);
39
43
  }
40
44
  /**
41
45
  * 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.
@@ -49,7 +53,7 @@ class Conversation extends SDKResource {
49
53
  * Access Policy Resource: `FHIR:Encounter`
50
54
  */
51
55
  addParticipant(params, request) {
52
- return this.request('/messaging/conversation/{conversationId}/participant', 'post')(params, request);
56
+ return this.request('/messaging/conversation/{conversationId}/participant', 'post', this.baseUrlThunk.bind(this))(params, request);
53
57
  }
54
58
  /**
55
59
  * 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.
@@ -61,7 +65,7 @@ class Conversation extends SDKResource {
61
65
  * Access Policy Resource: `FHIR:Patient`, `FHIR:Practitioner`, or `FHIR:RelatedPerson`
62
66
  */
63
67
  removeParticipant(params, request) {
64
- return this.request('/messaging/conversation/{conversationId}/participant', 'delete')(params, request);
68
+ return this.request('/messaging/conversation/{conversationId}/participant', 'delete', this.baseUrlThunk.bind(this))(params, request);
65
69
  }
66
70
  /**
67
71
  * 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.
@@ -71,7 +75,7 @@ class Conversation extends SDKResource {
71
75
  * Access Policy Resource: `Messaging:Conversation`
72
76
  */
73
77
  message(params, request) {
74
- return this.request('/messaging/conversation/{conversationId}/message', 'post')(params, request);
78
+ return this.request('/messaging/conversation/{conversationId}/message', 'post', this.baseUrlThunk.bind(this))(params, request);
75
79
  }
76
80
  }
77
81
 
@@ -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/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/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/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/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/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;IACD,YAAY,GAAA;;AACV,QAAA,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;KACvF;AASD;;;;;;;;;;AAUG;IACH,MAAM,CAAC,MAAgC,EAAE,OAA8B,EAAA;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,yBAAyB,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACvG;AACD;;;;;AAKG;AACH,IAAA,QAAQ,CAAC,OAA8B,EAAA;QACrC,OAAO,IAAI,CAAC,OAAO,CAAC,+BAA+B,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KACpG;AACD;;;;;;;;;;AAUG;IACH,cAAc,CAAC,MAAwC,EAAE,OAA8B,EAAA;QACrF,OAAO,IAAI,CAAC,OAAO,CACjB,sDAAsD,EACtD,MAAM,EACN,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAC7B,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,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAC7B,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,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAC7B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpB;AACF;;;;"}
@@ -3,6 +3,7 @@ import { SDKResource } from '../../client/client';
3
3
  import { OystehrConfig } from '../../config';
4
4
  export declare class Developer extends SDKResource {
5
5
  constructor(config: OystehrConfig);
6
+ baseUrlThunk(): string;
6
7
  /**
7
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/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
9
  *
@@ -5,6 +5,10 @@ class Developer extends SDKResource {
5
5
  constructor(config) {
6
6
  super(config);
7
7
  }
8
+ baseUrlThunk() {
9
+ var _a, _b;
10
+ 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';
11
+ }
8
12
  /**
9
13
  * 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.
10
14
  *
@@ -12,7 +16,7 @@ class Developer extends SDKResource {
12
16
  * Access Policy Resource: `IAM:Developer`
13
17
  */
14
18
  get(params, request) {
15
- return this.request('/developer/{id}', 'get')(params, request);
19
+ return this.request('/developer/{id}', 'get', this.baseUrlThunk.bind(this))(params, request);
16
20
  }
17
21
  /**
18
22
  * 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,7 +25,7 @@ class Developer extends SDKResource {
21
25
  * Access Policy Resource: `IAM:Developer`
22
26
  */
23
27
  update(params, request) {
24
- return this.request('/developer/{id}', 'patch')(params, request);
28
+ return this.request('/developer/{id}', 'patch', this.baseUrlThunk.bind(this))(params, request);
25
29
  }
26
30
  /**
27
31
  * 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,7 +34,7 @@ class Developer extends SDKResource {
30
34
  * Access Policy Resource: `IAM:Developer`
31
35
  */
32
36
  delete(params, request) {
33
- return this.request('/developer/{id}', 'delete')(params, request);
37
+ return this.request('/developer/{id}', 'delete', this.baseUrlThunk.bind(this))(params, request);
34
38
  }
35
39
  /**
36
40
  * 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,7 +43,7 @@ class Developer extends SDKResource {
39
43
  * Access Policy Resource: `IAM:Developer`
40
44
  */
41
45
  invite(params, request) {
42
- return this.request('/developer/invite', 'post')(params, request);
46
+ return this.request('/developer/invite', 'post', this.baseUrlThunk.bind(this))(params, request);
43
47
  }
44
48
  /**
45
49
  * DEPRECATED. Please use [v2/list](https://api-reference.oystehr.com/reference/get_developer-v2-list) instead.
@@ -50,7 +54,7 @@ class Developer extends SDKResource {
50
54
  * Access Policy Resource: `IAM:Developer`
51
55
  */
52
56
  list(request) {
53
- return this.request('/developer', 'get')(request);
57
+ return this.request('/developer', 'get', this.baseUrlThunk.bind(this))(request);
54
58
  }
55
59
  /**
56
60
  * 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,7 +63,7 @@ class Developer extends SDKResource {
59
63
  * Access Policy Resource: `Project:Settings`
60
64
  */
61
65
  listV2(params, request) {
62
- return this.request('/developer/v2/list', 'get')(params, request);
66
+ return this.request('/developer/v2/list', 'get', this.baseUrlThunk.bind(this))(params, request);
63
67
  }
64
68
  }
65
69
 
@@ -1 +1 @@
1
- {"version":3,"file":"developer.js","sources":["../../../../src/resources/classes/developer.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n DeveloperDeleteParams,\n DeveloperGetParams,\n DeveloperGetResponse,\n DeveloperInviteParams,\n DeveloperInviteResponse,\n DeveloperListResponse,\n DeveloperListV2Params,\n DeveloperListV2Response,\n DeveloperUpdateParams,\n DeveloperUpdateResponse,\n OystehrClientRequest,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Developer extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n /**\n * 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.\n *\n * Access Policy Action: `IAM:GetDeveloper`\n * Access Policy Resource: `IAM:Developer`\n */\n get(params: DeveloperGetParams, request?: OystehrClientRequest): Promise<DeveloperGetResponse> {\n return this.request('/developer/{id}', 'get')(params, request);\n }\n /**\n * 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.\n *\n * Access Policy Action: `IAM:UpdateDeveloper`\n * Access Policy Resource: `IAM:Developer`\n */\n update(params: DeveloperUpdateParams, request?: OystehrClientRequest): Promise<DeveloperUpdateResponse> {\n return this.request('/developer/{id}', 'patch')(params, request);\n }\n /**\n * 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.\n *\n * Access Policy Action: `IAM:RemoveDeveloper`\n * Access Policy Resource: `IAM:Developer`\n */\n delete(params: DeveloperDeleteParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/developer/{id}', 'delete')(params, request);\n }\n /**\n * 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.\n *\n * Access Policy Action: `IAM:InviteDeveloper`\n * Access Policy Resource: `IAM:Developer`\n */\n invite(params: DeveloperInviteParams, request?: OystehrClientRequest): Promise<DeveloperInviteResponse> {\n return this.request('/developer/invite', 'post')(params, request);\n }\n /**\n * DEPRECATED. Please use [v2/list](https://api-reference.oystehr.com/reference/get_developer-v2-list) instead.\n *\n * 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.\n *\n * Access Policy Action: `IAM:ListAllDevelopers`\n * Access Policy Resource: `IAM:Developer`\n */\n list(request?: OystehrClientRequest): Promise<DeveloperListResponse> {\n return this.request('/developer', 'get')(request);\n }\n /**\n * 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.\n *\n * Access Policy Action: `Project:ListAllUsers`\n * Access Policy Resource: `Project:Settings`\n */\n listV2(params: DeveloperListV2Params, request?: OystehrClientRequest): Promise<DeveloperListV2Response> {\n return this.request('/developer/v2/list', 'get')(params, request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AAkBM,MAAO,SAAU,SAAQ,WAAW,CAAA;AACxC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;AACD;;;;;AAKG;IACH,GAAG,CAAC,MAA0B,EAAE,OAA8B,EAAA;AAC5D,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChE;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA6B,EAAE,OAA8B,EAAA;AAClE,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAClE;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA6B,EAAE,OAA8B,EAAA;AAClE,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnE;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA6B,EAAE,OAA8B,EAAA;AAClE,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnE;AACD;;;;;;;AAOG;AACH,IAAA,IAAI,CAAC,OAA8B,EAAA;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;KACnD;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA6B,EAAE,OAA8B,EAAA;AAClE,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnE;AACF;;;;"}
1
+ {"version":3,"file":"developer.js","sources":["../../../../src/resources/classes/developer.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n DeveloperDeleteParams,\n DeveloperGetParams,\n DeveloperGetResponse,\n DeveloperInviteParams,\n DeveloperInviteResponse,\n DeveloperListResponse,\n DeveloperListV2Params,\n DeveloperListV2Response,\n DeveloperUpdateParams,\n DeveloperUpdateResponse,\n OystehrClientRequest,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Developer 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 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.\n *\n * Access Policy Action: `IAM:GetDeveloper`\n * Access Policy Resource: `IAM:Developer`\n */\n get(params: DeveloperGetParams, request?: OystehrClientRequest): Promise<DeveloperGetResponse> {\n return this.request('/developer/{id}', 'get', this.baseUrlThunk.bind(this))(params, request);\n }\n /**\n * 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.\n *\n * Access Policy Action: `IAM:UpdateDeveloper`\n * Access Policy Resource: `IAM:Developer`\n */\n update(params: DeveloperUpdateParams, request?: OystehrClientRequest): Promise<DeveloperUpdateResponse> {\n return this.request('/developer/{id}', 'patch', this.baseUrlThunk.bind(this))(params, request);\n }\n /**\n * 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.\n *\n * Access Policy Action: `IAM:RemoveDeveloper`\n * Access Policy Resource: `IAM:Developer`\n */\n delete(params: DeveloperDeleteParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/developer/{id}', 'delete', this.baseUrlThunk.bind(this))(params, request);\n }\n /**\n * 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.\n *\n * Access Policy Action: `IAM:InviteDeveloper`\n * Access Policy Resource: `IAM:Developer`\n */\n invite(params: DeveloperInviteParams, request?: OystehrClientRequest): Promise<DeveloperInviteResponse> {\n return this.request('/developer/invite', 'post', this.baseUrlThunk.bind(this))(params, request);\n }\n /**\n * DEPRECATED. Please use [v2/list](https://api-reference.oystehr.com/reference/get_developer-v2-list) instead.\n *\n * 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.\n *\n * Access Policy Action: `IAM:ListAllDevelopers`\n * Access Policy Resource: `IAM:Developer`\n */\n list(request?: OystehrClientRequest): Promise<DeveloperListResponse> {\n return this.request('/developer', 'get', this.baseUrlThunk.bind(this))(request);\n }\n /**\n * 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.\n *\n * Access Policy Action: `Project:ListAllUsers`\n * Access Policy Resource: `Project:Settings`\n */\n listV2(params: DeveloperListV2Params, request?: OystehrClientRequest): Promise<DeveloperListV2Response> {\n return this.request('/developer/v2/list', 'get', this.baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AAkBM,MAAO,SAAU,SAAQ,WAAW,CAAA;AACxC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;IACD,YAAY,GAAA;;AACV,QAAA,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;KACvF;AACD;;;;;AAKG;IACH,GAAG,CAAC,MAA0B,EAAE,OAA8B,EAAA;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC9F;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA6B,EAAE,OAA8B,EAAA;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChG;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA6B,EAAE,OAA8B,EAAA;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACjG;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA6B,EAAE,OAA8B,EAAA;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACjG;AACD;;;;;;;AAOG;AACH,IAAA,IAAI,CAAC,OAA8B,EAAA;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KACjF;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA6B,EAAE,OAA8B,EAAA;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACjG;AACF;;;;"}
@@ -1,8 +1,9 @@
1
- import { ErxAllergySearchParams, ErxAllergySearchResponse, ErxMedicationSearchParams, ErxMedicationSearchResponse, ErxMedicationSearchV2Params, ErxMedicationSearchV2Response, ErxSyncPatientParams, ErxSyncPatientResponse, OystehrClientRequest } from '../..';
1
+ import { ErxAllergySearchParams, ErxAllergySearchResponse, ErxCancelOrderParams, ErxCancelOrderResponse, ErxCancelPrescriptionParams, ErxCancelPrescriptionResponse, ErxMedicationSearchParams, ErxMedicationSearchResponse, ErxMedicationSearchV2Params, ErxMedicationSearchV2Response, ErxSyncPatientParams, ErxSyncPatientResponse, OystehrClientRequest } from '../..';
2
2
  import { SDKResource } from '../../client/client';
3
3
  import { OystehrConfig } from '../../config';
4
4
  export declare class Erx extends SDKResource {
5
5
  constructor(config: OystehrConfig);
6
+ baseUrlThunk(): string;
6
7
  /**
7
8
  * Retrieve patient properties from FHIR service and sync them with eRx service
8
9
  */
@@ -11,6 +12,14 @@ export declare class Erx extends SDKResource {
11
12
  * Search for allergies
12
13
  */
13
14
  allergySearch(params: ErxAllergySearchParams, request?: OystehrClientRequest): Promise<ErxAllergySearchResponse>;
15
+ /**
16
+ * Cancel photon order
17
+ */
18
+ cancelOrder(params: ErxCancelOrderParams, request?: OystehrClientRequest): Promise<ErxCancelOrderResponse>;
19
+ /**
20
+ * Cancel photon prescription
21
+ */
22
+ cancelPrescription(params: ErxCancelPrescriptionParams, request?: OystehrClientRequest): Promise<ErxCancelPrescriptionResponse>;
14
23
  /**
15
24
  * Search for medications. Provide at least one of code or name filters
16
25
  */
@@ -5,29 +5,45 @@ class Erx extends SDKResource {
5
5
  constructor(config) {
6
6
  super(config);
7
7
  }
8
+ baseUrlThunk() {
9
+ var _a, _b;
10
+ 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';
11
+ }
8
12
  /**
9
13
  * Retrieve patient properties from FHIR service and sync them with eRx service
10
14
  */
11
15
  syncPatient(params, request) {
12
- return this.request('/erx/sync-patient/{patientId}', 'post')(params, request);
16
+ return this.request('/erx/sync-patient/{patientId}', 'post', this.baseUrlThunk.bind(this))(params, request);
13
17
  }
14
18
  /**
15
19
  * Search for allergies
16
20
  */
17
21
  allergySearch(params, request) {
18
- return this.request('/erx/allergy/search', 'get')(params, request);
22
+ return this.request('/erx/allergy/search', 'get', this.baseUrlThunk.bind(this))(params, request);
23
+ }
24
+ /**
25
+ * Cancel photon order
26
+ */
27
+ cancelOrder(params, request) {
28
+ return this.request('/erx/cancel-order', 'post', this.baseUrlThunk.bind(this))(params, request);
29
+ }
30
+ /**
31
+ * Cancel photon prescription
32
+ */
33
+ cancelPrescription(params, request) {
34
+ return this.request('/erx/cancel-prescription', 'post', this.baseUrlThunk.bind(this))(params, request);
19
35
  }
20
36
  /**
21
37
  * Search for medications. Provide at least one of code or name filters
22
38
  */
23
39
  medicationSearch(params, request) {
24
- return this.request('/erx/medication/search', 'get')(params, request);
40
+ return this.request('/erx/medication/search', 'get', this.baseUrlThunk.bind(this))(params, request);
25
41
  }
26
42
  /**
27
43
  * Search for medications. Provide at least one of code or name filters
28
44
  */
29
45
  medicationSearchV2(params, request) {
30
- return this.request('/erx/v2/medication/search', 'get')(params, request);
46
+ return this.request('/erx/v2/medication/search', 'get', this.baseUrlThunk.bind(this))(params, request);
31
47
  }
32
48
  }
33
49
 
@@ -1 +1 @@
1
- {"version":3,"file":"erx.js","sources":["../../../../src/resources/classes/erx.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n ErxAllergySearchParams,\n ErxAllergySearchResponse,\n ErxMedicationSearchParams,\n ErxMedicationSearchResponse,\n ErxMedicationSearchV2Params,\n ErxMedicationSearchV2Response,\n ErxSyncPatientParams,\n ErxSyncPatientResponse,\n OystehrClientRequest,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Erx extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n /**\n * Retrieve patient properties from FHIR service and sync them with eRx service\n */\n syncPatient(params: ErxSyncPatientParams, request?: OystehrClientRequest): Promise<ErxSyncPatientResponse> {\n return this.request('/erx/sync-patient/{patientId}', 'post')(params, request);\n }\n /**\n * Search for allergies\n */\n allergySearch(params: ErxAllergySearchParams, request?: OystehrClientRequest): Promise<ErxAllergySearchResponse> {\n return this.request('/erx/allergy/search', 'get')(params, request);\n }\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(\n params: ErxMedicationSearchParams,\n request?: OystehrClientRequest\n ): Promise<ErxMedicationSearchResponse> {\n return this.request('/erx/medication/search', 'get')(params, request);\n }\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearchV2(\n params: ErxMedicationSearchV2Params,\n request?: OystehrClientRequest\n ): Promise<ErxMedicationSearchV2Response> {\n return this.request('/erx/v2/medication/search', 'get')(params, request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AAgBM,MAAO,GAAI,SAAQ,WAAW,CAAA;AAClC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;AACD;;AAEG;IACH,WAAW,CAAC,MAA4B,EAAE,OAA8B,EAAA;AACtE,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,+BAA+B,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/E;AACD;;AAEG;IACH,aAAa,CAAC,MAA8B,EAAE,OAA8B,EAAA;AAC1E,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpE;AACD;;AAEG;IACH,gBAAgB,CACd,MAAiC,EACjC,OAA8B,EAAA;AAE9B,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACvE;AACD;;AAEG;IACH,kBAAkB,CAChB,MAAmC,EACnC,OAA8B,EAAA;AAE9B,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC1E;AACF;;;;"}
1
+ {"version":3,"file":"erx.js","sources":["../../../../src/resources/classes/erx.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n ErxAllergySearchParams,\n ErxAllergySearchResponse,\n ErxCancelOrderParams,\n ErxCancelOrderResponse,\n ErxCancelPrescriptionParams,\n ErxCancelPrescriptionResponse,\n ErxMedicationSearchParams,\n ErxMedicationSearchResponse,\n ErxMedicationSearchV2Params,\n ErxMedicationSearchV2Response,\n ErxSyncPatientParams,\n ErxSyncPatientResponse,\n OystehrClientRequest,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Erx 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 * Retrieve patient properties from FHIR service and sync them with eRx service\n */\n syncPatient(params: ErxSyncPatientParams, request?: OystehrClientRequest): Promise<ErxSyncPatientResponse> {\n return this.request('/erx/sync-patient/{patientId}', 'post', this.baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Search for allergies\n */\n allergySearch(params: ErxAllergySearchParams, request?: OystehrClientRequest): Promise<ErxAllergySearchResponse> {\n return this.request('/erx/allergy/search', 'get', this.baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Cancel photon order\n */\n cancelOrder(params: ErxCancelOrderParams, request?: OystehrClientRequest): Promise<ErxCancelOrderResponse> {\n return this.request('/erx/cancel-order', 'post', this.baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Cancel photon prescription\n */\n cancelPrescription(\n params: ErxCancelPrescriptionParams,\n request?: OystehrClientRequest\n ): Promise<ErxCancelPrescriptionResponse> {\n return this.request('/erx/cancel-prescription', 'post', this.baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearch(\n params: ErxMedicationSearchParams,\n request?: OystehrClientRequest\n ): Promise<ErxMedicationSearchResponse> {\n return this.request('/erx/medication/search', 'get', this.baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Search for medications. Provide at least one of code or name filters\n */\n medicationSearchV2(\n params: ErxMedicationSearchV2Params,\n request?: OystehrClientRequest\n ): Promise<ErxMedicationSearchV2Response> {\n return this.request('/erx/v2/medication/search', 'get', this.baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AAoBM,MAAO,GAAI,SAAQ,WAAW,CAAA;AAClC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;IACD,YAAY,GAAA;;AACV,QAAA,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;KACvF;AACD;;AAEG;IACH,WAAW,CAAC,MAA4B,EAAE,OAA8B,EAAA;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,+BAA+B,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC7G;AACD;;AAEG;IACH,aAAa,CAAC,MAA8B,EAAE,OAA8B,EAAA;QAC1E,OAAO,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAClG;AACD;;AAEG;IACH,WAAW,CAAC,MAA4B,EAAE,OAA8B,EAAA;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACjG;AACD;;AAEG;IACH,kBAAkB,CAChB,MAAmC,EACnC,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,0BAA0B,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACxG;AACD;;AAEG;IACH,gBAAgB,CACd,MAAiC,EACjC,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACrG;AACD;;AAEG;IACH,kBAAkB,CAChB,MAAmC,EACnC,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,2BAA2B,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACxG;AACF;;;;"}
@@ -0,0 +1,31 @@
1
+ import { FaxSendParams, FaxSendResponse, OystehrClientRequest } from '../..';
2
+ import { SDKResource } from '../../client/client';
3
+ import { OystehrConfig } from '../../config';
4
+ export declare class Fax extends SDKResource {
5
+ constructor(config: OystehrConfig);
6
+ baseUrlThunk(): string;
7
+ /**
8
+ * Offboard a fax number. Oystehr's [offboard](https://docs.oystehr.com/services/fax/number/) feature makes it easy to stop using the fax service and release the project's assigned fax number with a single API call. Please note there is no way to guarantee getting the same number back again, so if you think this can break your project in any way we recommend not offboarding and avoid sending faxes until you're sure.
9
+ *
10
+ * Access Policy Requirements:
11
+ * Action: `Fax:Offboard`
12
+ * Access Policy Resource: `Fax:Number`
13
+ */
14
+ offboard(request?: OystehrClientRequest): Promise<void>;
15
+ /**
16
+ * Onboard a fax number. Oystehr's [onboard](https://docs.oystehr.com/services/fax/number/) feature makes it easy to start using the fax service and purchase a new fax number for your project with a single API call.
17
+ *
18
+ * Access Policy Requirements:
19
+ * Action: `Fax:Onboard`
20
+ * Access Policy Resource: `Fax:Number`
21
+ */
22
+ onboard(request?: OystehrClientRequest): Promise<void>;
23
+ /**
24
+ * Send a fax. Oystehr's [fax sending](https://docs.oystehr.com/services/fax/send/) feature makes it easy to send a fax to a chosen recipient with a single API call. You can use this feature to send referrals, medical records, prescriptions, and other documents that require fax transmission e.g. for HIPAA compliance.
25
+ *
26
+ * Access Policy Requirements:
27
+ * Action: `Fax:Send`
28
+ * Access Policy Resource: `Fax:Fax`
29
+ */
30
+ send(params: FaxSendParams, request?: OystehrClientRequest): Promise<FaxSendResponse>;
31
+ }
@@ -0,0 +1,45 @@
1
+ import { SDKResource } from '../../client/client.js';
2
+
3
+ // AUTOGENERATED -- DO NOT EDIT
4
+ class Fax extends SDKResource {
5
+ constructor(config) {
6
+ super(config);
7
+ }
8
+ baseUrlThunk() {
9
+ var _a, _b;
10
+ return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['faxApiUrl']) !== null && _b !== void 0 ? _b : 'https://fax-api.zapehr.com/v1';
11
+ }
12
+ /**
13
+ * Offboard a fax number. Oystehr's [offboard](https://docs.oystehr.com/services/fax/number/) feature makes it easy to stop using the fax service and release the project's assigned fax number with a single API call. Please note there is no way to guarantee getting the same number back again, so if you think this can break your project in any way we recommend not offboarding and avoid sending faxes until you're sure.
14
+ *
15
+ * Access Policy Requirements:
16
+ * Action: `Fax:Offboard`
17
+ * Access Policy Resource: `Fax:Number`
18
+ */
19
+ offboard(request) {
20
+ return this.request('/offboard', 'post', this.baseUrlThunk.bind(this))(request);
21
+ }
22
+ /**
23
+ * Onboard a fax number. Oystehr's [onboard](https://docs.oystehr.com/services/fax/number/) feature makes it easy to start using the fax service and purchase a new fax number for your project with a single API call.
24
+ *
25
+ * Access Policy Requirements:
26
+ * Action: `Fax:Onboard`
27
+ * Access Policy Resource: `Fax:Number`
28
+ */
29
+ onboard(request) {
30
+ return this.request('/onboard', 'post', this.baseUrlThunk.bind(this))(request);
31
+ }
32
+ /**
33
+ * Send a fax. Oystehr's [fax sending](https://docs.oystehr.com/services/fax/send/) feature makes it easy to send a fax to a chosen recipient with a single API call. You can use this feature to send referrals, medical records, prescriptions, and other documents that require fax transmission e.g. for HIPAA compliance.
34
+ *
35
+ * Access Policy Requirements:
36
+ * Action: `Fax:Send`
37
+ * Access Policy Resource: `Fax:Fax`
38
+ */
39
+ send(params, request) {
40
+ return this.request('/send', 'post', this.baseUrlThunk.bind(this))(params, request);
41
+ }
42
+ }
43
+
44
+ export { Fax };
45
+ //# sourceMappingURL=fax.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fax.js","sources":["../../../../src/resources/classes/fax.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport { FaxSendParams, FaxSendResponse, OystehrClientRequest } from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Fax extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n baseUrlThunk(): string {\n return this.config.services?.['faxApiUrl'] ?? 'https://fax-api.zapehr.com/v1';\n }\n /**\n * Offboard a fax number. Oystehr's [offboard](https://docs.oystehr.com/services/fax/number/) feature makes it easy to stop using the fax service and release the project's assigned fax number with a single API call. Please note there is no way to guarantee getting the same number back again, so if you think this can break your project in any way we recommend not offboarding and avoid sending faxes until you're sure.\n *\n * Access Policy Requirements:\n * Action: `Fax:Offboard`\n * Access Policy Resource: `Fax:Number`\n */\n offboard(request?: OystehrClientRequest): Promise<void> {\n return this.request('/offboard', 'post', this.baseUrlThunk.bind(this))(request);\n }\n /**\n * Onboard a fax number. Oystehr's [onboard](https://docs.oystehr.com/services/fax/number/) feature makes it easy to start using the fax service and purchase a new fax number for your project with a single API call.\n *\n * Access Policy Requirements:\n * Action: `Fax:Onboard`\n * Access Policy Resource: `Fax:Number`\n */\n onboard(request?: OystehrClientRequest): Promise<void> {\n return this.request('/onboard', 'post', this.baseUrlThunk.bind(this))(request);\n }\n /**\n * Send a fax. Oystehr's [fax sending](https://docs.oystehr.com/services/fax/send/) feature makes it easy to send a fax to a chosen recipient with a single API call. You can use this feature to send referrals, medical records, prescriptions, and other documents that require fax transmission e.g. for HIPAA compliance.\n *\n * Access Policy Requirements:\n * Action: `Fax:Send`\n * Access Policy Resource: `Fax:Fax`\n */\n send(params: FaxSendParams, request?: OystehrClientRequest): Promise<FaxSendResponse> {\n return this.request('/send', 'post', this.baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AAMM,MAAO,GAAI,SAAQ,WAAW,CAAA;AAClC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;IACD,YAAY,GAAA;;AACV,QAAA,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,WAAW,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,+BAA+B,CAAC;KAC/E;AACD;;;;;;AAMG;AACH,IAAA,QAAQ,CAAC,OAA8B,EAAA;QACrC,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KACjF;AACD;;;;;;AAMG;AACH,IAAA,OAAO,CAAC,OAA8B,EAAA;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KAChF;AACD;;;;;;AAMG;IACH,IAAI,CAAC,MAAqB,EAAE,OAA8B,EAAA;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACrF;AACF;;;;"}
@@ -3,6 +3,7 @@ import { OystehrConfig } from '../../config';
3
3
  import * as ext from './fhir-ext';
4
4
  export declare class Fhir extends SDKResource {
5
5
  constructor(config: OystehrConfig);
6
+ baseUrlThunk(): string;
6
7
  /**
7
8
  * Performs a FHIR search and returns the results as a Bundle resource
8
9
  * @param options FHIR resource type and FHIR search parameters
@@ -23,6 +23,10 @@ class Fhir extends SDKResource {
23
23
  this.formatAddress = formatAddress;
24
24
  this.formatHumanName = formatHumanName;
25
25
  }
26
+ baseUrlThunk() {
27
+ var _a, _b;
28
+ return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['fhirApiUrl']) !== null && _b !== void 0 ? _b : 'https://fhir-api.zapehr.com';
29
+ }
26
30
  }
27
31
 
28
32
  export { Fhir };