@oystehr/sdk 3.0.6 → 3.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/README.md +28 -12
  2. package/dist/cjs/client/client.d.ts +1 -1
  3. package/dist/cjs/config.d.ts +5 -0
  4. package/dist/cjs/errors/index.d.ts +4 -1
  5. package/dist/cjs/index.cjs +313 -155
  6. package/dist/cjs/index.cjs.map +1 -1
  7. package/dist/cjs/index.min.cjs +1 -1
  8. package/dist/cjs/index.min.cjs.map +1 -1
  9. package/dist/cjs/resources/classes/application.d.ts +6 -5
  10. package/dist/cjs/resources/classes/charge.d.ts +1 -0
  11. package/dist/cjs/resources/classes/conversation.d.ts +6 -5
  12. package/dist/cjs/resources/classes/developer.d.ts +14 -6
  13. package/dist/cjs/resources/classes/erx.d.ts +9 -0
  14. package/dist/cjs/resources/classes/fax.d.ts +4 -3
  15. package/dist/cjs/resources/classes/fhir.d.ts +1 -0
  16. package/dist/cjs/resources/classes/index.d.ts +1 -1
  17. package/dist/cjs/resources/classes/m2m.d.ts +15 -7
  18. package/dist/cjs/resources/classes/messaging.d.ts +1 -0
  19. package/dist/cjs/resources/classes/paymentMethod.d.ts +1 -0
  20. package/dist/cjs/resources/classes/project.d.ts +10 -2
  21. package/dist/cjs/resources/classes/rcm.d.ts +4 -3
  22. package/dist/cjs/resources/classes/role.d.ts +6 -5
  23. package/dist/cjs/resources/classes/secret.d.ts +1 -0
  24. package/dist/cjs/resources/classes/telemed.d.ts +2 -1
  25. package/dist/cjs/resources/classes/transactionalSMS.d.ts +2 -1
  26. package/dist/cjs/resources/classes/user.d.ts +15 -7
  27. package/dist/cjs/resources/classes/version.d.ts +1 -0
  28. package/dist/cjs/resources/classes/z3.d.ts +7 -6
  29. package/dist/cjs/resources/classes/zambda.d.ts +9 -8
  30. package/dist/cjs/resources/classes/zambdaLogStream.d.ts +4 -3
  31. package/dist/cjs/resources/types/AccessPolicy.d.ts +8 -3
  32. package/dist/cjs/resources/types/ChargeIssueParams.d.ts +1 -1
  33. package/dist/cjs/resources/types/ChargeStatusParams.d.ts +1 -1
  34. package/dist/cjs/resources/types/DeveloperInviteResponse.d.ts +0 -4
  35. package/dist/cjs/resources/types/DeveloperListV2Params.d.ts +2 -2
  36. package/dist/cjs/resources/types/FaxSendParams.d.ts +1 -1
  37. package/dist/cjs/resources/types/M2mListV2Params.d.ts +2 -2
  38. package/dist/cjs/resources/types/M2mRotateSecretResponse.d.ts +1 -1
  39. package/dist/cjs/resources/types/RcmEligibilityCheckParams.d.ts +1 -1
  40. package/dist/cjs/resources/types/RoleUpdateParams.d.ts +0 -4
  41. package/dist/cjs/resources/types/TelemedCreateMeetingParams.d.ts +1 -1
  42. package/dist/cjs/resources/types/UserListV2Params.d.ts +2 -2
  43. package/dist/cjs/resources/types/ZambdaCreateParams.d.ts +1 -1
  44. package/dist/cjs/resources/types/ZambdaFunction.d.ts +1 -1
  45. package/dist/cjs/resources/types/ZambdaUpdateParams.d.ts +2 -2
  46. package/dist/cjs/resources/types/index.d.ts +2 -2
  47. package/dist/cjs/tests/setup/constants.d.ts +2 -6
  48. package/dist/cjs/tests/setup/global.d.ts +1 -0
  49. package/dist/esm/client/client.d.ts +1 -1
  50. package/dist/esm/client/client.js +4 -4
  51. package/dist/esm/client/client.js.map +1 -1
  52. package/dist/esm/config.d.ts +5 -0
  53. package/dist/esm/errors/index.d.ts +4 -1
  54. package/dist/esm/errors/index.js +18 -2
  55. package/dist/esm/errors/index.js.map +1 -1
  56. package/dist/esm/index.min.js +1 -1
  57. package/dist/esm/index.min.js.map +1 -1
  58. package/dist/esm/resources/classes/application.d.ts +6 -5
  59. package/dist/esm/resources/classes/application.js +20 -13
  60. package/dist/esm/resources/classes/application.js.map +1 -1
  61. package/dist/esm/resources/classes/charge.d.ts +1 -0
  62. package/dist/esm/resources/classes/charge.js +9 -2
  63. package/dist/esm/resources/classes/charge.js.map +1 -1
  64. package/dist/esm/resources/classes/conversation.d.ts +6 -5
  65. package/dist/esm/resources/classes/conversation.js +17 -10
  66. package/dist/esm/resources/classes/conversation.js.map +1 -1
  67. package/dist/esm/resources/classes/developer.d.ts +14 -6
  68. package/dist/esm/resources/classes/developer.js +18 -11
  69. package/dist/esm/resources/classes/developer.js.map +1 -1
  70. package/dist/esm/resources/classes/erx.d.ts +9 -0
  71. package/dist/esm/resources/classes/erx.js +13 -6
  72. package/dist/esm/resources/classes/erx.js.map +1 -1
  73. package/dist/esm/resources/classes/fax.d.ts +4 -3
  74. package/dist/esm/resources/classes/fax.js +13 -6
  75. package/dist/esm/resources/classes/fax.js.map +1 -1
  76. package/dist/esm/resources/classes/fhir.d.ts +1 -0
  77. package/dist/esm/resources/classes/fhir.js +3 -0
  78. package/dist/esm/resources/classes/fhir.js.map +1 -1
  79. package/dist/esm/resources/classes/index.d.ts +1 -1
  80. package/dist/esm/resources/classes/index.js +6 -1
  81. package/dist/esm/resources/classes/index.js.map +1 -1
  82. package/dist/esm/resources/classes/m2m.d.ts +15 -7
  83. package/dist/esm/resources/classes/m2m.js +20 -13
  84. package/dist/esm/resources/classes/m2m.js.map +1 -1
  85. package/dist/esm/resources/classes/messaging.d.ts +1 -0
  86. package/dist/esm/resources/classes/messaging.js +8 -1
  87. package/dist/esm/resources/classes/messaging.js.map +1 -1
  88. package/dist/esm/resources/classes/paymentMethod.d.ts +1 -0
  89. package/dist/esm/resources/classes/paymentMethod.js +11 -4
  90. package/dist/esm/resources/classes/paymentMethod.js.map +1 -1
  91. package/dist/esm/resources/classes/project.d.ts +10 -2
  92. package/dist/esm/resources/classes/project.js +10 -3
  93. package/dist/esm/resources/classes/project.js.map +1 -1
  94. package/dist/esm/resources/classes/rcm.d.ts +4 -3
  95. package/dist/esm/resources/classes/rcm.js +13 -6
  96. package/dist/esm/resources/classes/rcm.js.map +1 -1
  97. package/dist/esm/resources/classes/role.d.ts +6 -5
  98. package/dist/esm/resources/classes/role.js +17 -10
  99. package/dist/esm/resources/classes/role.js.map +1 -1
  100. package/dist/esm/resources/classes/secret.d.ts +1 -0
  101. package/dist/esm/resources/classes/secret.js +11 -4
  102. package/dist/esm/resources/classes/secret.js.map +1 -1
  103. package/dist/esm/resources/classes/telemed.d.ts +2 -1
  104. package/dist/esm/resources/classes/telemed.js +10 -3
  105. package/dist/esm/resources/classes/telemed.js.map +1 -1
  106. package/dist/esm/resources/classes/transactionalSMS.d.ts +2 -1
  107. package/dist/esm/resources/classes/transactionalSMS.js +9 -2
  108. package/dist/esm/resources/classes/transactionalSMS.js.map +1 -1
  109. package/dist/esm/resources/classes/user.d.ts +15 -7
  110. package/dist/esm/resources/classes/user.js +20 -13
  111. package/dist/esm/resources/classes/user.js.map +1 -1
  112. package/dist/esm/resources/classes/version.d.ts +1 -0
  113. package/dist/esm/resources/classes/version.js +8 -1
  114. package/dist/esm/resources/classes/version.js.map +1 -1
  115. package/dist/esm/resources/classes/z3-ext.js +9 -5
  116. package/dist/esm/resources/classes/z3-ext.js.map +1 -1
  117. package/dist/esm/resources/classes/z3.d.ts +7 -6
  118. package/dist/esm/resources/classes/z3.js +19 -12
  119. package/dist/esm/resources/classes/z3.js.map +1 -1
  120. package/dist/esm/resources/classes/zambda-ext.js +5 -1
  121. package/dist/esm/resources/classes/zambda-ext.js.map +1 -1
  122. package/dist/esm/resources/classes/zambda.d.ts +9 -8
  123. package/dist/esm/resources/classes/zambda.js +23 -16
  124. package/dist/esm/resources/classes/zambda.js.map +1 -1
  125. package/dist/esm/resources/classes/zambdaLogStream.d.ts +4 -3
  126. package/dist/esm/resources/classes/zambdaLogStream.js +13 -6
  127. package/dist/esm/resources/classes/zambdaLogStream.js.map +1 -1
  128. package/dist/esm/resources/types/AccessPolicy.d.ts +8 -3
  129. package/dist/esm/resources/types/ChargeIssueParams.d.ts +1 -1
  130. package/dist/esm/resources/types/ChargeStatusParams.d.ts +1 -1
  131. package/dist/esm/resources/types/DeveloperInviteResponse.d.ts +0 -4
  132. package/dist/esm/resources/types/DeveloperListV2Params.d.ts +2 -2
  133. package/dist/esm/resources/types/FaxSendParams.d.ts +1 -1
  134. package/dist/esm/resources/types/M2mListV2Params.d.ts +2 -2
  135. package/dist/esm/resources/types/M2mRotateSecretResponse.d.ts +1 -1
  136. package/dist/esm/resources/types/RcmEligibilityCheckParams.d.ts +1 -1
  137. package/dist/esm/resources/types/RoleUpdateParams.d.ts +0 -4
  138. package/dist/esm/resources/types/TelemedCreateMeetingParams.d.ts +1 -1
  139. package/dist/esm/resources/types/UserListV2Params.d.ts +2 -2
  140. package/dist/esm/resources/types/ZambdaCreateParams.d.ts +1 -1
  141. package/dist/esm/resources/types/ZambdaFunction.d.ts +1 -1
  142. package/dist/esm/resources/types/ZambdaUpdateParams.d.ts +2 -2
  143. package/dist/esm/resources/types/index.d.ts +2 -2
  144. package/dist/esm/tests/setup/constants.d.ts +2 -6
  145. package/dist/esm/tests/setup/global.d.ts +1 -0
  146. package/package.json +3 -3
  147. package/src/client/client.ts +6 -6
  148. package/src/config.ts +5 -0
  149. package/src/errors/index.ts +18 -2
  150. package/src/resources/classes/application.ts +24 -13
  151. package/src/resources/classes/charge.ts +5 -2
  152. package/src/resources/classes/conversation.ts +25 -10
  153. package/src/resources/classes/developer.ts +32 -12
  154. package/src/resources/classes/erx.ts +31 -6
  155. package/src/resources/classes/fax.ts +9 -6
  156. package/src/resources/classes/fhir.ts +3 -0
  157. package/src/resources/classes/index.ts +5 -2
  158. package/src/resources/classes/m2m.ts +31 -14
  159. package/src/resources/classes/messaging.ts +4 -1
  160. package/src/resources/classes/paymentMethod.ts +7 -4
  161. package/src/resources/classes/project.ts +24 -4
  162. package/src/resources/classes/rcm.ts +9 -6
  163. package/src/resources/classes/role.ts +13 -10
  164. package/src/resources/classes/secret.ts +7 -4
  165. package/src/resources/classes/telemed.ts +10 -3
  166. package/src/resources/classes/transactionalSMS.ts +5 -2
  167. package/src/resources/classes/user.ts +34 -14
  168. package/src/resources/classes/version.ts +4 -1
  169. package/src/resources/classes/z3-ext.ts +10 -4
  170. package/src/resources/classes/z3.ts +15 -12
  171. package/src/resources/classes/zambda-ext.ts +5 -1
  172. package/src/resources/classes/zambda.ts +19 -16
  173. package/src/resources/classes/zambdaLogStream.ts +13 -6
  174. package/src/resources/types/AccessPolicy.ts +12 -3
  175. package/src/resources/types/ChargeIssueParams.ts +1 -1
  176. package/src/resources/types/ChargeStatusParams.ts +1 -1
  177. package/src/resources/types/DeveloperInviteResponse.ts +0 -4
  178. package/src/resources/types/DeveloperListV2Params.ts +2 -2
  179. package/src/resources/types/FaxSendParams.ts +1 -1
  180. package/src/resources/types/M2mListV2Params.ts +2 -2
  181. package/src/resources/types/M2mRotateSecretResponse.ts +1 -1
  182. package/src/resources/types/RcmEligibilityCheckParams.ts +1 -1
  183. package/src/resources/types/RoleUpdateParams.ts +0 -4
  184. package/src/resources/types/TelemedCreateMeetingParams.ts +1 -1
  185. package/src/resources/types/UserListV2Params.ts +2 -2
  186. package/src/resources/types/ZambdaCreateParams.ts +1 -1
  187. package/src/resources/types/ZambdaFunction.ts +1 -1
  188. package/src/resources/types/ZambdaUpdateParams.ts +2 -2
  189. package/src/resources/types/index.ts +2 -2
  190. package/dist/esm/node_modules/tslib/package.json +0 -1
  191. package/dist/esm/node_modules/tslib/tslib.es6.js +0 -34
  192. package/dist/esm/node_modules/tslib/tslib.es6.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"z3.js","sources":["../../../../src/resources/classes/z3.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n OystehrClientRequest,\n Z3CreateBucketParams,\n Z3CreateBucketResponse,\n Z3DeleteBucketParams,\n Z3DeleteObjectParams,\n Z3GetPresignedUrlParams,\n Z3GetPresignedUrlResponse,\n Z3ListBucketsResponse,\n Z3ListObjectsParams,\n Z3ListObjectsResponse,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\nimport * as ext from './z3-ext';\n\nexport class Z3 extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n /**\n * Uploads a file to the bucket and key. Files should be Blobs.\n * @param params upload file params\n */\n uploadFile = ext.uploadFile;\n /**\n * Downloads an object matching the bucket and key. File content is returned as an ArrayBuffer.\n * @param params download file params\n */\n downloadFile = ext.downloadFile;\n /**\n * This helper performs a `getPresignedUrl` request for Z3 URLs of the forms\n * `https://projects-api.oystehr.com/v1/z3/<bucket>/<key>` or `z3://<bucket>/<key>`\n * instead of the standard SDK `Z3GetPresignedUrlParams`.\n * @param params url and action\n */\n getPresignedUrlForZ3Url = ext.getPresignedUrlForZ3Url;\n /**\n * List all Z3 Buckets. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:ListBuckets`\n * Access Policy Resource: `Z3:BucketName`\n */\n listBuckets(request?: OystehrClientRequest): Promise<Z3ListBucketsResponse> {\n return this.request('/z3', 'get')(request);\n }\n /**\n * Create a Z3 Bucket with the provided name. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:CreateBucket`\n * Access Policy Resource: `Z3:BucketName`\n */\n createBucket(params: Z3CreateBucketParams, request?: OystehrClientRequest): Promise<Z3CreateBucketResponse> {\n return this.request('/z3/{bucketName}', 'put')(params, request);\n }\n /**\n * Delete the Z3 Bucket with the provided name. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:DeleteBucket`\n * Access Policy Resource: `Z3:BucketName`\n */\n deleteBucket(params: Z3DeleteBucketParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/z3/{bucketName}', 'delete')(params, request);\n }\n /**\n * List all Z3 Objects at the provided path in the Bucket with the provided name [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:ListObjects`\n * Access Policy Resource: `Z3:BucketName:ObjectPath`\n */\n listObjects(params: Z3ListObjectsParams, request?: OystehrClientRequest): Promise<Z3ListObjectsResponse> {\n return this.request('/z3/{bucketName}/{objectPath+}', 'get')(params, request);\n }\n /**\n * Get a link for downloading or uploading a Z3 Object to the provided path in the Bucket with the provided name. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:PutObject` or `Z3:GetObject`\n * Access Policy Resource: `Z3:BucketName:ObjectPath`\n */\n getPresignedUrl(params: Z3GetPresignedUrlParams, request?: OystehrClientRequest): Promise<Z3GetPresignedUrlResponse> {\n return this.request('/z3/{bucketName}/{objectPath+}', 'post')(params, request);\n }\n /**\n * Delete the Z3 Object at the provided path in the Bucket with the provided name. [Z3](https://docs.oystehr.com/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:DeleteObject`\n * Access Policy Resource: `Z3:BucketName:ObjectPath`\n */\n deleteObject(params: Z3DeleteObjectParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/z3/{bucketName}/{objectPath+}', 'delete')(params, request);\n }\n}\n"],"names":["ext.uploadFile","ext.downloadFile","ext.getPresignedUrlForZ3Url"],"mappings":";;;AAAA;AAkBM,MAAO,EAAG,SAAQ,WAAW,CAAA;AACjC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;AAEhB;;;AAGG;AACH,QAAA,IAAA,CAAA,UAAU,GAAGA,UAAc,CAAC;AAC5B;;;AAGG;AACH,QAAA,IAAA,CAAA,YAAY,GAAGC,YAAgB,CAAC;AAChC;;;;;AAKG;AACH,QAAA,IAAA,CAAA,uBAAuB,GAAGC,uBAA2B,CAAC;KAjBrD;AAkBD;;;;;AAKG;AACH,IAAA,WAAW,CAAC,OAA8B,EAAA;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;KAC5C;AACD;;;;;AAKG;IACH,YAAY,CAAC,MAA4B,EAAE,OAA8B,EAAA;AACvE,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACjE;AACD;;;;;AAKG;IACH,YAAY,CAAC,MAA4B,EAAE,OAA8B,EAAA;AACvE,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpE;AACD;;;;;AAKG;IACH,WAAW,CAAC,MAA2B,EAAE,OAA8B,EAAA;AACrE,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,gCAAgC,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/E;AACD;;;;;AAKG;IACH,eAAe,CAAC,MAA+B,EAAE,OAA8B,EAAA;AAC7E,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,gCAAgC,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChF;AACD;;;;;AAKG;IACH,YAAY,CAAC,MAA4B,EAAE,OAA8B,EAAA;AACvE,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,gCAAgC,EAAE,QAAQ,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAClF;AACF;;;;"}
