@oystehr/sdk 3.0.4 → 3.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/config.d.ts +8 -0
  3. package/dist/cjs/index.cjs +856 -642
  4. package/dist/cjs/index.cjs.map +1 -1
  5. package/dist/cjs/index.min.cjs +1 -1
  6. package/dist/cjs/index.min.cjs.map +1 -1
  7. package/dist/cjs/resources/classes/application.d.ts +8 -8
  8. package/dist/cjs/resources/classes/charge.d.ts +2 -2
  9. package/dist/cjs/resources/classes/conversation.d.ts +5 -5
  10. package/dist/cjs/resources/classes/developer.d.ts +6 -6
  11. package/dist/cjs/resources/classes/erx.d.ts +13 -5
  12. package/dist/cjs/resources/classes/fax.d.ts +30 -0
  13. package/dist/cjs/resources/classes/index.d.ts +2 -0
  14. package/dist/cjs/resources/classes/m2m.d.ts +7 -7
  15. package/dist/cjs/resources/classes/messaging.d.ts +1 -1
  16. package/dist/cjs/resources/classes/paymentMethod.d.ts +4 -4
  17. package/dist/cjs/resources/classes/project.d.ts +2 -2
  18. package/dist/cjs/resources/classes/rcm.d.ts +4 -4
  19. package/dist/cjs/resources/classes/role.d.ts +5 -5
  20. package/dist/cjs/resources/classes/secret.d.ts +4 -4
  21. package/dist/cjs/resources/classes/telemed.d.ts +2 -2
  22. package/dist/cjs/resources/classes/transactionalSMS.d.ts +1 -1
  23. package/dist/cjs/resources/classes/user.d.ts +7 -7
  24. package/dist/cjs/resources/classes/version.d.ts +1 -1
  25. package/dist/cjs/resources/classes/z3.d.ts +7 -7
  26. package/dist/cjs/resources/classes/zambda.d.ts +8 -8
  27. package/dist/cjs/resources/classes/zambdaLogStream.d.ts +3 -3
  28. package/dist/cjs/resources/types/ConversationAddParticipantParams.d.ts +1 -1
  29. package/dist/cjs/resources/types/ConversationCreateResponse.d.ts +1 -1
  30. package/dist/cjs/resources/types/ConversationRemoveParticipantParams.d.ts +1 -1
  31. package/dist/cjs/resources/types/ErxCancelOrderParams.d.ts +6 -0
  32. package/dist/cjs/resources/types/ErxCancelOrderResponse.d.ts +6 -0
  33. package/dist/cjs/resources/types/ErxCancelPrescriptionParams.d.ts +6 -0
  34. package/dist/cjs/resources/types/ErxCancelPrescriptionResponse.d.ts +6 -0
  35. package/dist/cjs/resources/types/FaxSendParams.d.ts +18 -0
  36. package/dist/cjs/resources/types/FaxSendResponse.d.ts +10 -0
  37. package/dist/cjs/resources/types/TelemedCreateMeetingParams.d.ts +1 -1
  38. package/dist/cjs/resources/types/TelemedCreateMeetingResponse.d.ts +1 -1
  39. package/dist/cjs/resources/types/index.d.ts +6 -0
  40. package/dist/cjs/tests/setup/constants.d.ts +1 -1
  41. package/dist/esm/client/client.js +14 -11
  42. package/dist/esm/client/client.js.map +1 -1
  43. package/dist/esm/config.d.ts +8 -0
  44. package/dist/esm/index.min.js +1 -1
  45. package/dist/esm/index.min.js.map +1 -1
  46. package/dist/esm/resources/classes/application.d.ts +8 -8
  47. package/dist/esm/resources/classes/application.js +72 -56
  48. package/dist/esm/resources/classes/application.js.map +1 -1
  49. package/dist/esm/resources/classes/charge.d.ts +2 -2
  50. package/dist/esm/resources/classes/charge.js +28 -24
  51. package/dist/esm/resources/classes/charge.js.map +1 -1
  52. package/dist/esm/resources/classes/conversation.d.ts +5 -5
  53. package/dist/esm/resources/classes/conversation.js +59 -49
  54. package/dist/esm/resources/classes/conversation.js.map +1 -1
  55. package/dist/esm/resources/classes/developer.d.ts +6 -6
  56. package/dist/esm/resources/classes/developer.js +56 -44
  57. package/dist/esm/resources/classes/developer.js.map +1 -1
  58. package/dist/esm/resources/classes/erx.d.ts +13 -5
  59. package/dist/esm/resources/classes/erx.js +36 -16
  60. package/dist/esm/resources/classes/erx.js.map +1 -1
  61. package/dist/esm/resources/classes/fax.d.ts +30 -0
  62. package/dist/esm/resources/classes/fax.js +41 -0
  63. package/dist/esm/resources/classes/fax.js.map +1 -0
  64. package/dist/esm/resources/classes/fhir-ext.js +3 -0
  65. package/dist/esm/resources/classes/fhir-ext.js.map +1 -1
  66. package/dist/esm/resources/classes/index.d.ts +2 -0
  67. package/dist/esm/resources/classes/index.js +2 -0
  68. package/dist/esm/resources/classes/index.js.map +1 -1
  69. package/dist/esm/resources/classes/m2m.d.ts +7 -7
  70. package/dist/esm/resources/classes/m2m.js +65 -51
  71. package/dist/esm/resources/classes/m2m.js.map +1 -1
  72. package/dist/esm/resources/classes/messaging.d.ts +1 -1
  73. package/dist/esm/resources/classes/messaging.js +6 -4
  74. package/dist/esm/resources/classes/messaging.js.map +1 -1
  75. package/dist/esm/resources/classes/paymentMethod.d.ts +4 -4
  76. package/dist/esm/resources/classes/paymentMethod.js +72 -64
  77. package/dist/esm/resources/classes/paymentMethod.js.map +1 -1
  78. package/dist/esm/resources/classes/project.d.ts +2 -2
  79. package/dist/esm/resources/classes/project.js +18 -14
  80. package/dist/esm/resources/classes/project.js.map +1 -1
  81. package/dist/esm/resources/classes/rcm.d.ts +4 -4
  82. package/dist/esm/resources/classes/rcm.js +39 -33
  83. package/dist/esm/resources/classes/rcm.js.map +1 -1
  84. package/dist/esm/resources/classes/role.d.ts +5 -5
  85. package/dist/esm/resources/classes/role.js +46 -36
  86. package/dist/esm/resources/classes/role.js.map +1 -1
  87. package/dist/esm/resources/classes/secret.d.ts +4 -4
  88. package/dist/esm/resources/classes/secret.js +36 -28
  89. package/dist/esm/resources/classes/secret.js.map +1 -1
  90. package/dist/esm/resources/classes/telemed.d.ts +2 -2
  91. package/dist/esm/resources/classes/telemed.js +27 -23
  92. package/dist/esm/resources/classes/telemed.js.map +1 -1
  93. package/dist/esm/resources/classes/transactionalSMS.d.ts +1 -1
  94. package/dist/esm/resources/classes/transactionalSMS.js +18 -16
  95. package/dist/esm/resources/classes/transactionalSMS.js.map +1 -1
  96. package/dist/esm/resources/classes/user.d.ts +7 -7
  97. package/dist/esm/resources/classes/user.js +64 -50
  98. package/dist/esm/resources/classes/user.js.map +1 -1
  99. package/dist/esm/resources/classes/version.d.ts +1 -1
  100. package/dist/esm/resources/classes/version.js +6 -4
  101. package/dist/esm/resources/classes/version.js.map +1 -1
  102. package/dist/esm/resources/classes/z3.d.ts +7 -7
  103. package/dist/esm/resources/classes/z3.js +55 -43
  104. package/dist/esm/resources/classes/z3.js.map +1 -1
  105. package/dist/esm/resources/classes/zambda.d.ts +8 -8
  106. package/dist/esm/resources/classes/zambda.js +71 -55
  107. package/dist/esm/resources/classes/zambda.js.map +1 -1
  108. package/dist/esm/resources/classes/zambdaLogStream.d.ts +3 -3
  109. package/dist/esm/resources/classes/zambdaLogStream.js +27 -21
  110. package/dist/esm/resources/classes/zambdaLogStream.js.map +1 -1
  111. package/dist/esm/resources/types/ConversationAddParticipantParams.d.ts +1 -1
  112. package/dist/esm/resources/types/ConversationCreateResponse.d.ts +1 -1
  113. package/dist/esm/resources/types/ConversationRemoveParticipantParams.d.ts +1 -1
  114. package/dist/esm/resources/types/ErxCancelOrderParams.d.ts +6 -0
  115. package/dist/esm/resources/types/ErxCancelOrderResponse.d.ts +6 -0
  116. package/dist/esm/resources/types/ErxCancelPrescriptionParams.d.ts +6 -0
  117. package/dist/esm/resources/types/ErxCancelPrescriptionResponse.d.ts +6 -0
  118. package/dist/esm/resources/types/FaxSendParams.d.ts +18 -0
  119. package/dist/esm/resources/types/FaxSendResponse.d.ts +10 -0
  120. package/dist/esm/resources/types/TelemedCreateMeetingParams.d.ts +1 -1
  121. package/dist/esm/resources/types/TelemedCreateMeetingResponse.d.ts +1 -1
  122. package/dist/esm/resources/types/index.d.ts +6 -0
  123. package/dist/esm/tests/setup/constants.d.ts +1 -1
  124. package/package.json +4 -4
  125. package/src/client/client.ts +8 -3
  126. package/src/config.ts +8 -0
  127. package/src/resources/classes/application.ts +27 -19
  128. package/src/resources/classes/charge.ts +6 -4
  129. package/src/resources/classes/conversation.ts +15 -10
  130. package/src/resources/classes/developer.ts +18 -11
  131. package/src/resources/classes/erx.ts +33 -8
  132. package/src/resources/classes/fax.ts +41 -0
  133. package/src/resources/classes/fhir-ext.ts +3 -0
  134. package/src/resources/classes/index.ts +3 -0
  135. package/src/resources/classes/m2m.ts +21 -13
  136. package/src/resources/classes/messaging.ts +3 -2
  137. package/src/resources/classes/paymentMethod.ts +12 -8
  138. package/src/resources/classes/project.ts +6 -3
  139. package/src/resources/classes/rcm.ts +13 -9
  140. package/src/resources/classes/role.ts +15 -9
  141. package/src/resources/classes/secret.ts +12 -7
  142. package/src/resources/classes/telemed.ts +7 -7
  143. package/src/resources/classes/transactionalSMS.ts +3 -2
  144. package/src/resources/classes/user.ts +21 -12
  145. package/src/resources/classes/version.ts +3 -1
  146. package/src/resources/classes/z3.ts +19 -14
  147. package/src/resources/classes/zambda.ts +25 -15
  148. package/src/resources/classes/zambdaLogStream.ts +9 -8
  149. package/src/resources/types/ConversationAddParticipantParams.ts +1 -1
  150. package/src/resources/types/ConversationCreateResponse.ts +1 -1
  151. package/src/resources/types/ConversationRemoveParticipantParams.ts +1 -1
  152. package/src/resources/types/ErxCancelOrderParams.ts +8 -0
  153. package/src/resources/types/ErxCancelOrderResponse.ts +8 -0
  154. package/src/resources/types/ErxCancelPrescriptionParams.ts +8 -0
  155. package/src/resources/types/ErxCancelPrescriptionResponse.ts +8 -0
  156. package/src/resources/types/FaxSendParams.ts +20 -0
  157. package/src/resources/types/FaxSendResponse.ts +12 -0
  158. package/src/resources/types/TelemedCreateMeetingParams.ts +1 -1
  159. package/src/resources/types/TelemedCreateMeetingResponse.ts +1 -1
  160. package/src/resources/types/index.ts +6 -0
  161. /package/dist/cjs/tests/{common.d.ts → integrational/common.d.ts} +0 -0
  162. /package/dist/esm/tests/{common.d.ts → integrational/common.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"zambda.js","sources":["../../../../src/resources/classes/zambda.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n OystehrClientRequest,\n ZambdaCreateParams,\n ZambdaCreateResponse,\n ZambdaDeleteParams,\n ZambdaExecuteParams,\n ZambdaExecutePublicParams,\n ZambdaExecutePublicResponse,\n ZambdaExecuteResponse,\n ZambdaGetParams,\n ZambdaGetResponse,\n ZambdaListResponse,\n ZambdaS3UploadParams,\n ZambdaS3UploadResponse,\n ZambdaUpdateParams,\n ZambdaUpdateResponse,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\nimport * as ext from './zambda-ext';\n\nexport class Zambda extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n uploadFile = ext.uploadFile;\n /**\n * Get a list of all Zambda Functions in the Project. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.\n *\n * Access Policy Action: `Zambda:ListAllFunctions`\n * Access Policy Resource: `Zambda:Function`\n */\n list = (request?: OystehrClientRequest): Promise<ZambdaListResponse> => this.request('/zambda', 'get')(request);\n /**\n * Create a new Zambda Function. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.\n *\n * Access Policy Action: `Zambda:CreateFunction`\n * Access Policy Resource: `Zambda:Function`\n */\n create = (params: ZambdaCreateParams, request?: OystehrClientRequest): Promise<ZambdaCreateResponse> =>\n this.request('/zambda', 'post')(params, request);\n /**\n * Get the Zambda Function with the provided ID or name. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.\n *\n * Access Policy Action: `Zambda:GetFunction`\n * Access Policy Resource: `Zambda:Function`\n */\n get = (params: ZambdaGetParams, request?: OystehrClientRequest): Promise<ZambdaGetResponse> =>\n this.request('/zambda/{id}', 'get')(params, request);\n /**\n * Update the Zambda Function with the provided ID or name. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.\n *\n * Access Policy Action: `Zambda:UpdateFunction`\n * Access Policy Resource: `Zambda:Function`\n */\n update = (params: ZambdaUpdateParams, request?: OystehrClientRequest): Promise<ZambdaUpdateResponse> =>\n this.request('/zambda/{id}', 'patch')(params, request);\n /**\n * Delete the Zambda Function with the provided ID or name. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.\n *\n * Access Policy Action: `Zambda:DeleteFunction`\n * Access Policy Resource: `Zambda:Function`\n */\n delete = (params: ZambdaDeleteParams, request?: OystehrClientRequest): Promise<void> =>\n this.request('/zambda/{id}', 'delete')(params, request);\n /**\n * Execute the [Authenticated Zambda Function](https://docs.oystehr.com/services/zambda/types/authenticated/) with the provided ID. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.\n *\n * Access Policy Action: `Zambda:InvokeFunction`\n * Access Policy Resource: `Zambda:Function`\n */\n execute = (params: ZambdaExecuteParams, request?: OystehrClientRequest): Promise<ZambdaExecuteResponse> =>\n this.request('/zambda/{id}/execute', 'post')(params, request);\n /**\n * Execute the [Public Zambda Function](https://docs.oystehr.com/services/zambda/types/public/) with the provided ID. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.\n *\n * Execute a zambda that has method http_open. This endpoint is public so there are no access policy requirements.\n */\n executePublic = (\n params: ZambdaExecutePublicParams,\n request?: OystehrClientRequest\n ): Promise<ZambdaExecutePublicResponse> => this.request('/zambda/{id}/execute-public', 'post')(params, request);\n /**\n * Returns a URL that is used to deploy code to the Zambda Function with the provided ID. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.\n *\n * Access Policy Action: `Zambda:UpdateFunction`\n * Access Policy Resource: `Zambda:Function`\n */\n s3Upload = (params: ZambdaS3UploadParams, request?: OystehrClientRequest): Promise<ZambdaS3UploadResponse> =>\n this.request('/zambda/{id}/s3-upload', 'post')(params, request);\n}\n"],"names":["ext.uploadFile"],"mappings":";;;AAAA;AAuBM,MAAO,MAAO,SAAQ,WAAW,CAAA;AACrC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;AAEhB,QAAA,IAAA,CAAA,UAAU,GAAGA,UAAc,CAAC;AAC5B;;;;;AAKG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,CAAC,OAA8B,KAAkC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;AAChH;;;;;AAKG;QACH,IAAM,CAAA,MAAA,GAAG,CAAC,MAA0B,EAAE,OAA8B,KAClE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACnD;;;;;AAKG;QACH,IAAG,CAAA,GAAA,GAAG,CAAC,MAAuB,EAAE,OAA8B,KAC5D,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACvD;;;;;AAKG;QACH,IAAM,CAAA,MAAA,GAAG,CAAC,MAA0B,EAAE,OAA8B,KAClE,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACzD;;;;;AAKG;QACH,IAAM,CAAA,MAAA,GAAG,CAAC,MAA0B,EAAE,OAA8B,KAClE,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC1D;;;;;AAKG;QACH,IAAO,CAAA,OAAA,GAAG,CAAC,MAA2B,EAAE,OAA8B,KACpE,IAAI,CAAC,OAAO,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAChE;;;;AAIG;QACH,IAAa,CAAA,aAAA,GAAG,CACd,MAAiC,EACjC,OAA8B,KACW,IAAI,CAAC,OAAO,CAAC,6BAA6B,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAChH;;;;;AAKG;QACH,IAAQ,CAAA,QAAA,GAAG,CAAC,MAA4B,EAAE,OAA8B,KACtE,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAjEjE;AAkEF;;;;"}
