@oystehr/sdk 3.0.0
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.
- package/.eslintrc.js +14 -0
- package/LICENSE.md +9 -0
- package/README.md +339 -0
- package/dist/cjs/client/client.d.ts +49 -0
- package/dist/cjs/config.d.ts +45 -0
- package/dist/cjs/errors/index.d.ts +17 -0
- package/dist/cjs/fhir/fhir-types.d.ts +9 -0
- package/dist/cjs/fhir/index.d.ts +2 -0
- package/dist/cjs/fhir/utils.d.ts +14 -0
- package/dist/cjs/index.cjs +1333 -0
- package/dist/cjs/index.cjs.map +1 -0
- package/dist/cjs/index.d.cts +16 -0
- package/dist/cjs/index.d.ts +16 -0
- package/dist/cjs/index.min.cjs +2 -0
- package/dist/cjs/index.min.cjs.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/resources/classes/application.d.ts +62 -0
- package/dist/cjs/resources/classes/charge.d.ts +30 -0
- package/dist/cjs/resources/classes/conversation-ext.d.ts +10 -0
- package/dist/cjs/resources/classes/conversation.d.ts +64 -0
- package/dist/cjs/resources/classes/developer.d.ts +50 -0
- package/dist/cjs/resources/classes/erx.d.ts +18 -0
- package/dist/cjs/resources/classes/fhir-ext.d.ts +58 -0
- package/dist/cjs/resources/classes/fhir.d.ts +21 -0
- package/dist/cjs/resources/classes/index.d.ts +44 -0
- package/dist/cjs/resources/classes/m2m.d.ts +57 -0
- package/dist/cjs/resources/classes/messaging.d.ts +10 -0
- package/dist/cjs/resources/classes/paymentMethod.d.ts +70 -0
- package/dist/cjs/resources/classes/project.d.ts +20 -0
- package/dist/cjs/resources/classes/rcm.d.ts +39 -0
- package/dist/cjs/resources/classes/role.d.ts +42 -0
- package/dist/cjs/resources/classes/secret.d.ts +34 -0
- package/dist/cjs/resources/classes/telemed.d.ts +29 -0
- package/dist/cjs/resources/classes/transactionalSMS.d.ts +22 -0
- package/dist/cjs/resources/classes/user.d.ts +56 -0
- package/dist/cjs/resources/classes/version.d.ts +10 -0
- package/dist/cjs/resources/classes/z3-ext.d.ts +10 -0
- package/dist/cjs/resources/classes/z3.d.ts +51 -0
- package/dist/cjs/resources/classes/zambda-ext.d.ts +6 -0
- package/dist/cjs/resources/classes/zambda.d.ts +63 -0
- package/dist/cjs/resources/classes/zambdaLogStream.d.ts +27 -0
- package/dist/cjs/resources/index.d.ts +1 -0
- package/dist/cjs/resources/types/AccessPolicy.d.ts +7 -0
- package/dist/cjs/resources/types/Application.d.ts +59 -0
- package/dist/cjs/resources/types/ApplicationCreateParams.d.ts +59 -0
- package/dist/cjs/resources/types/ApplicationCreateResponse.d.ts +5 -0
- package/dist/cjs/resources/types/ApplicationDeleteParams.d.ts +3 -0
- package/dist/cjs/resources/types/ApplicationGetParams.d.ts +3 -0
- package/dist/cjs/resources/types/ApplicationGetResponse.d.ts +5 -0
- package/dist/cjs/resources/types/ApplicationListItem.d.ts +15 -0
- package/dist/cjs/resources/types/ApplicationListResponse.d.ts +5 -0
- package/dist/cjs/resources/types/ApplicationRevokeAccessTokenParams.d.ts +4 -0
- package/dist/cjs/resources/types/ApplicationRevokeAccessTokenResponse.d.ts +6 -0
- package/dist/cjs/resources/types/ApplicationRevokeRefreshTokenParams.d.ts +4 -0
- package/dist/cjs/resources/types/ApplicationRevokeRefreshTokenResponse.d.ts +6 -0
- package/dist/cjs/resources/types/ApplicationRotateSecretParams.d.ts +3 -0
- package/dist/cjs/resources/types/ApplicationRotateSecretResponse.d.ts +6 -0
- package/dist/cjs/resources/types/ApplicationUpdateParams.d.ts +59 -0
- package/dist/cjs/resources/types/ApplicationUpdateResponse.d.ts +5 -0
- package/dist/cjs/resources/types/Card.d.ts +8 -0
- package/dist/cjs/resources/types/CardIdentifier.d.ts +7 -0
- package/dist/cjs/resources/types/ChargeDetails.d.ts +8 -0
- package/dist/cjs/resources/types/ChargeIssueParams.d.ts +6 -0
- package/dist/cjs/resources/types/ChargeStatusParams.d.ts +6 -0
- package/dist/cjs/resources/types/ChargeStatusResponse.d.ts +5 -0
- package/dist/cjs/resources/types/ClaimAddress.d.ts +7 -0
- package/dist/cjs/resources/types/ClaimCMS1500.d.ts +100 -0
- package/dist/cjs/resources/types/ClaimDate.d.ts +5 -0
- package/dist/cjs/resources/types/ClaimDatePeriod.d.ts +5 -0
- package/dist/cjs/resources/types/ClaimDateWithQualifier.d.ts +5 -0
- package/dist/cjs/resources/types/ClaimId.d.ts +4 -0
- package/dist/cjs/resources/types/ClaimName.d.ts +6 -0
- package/dist/cjs/resources/types/ConversationAddParticipantParams.d.ts +21 -0
- package/dist/cjs/resources/types/ConversationCreateParams.d.ts +7 -0
- package/dist/cjs/resources/types/ConversationCreateResponse.d.ts +10 -0
- package/dist/cjs/resources/types/ConversationGetTokenResponse.d.ts +9 -0
- package/dist/cjs/resources/types/ConversationMessageParams.d.ts +13 -0
- package/dist/cjs/resources/types/ConversationRemoveParticipantParams.d.ts +11 -0
- package/dist/cjs/resources/types/Developer.d.ts +20 -0
- package/dist/cjs/resources/types/DeveloperDeleteParams.d.ts +3 -0
- package/dist/cjs/resources/types/DeveloperGetParams.d.ts +3 -0
- package/dist/cjs/resources/types/DeveloperGetResponse.d.ts +5 -0
- package/dist/cjs/resources/types/DeveloperInviteParams.d.ts +17 -0
- package/dist/cjs/resources/types/DeveloperInviteResponse.d.ts +23 -0
- package/dist/cjs/resources/types/DeveloperListItem.d.ts +7 -0
- package/dist/cjs/resources/types/DeveloperListResponse.d.ts +5 -0
- package/dist/cjs/resources/types/DeveloperListV2Params.d.ts +11 -0
- package/dist/cjs/resources/types/DeveloperListV2Response.d.ts +29 -0
- package/dist/cjs/resources/types/DeveloperUpdateParams.d.ts +9 -0
- package/dist/cjs/resources/types/DeveloperUpdateResponse.d.ts +5 -0
- package/dist/cjs/resources/types/ErxAllergySearchParams.d.ts +3 -0
- package/dist/cjs/resources/types/ErxAllergySearchResponse.d.ts +19 -0
- package/dist/cjs/resources/types/ErxMedicationSearchParams.d.ts +6 -0
- package/dist/cjs/resources/types/ErxMedicationSearchResponse.d.ts +38 -0
- package/dist/cjs/resources/types/ErxSyncPatientParams.d.ts +3 -0
- package/dist/cjs/resources/types/ErxSyncPatientResponse.d.ts +9 -0
- package/dist/cjs/resources/types/M2m.d.ts +30 -0
- package/dist/cjs/resources/types/M2mCreateParams.d.ts +20 -0
- package/dist/cjs/resources/types/M2mCreateResponse.d.ts +5 -0
- package/dist/cjs/resources/types/M2mDeleteParams.d.ts +3 -0
- package/dist/cjs/resources/types/M2mGetParams.d.ts +3 -0
- package/dist/cjs/resources/types/M2mGetResponse.d.ts +5 -0
- package/dist/cjs/resources/types/M2mListItem.d.ts +25 -0
- package/dist/cjs/resources/types/M2mListResponse.d.ts +5 -0
- package/dist/cjs/resources/types/M2mListV2Params.d.ts +10 -0
- package/dist/cjs/resources/types/M2mListV2Response.d.ts +16 -0
- package/dist/cjs/resources/types/M2mRotateSecretParams.d.ts +3 -0
- package/dist/cjs/resources/types/M2mRotateSecretResponse.d.ts +6 -0
- package/dist/cjs/resources/types/M2mUpdateParams.d.ts +21 -0
- package/dist/cjs/resources/types/M2mUpdateResponse.d.ts +5 -0
- package/dist/cjs/resources/types/MessagingGetMessagingConfigResponse.d.ts +8 -0
- package/dist/cjs/resources/types/MessagingServiceInfo.d.ts +14 -0
- package/dist/cjs/resources/types/PaymentMethodDeleteParams.d.ts +16 -0
- package/dist/cjs/resources/types/PaymentMethodListParams.d.ts +12 -0
- package/dist/cjs/resources/types/PaymentMethodListResponse.d.ts +8 -0
- package/dist/cjs/resources/types/PaymentMethodSetDefaultParams.d.ts +16 -0
- package/dist/cjs/resources/types/PaymentMethodSetUpParams.d.ts +12 -0
- package/dist/cjs/resources/types/PaymentMethodSetUpResponse.d.ts +9 -0
- package/dist/cjs/resources/types/Project.d.ts +17 -0
- package/dist/cjs/resources/types/ProjectGetResponse.d.ts +5 -0
- package/dist/cjs/resources/types/ProjectUpdateParams.d.ts +16 -0
- package/dist/cjs/resources/types/ProjectUpdateResponse.d.ts +5 -0
- package/dist/cjs/resources/types/RcmEligibilityCheckParams.d.ts +6 -0
- package/dist/cjs/resources/types/RcmEligibilityCheckResponse.d.ts +5 -0
- package/dist/cjs/resources/types/RcmSubmitProfessionalClaimParams.d.ts +10 -0
- package/dist/cjs/resources/types/RcmSubmitProfessionalClaimResponse.d.ts +5 -0
- package/dist/cjs/resources/types/RcmValidateProfessionalClaimParams.d.ts +6 -0
- package/dist/cjs/resources/types/RcmValidateProfessionalClaimResponse.d.ts +21 -0
- package/dist/cjs/resources/types/Role.d.ts +16 -0
- package/dist/cjs/resources/types/RoleCreateParams.d.ts +12 -0
- package/dist/cjs/resources/types/RoleCreateResponse.d.ts +5 -0
- package/dist/cjs/resources/types/RoleDeleteParams.d.ts +3 -0
- package/dist/cjs/resources/types/RoleGetParams.d.ts +3 -0
- package/dist/cjs/resources/types/RoleGetResponse.d.ts +5 -0
- package/dist/cjs/resources/types/RoleListItem.d.ts +14 -0
- package/dist/cjs/resources/types/RoleListResponse.d.ts +5 -0
- package/dist/cjs/resources/types/RoleStub.d.ts +10 -0
- package/dist/cjs/resources/types/RoleUpdateParams.d.ts +17 -0
- package/dist/cjs/resources/types/RoleUpdateResponse.d.ts +5 -0
- package/dist/cjs/resources/types/Secret.d.ts +10 -0
- package/dist/cjs/resources/types/SecretDeleteParams.d.ts +3 -0
- package/dist/cjs/resources/types/SecretGetParams.d.ts +3 -0
- package/dist/cjs/resources/types/SecretGetResponse.d.ts +5 -0
- package/dist/cjs/resources/types/SecretListItem.d.ts +6 -0
- package/dist/cjs/resources/types/SecretListResponse.d.ts +5 -0
- package/dist/cjs/resources/types/SecretSetParams.d.ts +10 -0
- package/dist/cjs/resources/types/SecretSetResponse.d.ts +5 -0
- package/dist/cjs/resources/types/TelemedCreateMeetingParams.d.ts +7 -0
- package/dist/cjs/resources/types/TelemedCreateMeetingResponse.d.ts +10 -0
- package/dist/cjs/resources/types/TelemedJoinMeetingParams.d.ts +4 -0
- package/dist/cjs/resources/types/TelemedJoinMeetingResponse.d.ts +27 -0
- package/dist/cjs/resources/types/TransactionalSMSSendParams.d.ts +10 -0
- package/dist/cjs/resources/types/TransactionalSMSSendResponse.d.ts +9 -0
- package/dist/cjs/resources/types/User.d.ts +36 -0
- package/dist/cjs/resources/types/UserDeleteParams.d.ts +3 -0
- package/dist/cjs/resources/types/UserGetParams.d.ts +3 -0
- package/dist/cjs/resources/types/UserGetResponse.d.ts +5 -0
- package/dist/cjs/resources/types/UserInviteParams.d.ts +35 -0
- package/dist/cjs/resources/types/UserInviteResponse.d.ts +37 -0
- package/dist/cjs/resources/types/UserListItem.d.ts +15 -0
- package/dist/cjs/resources/types/UserListResponse.d.ts +5 -0
- package/dist/cjs/resources/types/UserListV2Params.d.ts +11 -0
- package/dist/cjs/resources/types/UserListV2Response.d.ts +16 -0
- package/dist/cjs/resources/types/UserMeResponse.d.ts +5 -0
- package/dist/cjs/resources/types/UserUpdateParams.d.ts +9 -0
- package/dist/cjs/resources/types/UserUpdateResponse.d.ts +5 -0
- package/dist/cjs/resources/types/VersionGetResponse.d.ts +17 -0
- package/dist/cjs/resources/types/Z3CreateBucketParams.d.ts +3 -0
- package/dist/cjs/resources/types/Z3CreateBucketResponse.d.ts +10 -0
- package/dist/cjs/resources/types/Z3DeleteBucketParams.d.ts +3 -0
- package/dist/cjs/resources/types/Z3DeleteObjectParams.d.ts +8 -0
- package/dist/cjs/resources/types/Z3GetPresignedUrlParams.d.ts +9 -0
- package/dist/cjs/resources/types/Z3GetPresignedUrlResponse.d.ts +9 -0
- package/dist/cjs/resources/types/Z3ListBucketsResponse.d.ts +14 -0
- package/dist/cjs/resources/types/Z3ListObjectsParams.d.ts +4 -0
- package/dist/cjs/resources/types/Z3ListObjectsResponse.d.ts +13 -0
- package/dist/cjs/resources/types/ZambdaCreateParams.d.ts +12 -0
- package/dist/cjs/resources/types/ZambdaCreateResponse.d.ts +5 -0
- package/dist/cjs/resources/types/ZambdaDeleteParams.d.ts +3 -0
- package/dist/cjs/resources/types/ZambdaExecuteParams.d.ts +4 -0
- package/dist/cjs/resources/types/ZambdaExecutePublicParams.d.ts +4 -0
- package/dist/cjs/resources/types/ZambdaExecutePublicResponse.d.ts +5 -0
- package/dist/cjs/resources/types/ZambdaExecuteResponse.d.ts +5 -0
- package/dist/cjs/resources/types/ZambdaExecuteResult.d.ts +10 -0
- package/dist/cjs/resources/types/ZambdaFunction.d.ts +38 -0
- package/dist/cjs/resources/types/ZambdaGetParams.d.ts +3 -0
- package/dist/cjs/resources/types/ZambdaGetResponse.d.ts +5 -0
- package/dist/cjs/resources/types/ZambdaListResponse.d.ts +5 -0
- package/dist/cjs/resources/types/ZambdaLogStreamGetParams.d.ts +8 -0
- package/dist/cjs/resources/types/ZambdaLogStreamGetResponse.d.ts +27 -0
- package/dist/cjs/resources/types/ZambdaLogStreamListParams.d.ts +4 -0
- package/dist/cjs/resources/types/ZambdaLogStreamListResponse.d.ts +46 -0
- package/dist/cjs/resources/types/ZambdaLogStreamSearchParams.d.ts +19 -0
- package/dist/cjs/resources/types/ZambdaLogStreamSearchResponse.d.ts +23 -0
- package/dist/cjs/resources/types/ZambdaS3UploadParams.d.ts +7 -0
- package/dist/cjs/resources/types/ZambdaS3UploadResponse.d.ts +9 -0
- package/dist/cjs/resources/types/ZambdaSchedule.d.ts +30 -0
- package/dist/cjs/resources/types/ZambdaUpdateParams.d.ts +17 -0
- package/dist/cjs/resources/types/ZambdaUpdateResponse.d.ts +5 -0
- package/dist/cjs/resources/types/fhir.d.ts +46 -0
- package/dist/cjs/resources/types/index.d.ts +158 -0
- package/dist/cjs/tests/common.d.ts +2 -0
- package/dist/cjs/tests/setup/constants.d.ts +12 -0
- package/dist/cjs/tests/setup/global.d.ts +1 -0
- package/dist/cjs/tests/setup/per-test.d.ts +1 -0
- package/dist/esm/client/client.d.ts +49 -0
- package/dist/esm/client/client.js +251 -0
- package/dist/esm/client/client.js.map +1 -0
- package/dist/esm/config.d.ts +45 -0
- package/dist/esm/errors/index.d.ts +17 -0
- package/dist/esm/errors/index.js +38 -0
- package/dist/esm/errors/index.js.map +1 -0
- package/dist/esm/fhir/fhir-types.d.ts +9 -0
- package/dist/esm/fhir/index.d.ts +2 -0
- package/dist/esm/fhir/utils.d.ts +14 -0
- package/dist/esm/index.d.ts +16 -0
- package/dist/esm/index.js +14 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/index.min.js +2 -0
- package/dist/esm/index.min.js.map +1 -0
- package/dist/esm/node_modules/tslib/package.json +1 -0
- package/dist/esm/node_modules/tslib/tslib.es6.js +34 -0
- package/dist/esm/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/esm/package.json +1 -0
- package/dist/esm/resources/classes/application.d.ts +62 -0
- package/dist/esm/resources/classes/application.js +67 -0
- package/dist/esm/resources/classes/application.js.map +1 -0
- package/dist/esm/resources/classes/charge.d.ts +30 -0
- package/dist/esm/resources/classes/charge.js +35 -0
- package/dist/esm/resources/classes/charge.js.map +1 -0
- package/dist/esm/resources/classes/conversation-ext.d.ts +10 -0
- package/dist/esm/resources/classes/conversation-ext.js +28 -0
- package/dist/esm/resources/classes/conversation-ext.js.map +1 -0
- package/dist/esm/resources/classes/conversation.d.ts +64 -0
- package/dist/esm/resources/classes/conversation.js +69 -0
- package/dist/esm/resources/classes/conversation.js.map +1 -0
- package/dist/esm/resources/classes/developer.d.ts +50 -0
- package/dist/esm/resources/classes/developer.js +55 -0
- package/dist/esm/resources/classes/developer.js.map +1 -0
- package/dist/esm/resources/classes/erx.d.ts +18 -0
- package/dist/esm/resources/classes/erx.js +23 -0
- package/dist/esm/resources/classes/erx.js.map +1 -0
- package/dist/esm/resources/classes/fhir-ext.d.ts +58 -0
- package/dist/esm/resources/classes/fhir-ext.js +130 -0
- package/dist/esm/resources/classes/fhir-ext.js.map +1 -0
- package/dist/esm/resources/classes/fhir.d.ts +21 -0
- package/dist/esm/resources/classes/fhir.js +27 -0
- package/dist/esm/resources/classes/fhir.js.map +1 -0
- package/dist/esm/resources/classes/index.d.ts +44 -0
- package/dist/esm/resources/classes/index.js +49 -0
- package/dist/esm/resources/classes/index.js.map +1 -0
- package/dist/esm/resources/classes/m2m.d.ts +57 -0
- package/dist/esm/resources/classes/m2m.js +62 -0
- package/dist/esm/resources/classes/m2m.js.map +1 -0
- package/dist/esm/resources/classes/messaging.d.ts +10 -0
- package/dist/esm/resources/classes/messaging.js +15 -0
- package/dist/esm/resources/classes/messaging.js.map +1 -0
- package/dist/esm/resources/classes/paymentMethod.d.ts +70 -0
- package/dist/esm/resources/classes/paymentMethod.js +75 -0
- package/dist/esm/resources/classes/paymentMethod.js.map +1 -0
- package/dist/esm/resources/classes/project.d.ts +20 -0
- package/dist/esm/resources/classes/project.js +25 -0
- package/dist/esm/resources/classes/project.js.map +1 -0
- package/dist/esm/resources/classes/rcm.d.ts +39 -0
- package/dist/esm/resources/classes/rcm.js +44 -0
- package/dist/esm/resources/classes/rcm.js.map +1 -0
- package/dist/esm/resources/classes/role.d.ts +42 -0
- package/dist/esm/resources/classes/role.js +47 -0
- package/dist/esm/resources/classes/role.js.map +1 -0
- package/dist/esm/resources/classes/secret.d.ts +34 -0
- package/dist/esm/resources/classes/secret.js +39 -0
- package/dist/esm/resources/classes/secret.js.map +1 -0
- package/dist/esm/resources/classes/telemed.d.ts +29 -0
- package/dist/esm/resources/classes/telemed.js +34 -0
- package/dist/esm/resources/classes/telemed.js.map +1 -0
- package/dist/esm/resources/classes/transactionalSMS.d.ts +22 -0
- package/dist/esm/resources/classes/transactionalSMS.js +27 -0
- package/dist/esm/resources/classes/transactionalSMS.js.map +1 -0
- package/dist/esm/resources/classes/user.d.ts +56 -0
- package/dist/esm/resources/classes/user.js +61 -0
- package/dist/esm/resources/classes/user.js.map +1 -0
- package/dist/esm/resources/classes/version.d.ts +10 -0
- package/dist/esm/resources/classes/version.js +15 -0
- package/dist/esm/resources/classes/version.js.map +1 -0
- package/dist/esm/resources/classes/z3-ext.d.ts +10 -0
- package/dist/esm/resources/classes/z3-ext.js +34 -0
- package/dist/esm/resources/classes/z3-ext.js.map +1 -0
- package/dist/esm/resources/classes/z3.d.ts +51 -0
- package/dist/esm/resources/classes/z3.js +56 -0
- package/dist/esm/resources/classes/z3.js.map +1 -0
- package/dist/esm/resources/classes/zambda-ext.d.ts +6 -0
- package/dist/esm/resources/classes/zambda-ext.js +14 -0
- package/dist/esm/resources/classes/zambda-ext.js.map +1 -0
- package/dist/esm/resources/classes/zambda.d.ts +63 -0
- package/dist/esm/resources/classes/zambda.js +68 -0
- package/dist/esm/resources/classes/zambda.js.map +1 -0
- package/dist/esm/resources/classes/zambdaLogStream.d.ts +27 -0
- package/dist/esm/resources/classes/zambdaLogStream.js +32 -0
- package/dist/esm/resources/classes/zambdaLogStream.js.map +1 -0
- package/dist/esm/resources/index.d.ts +1 -0
- package/dist/esm/resources/types/AccessPolicy.d.ts +7 -0
- package/dist/esm/resources/types/Application.d.ts +59 -0
- package/dist/esm/resources/types/ApplicationCreateParams.d.ts +59 -0
- package/dist/esm/resources/types/ApplicationCreateResponse.d.ts +5 -0
- package/dist/esm/resources/types/ApplicationDeleteParams.d.ts +3 -0
- package/dist/esm/resources/types/ApplicationGetParams.d.ts +3 -0
- package/dist/esm/resources/types/ApplicationGetResponse.d.ts +5 -0
- package/dist/esm/resources/types/ApplicationListItem.d.ts +15 -0
- package/dist/esm/resources/types/ApplicationListResponse.d.ts +5 -0
- package/dist/esm/resources/types/ApplicationRevokeAccessTokenParams.d.ts +4 -0
- package/dist/esm/resources/types/ApplicationRevokeAccessTokenResponse.d.ts +6 -0
- package/dist/esm/resources/types/ApplicationRevokeRefreshTokenParams.d.ts +4 -0
- package/dist/esm/resources/types/ApplicationRevokeRefreshTokenResponse.d.ts +6 -0
- package/dist/esm/resources/types/ApplicationRotateSecretParams.d.ts +3 -0
- package/dist/esm/resources/types/ApplicationRotateSecretResponse.d.ts +6 -0
- package/dist/esm/resources/types/ApplicationUpdateParams.d.ts +59 -0
- package/dist/esm/resources/types/ApplicationUpdateResponse.d.ts +5 -0
- package/dist/esm/resources/types/Card.d.ts +8 -0
- package/dist/esm/resources/types/CardIdentifier.d.ts +7 -0
- package/dist/esm/resources/types/ChargeDetails.d.ts +8 -0
- package/dist/esm/resources/types/ChargeIssueParams.d.ts +6 -0
- package/dist/esm/resources/types/ChargeStatusParams.d.ts +6 -0
- package/dist/esm/resources/types/ChargeStatusResponse.d.ts +5 -0
- package/dist/esm/resources/types/ClaimAddress.d.ts +7 -0
- package/dist/esm/resources/types/ClaimCMS1500.d.ts +100 -0
- package/dist/esm/resources/types/ClaimDate.d.ts +5 -0
- package/dist/esm/resources/types/ClaimDatePeriod.d.ts +5 -0
- package/dist/esm/resources/types/ClaimDateWithQualifier.d.ts +5 -0
- package/dist/esm/resources/types/ClaimId.d.ts +4 -0
- package/dist/esm/resources/types/ClaimName.d.ts +6 -0
- package/dist/esm/resources/types/ConversationAddParticipantParams.d.ts +21 -0
- package/dist/esm/resources/types/ConversationCreateParams.d.ts +7 -0
- package/dist/esm/resources/types/ConversationCreateResponse.d.ts +10 -0
- package/dist/esm/resources/types/ConversationGetTokenResponse.d.ts +9 -0
- package/dist/esm/resources/types/ConversationMessageParams.d.ts +13 -0
- package/dist/esm/resources/types/ConversationRemoveParticipantParams.d.ts +11 -0
- package/dist/esm/resources/types/Developer.d.ts +20 -0
- package/dist/esm/resources/types/DeveloperDeleteParams.d.ts +3 -0
- package/dist/esm/resources/types/DeveloperGetParams.d.ts +3 -0
- package/dist/esm/resources/types/DeveloperGetResponse.d.ts +5 -0
- package/dist/esm/resources/types/DeveloperInviteParams.d.ts +17 -0
- package/dist/esm/resources/types/DeveloperInviteResponse.d.ts +23 -0
- package/dist/esm/resources/types/DeveloperListItem.d.ts +7 -0
- package/dist/esm/resources/types/DeveloperListResponse.d.ts +5 -0
- package/dist/esm/resources/types/DeveloperListV2Params.d.ts +11 -0
- package/dist/esm/resources/types/DeveloperListV2Response.d.ts +29 -0
- package/dist/esm/resources/types/DeveloperUpdateParams.d.ts +9 -0
- package/dist/esm/resources/types/DeveloperUpdateResponse.d.ts +5 -0
- package/dist/esm/resources/types/ErxAllergySearchParams.d.ts +3 -0
- package/dist/esm/resources/types/ErxAllergySearchResponse.d.ts +19 -0
- package/dist/esm/resources/types/ErxMedicationSearchParams.d.ts +6 -0
- package/dist/esm/resources/types/ErxMedicationSearchResponse.d.ts +38 -0
- package/dist/esm/resources/types/ErxSyncPatientParams.d.ts +3 -0
- package/dist/esm/resources/types/ErxSyncPatientResponse.d.ts +9 -0
- package/dist/esm/resources/types/M2m.d.ts +30 -0
- package/dist/esm/resources/types/M2mCreateParams.d.ts +20 -0
- package/dist/esm/resources/types/M2mCreateResponse.d.ts +5 -0
- package/dist/esm/resources/types/M2mDeleteParams.d.ts +3 -0
- package/dist/esm/resources/types/M2mGetParams.d.ts +3 -0
- package/dist/esm/resources/types/M2mGetResponse.d.ts +5 -0
- package/dist/esm/resources/types/M2mListItem.d.ts +25 -0
- package/dist/esm/resources/types/M2mListResponse.d.ts +5 -0
- package/dist/esm/resources/types/M2mListV2Params.d.ts +10 -0
- package/dist/esm/resources/types/M2mListV2Response.d.ts +16 -0
- package/dist/esm/resources/types/M2mRotateSecretParams.d.ts +3 -0
- package/dist/esm/resources/types/M2mRotateSecretResponse.d.ts +6 -0
- package/dist/esm/resources/types/M2mUpdateParams.d.ts +21 -0
- package/dist/esm/resources/types/M2mUpdateResponse.d.ts +5 -0
- package/dist/esm/resources/types/MessagingGetMessagingConfigResponse.d.ts +8 -0
- package/dist/esm/resources/types/MessagingServiceInfo.d.ts +14 -0
- package/dist/esm/resources/types/PaymentMethodDeleteParams.d.ts +16 -0
- package/dist/esm/resources/types/PaymentMethodListParams.d.ts +12 -0
- package/dist/esm/resources/types/PaymentMethodListResponse.d.ts +8 -0
- package/dist/esm/resources/types/PaymentMethodSetDefaultParams.d.ts +16 -0
- package/dist/esm/resources/types/PaymentMethodSetUpParams.d.ts +12 -0
- package/dist/esm/resources/types/PaymentMethodSetUpResponse.d.ts +9 -0
- package/dist/esm/resources/types/Project.d.ts +17 -0
- package/dist/esm/resources/types/ProjectGetResponse.d.ts +5 -0
- package/dist/esm/resources/types/ProjectUpdateParams.d.ts +16 -0
- package/dist/esm/resources/types/ProjectUpdateResponse.d.ts +5 -0
- package/dist/esm/resources/types/RcmEligibilityCheckParams.d.ts +6 -0
- package/dist/esm/resources/types/RcmEligibilityCheckResponse.d.ts +5 -0
- package/dist/esm/resources/types/RcmSubmitProfessionalClaimParams.d.ts +10 -0
- package/dist/esm/resources/types/RcmSubmitProfessionalClaimResponse.d.ts +5 -0
- package/dist/esm/resources/types/RcmValidateProfessionalClaimParams.d.ts +6 -0
- package/dist/esm/resources/types/RcmValidateProfessionalClaimResponse.d.ts +21 -0
- package/dist/esm/resources/types/Role.d.ts +16 -0
- package/dist/esm/resources/types/RoleCreateParams.d.ts +12 -0
- package/dist/esm/resources/types/RoleCreateResponse.d.ts +5 -0
- package/dist/esm/resources/types/RoleDeleteParams.d.ts +3 -0
- package/dist/esm/resources/types/RoleGetParams.d.ts +3 -0
- package/dist/esm/resources/types/RoleGetResponse.d.ts +5 -0
- package/dist/esm/resources/types/RoleListItem.d.ts +14 -0
- package/dist/esm/resources/types/RoleListResponse.d.ts +5 -0
- package/dist/esm/resources/types/RoleStub.d.ts +10 -0
- package/dist/esm/resources/types/RoleUpdateParams.d.ts +17 -0
- package/dist/esm/resources/types/RoleUpdateResponse.d.ts +5 -0
- package/dist/esm/resources/types/Secret.d.ts +10 -0
- package/dist/esm/resources/types/SecretDeleteParams.d.ts +3 -0
- package/dist/esm/resources/types/SecretGetParams.d.ts +3 -0
- package/dist/esm/resources/types/SecretGetResponse.d.ts +5 -0
- package/dist/esm/resources/types/SecretListItem.d.ts +6 -0
- package/dist/esm/resources/types/SecretListResponse.d.ts +5 -0
- package/dist/esm/resources/types/SecretSetParams.d.ts +10 -0
- package/dist/esm/resources/types/SecretSetResponse.d.ts +5 -0
- package/dist/esm/resources/types/TelemedCreateMeetingParams.d.ts +7 -0
- package/dist/esm/resources/types/TelemedCreateMeetingResponse.d.ts +10 -0
- package/dist/esm/resources/types/TelemedJoinMeetingParams.d.ts +4 -0
- package/dist/esm/resources/types/TelemedJoinMeetingResponse.d.ts +27 -0
- package/dist/esm/resources/types/TransactionalSMSSendParams.d.ts +10 -0
- package/dist/esm/resources/types/TransactionalSMSSendResponse.d.ts +9 -0
- package/dist/esm/resources/types/User.d.ts +36 -0
- package/dist/esm/resources/types/UserDeleteParams.d.ts +3 -0
- package/dist/esm/resources/types/UserGetParams.d.ts +3 -0
- package/dist/esm/resources/types/UserGetResponse.d.ts +5 -0
- package/dist/esm/resources/types/UserInviteParams.d.ts +35 -0
- package/dist/esm/resources/types/UserInviteResponse.d.ts +37 -0
- package/dist/esm/resources/types/UserListItem.d.ts +15 -0
- package/dist/esm/resources/types/UserListResponse.d.ts +5 -0
- package/dist/esm/resources/types/UserListV2Params.d.ts +11 -0
- package/dist/esm/resources/types/UserListV2Response.d.ts +16 -0
- package/dist/esm/resources/types/UserMeResponse.d.ts +5 -0
- package/dist/esm/resources/types/UserUpdateParams.d.ts +9 -0
- package/dist/esm/resources/types/UserUpdateResponse.d.ts +5 -0
- package/dist/esm/resources/types/VersionGetResponse.d.ts +17 -0
- package/dist/esm/resources/types/Z3CreateBucketParams.d.ts +3 -0
- package/dist/esm/resources/types/Z3CreateBucketResponse.d.ts +10 -0
- package/dist/esm/resources/types/Z3DeleteBucketParams.d.ts +3 -0
- package/dist/esm/resources/types/Z3DeleteObjectParams.d.ts +8 -0
- package/dist/esm/resources/types/Z3GetPresignedUrlParams.d.ts +9 -0
- package/dist/esm/resources/types/Z3GetPresignedUrlResponse.d.ts +9 -0
- package/dist/esm/resources/types/Z3ListBucketsResponse.d.ts +14 -0
- package/dist/esm/resources/types/Z3ListObjectsParams.d.ts +4 -0
- package/dist/esm/resources/types/Z3ListObjectsResponse.d.ts +13 -0
- package/dist/esm/resources/types/ZambdaCreateParams.d.ts +12 -0
- package/dist/esm/resources/types/ZambdaCreateResponse.d.ts +5 -0
- package/dist/esm/resources/types/ZambdaDeleteParams.d.ts +3 -0
- package/dist/esm/resources/types/ZambdaExecuteParams.d.ts +4 -0
- package/dist/esm/resources/types/ZambdaExecutePublicParams.d.ts +4 -0
- package/dist/esm/resources/types/ZambdaExecutePublicResponse.d.ts +5 -0
- package/dist/esm/resources/types/ZambdaExecuteResponse.d.ts +5 -0
- package/dist/esm/resources/types/ZambdaExecuteResult.d.ts +10 -0
- package/dist/esm/resources/types/ZambdaFunction.d.ts +38 -0
- package/dist/esm/resources/types/ZambdaGetParams.d.ts +3 -0
- package/dist/esm/resources/types/ZambdaGetResponse.d.ts +5 -0
- package/dist/esm/resources/types/ZambdaListResponse.d.ts +5 -0
- package/dist/esm/resources/types/ZambdaLogStreamGetParams.d.ts +8 -0
- package/dist/esm/resources/types/ZambdaLogStreamGetResponse.d.ts +27 -0
- package/dist/esm/resources/types/ZambdaLogStreamListParams.d.ts +4 -0
- package/dist/esm/resources/types/ZambdaLogStreamListResponse.d.ts +46 -0
- package/dist/esm/resources/types/ZambdaLogStreamSearchParams.d.ts +19 -0
- package/dist/esm/resources/types/ZambdaLogStreamSearchResponse.d.ts +23 -0
- package/dist/esm/resources/types/ZambdaS3UploadParams.d.ts +7 -0
- package/dist/esm/resources/types/ZambdaS3UploadResponse.d.ts +9 -0
- package/dist/esm/resources/types/ZambdaSchedule.d.ts +30 -0
- package/dist/esm/resources/types/ZambdaUpdateParams.d.ts +17 -0
- package/dist/esm/resources/types/ZambdaUpdateResponse.d.ts +5 -0
- package/dist/esm/resources/types/fhir.d.ts +46 -0
- package/dist/esm/resources/types/index.d.ts +158 -0
- package/dist/esm/tests/common.d.ts +2 -0
- package/dist/esm/tests/setup/constants.d.ts +12 -0
- package/dist/esm/tests/setup/global.d.ts +1 -0
- package/dist/esm/tests/setup/per-test.d.ts +1 -0
- package/package.json +59 -0
- package/rollup.config-cjs.mjs +49 -0
- package/rollup.config-mjs.mjs +49 -0
- package/src/client/client.ts +307 -0
- package/src/config.ts +56 -0
- package/src/errors/index.ts +41 -0
- package/src/fhir/fhir-types.ts +15 -0
- package/src/fhir/index.ts +2 -0
- package/src/fhir/utils.ts +68 -0
- package/src/index.cts +22 -0
- package/src/index.ts +27 -0
- package/src/resources/classes/application.ts +100 -0
- package/src/resources/classes/charge.ts +37 -0
- package/src/resources/classes/conversation-ext.ts +31 -0
- package/src/resources/classes/conversation.ts +82 -0
- package/src/resources/classes/developer.ts +72 -0
- package/src/resources/classes/erx.ts +36 -0
- package/src/resources/classes/fhir-ext.ts +214 -0
- package/src/resources/classes/fhir.ts +26 -0
- package/src/resources/classes/index.ts +68 -0
- package/src/resources/classes/m2m.ts +82 -0
- package/src/resources/classes/messaging.ts +16 -0
- package/src/resources/classes/paymentMethod.ts +87 -0
- package/src/resources/classes/project.ts +26 -0
- package/src/resources/classes/rcm.ts +63 -0
- package/src/resources/classes/role.ts +61 -0
- package/src/resources/classes/secret.ts +50 -0
- package/src/resources/classes/telemed.ts +47 -0
- package/src/resources/classes/transactionalSMS.ts +28 -0
- package/src/resources/classes/user.ts +79 -0
- package/src/resources/classes/version.ts +15 -0
- package/src/resources/classes/z3-ext.ts +54 -0
- package/src/resources/classes/z3.ts +74 -0
- package/src/resources/classes/zambda-ext.ts +20 -0
- package/src/resources/classes/zambda.ts +93 -0
- package/src/resources/classes/zambdaLogStream.ts +45 -0
- package/src/resources/index.ts +1 -0
- package/src/resources/types/AccessPolicy.ts +9 -0
- package/src/resources/types/Application.ts +61 -0
- package/src/resources/types/ApplicationCreateParams.ts +61 -0
- package/src/resources/types/ApplicationCreateResponse.ts +7 -0
- package/src/resources/types/ApplicationDeleteParams.ts +5 -0
- package/src/resources/types/ApplicationGetParams.ts +5 -0
- package/src/resources/types/ApplicationGetResponse.ts +7 -0
- package/src/resources/types/ApplicationListItem.ts +17 -0
- package/src/resources/types/ApplicationListResponse.ts +7 -0
- package/src/resources/types/ApplicationRevokeAccessTokenParams.ts +6 -0
- package/src/resources/types/ApplicationRevokeAccessTokenResponse.ts +8 -0
- package/src/resources/types/ApplicationRevokeRefreshTokenParams.ts +6 -0
- package/src/resources/types/ApplicationRevokeRefreshTokenResponse.ts +8 -0
- package/src/resources/types/ApplicationRotateSecretParams.ts +5 -0
- package/src/resources/types/ApplicationRotateSecretResponse.ts +8 -0
- package/src/resources/types/ApplicationUpdateParams.ts +61 -0
- package/src/resources/types/ApplicationUpdateResponse.ts +7 -0
- package/src/resources/types/Card.ts +10 -0
- package/src/resources/types/CardIdentifier.ts +9 -0
- package/src/resources/types/ChargeDetails.ts +11 -0
- package/src/resources/types/ChargeIssueParams.ts +8 -0
- package/src/resources/types/ChargeStatusParams.ts +8 -0
- package/src/resources/types/ChargeStatusResponse.ts +7 -0
- package/src/resources/types/ClaimAddress.ts +9 -0
- package/src/resources/types/ClaimCMS1500.ts +103 -0
- package/src/resources/types/ClaimDate.ts +7 -0
- package/src/resources/types/ClaimDatePeriod.ts +8 -0
- package/src/resources/types/ClaimDateWithQualifier.ts +8 -0
- package/src/resources/types/ClaimId.ts +6 -0
- package/src/resources/types/ClaimName.ts +8 -0
- package/src/resources/types/ConversationAddParticipantParams.ts +23 -0
- package/src/resources/types/ConversationCreateParams.ts +10 -0
- package/src/resources/types/ConversationCreateResponse.ts +12 -0
- package/src/resources/types/ConversationGetTokenResponse.ts +11 -0
- package/src/resources/types/ConversationMessageParams.ts +15 -0
- package/src/resources/types/ConversationRemoveParticipantParams.ts +13 -0
- package/src/resources/types/Developer.ts +23 -0
- package/src/resources/types/DeveloperDeleteParams.ts +5 -0
- package/src/resources/types/DeveloperGetParams.ts +5 -0
- package/src/resources/types/DeveloperGetResponse.ts +7 -0
- package/src/resources/types/DeveloperInviteParams.ts +20 -0
- package/src/resources/types/DeveloperInviteResponse.ts +25 -0
- package/src/resources/types/DeveloperListItem.ts +9 -0
- package/src/resources/types/DeveloperListResponse.ts +7 -0
- package/src/resources/types/DeveloperListV2Params.ts +13 -0
- package/src/resources/types/DeveloperListV2Response.ts +31 -0
- package/src/resources/types/DeveloperUpdateParams.ts +12 -0
- package/src/resources/types/DeveloperUpdateResponse.ts +7 -0
- package/src/resources/types/ErxAllergySearchParams.ts +5 -0
- package/src/resources/types/ErxAllergySearchResponse.ts +21 -0
- package/src/resources/types/ErxMedicationSearchParams.ts +8 -0
- package/src/resources/types/ErxMedicationSearchResponse.ts +40 -0
- package/src/resources/types/ErxSyncPatientParams.ts +5 -0
- package/src/resources/types/ErxSyncPatientResponse.ts +11 -0
- package/src/resources/types/M2m.ts +33 -0
- package/src/resources/types/M2mCreateParams.ts +23 -0
- package/src/resources/types/M2mCreateResponse.ts +7 -0
- package/src/resources/types/M2mDeleteParams.ts +5 -0
- package/src/resources/types/M2mGetParams.ts +5 -0
- package/src/resources/types/M2mGetResponse.ts +7 -0
- package/src/resources/types/M2mListItem.ts +28 -0
- package/src/resources/types/M2mListResponse.ts +7 -0
- package/src/resources/types/M2mListV2Params.ts +12 -0
- package/src/resources/types/M2mListV2Response.ts +18 -0
- package/src/resources/types/M2mRotateSecretParams.ts +5 -0
- package/src/resources/types/M2mRotateSecretResponse.ts +8 -0
- package/src/resources/types/M2mUpdateParams.ts +24 -0
- package/src/resources/types/M2mUpdateResponse.ts +7 -0
- package/src/resources/types/MessagingGetMessagingConfigResponse.ts +10 -0
- package/src/resources/types/MessagingServiceInfo.ts +16 -0
- package/src/resources/types/PaymentMethodDeleteParams.ts +18 -0
- package/src/resources/types/PaymentMethodListParams.ts +14 -0
- package/src/resources/types/PaymentMethodListResponse.ts +10 -0
- package/src/resources/types/PaymentMethodSetDefaultParams.ts +18 -0
- package/src/resources/types/PaymentMethodSetUpParams.ts +14 -0
- package/src/resources/types/PaymentMethodSetUpResponse.ts +11 -0
- package/src/resources/types/Project.ts +20 -0
- package/src/resources/types/ProjectGetResponse.ts +7 -0
- package/src/resources/types/ProjectUpdateParams.ts +18 -0
- package/src/resources/types/ProjectUpdateResponse.ts +7 -0
- package/src/resources/types/RcmEligibilityCheckParams.ts +8 -0
- package/src/resources/types/RcmEligibilityCheckResponse.ts +7 -0
- package/src/resources/types/RcmSubmitProfessionalClaimParams.ts +13 -0
- package/src/resources/types/RcmSubmitProfessionalClaimResponse.ts +7 -0
- package/src/resources/types/RcmValidateProfessionalClaimParams.ts +9 -0
- package/src/resources/types/RcmValidateProfessionalClaimResponse.ts +23 -0
- package/src/resources/types/Role.ts +19 -0
- package/src/resources/types/RoleCreateParams.ts +15 -0
- package/src/resources/types/RoleCreateResponse.ts +7 -0
- package/src/resources/types/RoleDeleteParams.ts +5 -0
- package/src/resources/types/RoleGetParams.ts +5 -0
- package/src/resources/types/RoleGetResponse.ts +7 -0
- package/src/resources/types/RoleListItem.ts +16 -0
- package/src/resources/types/RoleListResponse.ts +7 -0
- package/src/resources/types/RoleStub.ts +12 -0
- package/src/resources/types/RoleUpdateParams.ts +20 -0
- package/src/resources/types/RoleUpdateResponse.ts +7 -0
- package/src/resources/types/Secret.ts +12 -0
- package/src/resources/types/SecretDeleteParams.ts +5 -0
- package/src/resources/types/SecretGetParams.ts +5 -0
- package/src/resources/types/SecretGetResponse.ts +7 -0
- package/src/resources/types/SecretListItem.ts +8 -0
- package/src/resources/types/SecretListResponse.ts +7 -0
- package/src/resources/types/SecretSetParams.ts +12 -0
- package/src/resources/types/SecretSetResponse.ts +7 -0
- package/src/resources/types/TelemedCreateMeetingParams.ts +10 -0
- package/src/resources/types/TelemedCreateMeetingResponse.ts +12 -0
- package/src/resources/types/TelemedJoinMeetingParams.ts +6 -0
- package/src/resources/types/TelemedJoinMeetingResponse.ts +29 -0
- package/src/resources/types/TransactionalSMSSendParams.ts +12 -0
- package/src/resources/types/TransactionalSMSSendResponse.ts +11 -0
- package/src/resources/types/User.ts +39 -0
- package/src/resources/types/UserDeleteParams.ts +5 -0
- package/src/resources/types/UserGetParams.ts +5 -0
- package/src/resources/types/UserGetResponse.ts +7 -0
- package/src/resources/types/UserInviteParams.ts +38 -0
- package/src/resources/types/UserInviteResponse.ts +39 -0
- package/src/resources/types/UserListItem.ts +17 -0
- package/src/resources/types/UserListResponse.ts +7 -0
- package/src/resources/types/UserListV2Params.ts +13 -0
- package/src/resources/types/UserListV2Response.ts +18 -0
- package/src/resources/types/UserMeResponse.ts +7 -0
- package/src/resources/types/UserUpdateParams.ts +12 -0
- package/src/resources/types/UserUpdateResponse.ts +7 -0
- package/src/resources/types/VersionGetResponse.ts +19 -0
- package/src/resources/types/Z3CreateBucketParams.ts +5 -0
- package/src/resources/types/Z3CreateBucketResponse.ts +12 -0
- package/src/resources/types/Z3DeleteBucketParams.ts +5 -0
- package/src/resources/types/Z3DeleteObjectParams.ts +10 -0
- package/src/resources/types/Z3GetPresignedUrlParams.ts +11 -0
- package/src/resources/types/Z3GetPresignedUrlResponse.ts +11 -0
- package/src/resources/types/Z3ListBucketsResponse.ts +16 -0
- package/src/resources/types/Z3ListObjectsParams.ts +6 -0
- package/src/resources/types/Z3ListObjectsResponse.ts +15 -0
- package/src/resources/types/ZambdaCreateParams.ts +15 -0
- package/src/resources/types/ZambdaCreateResponse.ts +7 -0
- package/src/resources/types/ZambdaDeleteParams.ts +5 -0
- package/src/resources/types/ZambdaExecuteParams.ts +6 -0
- package/src/resources/types/ZambdaExecutePublicParams.ts +6 -0
- package/src/resources/types/ZambdaExecutePublicResponse.ts +7 -0
- package/src/resources/types/ZambdaExecuteResponse.ts +7 -0
- package/src/resources/types/ZambdaExecuteResult.ts +12 -0
- package/src/resources/types/ZambdaFunction.ts +41 -0
- package/src/resources/types/ZambdaGetParams.ts +5 -0
- package/src/resources/types/ZambdaGetResponse.ts +7 -0
- package/src/resources/types/ZambdaListResponse.ts +7 -0
- package/src/resources/types/ZambdaLogStreamGetParams.ts +10 -0
- package/src/resources/types/ZambdaLogStreamGetResponse.ts +29 -0
- package/src/resources/types/ZambdaLogStreamListParams.ts +6 -0
- package/src/resources/types/ZambdaLogStreamListResponse.ts +48 -0
- package/src/resources/types/ZambdaLogStreamSearchParams.ts +21 -0
- package/src/resources/types/ZambdaLogStreamSearchResponse.ts +25 -0
- package/src/resources/types/ZambdaS3UploadParams.ts +9 -0
- package/src/resources/types/ZambdaS3UploadResponse.ts +11 -0
- package/src/resources/types/ZambdaSchedule.ts +32 -0
- package/src/resources/types/ZambdaUpdateParams.ts +20 -0
- package/src/resources/types/ZambdaUpdateResponse.ts +7 -0
- package/src/resources/types/fhir.ts +75 -0
- package/src/resources/types/index.ts +160 -0
- package/turbo.json +13 -0
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
"extends": "../../.eslintrc.js",
|
|
3
|
+
"parserOptions": {
|
|
4
|
+
tsconfigRootDir: __dirname,
|
|
5
|
+
"project": ["tsconfig.json", "tsconfig.scripts.json"]
|
|
6
|
+
},
|
|
7
|
+
"settings": {
|
|
8
|
+
"import/resolver": {
|
|
9
|
+
"typescript": {
|
|
10
|
+
"project": ["tsconfig.json", "tsconfig.scripts.json"]
|
|
11
|
+
},
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
};
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Oystehr
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://zapehr-public-files.s3.amazonaws.com/osytehr-logo-dark.svg">
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://zapehr-public-files.s3.amazonaws.com/osytehr-logo-dark.svg">
|
|
5
|
+
<img alt="Oystehr Logo" src="https://zapehr-public-files.s3.amazonaws.com/oystehr-logo-white.svg" width=300px>
|
|
6
|
+
</picture>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">The complete health-tech developer platform.</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://www.oystehr.com/"><b>Website</b></a> •
|
|
13
|
+
<a href="https://docs.oystehr.com/"><b>Documentation</b></a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<div align="center">
|
|
17
|
+
|
|
18
|
+
[](https://npmjs.com/package/@oystehr/sdk)
|
|
19
|
+
[](https://npmjs.com/package/@oystehr/sdk)
|
|
20
|
+
[](https://packagephobia.com/result?p=%40oystehr%2Fsdk)
|
|
21
|
+
[](https://bundlephobia.com/package/@oystehr/sdk)
|
|
22
|
+
[](https://npmjs.com/package/@oystehr/sdk)
|
|
23
|
+
[](https://npmjs.com/package/@oystehr/sdk)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
# Oystehr SDK
|
|
31
|
+
|
|
32
|
+
The Oystehr SDK is a TypeScript library for interacting with Oystehr's [FHIR and Project APIs](https://api-reference.oystehr.com).
|
|
33
|
+
|
|
34
|
+
While you can always make raw HTTP requests to Oystehr's APIs from any language, this SDK provides several advantages for developers:
|
|
35
|
+
|
|
36
|
+
- TypeScript types — The SDK provides complete typing for requests and responses across all of Oystehr's APIs. This gives you helpful autocomplete and build-time type checking.
|
|
37
|
+
- Convenience functions — The SDK provides convenience functions for doing common tasks like uploading and downloading files with Z3.
|
|
38
|
+
- FHIR Support — The SDK supports the R4B and R5 versions of FHIR and includes types and helpers for interacting with the Oystehr FHIR API.
|
|
39
|
+
|
|
40
|
+
## Installation
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm install @oystehr/sdk
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Usage
|
|
47
|
+
|
|
48
|
+
1. Import the SDK.
|
|
49
|
+
2. Initialize the SDK with a Oystehr access token. ([Learn how to get an access token](https://docs.oystehr.com/core-documentation/authenticating-api-requests)).
|
|
50
|
+
3. Invoke any of Oystehr's APIs with a function call.
|
|
51
|
+
|
|
52
|
+
```typescript filename="Example of using the SDK"
|
|
53
|
+
import Oystehr from '@oystehr/sdk';
|
|
54
|
+
import { Patient } from 'fhir/r4b';
|
|
55
|
+
|
|
56
|
+
const oystehr = new Oystehr({
|
|
57
|
+
accessToken: 'your_access_token',
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
// Create a Patient FHIR resource
|
|
61
|
+
const patient = await oystehr.fhir.create<Patient>({
|
|
62
|
+
resourceType: 'Patient',
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
// Upload a zambda
|
|
66
|
+
try {
|
|
67
|
+
const zambda = await oystehr.zambda.create({ name: 'new zambda', triggerMethod: 'http_open' });
|
|
68
|
+
const fileHandle = await fs.open('./path/to/my/zambda.zip')
|
|
69
|
+
const file = new Blob([await fileHandle.readFile()]);
|
|
70
|
+
await oystehr.zambda.uploadFile({ id: createZambda.data.id, file, })
|
|
71
|
+
} catch (err) {
|
|
72
|
+
// Handle error thrown by Oystehr or JS in some way
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### SDK Config Object
|
|
77
|
+
|
|
78
|
+
Instantiating the SDK requires a configuration object, though all fields are optional.
|
|
79
|
+
|
|
80
|
+
```typescript
|
|
81
|
+
interface OystehrConfig {
|
|
82
|
+
/**
|
|
83
|
+
* Access token for your user, M2M, or developer account.
|
|
84
|
+
*/
|
|
85
|
+
accessToken?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Optional Oystehr Project ID. Required for developer accessTokens.
|
|
88
|
+
*/
|
|
89
|
+
projectId?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Optionally provide a custom fetch implementation. This must conform to the
|
|
92
|
+
* built-in node.js fetch implementation (Undici fetch).
|
|
93
|
+
* @param req
|
|
94
|
+
* @returns
|
|
95
|
+
*/
|
|
96
|
+
fetch?: (req: Request) => Promise<Response>;
|
|
97
|
+
/**
|
|
98
|
+
* Optional configuration for retrying request in case of error. Defaults to
|
|
99
|
+
* `{ retries: 3 }` if not provided.
|
|
100
|
+
*/
|
|
101
|
+
retry?: {
|
|
102
|
+
/**
|
|
103
|
+
* Number of retries.
|
|
104
|
+
*/
|
|
105
|
+
retries: number;
|
|
106
|
+
/**
|
|
107
|
+
* Optional, non-async function to call when a request is retried.
|
|
108
|
+
* @param attempt
|
|
109
|
+
* @returns
|
|
110
|
+
*/
|
|
111
|
+
onRetry?: (attempt: number) => void;
|
|
112
|
+
/**
|
|
113
|
+
* Optional list of additional errors to retry for. The Oystehr SDK will always
|
|
114
|
+
* retry for status codes 408, 429, 500, 502, 503, and 504.
|
|
115
|
+
*/
|
|
116
|
+
retryOn?: number[];
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Features
|
|
122
|
+
|
|
123
|
+
### Unauthenticated Usage
|
|
124
|
+
|
|
125
|
+
All Oystehr endpoints require authentication to access except for public Zambdas that you upload to your project. You can invoke these Zambdas without passing an authentication token to the SDK:
|
|
126
|
+
|
|
127
|
+
```typescript filename="Example of unauthenticated usage"
|
|
128
|
+
import Oystehr from '@oystehr/sdk';
|
|
129
|
+
|
|
130
|
+
const oystehr = new Oystehr({});
|
|
131
|
+
|
|
132
|
+
// Execute the Zambda
|
|
133
|
+
const result = await oystehr.zambda.executePublic({
|
|
134
|
+
id: 'your_oystehr_zambda_id',
|
|
135
|
+
additional: 'params',
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
// Do something with your Zambda result
|
|
139
|
+
console.log(JSON.stringify(result, null, 2));
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Retries
|
|
143
|
+
|
|
144
|
+
The Oystehr SDK will retry on a variety of errors by default:
|
|
145
|
+
|
|
146
|
+
* Common Node.js and Undici networking errors
|
|
147
|
+
* Rate limiting status codes (`408`, `429`)
|
|
148
|
+
* Potentially ephemeral upstream status codes (`500`, `502`, `503`, `504`)
|
|
149
|
+
|
|
150
|
+
Note that the Oystehr FHIR API is eventually consistent, so if you are retrieving or updating a resource immediately after creating it, it's recommended to retry on `404` and `412` status codes as well.
|
|
151
|
+
|
|
152
|
+
To retry on additional status codes, change the number of retries, or register a callback for each retry, pass options to the Oystehr SDK configuration object as shown above.
|
|
153
|
+
|
|
154
|
+
## Types
|
|
155
|
+
|
|
156
|
+
### Oystehr Types
|
|
157
|
+
|
|
158
|
+
The SDK includes input and output types for all non-FHIR Oystehr services, as well as some reusable "component" types. These types provide a single interface for inputs — no need to worry about whether a value goes into a path parameters or the request body.
|
|
159
|
+
|
|
160
|
+
```typescript filename="Example of a reusable user invite wrapper"
|
|
161
|
+
import Oystehr, { UserInviteParams, UserInviteResponse } from '@oystehr/sdk';
|
|
162
|
+
|
|
163
|
+
// Hard-coded application ID from environment
|
|
164
|
+
const APP_ID = process.env.OYSTEHR_APP_ID;
|
|
165
|
+
|
|
166
|
+
// Elsewhere in your project, initialize an Oystehr client
|
|
167
|
+
// with the currently-authenticated user's access token
|
|
168
|
+
const oystehr = new Oystehr({ accessToken: accessTokenFromAuthn });
|
|
169
|
+
|
|
170
|
+
// Define a reusable helper function to add practitioners
|
|
171
|
+
// to your application, omitting the `applicationId` field
|
|
172
|
+
// since you will override it.
|
|
173
|
+
async function inviteUserToMyApp(
|
|
174
|
+
oystehr: Oystehr,
|
|
175
|
+
input: Omit<UserInviteParams, 'applicationId'>
|
|
176
|
+
): Promise<UserInviteResponse> {
|
|
177
|
+
return oystehr.user.invite({
|
|
178
|
+
...input,
|
|
179
|
+
applicationId: APP_ID,
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## FHIR
|
|
185
|
+
|
|
186
|
+
### FHIR Types
|
|
187
|
+
|
|
188
|
+
The SDK supports both the R4B and R5 versions of FHIR from one shared set of generic functions. You shouldn't need to mix these types, since each Oystehr project can only have one FHIR version, but the example below shows how the SDK handles types for each version.
|
|
189
|
+
|
|
190
|
+
```typescript filename="Example of using FHIR types with the SDK"
|
|
191
|
+
import Oystehr from '@oystehr/sdk';
|
|
192
|
+
import { Patient as PatientR4 } from 'fhir/r4b';
|
|
193
|
+
import { Patient as PatientR5 } from 'fhir/r5';
|
|
194
|
+
|
|
195
|
+
const oystehr = new Oystehr({
|
|
196
|
+
accessToken: 'your_access_token',
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
const encounter4 = await oystehr.fhir.create<EncounterR4B>({
|
|
200
|
+
resourceType: 'Encounter',
|
|
201
|
+
status: 'arrived',
|
|
202
|
+
class: {},
|
|
203
|
+
});
|
|
204
|
+
/*
|
|
205
|
+
* R4B Encounters do not have `virtualService` so this shows an error:
|
|
206
|
+
* Argument of type '{ resourceType: "Encounter"; status: "arrived"; class: {}; virtualService: {}; }' is not assignable to parameter of type 'Encounter'.
|
|
207
|
+
* Object literal may only specify known properties, and 'virtualService' does not exist in type 'Encounter'.ts(2345)
|
|
208
|
+
*/
|
|
209
|
+
const vs = encounter4.virtualService;
|
|
210
|
+
const encounter5 = await oystehr.fhir.create<EncounterR5>({
|
|
211
|
+
resourceType: 'Encounter',
|
|
212
|
+
/*
|
|
213
|
+
* R5 Encounters have different enum values for `status` so this shows an error:
|
|
214
|
+
* Type '"arrived"' is not assignable to type '"planned" | "in-progress" | "cancelled" | "entered-in-error" | "unknown" | "on-hold" | "completed" | "discharged" | "discontinued"'.ts(2322)
|
|
215
|
+
*/
|
|
216
|
+
status: 'arrived',
|
|
217
|
+
class: [],
|
|
218
|
+
});
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### FHIR Bundles
|
|
222
|
+
|
|
223
|
+
When performing a FHIR search, the resulting type is `Bundle`. The Oystehr SDK has a convenience function for unwrapping the bundle into an array of the base type.
|
|
224
|
+
|
|
225
|
+
```typescript
|
|
226
|
+
import Oystehr from '@oystehr/sdk';
|
|
227
|
+
import { Patient } from 'fhir/r4b';
|
|
228
|
+
const patientBundle/*: Bundle<Patient>*/ = await oystehr.fhir.search<Patient>({
|
|
229
|
+
resourceType: 'Patient',
|
|
230
|
+
params: [
|
|
231
|
+
{
|
|
232
|
+
name: 'name',
|
|
233
|
+
value: 'sam',
|
|
234
|
+
},
|
|
235
|
+
],
|
|
236
|
+
});
|
|
237
|
+
const patients/*: Patient[]*/ = patientBundle.unbundle();
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### Batch Requests
|
|
241
|
+
|
|
242
|
+
The Oystehr FHIR service supports two kinds of [batch requests](https://docs.oystehr.com/services/fhir/batch-transaction/): batch and transaction. In the SDK, the syntax to use these is the same.
|
|
243
|
+
|
|
244
|
+
PATCH requests [behave differently in batch requests](https://docs.oystehr.com/services/fhir/batch-transaction#patch). The Oystehr SDK allows you to pass either pre-encoded `Binary` resources or JSON Patch operations directly.
|
|
245
|
+
|
|
246
|
+
Here's an example of a transaction that patches an appointment and then retrieves a list of today's appointments:
|
|
247
|
+
|
|
248
|
+
```typescript
|
|
249
|
+
import dayjs from 'dayjs';
|
|
250
|
+
import Oystehr, { BatchInputGetRequest, BatchInputPatchRequest } from '@oystehr/sdk';
|
|
251
|
+
const oystehr = new Oystehr({
|
|
252
|
+
accessToken: '<your_access_token>',
|
|
253
|
+
});
|
|
254
|
+
const patchAppointment: BatchInputPatchRequest = {
|
|
255
|
+
method: 'PATCH',
|
|
256
|
+
url: '/Appointment/some_appointment_id',
|
|
257
|
+
operations: [{
|
|
258
|
+
op: 'replace',
|
|
259
|
+
path: '/start',
|
|
260
|
+
value: dayjs().format('YYYY-MM-DDTHH:mm:ss.SSSZ'),
|
|
261
|
+
}],
|
|
262
|
+
};
|
|
263
|
+
const getAppointments: BatchInputGetRequest = {
|
|
264
|
+
method: 'GET',
|
|
265
|
+
url: `/Appointment?date=sa${dayjs().startOf('day').format('YYYY-MM-DDTHH:mm:ss.SSSZ')}`,
|
|
266
|
+
};
|
|
267
|
+
await oystehr.fhir.transaction({ requests: [patchAppointment, getAppointments ]});
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### Optimistic Locking
|
|
271
|
+
|
|
272
|
+
The Oystehr FHIR API and SDK supports [FHIR's optimistic locking specification](https://build.fhir.org/http.html#concurrency). To use optimistic locking, pass a valid FHIR version ID to the request object on your SDK function call.
|
|
273
|
+
|
|
274
|
+
```typescript
|
|
275
|
+
import Oystehr from '@oystehr/sdk';
|
|
276
|
+
import { Patient } from 'fhir/r4b';
|
|
277
|
+
|
|
278
|
+
const oystehr = new Oystehr({
|
|
279
|
+
accessToken: 'your_access_token',
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
// Create a Patient FHIR resource
|
|
283
|
+
const patient = await oystehr.fhir.create<Patient>({
|
|
284
|
+
resourceType: 'Patient',
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
// Fails if patient has been updated by a separate process
|
|
288
|
+
const updatedPatient = await oystehr.fhir.update<Patient>({
|
|
289
|
+
resourceType: 'Patient'
|
|
290
|
+
id: patient.id,
|
|
291
|
+
active: true,
|
|
292
|
+
}, { optimisticLockingVersionId: patient.meta?.versionId });
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
## Convenience Functions
|
|
296
|
+
|
|
297
|
+
### Z3
|
|
298
|
+
|
|
299
|
+
Under the hood, uploading and downloading files with [Z3](/services/z3) is a two-step process:
|
|
300
|
+
|
|
301
|
+
1. Create a presigned URL to upload or download the file ([API Reference](https://api-reference.oystehr.com/reference/post_z3-bucketname-objectpath)).
|
|
302
|
+
2. Upload or download the file using the presigned URL.
|
|
303
|
+
|
|
304
|
+
The SDK provides convenience functions which combine these steps into a single function call to make it a one-liner:
|
|
305
|
+
|
|
306
|
+
```typescript copy filename="Upload a file to Z3 with the SDK"
|
|
307
|
+
await oystehr.z3.uploadFile(
|
|
308
|
+
{ bucketName: 'your-bucket-name', 'objectPath+': 'path/to/your-filename', file: someFileBlob }
|
|
309
|
+
);
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
In the example, `someFileBlob` is a [Blob](https://nodejs.org/api/buffer.html#class-blob).
|
|
313
|
+
|
|
314
|
+
```typescript copy filename="Download a file from Z3 with the SDK"
|
|
315
|
+
const downloadedBuffer = await oystehr.z3.downloadFile(
|
|
316
|
+
{ bucketName: 'your-bucket-name', 'objectPath+': 'path/to/your-filename' }
|
|
317
|
+
);
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### Zambda
|
|
321
|
+
|
|
322
|
+
Uploading code for your Zambda Functions is very similar to uploading a file with Z3. After creating your `.zip` archive, use the `uploadFile()` function to deploy your code.
|
|
323
|
+
|
|
324
|
+
```typescript copy filename="Deploy a code zip to a Zambda Function"
|
|
325
|
+
const zambdaFile = fs.readFileSync('build/your-zambda-code.zip');
|
|
326
|
+
await oystehr.zambda.uploadFile({
|
|
327
|
+
id: yourZambdaId,
|
|
328
|
+
file: new Blob([zambdaFile]),
|
|
329
|
+
});
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
## Migration Guide
|
|
333
|
+
|
|
334
|
+
If you have questions about migrating to a new version of the Oystehr SDK, check out our [migration guide](https://docs.oystehr.com/core-documentation/typescript-sdk/migration-guide).
|
|
335
|
+
|
|
336
|
+
## Contact
|
|
337
|
+
|
|
338
|
+
Questions? Join our [public Slack](https://join.slack.com/t/oystehr/shared_invite/zt-1se6hw93b-olDYmAzDGDhU5ibnEugCmA) or contact [support](mailto:support@oystehr.com).
|
|
339
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { OystehrConfig } from '../config';
|
|
2
|
+
import { FhirBundle, FhirResource } from '../resources/types';
|
|
3
|
+
/**
|
|
4
|
+
* Optional parameter that can be passed to the client methods. It allows
|
|
5
|
+
* overriding the access token or project ID, and setting various headers,
|
|
6
|
+
* such as 'Content-Type'.
|
|
7
|
+
*/
|
|
8
|
+
export interface OystehrClientRequest {
|
|
9
|
+
/**
|
|
10
|
+
* The access token to use for the request. If not provided, the access token from `oystehr.init()` will be used.
|
|
11
|
+
*/
|
|
12
|
+
accessToken?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The project ID to use for the request. If not provided, the project ID from `oystehr.init()` will be used.
|
|
15
|
+
*/
|
|
16
|
+
projectId?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The value of the 'Content-Type' header to use for the request.
|
|
19
|
+
*/
|
|
20
|
+
contentType?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Unique identifier for this request.
|
|
23
|
+
*/
|
|
24
|
+
requestId?: string;
|
|
25
|
+
}
|
|
26
|
+
interface InternalClientRequest extends OystehrClientRequest {
|
|
27
|
+
ifMatch?: string;
|
|
28
|
+
}
|
|
29
|
+
type FhirData<T extends FhirResource> = T | T[] | FhirBundle<T>;
|
|
30
|
+
export type FhirFetcherResponse<T extends FhirData<FhirResource> = any> = T;
|
|
31
|
+
export declare class SDKResource {
|
|
32
|
+
private readonly config;
|
|
33
|
+
constructor(config: OystehrConfig);
|
|
34
|
+
request(path: string, method: string): FetcherFunction;
|
|
35
|
+
fhirRequest<T extends FhirResource = any>(path: string, method: string): (params: any, request?: InternalClientRequest) => Promise<FhirFetcherResponse<T>>;
|
|
36
|
+
}
|
|
37
|
+
export type FetcherError = {
|
|
38
|
+
message: string;
|
|
39
|
+
code: number;
|
|
40
|
+
};
|
|
41
|
+
export type FetcherResponse = any;
|
|
42
|
+
export type FetcherFunction = (params?: Record<string, any> | [any] | InternalClientRequest, request?: InternalClientRequest) => Promise<FetcherResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* Adds params to a URLSearchParams object in such a way as to preserve array values.
|
|
45
|
+
* @param params params
|
|
46
|
+
* @param search URLSearchParams object
|
|
47
|
+
*/
|
|
48
|
+
export declare function addParamsToSearch(params: Record<string, unknown>, search: URLSearchParams): void;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration for the Oystehr SDK client
|
|
3
|
+
*/
|
|
4
|
+
export interface OystehrConfig {
|
|
5
|
+
/**
|
|
6
|
+
* Access token for your user, M2M, or developer account.
|
|
7
|
+
*/
|
|
8
|
+
accessToken?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Optional Oystehr Project ID. Required for developer accessTokens.
|
|
11
|
+
*/
|
|
12
|
+
projectId?: string;
|
|
13
|
+
fhirApiUrl?: string;
|
|
14
|
+
projectApiUrl?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Optionally provide a custom fetch implementation. This must conform to the
|
|
17
|
+
* built-in node.js fetch implementation (undici fetch).
|
|
18
|
+
* @param req
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
fetch?: (req: Request) => Promise<Response>;
|
|
22
|
+
/**
|
|
23
|
+
* Optional configuration for retrying request in case of error. Defaults to
|
|
24
|
+
* `{ retries: 3 }` if not provided.
|
|
25
|
+
*/
|
|
26
|
+
retry?: {
|
|
27
|
+
/**
|
|
28
|
+
* Number of retries.
|
|
29
|
+
*/
|
|
30
|
+
retries: number;
|
|
31
|
+
/**
|
|
32
|
+
* Optional, non-async function to call when a request is retried.
|
|
33
|
+
* @param attempt
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
36
|
+
onRetry?: (attempt: number) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Optional list of additional errors to retry for. The Oystehr SDK will always
|
|
39
|
+
* retry for status codes 408, 429, 500, 502, 503, and 504.
|
|
40
|
+
*/
|
|
41
|
+
retryOn?: number[];
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export declare function getConfig(): OystehrConfig;
|
|
45
|
+
export declare function setConfig(config: OystehrConfig): void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { OperationOutcome as OperationOutcomeR4B } from 'fhir/r4b';
|
|
2
|
+
import { OperationOutcome as OperationOutcomeR5 } from 'fhir/r5';
|
|
3
|
+
export declare class OystehrSdkError extends Error {
|
|
4
|
+
code: number;
|
|
5
|
+
constructor({ message, code }: {
|
|
6
|
+
message: string;
|
|
7
|
+
code: number;
|
|
8
|
+
});
|
|
9
|
+
toString(): string;
|
|
10
|
+
}
|
|
11
|
+
export declare class OystehrFHIRError extends OystehrSdkError {
|
|
12
|
+
cause: OperationOutcomeR4B | OperationOutcomeR5;
|
|
13
|
+
constructor({ error, code }: {
|
|
14
|
+
error: OperationOutcomeR4B | OperationOutcomeR5;
|
|
15
|
+
code: number;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as R4B from 'fhir/r4b';
|
|
2
|
+
import * as R5 from 'fhir/r5';
|
|
3
|
+
export type Binary = R4B.Binary | R5.Binary;
|
|
4
|
+
export type FhirResource = R4B.FhirResource | R5.FhirResource;
|
|
5
|
+
export type Resource = R4B.Resource | R5.Resource;
|
|
6
|
+
export type Bundle<BundleContentType = FhirResource> = R4B.Bundle<BundleContentType> | R5.Bundle<BundleContentType>;
|
|
7
|
+
export type BundleEntry<BundleContentType = FhirResource> = R4B.BundleEntry<BundleContentType> | R5.BundleEntry<BundleContentType>;
|
|
8
|
+
export type Address = R4B.Address | R5.Address;
|
|
9
|
+
export type HumanName = R4B.HumanName | R5.HumanName;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Address, HumanName } from './fhir-types';
|
|
2
|
+
export interface AddressFormatOptions {
|
|
3
|
+
all?: boolean;
|
|
4
|
+
use?: boolean;
|
|
5
|
+
lineSeparator?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface HumanNameFormatOptions {
|
|
8
|
+
all?: boolean;
|
|
9
|
+
prefix?: boolean;
|
|
10
|
+
suffix?: boolean;
|
|
11
|
+
use?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function formatAddress(address: Address, options?: AddressFormatOptions): string;
|
|
14
|
+
export declare function formatHumanName(name: HumanName, options?: HumanNameFormatOptions): string;
|