1
+ {"version":3,"file":"z3.js","sources":["../../../../src/resources/classes/z3.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n OystehrClientRequest,\n Z3CreateBucketParams,\n Z3CreateBucketResponse,\n Z3DeleteBucketParams,\n Z3DeleteObjectParams,\n Z3GetPresignedUrlParams,\n Z3GetPresignedUrlResponse,\n Z3ListBucketsResponse,\n Z3ListObjectsParams,\n Z3ListObjectsResponse,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\nimport * as ext from './z3-ext';\n\nexport class Z3 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 * Uploads a file to the bucket and key. Files should be Blobs.\n * @param params upload file params\n */\n uploadFile = ext.uploadFile;\n /**\n * Downloads an object matching the bucket and key. File content is returned as an ArrayBuffer.\n * @param params download file params\n */\n downloadFile = ext.downloadFile;\n /**\n * This helper performs a `getPresignedUrl` request for Z3 URLs of the forms\n * `https://projects-api.oystehr.com/v1/z3/<bucket>/<key>` or `z3://<bucket>/<key>`\n * instead of the standard SDK `Z3GetPresignedUrlParams`.\n * @param params url and action\n */\n getPresignedUrlForZ3Url = ext.getPresignedUrlForZ3Url;\n /**\n * List all Z3 Buckets. [Z3](https://docs.oystehr.com/oystehr/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:ListBuckets`\n * Access Policy Resource: `Z3:BucketName`\n */\n listBuckets(request?: OystehrClientRequest): Promise<Z3ListBucketsResponse> {\n return this.request('/z3', 'get', this.#baseUrlThunk.bind(this))(request);\n }\n /**\n * Create a Z3 Bucket with the provided name. [Z3](https://docs.oystehr.com/oystehr/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:CreateBucket`\n * Access Policy Resource: `Z3:BucketName`\n */\n createBucket(params: Z3CreateBucketParams, request?: OystehrClientRequest): Promise<Z3CreateBucketResponse> {\n return this.request('/z3/{bucketName}', 'put', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Delete the Z3 Bucket with the provided name. [Z3](https://docs.oystehr.com/oystehr/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:DeleteBucket`\n * Access Policy Resource: `Z3:BucketName`\n */\n deleteBucket(params: Z3DeleteBucketParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/z3/{bucketName}', 'delete', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * List all Z3 Objects at the provided path in the Bucket with the provided name [Z3](https://docs.oystehr.com/oystehr/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:ListObjects`\n * Access Policy Resource: `Z3:BucketName:ObjectPath`\n */\n listObjects(params: Z3ListObjectsParams, request?: OystehrClientRequest): Promise<Z3ListObjectsResponse> {\n return this.request('/z3/{bucketName}/{objectPath+}', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Get a link for downloading or uploading a Z3 Object to the provided path in the Bucket with the provided name. [Z3](https://docs.oystehr.com/oystehr/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:PutObject` or `Z3:GetObject`\n * Access Policy Resource: `Z3:BucketName:ObjectPath`\n */\n getPresignedUrl(params: Z3GetPresignedUrlParams, request?: OystehrClientRequest): Promise<Z3GetPresignedUrlResponse> {\n return this.request('/z3/{bucketName}/{objectPath+}', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Delete the Z3 Object at the provided path in the Bucket with the provided name. [Z3](https://docs.oystehr.com/oystehr/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.\n *\n * Access Policy Action: `Z3:DeleteObject`\n * Access Policy Resource: `Z3:BucketName:ObjectPath`\n */\n deleteObject(params: Z3DeleteObjectParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/z3/{bucketName}/{objectPath+}', 'delete', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":["ext.uploadFile","ext.downloadFile","ext.getPresignedUrlForZ3Url"],"mappings":";;;;AAAA;;AAkBM,MAAO,EAAG,SAAQ,WAAW,CAAA;AACjC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;;AAKhB;;;AAGG;AACH,QAAA,IAAA,CAAA,UAAU,GAAGA,UAAc,CAAC;AAC5B;;;AAGG;AACH,QAAA,IAAA,CAAA,YAAY,GAAGC,YAAgB,CAAC;AAChC;;;;;AAKG;AACH,QAAA,IAAA,CAAA,uBAAuB,GAAGC,uBAA2B,CAAC;KApBrD;AAqBD;;;;;AAKG;AACH,IAAA,WAAW,CAAC,OAA8B,EAAA;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,sBAAA,CAAA,IAAI,uCAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KAC3E;AACD;;;;;AAKG;IACH,YAAY,CAAC,MAA4B,EAAE,OAA8B,EAAA;QACvE,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,KAAK,EAAE,sBAAA,CAAA,IAAI,EAAA,aAAA,EAAA,GAAA,EAAA,gBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChG;AACD;;;;;AAKG;IACH,YAAY,CAAC,MAA4B,EAAE,OAA8B,EAAA;QACvE,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,QAAQ,EAAE,sBAAA,CAAA,IAAI,EAAA,aAAA,EAAA,GAAA,EAAA,gBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnG;AACD;;;;;AAKG;IACH,WAAW,CAAC,MAA2B,EAAE,OAA8B,EAAA;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,gCAAgC,EAAE,KAAK,EAAE,sBAAA,CAAA,IAAI,EAAA,aAAA,EAAA,GAAA,EAAA,gBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC9G;AACD;;;;;AAKG;IACH,eAAe,CAAC,MAA+B,EAAE,OAA8B,EAAA;QAC7E,OAAO,IAAI,CAAC,OAAO,CAAC,gCAAgC,EAAE,MAAM,EAAE,sBAAA,CAAA,IAAI,EAAA,aAAA,EAAA,GAAA,EAAA,gBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/G;AACD;;;;;AAKG;IACH,YAAY,CAAC,MAA4B,EAAE,OAA8B,EAAA;QACvE,OAAO,IAAI,CAAC,OAAO,CAAC,gCAAgC,EAAE,QAAQ,EAAE,sBAAA,CAAA,IAAI,EAAA,aAAA,EAAA,GAAA,EAAA,gBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACjH;AACF,CAAA;;;AAzEG,IAAA,OAAO,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAG,eAAe,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,mCAAmC,CAAC;AACxF,CAAC;;;;"}
@@ -1,8 +1,12 @@
1
1
  import { __awaiter } from '../../node_modules/tslib/tslib.es6.js';
2
2
 
3
+ function baseUrlThunk() {
4
+ var _a, _b;
5
+ 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';
6
+ }
3
7
  function uploadFile({ id, file, filename, }) {
4
8
  return __awaiter(this, void 0, void 0, function* () {
5
- const uploadUrl = yield this.request('/zambda/{id}/s3-upload', 'post')({ id, filename });
9
+ const uploadUrl = yield this.request('/zambda/{id}/s3-upload', 'post', baseUrlThunk.bind(this))({ id, filename });
6
10
  yield fetch(uploadUrl.signedUrl, {
7
11
  method: 'PUT',
8
12
  body: file,
@@ -1 +1 @@
1
- {"version":3,"file":"zambda-ext.js","sources":["../../../../src/resources/classes/zambda-ext.ts"],"sourcesContent":["import { SDKResource } from '../../client/client';\n\nexport async function uploadFile(\n this: SDKResource,\n {\n id,\n file,\n filename,\n }: {\n id: string;\n file: Blob;\n filename?: string | undefined;\n }\n): Promise<void> {\n const uploadUrl = await this.request('/zambda/{id}/s3-upload', 'post')({ id, filename });\n await fetch(uploadUrl.signedUrl, {\n method: 'PUT',\n body: file,\n });\n}\n"],"names":[],"mappings":";;AAEM,SAAgB,UAAU,CAE9B,EACE,EAAE,EACF,IAAI,EACJ,QAAQ,GAKT,EAAA;;AAED,QAAA,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;AACzF,QAAA,MAAM,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE;AAC/B,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,IAAI,EAAE,IAAI;AACX,SAAA,CAAC,CAAC;KACJ,CAAA,CAAA;AAAA;;;;"}
1
+ {"version":3,"file":"zambda-ext.js","sources":["../../../../src/resources/classes/zambda-ext.ts"],"sourcesContent":["import { SDKResource } from '../../client/client';\n\nfunction baseUrlThunk(this: SDKResource): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n}\n\nexport async function uploadFile(\n this: SDKResource,\n {\n id,\n file,\n filename,\n }: {\n id: string;\n file: Blob;\n filename?: string | undefined;\n }\n): Promise<void> {\n const uploadUrl = await this.request('/zambda/{id}/s3-upload', 'post', baseUrlThunk.bind(this))({ id, filename });\n await fetch(uploadUrl.signedUrl, {\n method: 'PUT',\n body: file,\n });\n}\n"],"names":[],"mappings":";;AAEA,SAAS,YAAY,GAAA;;AACnB,IAAA,OAAO,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAG,eAAe,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,mCAAmC,CAAC;AACxF,CAAC;AAEK,SAAgB,UAAU,CAE9B,EACE,EAAE,EACF,IAAI,EACJ,QAAQ,GAKT,EAAA;;QAED,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,MAAM,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClH,QAAA,MAAM,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE;AAC/B,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,IAAI,EAAE,IAAI;AACX,SAAA,CAAC,CAAC;KACJ,CAAA,CAAA;AAAA;;;;"}
@@ -3,58 +3,59 @@ import { SDKResource } from '../../client/client';
3
3
  import { OystehrConfig } from '../../config';
4
4
  import * as ext from './zambda-ext';
5
5
  export declare class Zambda extends SDKResource {
6
+ #private;
6
7
  constructor(config: OystehrConfig);
7
8
  uploadFile: typeof ext.uploadFile;
8
9
  /**
9
- * 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.
10
+ * Get a list of all Zambda Functions in the Project. [Zambdas](https://docs.oystehr.com/oystehr/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
  *
11
12
  * Access Policy Action: `Zambda:ListAllFunctions`
12
13
  * Access Policy Resource: `Zambda:Function`
13
14
  */
14
15
  list(request?: OystehrClientRequest): Promise<ZambdaListResponse>;
15
16
  /**
16
- * 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.
17
+ * Create a new Zambda Function. [Zambdas](https://docs.oystehr.com/oystehr/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.
17
18
  *
18
19
  * Access Policy Action: `Zambda:CreateFunction`
19
20
  * Access Policy Resource: `Zambda:Function`
20
21
  */
21
22
  create(params: ZambdaCreateParams, request?: OystehrClientRequest): Promise<ZambdaCreateResponse>;
22
23
  /**
23
- * 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.
24
+ * Get the Zambda Function with the provided ID or name. [Zambdas](https://docs.oystehr.com/oystehr/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.
24
25
  *
25
26
  * Access Policy Action: `Zambda:GetFunction`
26
27
  * Access Policy Resource: `Zambda:Function`
27
28
  */
28
29
  get(params: ZambdaGetParams, request?: OystehrClientRequest): Promise<ZambdaGetResponse>;
29
30
  /**
30
- * 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.
31
+ * Update the Zambda Function with the provided ID or name. [Zambdas](https://docs.oystehr.com/oystehr/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.
31
32
  *
32
33
  * Access Policy Action: `Zambda:UpdateFunction`
33
34
  * Access Policy Resource: `Zambda:Function`
34
35
  */
35
36
  update(params: ZambdaUpdateParams, request?: OystehrClientRequest): Promise<ZambdaUpdateResponse>;
36
37
  /**
37
- * 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.
38
+ * Delete the Zambda Function with the provided ID or name. [Zambdas](https://docs.oystehr.com/oystehr/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.
38
39
  *
39
40
  * Access Policy Action: `Zambda:DeleteFunction`
40
41
  * Access Policy Resource: `Zambda:Function`
41
42
  */
42
43
  delete(params: ZambdaDeleteParams, request?: OystehrClientRequest): Promise<void>;
43
44
  /**
44
- * 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.
45
+ * Execute the [Authenticated Zambda Function](https://docs.oystehr.com/oystehr/services/zambda/types/authenticated/) with the provided ID. [Zambdas](https://docs.oystehr.com/oystehr/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.
45
46
  *
46
47
  * Access Policy Action: `Zambda:InvokeFunction`
47
48
  * Access Policy Resource: `Zambda:Function`
48
49
  */
49
50
  execute(params: ZambdaExecuteParams, request?: OystehrClientRequest): Promise<ZambdaExecuteResponse>;
50
51
  /**
51
- * 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.
52
+ * Execute the [Public Zambda Function](https://docs.oystehr.com/oystehr/services/zambda/types/public/) with the provided ID. [Zambdas](https://docs.oystehr.com/oystehr/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.
52
53
  *
53
54
  * Execute a zambda that has method http_open. This endpoint is public so there are no access policy requirements.
54
55
  */
55
56
  executePublic(params: ZambdaExecutePublicParams, request?: OystehrClientRequest): Promise<ZambdaExecutePublicResponse>;
56
57
  /**
57
- * 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.
58
+ * Returns a URL that is used to deploy code to the Zambda Function with the provided ID. [Zambdas](https://docs.oystehr.com/oystehr/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.
58
59
  *
59
60
  * Access Policy Action: `Zambda:UpdateFunction`
60
61
  * Access Policy Resource: `Zambda:Function`
@@ -1,84 +1,91 @@
1
+ import { __classPrivateFieldGet } from '../../node_modules/tslib/tslib.es6.js';
1
2
  import { SDKResource } from '../../client/client.js';
2
3
  import { uploadFile } from './zambda-ext.js';
3
4
 
4
5
  // AUTOGENERATED -- DO NOT EDIT
6
+ var _Zambda_instances, _Zambda_baseUrlThunk;
5
7
  class Zambda extends SDKResource {
6
8
  constructor(config) {
7
9
  super(config);
10
+ _Zambda_instances.add(this);
8
11
  this.uploadFile = uploadFile;
9
12
  }
10
13
  /**
11
- * 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.
14
+ * Get a list of all Zambda Functions in the Project. [Zambdas](https://docs.oystehr.com/oystehr/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.
12
15
  *
13
16
  * Access Policy Action: `Zambda:ListAllFunctions`
14
17
  * Access Policy Resource: `Zambda:Function`
15
18
  */
16
19
  list(request) {
17
- return this.request('/zambda', 'get')(request);
20
+ return this.request('/zambda', 'get', __classPrivateFieldGet(this, _Zambda_instances, "m", _Zambda_baseUrlThunk).bind(this))(request);
18
21
  }
19
22
  /**
20
- * 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.
23
+ * Create a new Zambda Function. [Zambdas](https://docs.oystehr.com/oystehr/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.
21
24
  *
22
25
  * Access Policy Action: `Zambda:CreateFunction`
23
26
  * Access Policy Resource: `Zambda:Function`
24
27
  */
25
28
  create(params, request) {
26
- return this.request('/zambda', 'post')(params, request);
29
+ return this.request('/zambda', 'post', __classPrivateFieldGet(this, _Zambda_instances, "m", _Zambda_baseUrlThunk).bind(this))(params, request);
27
30
  }
28
31
  /**
29
- * 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.
32
+ * Get the Zambda Function with the provided ID or name. [Zambdas](https://docs.oystehr.com/oystehr/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.
30
33
  *
31
34
  * Access Policy Action: `Zambda:GetFunction`
32
35
  * Access Policy Resource: `Zambda:Function`
33
36
  */
34
37
  get(params, request) {
35
- return this.request('/zambda/{id}', 'get')(params, request);
38
+ return this.request('/zambda/{id}', 'get', __classPrivateFieldGet(this, _Zambda_instances, "m", _Zambda_baseUrlThunk).bind(this))(params, request);
36
39
  }
37
40
  /**
38
- * 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.
41
+ * Update the Zambda Function with the provided ID or name. [Zambdas](https://docs.oystehr.com/oystehr/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.
39
42
  *
40
43
  * Access Policy Action: `Zambda:UpdateFunction`
41
44
  * Access Policy Resource: `Zambda:Function`
42
45
  */
43
46
  update(params, request) {
44
- return this.request('/zambda/{id}', 'patch')(params, request);
47
+ return this.request('/zambda/{id}', 'patch', __classPrivateFieldGet(this, _Zambda_instances, "m", _Zambda_baseUrlThunk).bind(this))(params, request);
45
48
  }
46
49
  /**
47
- * 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.
50
+ * Delete the Zambda Function with the provided ID or name. [Zambdas](https://docs.oystehr.com/oystehr/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.
48
51
  *
49
52
  * Access Policy Action: `Zambda:DeleteFunction`
50
53
  * Access Policy Resource: `Zambda:Function`
51
54
  */
52
55
  delete(params, request) {
53
- return this.request('/zambda/{id}', 'delete')(params, request);
56
+ return this.request('/zambda/{id}', 'delete', __classPrivateFieldGet(this, _Zambda_instances, "m", _Zambda_baseUrlThunk).bind(this))(params, request);
54
57
  }
55
58
  /**
56
- * 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.
59
+ * Execute the [Authenticated Zambda Function](https://docs.oystehr.com/oystehr/services/zambda/types/authenticated/) with the provided ID. [Zambdas](https://docs.oystehr.com/oystehr/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.
57
60
  *
58
61
  * Access Policy Action: `Zambda:InvokeFunction`
59
62
  * Access Policy Resource: `Zambda:Function`
60
63
  */
61
64
  execute(params, request) {
62
- return this.request('/zambda/{id}/execute', 'post')(params, request);
65
+ return this.request('/zambda/{id}/execute', 'post', __classPrivateFieldGet(this, _Zambda_instances, "m", _Zambda_baseUrlThunk).bind(this))(params, request);
63
66
  }
64
67
  /**
65
- * 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.
68
+ * Execute the [Public Zambda Function](https://docs.oystehr.com/oystehr/services/zambda/types/public/) with the provided ID. [Zambdas](https://docs.oystehr.com/oystehr/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.
66
69
  *
67
70
  * Execute a zambda that has method http_open. This endpoint is public so there are no access policy requirements.
68
71
  */
69
72
  executePublic(params, request) {
70
- return this.request('/zambda/{id}/execute-public', 'post')(params, request);
73
+ return this.request('/zambda/{id}/execute-public', 'post', __classPrivateFieldGet(this, _Zambda_instances, "m", _Zambda_baseUrlThunk).bind(this))(params, request);
71
74
  }
72
75
  /**
73
- * 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.
76
+ * Returns a URL that is used to deploy code to the Zambda Function with the provided ID. [Zambdas](https://docs.oystehr.com/oystehr/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.
74
77
  *
75
78
  * Access Policy Action: `Zambda:UpdateFunction`
76
79
  * Access Policy Resource: `Zambda:Function`
77
80
  */
78
81
  s3Upload(params, request) {
79
- return this.request('/zambda/{id}/s3-upload', 'post')(params, request);
82
+ return this.request('/zambda/{id}/s3-upload', 'post', __classPrivateFieldGet(this, _Zambda_instances, "m", _Zambda_baseUrlThunk).bind(this))(params, request);
80
83
  }
81
84
  }
85
+ _Zambda_instances = new WeakSet(), _Zambda_baseUrlThunk = function _Zambda_baseUrlThunk() {
86
+ var _a, _b;
87
+ 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';
88
+ };
82
89
 
83
90
  export { Zambda };
84
91
  //# sourceMappingURL=zambda.js.map
@@ -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> {\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;;;;"}
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 #baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n uploadFile = ext.uploadFile;\n /**\n * Get a list of all Zambda Functions in the Project. [Zambdas](https://docs.oystehr.com/oystehr/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', this.#baseUrlThunk.bind(this))(request);\n }\n /**\n * Create a new Zambda Function. [Zambdas](https://docs.oystehr.com/oystehr/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', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Get the Zambda Function with the provided ID or name. [Zambdas](https://docs.oystehr.com/oystehr/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', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Update the Zambda Function with the provided ID or name. [Zambdas](https://docs.oystehr.com/oystehr/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', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Delete the Zambda Function with the provided ID or name. [Zambdas](https://docs.oystehr.com/oystehr/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', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Execute the [Authenticated Zambda Function](https://docs.oystehr.com/oystehr/services/zambda/types/authenticated/) with the provided ID. [Zambdas](https://docs.oystehr.com/oystehr/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', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Execute the [Public Zambda Function](https://docs.oystehr.com/oystehr/services/zambda/types/public/) with the provided ID. [Zambdas](https://docs.oystehr.com/oystehr/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', this.#baseUrlThunk.bind(this))(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/oystehr/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', this.#baseUrlThunk.bind(this))(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;;AAKhB,QAAA,IAAA,CAAA,UAAU,GAAGA,UAAc,CAAC;KAJ3B;AAKD;;;;;AAKG;AACH,IAAA,IAAI,CAAC,OAA8B,EAAA;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,EAAE,sBAAA,CAAA,IAAI,+CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KAC/E;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA0B,EAAE,OAA8B,EAAA;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,sBAAA,CAAA,IAAI,EAAA,iBAAA,EAAA,GAAA,EAAA,oBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACxF;AACD;;;;;AAKG;IACH,GAAG,CAAC,MAAuB,EAAE,OAA8B,EAAA;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,KAAK,EAAE,sBAAA,CAAA,IAAI,EAAA,iBAAA,EAAA,GAAA,EAAA,oBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC5F;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA0B,EAAE,OAA8B,EAAA;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,OAAO,EAAE,sBAAA,CAAA,IAAI,EAAA,iBAAA,EAAA,GAAA,EAAA,oBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC9F;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAA0B,EAAE,OAA8B,EAAA;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,QAAQ,EAAE,sBAAA,CAAA,IAAI,EAAA,iBAAA,EAAA,GAAA,EAAA,oBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/F;AACD;;;;;AAKG;IACH,OAAO,CAAC,MAA2B,EAAE,OAA8B,EAAA;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,sBAAsB,EAAE,MAAM,EAAE,sBAAA,CAAA,IAAI,EAAA,iBAAA,EAAA,GAAA,EAAA,oBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACrG;AACD;;;;AAIG;IACH,aAAa,CACX,MAAiC,EACjC,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,6BAA6B,EAAE,MAAM,EAAE,sBAAA,CAAA,IAAI,EAAA,iBAAA,EAAA,GAAA,EAAA,oBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC5G;AACD;;;;;AAKG;IACH,QAAQ,CAAC,MAA4B,EAAE,OAA8B,EAAA;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,MAAM,EAAE,sBAAA,CAAA,IAAI,EAAA,iBAAA,EAAA,GAAA,EAAA,oBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACvG;AACF,CAAA;;;AA7EG,IAAA,OAAO,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAG,eAAe,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,mCAAmC,CAAC;AACxF,CAAC;;;;"}
@@ -2,23 +2,24 @@ import { OystehrClientRequest, ZambdaLogStreamGetParams, ZambdaLogStreamGetRespo
2
2
  import { SDKResource } from '../../client/client';
3
3
  import { OystehrConfig } from '../../config';
4
4
  export declare class ZambdaLogStream extends SDKResource {
5
+ #private;
5
6
  constructor(config: OystehrConfig);
6
7
  /**
7
- * 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.
8
+ * Get the log streams for the Zambda Function with the provided ID. [Zambdas](https://docs.oystehr.com/oystehr/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.
8
9
  *
9
10
  * Access Policy Action: `Zambda:ReadLogs`
10
11
  * Access Policy Resource: `Zambda:Function`
11
12
  */
12
13
  list(params: ZambdaLogStreamListParams, request?: OystehrClientRequest): Promise<ZambdaLogStreamListResponse>;
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
+ * 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/oystehr/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
16
  *
16
17
  * Access Policy Action: `Zambda:ReadLogs`
17
18
  * Access Policy Resource: `Zambda:Function`
18
19
  */
19
20
  search(params: ZambdaLogStreamSearchParams, request?: OystehrClientRequest): Promise<ZambdaLogStreamSearchResponse>;
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
+ * Get the logs from the specified log stream for the Zambda Function with the provided ID. [Zambdas](https://docs.oystehr.com/oystehr/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
23
  *
23
24
  * Access Policy Action: `Zambda:ReadLogs`
24
25
  * Access Policy Resource: `Zambda:Function`
@@ -1,38 +1,45 @@
1
+ import { __classPrivateFieldGet } from '../../node_modules/tslib/tslib.es6.js';
1
2
  import { SDKResource } from '../../client/client.js';
2
3
 
3
4
  // AUTOGENERATED -- DO NOT EDIT
5
+ var _ZambdaLogStream_instances, _ZambdaLogStream_baseUrlThunk;
4
6
  class ZambdaLogStream extends SDKResource {
5
7
  constructor(config) {
6
8
  super(config);
9
+ _ZambdaLogStream_instances.add(this);
7
10
  }
8
11
  /**
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.
12
+ * Get the log streams for the Zambda Function with the provided ID. [Zambdas](https://docs.oystehr.com/oystehr/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
13
  *
11
14
  * Access Policy Action: `Zambda:ReadLogs`
12
15
  * Access Policy Resource: `Zambda:Function`
13
16
  */
14
17
  list(params, request) {
15
- return this.request('/zambda/{id}/logStream', 'post')(params, request);
18
+ return this.request('/zambda/{id}/logStream', 'post', __classPrivateFieldGet(this, _ZambdaLogStream_instances, "m", _ZambdaLogStream_baseUrlThunk).bind(this))(params, request);
16
19
  }
17
20
  /**
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.
21
+ * 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/oystehr/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
22
  *
20
23
  * Access Policy Action: `Zambda:ReadLogs`
21
24
  * Access Policy Resource: `Zambda:Function`
22
25
  */
23
26
  search(params, request) {
24
- return this.request('/zambda/{id}/logStream/search', 'post')(params, request);
27
+ return this.request('/zambda/{id}/logStream/search', 'post', __classPrivateFieldGet(this, _ZambdaLogStream_instances, "m", _ZambdaLogStream_baseUrlThunk).bind(this))(params, request);
25
28
  }
26
29
  /**
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.
30
+ * Get the logs from the specified log stream for the Zambda Function with the provided ID. [Zambdas](https://docs.oystehr.com/oystehr/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
31
  *
29
32
  * Access Policy Action: `Zambda:ReadLogs`
30
33
  * Access Policy Resource: `Zambda:Function`
31
34
  */
32
35
  get(params, request) {
33
- return this.request('/zambda/{id}/logStream/{logStreamName}', 'post')(params, request);
36
+ return this.request('/zambda/{id}/logStream/{logStreamName}', 'post', __classPrivateFieldGet(this, _ZambdaLogStream_instances, "m", _ZambdaLogStream_baseUrlThunk).bind(this))(params, request);
34
37
  }
35
38
  }
39
+ _ZambdaLogStream_instances = new WeakSet(), _ZambdaLogStream_baseUrlThunk = function _ZambdaLogStream_baseUrlThunk() {
40
+ var _a, _b;
41
+ 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';
42
+ };
36
43
 
37
44
  export { ZambdaLogStream };
38
45
  //# sourceMappingURL=zambdaLogStream.js.map
@@ -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 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
+ {"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 #baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n /**\n * Get the log streams for the Zambda Function with the provided ID. [Zambdas](https://docs.oystehr.com/oystehr/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', this.#baseUrlThunk.bind(this))(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/oystehr/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', this.#baseUrlThunk.bind(this))(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/oystehr/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(\n '/zambda/{id}/logStream/{logStreamName}',\n 'post',\n this.#baseUrlThunk.bind(this)\n )(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;AAID;;;;;AAKG;IACH,IAAI,CAAC,MAAiC,EAAE,OAA8B,EAAA;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,MAAM,EAAE,sBAAA,CAAA,IAAI,EAAA,0BAAA,EAAA,GAAA,EAAA,6BAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACvG;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAAmC,EAAE,OAA8B,EAAA;QACxE,OAAO,IAAI,CAAC,OAAO,CAAC,+BAA+B,EAAE,MAAM,EAAE,sBAAA,CAAA,IAAI,EAAA,0BAAA,EAAA,GAAA,EAAA,6BAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC9G;AACD;;;;;AAKG;IACH,GAAG,CAAC,MAAgC,EAAE,OAA8B,EAAA;QAClE,OAAO,IAAI,CAAC,OAAO,CACjB,wCAAwC,EACxC,MAAM,EACN,sBAAA,CAAA,IAAI,EAAA,0BAAA,EAAA,GAAA,EAAA,6BAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAC9B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpB;AACF,CAAA;;;AAjCG,IAAA,OAAO,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAG,eAAe,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,mCAAmC,CAAC;AACxF,CAAC;;;;"}
@@ -1,7 +1,12 @@
1
1
  export interface AccessPolicy {
2
2
  rule: {
3
- resource?: string[];
4
- action?: string[];
5
- effect?: 'Allow' | 'Deny';
3
+ resource: string | string[];
4
+ action: string | string[];
5
+ effect: 'Allow' | 'Deny';
6
+ condition?: {
7
+ [k: string]: any;
8
+ } | {
9
+ [k: string]: any;
10
+ }[] | string | string[];
6
11
  }[];
7
12
  }
@@ -2,5 +2,5 @@ export interface ChargeIssueParams {
2
2
  /**
3
3
  * An ID reference to a FHIR Encounter resource in the format: `some-uuid`.
4
4
  */
5
- encounterId?: string;
5
+ encounterId: string;
6
6
  }
@@ -2,5 +2,5 @@ export interface ChargeStatusParams {
2
2
  /**
3
3
  * An ID reference to a FHIR Encounter resource in the format: `some-uuid`.
4
4
  */
5
- encounterId?: string;
5
+ encounterId: string;
6
6
  }
@@ -12,10 +12,6 @@ export interface DeveloperInviteResponse {
12
12
  * The ID of the FHIR Practitioner resource that represents the developer. Also known as the Developer's "profile".
13
13
  */
14
14
  practitionerId: string;
15
- /**
16
- * The ID of the invite
17
- */
18
- invitationUrl: string;
19
15
  /**
20
16
  * The roles assigned to the developer.
21
17
  */
@@ -6,6 +6,6 @@ export interface DeveloperListV2Params {
6
6
  roleId?: string;
7
7
  cursor?: string;
8
8
  limit?: number;
9
- sort?: string;
10
- sortOrder?: string;
9
+ sort?: 'id' | 'name' | 'email' | 'phoneNumber' | 'createdAt';
10
+ sortOrder?: 'asc' | 'desc';
11
11
  }
@@ -12,7 +12,7 @@ export interface FaxSendParams {
12
12
  */
13
13
  recipient: string;
14
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`.
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/oystehr/services/fax/number/) in the `telecom` field with a `system` of `fax`.
16
16
  */
17
17
  sender: string;
18
18
  }
@@ -5,6 +5,6 @@ export interface M2mListV2Params {
5
5
  roleId?: string;
6
6
  cursor?: string;
7
7
  limit?: number;
8
- sort?: string;
9
- sortOrder?: string;
8
+ sort?: 'id' | 'name' | 'email' | 'phoneNumber' | 'createdAt';
9
+ sortOrder?: 'asc' | 'desc';
10
10
  }
@@ -2,5 +2,5 @@
2
2
  * M2M Client secret rotated
3
3
  */
4
4
  export interface M2mRotateSecretResponse {
5
- secret?: string;
5
+ secret: string;
6
6
  }
@@ -2,5 +2,5 @@ export interface RcmEligibilityCheckParams {
2
2
  /**
3
3
  * Identifier of the CoverageEligibilityRequest that the eligibility check will reference.
4
4
  */
5
- eligibilityRequestId?: string;
5
+ eligibilityRequestId: string;
6
6
  }
@@ -1,9 +1,5 @@
1
1
  import { AccessPolicy } from './AccessPolicy';
2
2
  export interface RoleUpdateParams {
3
- /**
4
- * The unique id of the role
5
- */
6
- id?: string;
7
3
  /**
8
4
  * The name of the role.
9
5
  */
@@ -3,5 +3,5 @@ export interface TelemedCreateMeetingParams {
3
3
  /**
4
4
  * Well formed Encounter with the https://extensions.fhir.oystehr.com/encounter-other-participants extension specified optionally.
5
5
  */
6
- encounter?: Encounter;
6
+ encounter: Encounter;
7
7
  }
@@ -6,6 +6,6 @@ export interface UserListV2Params {
6
6
  roleId?: string;
7
7
  cursor?: string;
8
8
  limit?: number;
9
- sort?: string;
10
- sortOrder?: string;
9
+ sort?: 'id' | 'name' | 'email' | 'phoneNumber' | 'createdAt';
10
+ sortOrder?: 'asc' | 'desc';
11
11
  }
@@ -5,7 +5,7 @@ export interface ZambdaCreateParams {
5
5
  */
6
6
  name: string;
7
7
  /**
8
- * The trigger method for the Zambda Function determines how the Function is invoked. Learn more about the different types here, https://docs.oystehr.com/services/zambda/#types-of-zambdas.
8
+ * The trigger method for the Zambda Function determines how the Function is invoked. Learn more about the different types here, https://docs.oystehr.com/oystehr/services/zambda/#types-of-zambdas.
9
9
  */
10
10
  triggerMethod?: 'http_auth' | 'http_open' | 'subscription' | 'cron';
11
11
  schedule?: ZambdaSchedule;
@@ -14,7 +14,7 @@ export interface ZambdaFunction {
14
14
  */
15
15
  status: 'Draft' | 'Pending' | 'Active' | 'Failed' | 'Inactive' | 'Validating';
16
16
  /**
17
- * The trigger method for the Zambda Function determines how the Function is invoked. Learn more about the different types here, https://docs.oystehr.com/services/zambda/#types-of-zambdas.
17
+ * The trigger method for the Zambda Function determines how the Function is invoked. Learn more about the different types here, https://docs.oystehr.com/oystehr/services/zambda/#types-of-zambdas.
18
18
  */
19
19
  triggerMethod: 'http_auth' | 'http_open' | 'subscription' | 'cron';
20
20
  schedule?: ZambdaSchedule;
@@ -5,13 +5,13 @@ export interface ZambdaUpdateParams {
5
5
  */
6
6
  name?: string;
7
7
  /**
8
- * The trigger method for the Zambda Function determines how the Function is invoked. Learn more about the different types here, https://docs.oystehr.com/services/zambda/#types-of-zambdas.
8
+ * The trigger method for the Zambda Function determines how the Function is invoked. Learn more about the different types here, https://docs.oystehr.com/oystehr/services/zambda/#types-of-zambdas.
9
9
  */
10
10
  triggerMethod?: 'http_auth' | 'http_open' | 'subscription' | 'cron';
11
11
  schedule?: ZambdaSchedule;
12
12
  /**
13
13
  * The runtime to use for the Zambda Function. This property is optional and defaults to "nodejs20.x".
14
14
  */
15
- runtime?: 'nodejs18.x' | 'nodejs20.x';
15
+ runtime?: 'nodejs18.x' | 'nodejs20.x' | 'nodejs22.x';
16
16
  id: string;
17
17
  }
@@ -103,8 +103,6 @@ export * from './ErxMedicationSearchParams';
103
103
  export * from './ErxMedicationSearchResponse';
104
104
  export * from './ErxMedicationSearchV2Params';
105
105
  export * from './ErxMedicationSearchV2Response';
106
- export * from './FaxSendParams';
107
- export * from './FaxSendResponse';
108
106
  export * from './RoleListResponse';
109
107
  export * from './RoleCreateParams';
110
108
  export * from './RoleCreateResponse';
@@ -164,3 +162,5 @@ export * from './ZambdaLogStreamSearchParams';
164
162
  export * from './ZambdaLogStreamSearchResponse';
165
163
  export * from './ZambdaLogStreamGetParams';
166
164
  export * from './ZambdaLogStreamGetResponse';
165
+ export * from './FaxSendParams';
166
+ export * from './FaxSendResponse';
@@ -1,12 +1,8 @@
1
+ import { OystehrConfig } from '../../config';
1
2
  export declare const accessToken = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IllhcGtmeERqb3FvVnR1YUtlcHllZyJ9.eyJpc3MiOiJodHRwczovL2Rldi1hdXRoLnphcGVoci5jb20vIiwic3ViIjoiYXV0aDB8NjQ4MjRmYTYxODY2YmVmY2NiNTU5NTY4IiwiYXVkIjpbImh0dHBzOi8vZGV2LmFwaS56YXBlaHIuY29tIiwiaHR0cHM6Ly96YXBlaHItZGV2LnVzLmF1dGgwLmNvbS91c2VyaW5mbyJdLCJpYXQiOjE2ODYyNjE2NzIsImV4cCI6MTY4NjM0ODA3MiwiYXpwIjoiZzNPV0xIb1dhUEhHWkRyd1lTYW5QdDBCcUp6ZXgzTnYiLCJzY29wZSI6Im9wZW5pZCBwcm9maWxlIGVtYWlsIn0.EBSaOYp5NMJ94GZyd9cg57QWnozlN-ua4XAO3iIrPal16yWOW-_TeVgj-1j-PwAhHaxW8QoTuojMXwhWVkNUwUw1AomxFubrvL98jm871VMZTXayQRGGlZHUsREmUDWpojGKAf0wAegEPC-kSw5KAc79V5SOrcVzhTmk5AMnR1aDzck9ZbXpTCPWWmyjyf4BiCb4N3zw3Zt3iQ0c5YDKvdMa_aAKiUZ9jaOw1TnQZ4tivKsn2uVfRGPZ5WFmj7B2MQTpzw4rokHtnSYtbKb-1h5wMxsdmzy_gKMYYaiPGqkJVt1twtjH9O1nZZMSDjGQI5B96TnrVjBFm6ow8jpBKg";
2
3
  export declare const projectId = "eb1306aa-fba5-416a-a2a4-6b69eca58d87";
3
4
  export declare const FHIR_API_URL = "http://localhost:3030/dev";
4
5
  export declare const PLATFORM_API_URL = "http://localhost:3031/dev";
5
6
  export declare const PROJECT_API_URL = "http://localhost:3032/dev";
6
7
  export declare const FHIR_VERSION: import("@zapehr/core").FhirVersion;
7
- export declare const config: {
8
- accessToken: string;
9
- projectId: string;
10
- fhirApiUrl: string;
11
- projectApiUrl: string;
12
- };
8
+ export declare const config: OystehrConfig;
@@ -1 +1,2 @@
1
+ export declare function register(authToken: string, desiredProjectId?: string): Promise<string>;
1
2
  export default function registerUserAndProject(): Promise<void>;