1
+ {"version":3,"file":"zambda.js","sources":["../../../../src/resources/classes/zambda.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n OystehrClientRequest,\n ZambdaCreateParams,\n ZambdaCreateResponse,\n ZambdaDeleteParams,\n ZambdaExecuteParams,\n ZambdaExecutePublicParams,\n ZambdaExecutePublicResponse,\n ZambdaExecuteResponse,\n ZambdaGetParams,\n ZambdaGetResponse,\n ZambdaListResponse,\n ZambdaS3UploadParams,\n ZambdaS3UploadResponse,\n ZambdaUpdateParams,\n ZambdaUpdateResponse,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\nimport * as ext from './zambda-ext';\n\nexport class Zambda extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n uploadFile = ext.uploadFile;\n /**\n * Get a list of all Zambda Functions in the Project. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.\n *\n * Access Policy Action: `Zambda:ListAllFunctions`\n * Access Policy Resource: `Zambda:Function`\n */\n list(request?: OystehrClientRequest): Promise<ZambdaListResponse> {\n return this.request('/zambda', 'get')(request);\n }\n /**\n * Create a new Zambda Function. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.\n *\n * Access Policy Action: `Zambda:CreateFunction`\n * Access Policy Resource: `Zambda:Function`\n */\n create(params: ZambdaCreateParams, request?: OystehrClientRequest): Promise<ZambdaCreateResponse> {\n return this.request('/zambda', 'post')(params, request);\n }\n /**\n * Get the Zambda Function with the provided ID or name. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.\n *\n * Access Policy Action: `Zambda:GetFunction`\n * Access Policy Resource: `Zambda:Function`\n */\n get(params: ZambdaGetParams, request?: OystehrClientRequest): Promise<ZambdaGetResponse> {\n return this.request('/zambda/{id}', 'get')(params, request);\n }\n /**\n * Update the Zambda Function with the provided ID or name. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.\n *\n * Access Policy Action: `Zambda:UpdateFunction`\n * Access Policy Resource: `Zambda:Function`\n */\n update(params: ZambdaUpdateParams, request?: OystehrClientRequest): Promise<ZambdaUpdateResponse> {\n return this.request('/zambda/{id}', 'patch')(params, request);\n }\n /**\n * Delete the Zambda Function with the provided ID or name. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.\n *\n * Access Policy Action: `Zambda:DeleteFunction`\n * Access Policy Resource: `Zambda:Function`\n */\n delete(params: ZambdaDeleteParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/zambda/{id}', 'delete')(params, request);\n }\n /**\n * Execute the [Authenticated Zambda Function](https://docs.oystehr.com/services/zambda/types/authenticated/) with the provided ID. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.\n *\n * Access Policy Action: `Zambda:InvokeFunction`\n * Access Policy Resource: `Zambda:Function`\n */\n execute(params: ZambdaExecuteParams, request?: OystehrClientRequest): Promise<ZambdaExecuteResponse> {\n return this.request('/zambda/{id}/execute', 'post')(params, request);\n }\n /**\n * Execute the [Public Zambda Function](https://docs.oystehr.com/services/zambda/types/public/) with the provided ID. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.\n *\n * Execute a zambda that has method http_open. This endpoint is public so there are no access policy requirements.\n */\n executePublic(\n params: ZambdaExecutePublicParams,\n request?: OystehrClientRequest\n ): Promise<ZambdaExecutePublicResponse> {\n return this.request('/zambda/{id}/execute-public', 'post')(params, request);\n }\n /**\n * Returns a URL that is used to deploy code to the Zambda Function with the provided ID. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.\n *\n * Access Policy Action: `Zambda:UpdateFunction`\n * Access Policy Resource: `Zambda:Function`\n */\n s3Upload(params: ZambdaS3UploadParams, request?: OystehrClientRequest): Promise<ZambdaS3UploadResponse> {\n return this.request('/zambda/{id}/s3-upload', 'post')(params, request);\n }\n}\n"],"names":["ext.uploadFile"],"mappings":";;;AAAA;AAuBM,MAAO,MAAO,SAAQ,WAAW,CAAA;AACrC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;AAEhB,QAAA,IAAA,CAAA,UAAU,GAAGA,UAAc,CAAC;KAD3B;AAED;;;;;AAKG;AACH,IAAA,IAAI,CAAC,OAA8B,EAAA;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;KAChD;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA0B,EAAE,OAA8B,EAAA;AAC/D,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACzD;AACD;;;;;AAKG;IACH,GAAG,CAAC,MAAuB,EAAE,OAA8B,EAAA;AACzD,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC7D;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA0B,EAAE,OAA8B,EAAA;AAC/D,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/D;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA0B,EAAE,OAA8B,EAAA;AAC/D,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChE;AACD;;;;;AAKG;IACH,OAAO,CAAC,MAA2B,EAAE,OAA8B,EAAA;AACjE,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACtE;AACD;;;;AAIG;IACH,aAAa,CACX,MAAiC,EACjC,OAA8B,EAAA;AAE9B,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,6BAA6B,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC7E;AACD;;;;;AAKG;IACH,QAAQ,CAAC,MAA4B,EAAE,OAA8B,EAAA;AACnE,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACxE;AACF;;;;"}
@@ -9,19 +9,19 @@ export declare class ZambdaLogStream extends SDKResource {
9
9
  * Access Policy Action: `Zambda:ReadLogs`
10
10
  * Access Policy Resource: `Zambda:Function`
11
11
  */
12
- list: (params: ZambdaLogStreamListParams, request?: OystehrClientRequest) => Promise<ZambdaLogStreamListResponse>;
12
+ list(params: ZambdaLogStreamListParams, request?: OystehrClientRequest): Promise<ZambdaLogStreamListResponse>;
13
13
  /**
14
14
  * Get all logs for the Zambda Function with the provided ID, filtered by any of: text in messages, minimum start date, and/or maximum end date. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
15
15
  *
16
16
  * Access Policy Action: `Zambda:ReadLogs`
17
17
  * Access Policy Resource: `Zambda:Function`
18
18
  */
19
- search: (params: ZambdaLogStreamSearchParams, request?: OystehrClientRequest) => Promise<ZambdaLogStreamSearchResponse>;
19
+ search(params: ZambdaLogStreamSearchParams, request?: OystehrClientRequest): Promise<ZambdaLogStreamSearchResponse>;
20
20
  /**
21
21
  * Get the logs from the specified log stream for the Zambda Function with the provided ID. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
22
22
  *
23
23
  * Access Policy Action: `Zambda:ReadLogs`
24
24
  * Access Policy Resource: `Zambda:Function`
25
25
  */
26
- get: (params: ZambdaLogStreamGetParams, request?: OystehrClientRequest) => Promise<ZambdaLogStreamGetResponse>;
26
+ get(params: ZambdaLogStreamGetParams, request?: OystehrClientRequest): Promise<ZambdaLogStreamGetResponse>;
27
27
  }
@@ -4,27 +4,33 @@ import { SDKResource } from '../../client/client.js';
4
4
  class ZambdaLogStream extends SDKResource {
5
5
  constructor(config) {
6
6
  super(config);
7
- /**
8
- * Get the log streams for the Zambda Function with the provided ID. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
9
- *
10
- * Access Policy Action: `Zambda:ReadLogs`
11
- * Access Policy Resource: `Zambda:Function`
12
- */
13
- this.list = (params, request) => this.request('/zambda/{id}/logStream', 'post')(params, request);
14
- /**
15
- * Get all logs for the Zambda Function with the provided ID, filtered by any of: text in messages, minimum start date, and/or maximum end date. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
16
- *
17
- * Access Policy Action: `Zambda:ReadLogs`
18
- * Access Policy Resource: `Zambda:Function`
19
- */
20
- this.search = (params, request) => this.request('/zambda/{id}/logStream/search', 'post')(params, request);
21
- /**
22
- * Get the logs from the specified log stream for the Zambda Function with the provided ID. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
23
- *
24
- * Access Policy Action: `Zambda:ReadLogs`
25
- * Access Policy Resource: `Zambda:Function`
26
- */
27
- this.get = (params, request) => this.request('/zambda/{id}/logStream/{logStreamName}', 'post')(params, request);
7
+ }
8
+ /**
9
+ * Get the log streams for the Zambda Function with the provided ID. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
10
+ *
11
+ * Access Policy Action: `Zambda:ReadLogs`
12
+ * Access Policy Resource: `Zambda:Function`
13
+ */
14
+ list(params, request) {
15
+ return this.request('/zambda/{id}/logStream', 'post')(params, request);
16
+ }
17
+ /**
18
+ * Get all logs for the Zambda Function with the provided ID, filtered by any of: text in messages, minimum start date, and/or maximum end date. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
19
+ *
20
+ * Access Policy Action: `Zambda:ReadLogs`
21
+ * Access Policy Resource: `Zambda:Function`
22
+ */
23
+ search(params, request) {
24
+ return this.request('/zambda/{id}/logStream/search', 'post')(params, request);
25
+ }
26
+ /**
27
+ * Get the logs from the specified log stream for the Zambda Function with the provided ID. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.
28
+ *
29
+ * Access Policy Action: `Zambda:ReadLogs`
30
+ * Access Policy Resource: `Zambda:Function`
31
+ */
32
+ get(params, request) {
33
+ return this.request('/zambda/{id}/logStream/{logStreamName}', 'post')(params, request);
28
34
  }
29
35
  }
30
36
 
@@ -1 +1 @@
1
- {"version":3,"file":"zambdaLogStream.js","sources":["../../../../src/resources/classes/zambdaLogStream.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n OystehrClientRequest,\n ZambdaLogStreamGetParams,\n ZambdaLogStreamGetResponse,\n ZambdaLogStreamListParams,\n ZambdaLogStreamListResponse,\n ZambdaLogStreamSearchParams,\n ZambdaLogStreamSearchResponse,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class ZambdaLogStream extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n /**\n * Get the log streams for the Zambda Function with the provided ID. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.\n *\n * Access Policy Action: `Zambda:ReadLogs`\n * Access Policy Resource: `Zambda:Function`\n */\n list = (params: ZambdaLogStreamListParams, request?: OystehrClientRequest): Promise<ZambdaLogStreamListResponse> =>\n this.request('/zambda/{id}/logStream', 'post')(params, request);\n /**\n * Get all logs for the Zambda Function with the provided ID, filtered by any of: text in messages, minimum start date, and/or maximum end date. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.\n *\n * Access Policy Action: `Zambda:ReadLogs`\n * Access Policy Resource: `Zambda:Function`\n */\n search = (\n params: ZambdaLogStreamSearchParams,\n request?: OystehrClientRequest\n ): Promise<ZambdaLogStreamSearchResponse> => this.request('/zambda/{id}/logStream/search', 'post')(params, request);\n /**\n * Get the logs from the specified log stream for the Zambda Function with the provided ID. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.\n *\n * Access Policy Action: `Zambda:ReadLogs`\n * Access Policy Resource: `Zambda:Function`\n */\n get = (params: ZambdaLogStreamGetParams, request?: OystehrClientRequest): Promise<ZambdaLogStreamGetResponse> =>\n this.request('/zambda/{id}/logStream/{logStreamName}', 'post')(params, request);\n}\n"],"names":[],"mappings":";;AAAA;AAcM,MAAO,eAAgB,SAAQ,WAAW,CAAA;AAC9C,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;AAEhB;;;;;AAKG;QACH,IAAI,CAAA,IAAA,GAAG,CAAC,MAAiC,EAAE,OAA8B,KACvE,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAClE;;;;;AAKG;QACH,IAAM,CAAA,MAAA,GAAG,CACP,MAAmC,EACnC,OAA8B,KACa,IAAI,CAAC,OAAO,CAAC,+BAA+B,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACpH;;;;;AAKG;QACH,IAAG,CAAA,GAAA,GAAG,CAAC,MAAgC,EAAE,OAA8B,KACrE,IAAI,CAAC,OAAO,CAAC,wCAAwC,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KA1BjF;AA2BF;;;;"}
1
+ {"version":3,"file":"zambdaLogStream.js","sources":["../../../../src/resources/classes/zambdaLogStream.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n OystehrClientRequest,\n ZambdaLogStreamGetParams,\n ZambdaLogStreamGetResponse,\n ZambdaLogStreamListParams,\n ZambdaLogStreamListResponse,\n ZambdaLogStreamSearchParams,\n ZambdaLogStreamSearchResponse,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class ZambdaLogStream extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n /**\n * Get the log streams for the Zambda Function with the provided ID. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.\n *\n * Access Policy Action: `Zambda:ReadLogs`\n * Access Policy Resource: `Zambda:Function`\n */\n list(params: ZambdaLogStreamListParams, request?: OystehrClientRequest): Promise<ZambdaLogStreamListResponse> {\n return this.request('/zambda/{id}/logStream', 'post')(params, request);\n }\n /**\n * Get all logs for the Zambda Function with the provided ID, filtered by any of: text in messages, minimum start date, and/or maximum end date. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.\n *\n * Access Policy Action: `Zambda:ReadLogs`\n * Access Policy Resource: `Zambda:Function`\n */\n search(params: ZambdaLogStreamSearchParams, request?: OystehrClientRequest): Promise<ZambdaLogStreamSearchResponse> {\n return this.request('/zambda/{id}/logStream/search', 'post')(params, request);\n }\n /**\n * Get the logs from the specified log stream for the Zambda Function with the provided ID. [Zambdas](https://docs.oystehr.com/services/zambda/) are functions that can be used to execute your code. They can be used to process data received from Oystehr's APIs or to perform operations on third-party services.\n *\n * Access Policy Action: `Zambda:ReadLogs`\n * Access Policy Resource: `Zambda:Function`\n */\n get(params: ZambdaLogStreamGetParams, request?: OystehrClientRequest): Promise<ZambdaLogStreamGetResponse> {\n return this.request('/zambda/{id}/logStream/{logStreamName}', 'post')(params, request);\n }\n}\n"],"names":[],"mappings":";;AAAA;AAcM,MAAO,eAAgB,SAAQ,WAAW,CAAA;AAC9C,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;AACD;;;;;AAKG;IACH,IAAI,CAAC,MAAiC,EAAE,OAA8B,EAAA;AACpE,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACxE;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAAmC,EAAE,OAA8B,EAAA;AACxE,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,+BAA+B,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/E;AACD;;;;;AAKG;IACH,GAAG,CAAC,MAAgC,EAAE,OAA8B,EAAA;AAClE,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,wCAAwC,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACxF;AACF;;;;"}
@@ -1,6 +1,6 @@
1
1
  export interface ConversationAddParticipantParams {
2
2
  /**
3
- * A valid FHIR Encounter relative reference in the format: `Encounter/some-uuid`. This reference must be a valid Encounter in the FHIR store which has the https://extensions.fhir.zapehr.com/encounter-virtual-service-pre-release extension from being created by `POST /message/conversation`.
3
+ * A valid FHIR Encounter relative reference in the format: `Encounter/some-uuid`. This reference must be a valid Encounter in the FHIR store which has the https://extensions.fhir.oystehr.com/encounter-virtual-service-pre-release extension from being created by `POST /message/conversation`.
4
4
  */
5
5
  encounterReference: string;
6
6
  participants: {
@@ -4,7 +4,7 @@ import { Encounter } from 'fhir/r4b';
4
4
  */
5
5
  export interface ConversationCreateResponse {
6
6
  /**
7
- * The FHIR Encounter resource that represents the Conversation in the FHIR Store modified to include the https://extensions.fhir.zapehr.com/encounter-virtual-service-pre-release extension which holds the Twilio Conversation SID.
7
+ * The FHIR Encounter resource that represents the Conversation in the FHIR Store modified to include the https://extensions.fhir.oystehr.com/encounter-virtual-service-pre-release extension which holds the Twilio Conversation SID.
8
8
  */
9
9
  encounter: Encounter;
10
10
  }
@@ -1,6 +1,6 @@
1
1
  export interface ConversationRemoveParticipantParams {
2
2
  /**
3
- * A valid FHIR Encounter relative reference in the format: `Encounter/some-uuid`. This reference must be a valid Encounter in the FHIR store which has the https://extensions.fhir.zapehr.com/encounter-virtual-service-pre-release extension from being created by `POST /message/conversation`.
3
+ * A valid FHIR Encounter relative reference in the format: `Encounter/some-uuid`. This reference must be a valid Encounter in the FHIR store which has the https://extensions.fhir.oystehr.com/encounter-virtual-service-pre-release extension from being created by `POST /message/conversation`.
4
4
  */
5
5
  encounterReference: string;
6
6
  /**
@@ -0,0 +1,6 @@
1
+ export interface ErxCancelOrderParams {
2
+ /**
3
+ * A photon id of the order to cancel.
4
+ */
5
+ orderId: string;
6
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Cancelled order
3
+ */
4
+ export interface ErxCancelOrderResponse {
5
+ orderId: string;
6
+ }
@@ -0,0 +1,6 @@
1
+ export interface ErxCancelPrescriptionParams {
2
+ /**
3
+ * A photon id of the prescription to cancel.
4
+ */
5
+ prescriptionId: string;
6
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Cancelled prescription
3
+ */
4
+ export interface ErxCancelPrescriptionResponse {
5
+ prescriptionId: string;
6
+ }
@@ -0,0 +1,18 @@
1
+ export interface FaxSendParams {
2
+ /**
3
+ * A Z3 URL of the document you want to send. Your user must have access to this document.
4
+ */
5
+ media: string;
6
+ /**
7
+ * The quality of the document you want sent.
8
+ */
9
+ quality: 'standard' | 'fine' | 'superfine';
10
+ /**
11
+ * The recipient of the fax. This must be a valid FHIR CareTeam, HealthcareService, Organization, Patient, Practitioner, PractitionerRole, or RelatedPerson relative reference in the format: `the-resource-type/some-valid-uuid`. This reference must be a valid resource and have a number in the `telecom` field with a `system` of `fax`.
12
+ */
13
+ recipient: string;
14
+ /**
15
+ * The sender of the fax. This must be a valid FHIR HealthcareService, Organization, Patient, Practitioner, PractitionerRole, or RelatedPerson relative reference in the format: `the-resource-type/some-valid-uuid`. This reference must be a valid resource and have your [onboarded fax number](https://docs.oystehr.com/services/fax/number/) in the `telecom` field with a `system` of `fax`.
16
+ */
17
+ sender: string;
18
+ }
@@ -0,0 +1,10 @@
1
+ import { Communication } from 'fhir/r4b';
2
+ /**
3
+ * Successfully sent a fax.
4
+ */
5
+ export interface FaxSendResponse {
6
+ /**
7
+ * The FHIR Communication resource that represents the sent fax in the FHIR Store modified to include the https://extensions.fhir.oystehr.com/outbound-fax-status extension which holds the fax status that will be updated automatically.
8
+ */
9
+ communicationResource: Communication;
10
+ }
@@ -1,7 +1,7 @@
1
1
  import { Encounter } from 'fhir/r4b';
2
2
  export interface TelemedCreateMeetingParams {
3
3
  /**
4
- * Well formed Encounter with the https://extensions.fhir.zapehr.com/encounter-other-participants extension specified optionally.
4
+ * Well formed Encounter with the https://extensions.fhir.oystehr.com/encounter-other-participants extension specified optionally.
5
5
  */
6
6
  encounter?: Encounter;
7
7
  }
@@ -4,7 +4,7 @@ import { Encounter } from 'fhir/r4b';
4
4
  */
5
5
  export interface TelemedCreateMeetingResponse {
6
6
  /**
7
- * Returns well formed Encounter with video meeting information in the https://extensions.fhir.zapehr.com/encounter-virtual-service-pre-release extension.
7
+ * Returns well formed Encounter with video meeting information in the https://extensions.fhir.oystehr.com/encounter-virtual-service-pre-release extension.
8
8
  */
9
9
  encounter?: Encounter;
10
10
  }
@@ -95,10 +95,16 @@ export * from './ErxSyncPatientParams';
95
95
  export * from './ErxSyncPatientResponse';
96
96
  export * from './ErxAllergySearchParams';
97
97
  export * from './ErxAllergySearchResponse';
98
+ export * from './ErxCancelOrderParams';
99
+ export * from './ErxCancelOrderResponse';
100
+ export * from './ErxCancelPrescriptionParams';
101
+ export * from './ErxCancelPrescriptionResponse';
98
102
  export * from './ErxMedicationSearchParams';
99
103
  export * from './ErxMedicationSearchResponse';
100
104
  export * from './ErxMedicationSearchV2Params';
101
105
  export * from './ErxMedicationSearchV2Response';
106
+ export * from './FaxSendParams';
107
+ export * from './FaxSendResponse';
102
108
  export * from './RoleListResponse';
103
109
  export * from './RoleCreateParams';
104
110
  export * from './RoleCreateResponse';
@@ -3,7 +3,7 @@ export declare const projectId = "eb1306aa-fba5-416a-a2a4-6b69eca58d87";
3
3
  export declare const FHIR_API_URL = "http://localhost:3030/dev";
4
4
  export declare const PLATFORM_API_URL = "http://localhost:3031/dev";
5
5
  export declare const PROJECT_API_URL = "http://localhost:3032/dev";
6
- export declare const FHIR_VERSION: any;
6
+ export declare const FHIR_VERSION: import("@zapehr/core").FhirVersion;
7
7
  export declare const config: {
8
8
  accessToken: string;
9
9
  projectId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oystehr/sdk",
3
- "version": "3.0.4",
3
+ "version": "3.0.6",
4
4
  "description": "Oystehr SDK",
5
5
  "scripts": {
6
6
  "lint": "eslint .",
@@ -10,7 +10,7 @@
10
10
  "rollup": "npm run rollup-cjs && npm run rollup-mjs",
11
11
  "rollup-cjs": "node --max-old-space-size=8192 ../../node_modules/rollup/dist/bin/rollup --config rollup.config-cjs.mjs",
12
12
  "rollup-mjs": "node --max-old-space-size=8192 ../../node_modules/rollup/dist/bin/rollup --config rollup.config-mjs.mjs",
13
- "test": "jest \".*\\.ts\" --runInBand",
13
+ "test": "NODE_OPTIONS=--experimental-vm-modules jest --runInBand",
14
14
  "parser": "ts-node debug-parser.ts",
15
15
  "publish-to-npmjs": "npm run build && npm publish",
16
16
  "publish-to-npmjs-next": "npm run build && npm publish --tag next",
@@ -36,9 +36,9 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@types/fhir": "0.0.41",
39
- "@types/node": "20.11.25",
39
+ "@types/node": "20.17.6",
40
40
  "fast-json-patch": "3.1.1",
41
- "uuid": "10.0.0"
41
+ "uuid": "11.0.2"
42
42
  },
43
43
  "keywords": [
44
44
  "oystehr",
@@ -179,12 +179,14 @@ function fetcher(
179
179
  );
180
180
  const retryConfig: ConstructedRetryConfig = {
181
181
  retries: config.retry?.retries ?? 3,
182
+ jitter: config.retry?.jitter ?? 20,
183
+ delay: config.retry?.delay ?? 100,
182
184
  onRetry: config.retry?.onRetry,
183
185
  // Using array instead of set because the length is too short for uniqueness to be important
184
186
  retryOn: [...(config.retry?.retryOn ?? []), ...STATUS_CODES_TO_RETRY],
185
187
  };
186
188
  retryConfig.retryOn.push(...STATUS_CODES_TO_RETRY);
187
- return retry(async (attempt) => {
189
+ return retry(async () => {
188
190
  const response = await fetchImpl(
189
191
  new Request(url, {
190
192
  method: method.toUpperCase(),
@@ -201,13 +203,12 @@ function fetcher(
201
203
  response.headers.get('content-type')?.includes('application/fhir+json'))
202
204
  ? JSON.parse(responseBody)
203
205
  : null;
204
- } catch (err) {
206
+ } catch (_err) {
205
207
  // ignore JSON.parse errors
206
208
  responseJson = null;
207
209
  }
208
210
  const isError = !response.ok || response.status >= 400;
209
211
  if (isError) {
210
- headers['x-oystehr-fetch-attempts'] = `${attempt}`;
211
212
  const errObj = {
212
213
  message: responseJson?.message ?? responseJson ?? responseBody ?? response.statusText,
213
214
  code: responseJson?.code ?? response.status,
@@ -221,6 +222,8 @@ function fetcher(
221
222
  }
222
223
 
223
224
  type ConstructedRetryConfig = Omit<NonNullable<OystehrConfig['retry']>, 'retryOn'> & {
225
+ jitter: NonNullable<NonNullable<OystehrConfig['retry']>['jitter']>;
226
+ delay: NonNullable<NonNullable<OystehrConfig['retry']>['delay']>;
224
227
  retryOn: NonNullable<NonNullable<OystehrConfig['retry']>['retryOn']>;
225
228
  };
226
229
  async function retry<T>(work: (attempt: number) => Promise<T>, config: ConstructedRetryConfig): Promise<T> {
@@ -247,6 +250,8 @@ async function retry<T>(work: (attempt: number) => Promise<T>, config: Construct
247
250
  if (!isRetryable) {
248
251
  break;
249
252
  }
253
+ const jitter = Math.floor(Math.random() * (config.jitter + 1));
254
+ await new Promise((resolve) => setTimeout(resolve, config.delay + jitter));
250
255
  if (config.onRetry && attempt !== (config.retries ?? 0)) {
251
256
  config.onRetry(attempt + 1);
252
257
  }
package/src/config.ts CHANGED
@@ -28,6 +28,14 @@ export interface OystehrConfig {
28
28
  * Number of retries.
29
29
  */
30
30
  retries: number;
31
+ /**
32
+ * Shift retries by up to this many milliseconds. Defaults to 20 milliseconds.
33
+ */
34
+ jitter?: number;
35
+ /**
36
+ * Wait this many milliseconds between retries. Defaults to 100 milliseconds.
37
+ */
38
+ delay?: number;
31
39
  /**
32
40
  * Optional, non-async function to call when a request is retried.
33
41
  * @param attempt
@@ -30,71 +30,79 @@ export class Application extends SDKResource {
30
30
  * Access Policy Action: `App:ListAllApplications`
31
31
  * Access Policy Resource: `App:Application`
32
32
  */
33
- list = (request?: OystehrClientRequest): Promise<ApplicationListResponse> =>
34
- this.request('/application', 'get')(request);
33
+ list(request?: OystehrClientRequest): Promise<ApplicationListResponse> {
34
+ return this.request('/application', 'get')(request);
35
+ }
35
36
  /**
36
37
  * 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.
37
38
  *
38
39
  * Access Policy Action: `App:CreateApplication`
39
40
  * Access Policy Resource: `App:Application`
40
41
  */
41
- create = (params: ApplicationCreateParams, request?: OystehrClientRequest): Promise<ApplicationCreateResponse> =>
42
- this.request('/application', 'post')(params, request);
42
+ create(params: ApplicationCreateParams, request?: OystehrClientRequest): Promise<ApplicationCreateResponse> {
43
+ return this.request('/application', 'post')(params, request);
44
+ }
43
45
  /**
44
46
  * 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.
45
47
  *
46
48
  * Access Policy Action: `App:GetApplication`
47
49
  * Access Policy Resource: `App:Application`
48
50
  */
49
- get = (params: ApplicationGetParams, request?: OystehrClientRequest): Promise<ApplicationGetResponse> =>
50
- this.request('/application/{id}', 'get')(params, request);
51
+ get(params: ApplicationGetParams, request?: OystehrClientRequest): Promise<ApplicationGetResponse> {
52
+ return this.request('/application/{id}', 'get')(params, request);
53
+ }
51
54
  /**
52
55
  * 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.
53
56
  *
54
57
  * Access Policy Action: `App:UpdateApplication`
55
58
  * Access Policy Resource: `App:Application`
56
59
  */
57
- update = (params: ApplicationUpdateParams, request?: OystehrClientRequest): Promise<ApplicationUpdateResponse> =>
58
- this.request('/application/{id}', 'patch')(params, request);
60
+ update(params: ApplicationUpdateParams, request?: OystehrClientRequest): Promise<ApplicationUpdateResponse> {
61
+ return this.request('/application/{id}', 'patch')(params, request);
62
+ }
59
63
  /**
60
64
  * 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.
61
65
  *
62
66
  * Access Policy Action: `App:DeleteApplication`
63
67
  * Access Policy Resource: `App:Application`
64
68
  */
65
- delete = (params: ApplicationDeleteParams, request?: OystehrClientRequest): Promise<void> =>
66
- this.request('/application/{id}', 'delete')(params, request);
69
+ delete(params: ApplicationDeleteParams, request?: OystehrClientRequest): Promise<void> {
70
+ return this.request('/application/{id}', 'delete')(params, request);
71
+ }
67
72
  /**
68
73
  * Rotate client's secrete associated with an application.
69
74
  *
70
75
  * Access Policy Action: `App:RotateApplicationSecret`
71
76
  * Access Policy Resource: `App:Application`
72
77
  */
73
- rotateSecret = (
78
+ rotateSecret(
74
79
  params: ApplicationRotateSecretParams,
75
80
  request?: OystehrClientRequest
76
- ): Promise<ApplicationRotateSecretResponse> =>
77
- this.request('/application/{id}/rotate-secret', 'post')(params, request);
81
+ ): Promise<ApplicationRotateSecretResponse> {
82
+ return this.request('/application/{id}/rotate-secret', 'post')(params, request);
83
+ }
78
84
  /**
79
85
  * Revokes user's refresh token issued for the application.
80
86
  *
81
87
  * Access Policy Action: `App:RevokeRefreshToken`
82
88
  * Access Policy Resource: `App:Application`
83
89
  */
84
- revokeRefreshToken = (
90
+ revokeRefreshToken(
85
91
  params: ApplicationRevokeRefreshTokenParams,
86
92
  request?: OystehrClientRequest
87
- ): Promise<ApplicationRevokeRefreshTokenResponse> =>
88
- this.request('/application/{id}/revoke-refresh-token', 'post')(params, request);
93
+ ): Promise<ApplicationRevokeRefreshTokenResponse> {
94
+ return this.request('/application/{id}/revoke-refresh-token', 'post')(params, request);
95
+ }
89
96
  /**
90
97
  * Revokes user's access token issued for the application.
91
98
  *
92
99
  * Access Policy Action: `App:RevokeAccessToken`
93
100
  * Access Policy Resource: `App:Application`
94
101
  */
95
- revokeAccessToken = (
102
+ revokeAccessToken(
96
103
  params: ApplicationRevokeAccessTokenParams,
97
104
  request?: OystehrClientRequest
98
- ): Promise<ApplicationRevokeAccessTokenResponse> =>
99
- this.request('/application/{id}/revoke-access-token', 'post')(params, request);
105
+ ): Promise<ApplicationRevokeAccessTokenResponse> {
106
+ return this.request('/application/{id}/revoke-access-token', 'post')(params, request);
107
+ }
100
108
  }
@@ -19,8 +19,9 @@ export class Charge extends SDKResource {
19
19
  * Action: `FHIR:Read`
20
20
  * Access Policy Resources: `FHIR:Patient:*,FHIR:Encounter:*,FHIR:Coverage:*`
21
21
  */
22
- issue = (params: ChargeIssueParams, request?: OystehrClientRequest): Promise<void> =>
23
- this.request('/payment/charge/issue', 'post')(params, request);
22
+ issue(params: ChargeIssueParams, request?: OystehrClientRequest): Promise<void> {
23
+ return this.request('/payment/charge/issue', 'post')(params, request);
24
+ }
24
25
  /**
25
26
  * Retrieve charge status for a specified encounter or charge item.
26
27
  *
@@ -32,6 +33,7 @@ export class Charge extends SDKResource {
32
33
  * Action: `FHIR:Read`
33
34
  * Access Policy Resources: `FHIR:Patient:*,FHIR:Encounter:*,FHIR:Coverage:*`
34
35
  */
35
- status = (params: ChargeStatusParams, request?: OystehrClientRequest): Promise<ChargeStatusResponse> =>
36
- this.request('/payment/charge/status', 'post')(params, request);
36
+ status(params: ChargeStatusParams, request?: OystehrClientRequest): Promise<ChargeStatusResponse> {
37
+ return this.request('/payment/charge/status', 'post')(params, request);
38
+ }
37
39
  }
@@ -36,16 +36,18 @@ export class Conversation extends SDKResource {
36
36
  * Action: `FHIR:Update`
37
37
  * Access Policy Resource: `FHIR:Encounter`
38
38
  */
39
- create = (params: ConversationCreateParams, request?: OystehrClientRequest): Promise<ConversationCreateResponse> =>
40
- this.request('/messaging/conversation', 'post')(params, request);
39
+ create(params: ConversationCreateParams, request?: OystehrClientRequest): Promise<ConversationCreateResponse> {
40
+ return this.request('/messaging/conversation', 'post')(params, request);
41
+ }
41
42
  /**
42
43
  * 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.
43
44
  *
44
45
  * Access Policy Action: `Messaging:GetConversationToken`
45
46
  * Access Policy Resource: `Messaging:Conversation`.
46
47
  */
47
- getToken = (request?: OystehrClientRequest): Promise<ConversationGetTokenResponse> =>
48
- this.request('/messaging/conversation/token', 'get')(request);
48
+ getToken(request?: OystehrClientRequest): Promise<ConversationGetTokenResponse> {
49
+ return this.request('/messaging/conversation/token', 'get')(request);
50
+ }
49
51
  /**
50
52
  * 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.
51
53
  *
@@ -57,8 +59,9 @@ export class Conversation extends SDKResource {
57
59
  * Action: `FHIR:Update`
58
60
  * Access Policy Resource: `FHIR:Encounter`
59
61
  */
60
- addParticipant = (params: ConversationAddParticipantParams, request?: OystehrClientRequest): Promise<void> =>
61
- this.request('/messaging/conversation/{conversationId}/participant', 'post')(params, request);
62
+ addParticipant(params: ConversationAddParticipantParams, request?: OystehrClientRequest): Promise<void> {
63
+ return this.request('/messaging/conversation/{conversationId}/participant', 'post')(params, request);
64
+ }
62
65
  /**
63
66
  * 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.
64
67
  *
@@ -68,8 +71,9 @@ export class Conversation extends SDKResource {
68
71
  * Action: `FHIR:Read`
69
72
  * Access Policy Resource: `FHIR:Patient`, `FHIR:Practitioner`, or `FHIR:RelatedPerson`
70
73
  */
71
- removeParticipant = (params: ConversationRemoveParticipantParams, request?: OystehrClientRequest): Promise<void> =>
72
- this.request('/messaging/conversation/{conversationId}/participant', 'delete')(params, request);
74
+ removeParticipant(params: ConversationRemoveParticipantParams, request?: OystehrClientRequest): Promise<void> {
75
+ return this.request('/messaging/conversation/{conversationId}/participant', 'delete')(params, request);
76
+ }
73
77
  /**
74
78
  * 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.
75
79
  *
@@ -77,6 +81,7 @@ export class Conversation extends SDKResource {
77
81
  * Action: `Messaging:ConversationSendMessage`
78
82
  * Access Policy Resource: `Messaging:Conversation`
79
83
  */
80
- message = (params: ConversationMessageParams, request?: OystehrClientRequest): Promise<void> =>
81
- this.request('/messaging/conversation/{conversationId}/message', 'post')(params, request);
84
+ message(params: ConversationMessageParams, request?: OystehrClientRequest): Promise<void> {
85
+ return this.request('/messaging/conversation/{conversationId}/message', 'post')(params, request);
86
+ }
82
87
  }