@icanbwell/bwell-sdk-ts 1.55.0 → 1.56.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/README.md +3 -19
- package/dist/__version__.d.ts +1 -1
- package/dist/__version__.js +1 -1
- package/dist/api/api-provider-factory.d.ts +1 -1
- package/dist/api/api-provider-factory.js +1 -2
- package/dist/api/base/activity/activity-manager.d.ts +25 -18
- package/dist/api/base/activity/get-tasks-request.d.ts +49 -29
- package/dist/api/base/activity/get-tasks-request.js +15 -42
- package/dist/api/base/activity/index.d.ts +4 -2
- package/dist/api/base/activity/index.js +1 -0
- package/dist/api/base/activity/types.d.ts +3 -0
- package/dist/api/base/activity/types.js +5 -0
- package/dist/api/base/activity/update-task-status-request.d.ts +18 -0
- package/dist/api/base/activity/update-task-status-request.js +15 -0
- package/dist/api/base/api-provider.d.ts +14 -12
- package/dist/api/base/connection/connection-manager.d.ts +51 -68
- package/dist/api/base/connection/connection-manager.js +0 -3
- package/dist/api/base/connection/connection-request.d.ts +1 -15
- package/dist/api/base/connection/connection-request.js +0 -8
- package/dist/api/base/connection/index.d.ts +1 -1
- package/dist/api/base/device/device-manager.d.ts +12 -34
- package/dist/api/base/device/device-manager.js +5 -1
- package/dist/api/base/device/device-request.d.ts +42 -35
- package/dist/api/base/device/device-request.js +42 -30
- package/dist/api/base/device/index.d.ts +2 -2
- package/dist/api/base/device/index.js +2 -2
- package/dist/api/base/event/event-manager.d.ts +16 -0
- package/dist/api/base/event/event-request.d.ts +35 -0
- package/dist/api/base/event/event-request.js +64 -0
- package/dist/api/base/event/index.d.ts +2 -0
- package/dist/api/base/event/index.js +1 -0
- package/dist/api/base/financial/coverage-request.d.ts +6 -5
- package/dist/api/base/financial/coverage-request.js +7 -7
- package/dist/api/base/financial/{explanation-of-benefit-request.d.ts → explanation-of-benefit.d.ts} +9 -15
- package/dist/api/base/financial/{explanation-of-benefit-request.js → explanation-of-benefit.js} +18 -8
- package/dist/api/base/financial/financial-manager.d.ts +14 -46
- package/dist/api/base/financial/index.d.ts +2 -3
- package/dist/api/base/financial/index.js +2 -2
- package/dist/api/base/health-data/health-data-request.d.ts +8 -116
- package/dist/api/base/health-data/health-data-request.js +2 -83
- package/dist/api/base/health-data/health-manager.d.ts +243 -293
- package/dist/api/base/health-data/index.d.ts +3 -2
- package/dist/api/base/health-data/index.js +2 -0
- package/dist/api/base/health-data/lab-knowledge-request.d.ts +0 -9
- package/dist/api/base/health-data/lab-knowledge-request.js +0 -3
- package/dist/api/base/health-data/medication-knowledge-request.d.ts +0 -9
- package/dist/api/base/health-data/medication-knowledge-request.js +0 -3
- package/dist/api/base/health-data/medication-pricing-request.d.ts +21 -0
- package/dist/api/base/health-data/medication-pricing-request.js +26 -0
- package/dist/api/base/health-data/medication-statement-request.d.ts +29 -0
- package/dist/api/base/health-data/medication-statement-request.js +35 -0
- package/dist/api/base/health-space/add-care-team-member-request.d.ts +33 -0
- package/dist/api/base/health-space/add-care-team-member-request.js +36 -0
- package/dist/api/base/health-space/add-care-team-members-request.d.ts +35 -0
- package/dist/api/base/health-space/add-care-team-members-request.js +61 -0
- package/dist/api/base/health-space/appointments-request.d.ts +0 -9
- package/dist/api/base/health-space/appointments-request.js +0 -3
- package/dist/api/base/health-space/cancel-appointment-request.d.ts +1 -8
- package/dist/api/base/health-space/cancel-appointment-request.js +0 -4
- package/dist/api/base/health-space/cancelationReasons-request.d.ts +16 -0
- package/dist/api/base/health-space/{cancellation-reasons-request.js → cancelationReasons-request.js} +4 -10
- package/dist/api/base/health-space/care-team-members-request.d.ts +31 -0
- package/dist/api/base/health-space/care-team-members-request.js +33 -0
- package/dist/api/base/health-space/health-space-manager.d.ts +116 -29
- package/dist/api/base/health-space/index.d.ts +7 -2
- package/dist/api/base/health-space/index.js +6 -1
- package/dist/api/base/health-space/remove-care-team-member-request.d.ts +34 -0
- package/dist/api/base/health-space/remove-care-team-member-request.js +36 -0
- package/dist/api/base/health-space/update-care-team-member-request.d.ts +55 -0
- package/dist/api/base/health-space/update-care-team-member-request.js +71 -0
- package/dist/api/base/identity/identity-manager.d.ts +11 -98
- package/dist/api/base/index.d.ts +3 -1
- package/dist/api/base/index.js +3 -2
- package/dist/api/base/questionnaire/index.d.ts +4 -1
- package/dist/api/base/questionnaire/index.js +3 -0
- package/dist/api/base/questionnaire/next-question-request.d.ts +2 -8
- package/dist/api/base/questionnaire/next-question-request.js +1 -4
- package/dist/api/base/questionnaire/questionnaire-manager.d.ts +42 -24
- package/dist/api/base/questionnaire/questionnaire-responses-request.d.ts +30 -0
- package/dist/api/base/questionnaire/questionnaire-responses-request.js +49 -0
- package/dist/api/base/questionnaire/questionnaires-request.d.ts +18 -0
- package/dist/api/base/questionnaire/questionnaires-request.js +42 -0
- package/dist/api/base/questionnaire/save-questionnaire-response-request.d.ts +22 -0
- package/dist/api/base/questionnaire/save-questionnaire-response-request.js +33 -0
- package/dist/api/base/requests/index.d.ts +0 -2
- package/dist/api/base/requests/search-date.d.ts +0 -12
- package/dist/api/base/requests/search-reference.d.ts +1 -9
- package/dist/api/base/requests/search-string.d.ts +0 -6
- package/dist/api/base/requests/search-token.d.ts +0 -18
- package/dist/api/base/requests/search-token.js +17 -17
- package/dist/api/base/search/index.d.ts +5 -3
- package/dist/api/base/search/index.js +3 -1
- package/dist/api/base/search/request-connection-request.d.ts +24 -0
- package/dist/api/base/search/request-connection-request.js +3 -0
- package/dist/api/base/search/search-health-resources-request.d.ts +44 -33
- package/dist/api/base/search/search-health-resources-request.js +0 -3
- package/dist/api/base/search/search-manager.d.ts +42 -39
- package/dist/api/base/search/search-request.d.ts +84 -0
- package/dist/api/base/search/search-request.js +78 -0
- package/dist/api/base/support/create-support-comment-request.d.ts +13 -0
- package/dist/api/base/support/create-support-comment-request.js +18 -0
- package/dist/api/base/support/create-support-request-request.d.ts +22 -0
- package/dist/api/base/support/create-support-request-request.js +20 -0
- package/dist/api/base/support/delete-support-attachment-request.d.ts +11 -0
- package/dist/api/base/support/delete-support-attachment-request.js +14 -0
- package/dist/api/base/support/get-support-articles-request.d.ts +14 -0
- package/dist/api/base/support/get-support-articles-request.js +12 -0
- package/dist/api/base/support/get-support-attachment-request.d.ts +14 -0
- package/dist/api/base/support/get-support-attachment-request.js +18 -0
- package/dist/api/base/support/get-support-comments-request.d.ts +14 -0
- package/dist/api/base/support/get-support-comments-request.js +15 -0
- package/dist/api/base/support/get-support-requests-request.d.ts +16 -0
- package/dist/api/base/support/get-support-requests-request.js +14 -0
- package/dist/api/base/support/index.d.ts +9 -0
- package/dist/api/base/support/index.js +9 -0
- package/dist/api/base/support/support-manager.d.ts +78 -0
- package/dist/api/base/support/upload-support-attachment-request.d.ts +25 -0
- package/dist/api/base/support/upload-support-attachment-request.js +27 -0
- package/dist/api/base/user/create-consent-request.d.ts +1 -13
- package/dist/api/base/user/create-consent-request.js +5 -10
- package/dist/api/base/user/create-data-export-direct-download-url-request.d.ts +0 -9
- package/dist/api/base/user/create-data-export-direct-download-url-request.js +0 -3
- package/dist/api/base/user/create-verification-url-request.d.ts +0 -12
- package/dist/api/base/user/create-verification-url-request.js +0 -6
- package/dist/api/base/user/get-consents-request.d.ts +1 -19
- package/dist/api/base/user/get-consents-request.js +1 -13
- package/dist/api/base/user/index.d.ts +2 -1
- package/dist/api/base/user/types.d.ts +9 -0
- package/dist/api/base/user/types.js +17 -0
- package/dist/api/base/user/update-profile-request.d.ts +3 -11
- package/dist/api/base/user/update-profile-request.js +3 -5
- package/dist/api/base/user/user-manager.d.ts +49 -100
- package/dist/api/graphql-api/activity/{get-tasks-request-factory.d.ts → activity-request-factories.d.ts} +7 -0
- package/dist/api/graphql-api/activity/activity-request-factories.js +70 -0
- package/dist/api/graphql-api/activity/graphql-activity-manager.d.ts +8 -6
- package/dist/api/graphql-api/activity/graphql-activity-manager.js +30 -19
- package/dist/api/graphql-api/activity/index.d.ts +1 -1
- package/dist/api/graphql-api/activity/index.js +1 -1
- package/dist/api/graphql-api/connection/graphql-connection-manager.d.ts +9 -9
- package/dist/api/graphql-api/connection/graphql-connection-manager.js +5 -7
- package/dist/api/graphql-api/connection/graphql-get-member-connections-bwell-response-factory.d.ts +18 -0
- package/dist/api/graphql-api/connection/graphql-get-member-connections-bwell-response-factory.js +40 -0
- package/dist/api/graphql-api/connection/index.d.ts +1 -0
- package/dist/api/graphql-api/connection/index.js +1 -1
- package/dist/api/graphql-api/device/graphql-device-manager.d.ts +1 -2
- package/dist/api/graphql-api/device/graphql-device-manager.js +2 -4
- package/dist/api/graphql-api/errors/errors.js +1 -1
- package/dist/api/graphql-api/event/event-request-factory.d.ts +6 -0
- package/dist/api/graphql-api/event/event-request-factory.js +11 -0
- package/dist/api/graphql-api/event/graphql-event-manager.d.ts +15 -0
- package/dist/api/graphql-api/event/graphql-event-manager.js +65 -0
- package/dist/api/graphql-api/event/index.d.ts +1 -0
- package/dist/api/graphql-api/event/index.js +1 -0
- package/dist/api/graphql-api/financial/graphql-coverages-bwell-request-factory.d.ts +6 -0
- package/dist/api/graphql-api/financial/graphql-coverages-bwell-request-factory.js +17 -0
- package/dist/api/graphql-api/financial/{explanation-of-benefit-request-factory.d.ts → graphql-explanation-of-benefits-factory.d.ts} +3 -3
- package/dist/api/graphql-api/financial/graphql-explanation-of-benefits-factory.js +23 -0
- package/dist/api/graphql-api/financial/graphql-financial-manager.d.ts +12 -4
- package/dist/api/graphql-api/financial/graphql-financial-manager.js +19 -32
- package/dist/api/graphql-api/financial/index.d.ts +1 -3
- package/dist/api/graphql-api/financial/index.js +1 -3
- package/dist/api/graphql-api/graphql-api-provider.d.ts +14 -6
- package/dist/api/graphql-api/graphql-api-provider.js +7 -6
- package/dist/api/graphql-api/health-space/add-care-team-member-request-factory.d.ts +20 -0
- package/dist/api/graphql-api/health-space/add-care-team-member-request-factory.js +29 -0
- package/dist/api/graphql-api/health-space/add-care-team-members-request-factory.d.ts +16 -0
- package/dist/api/graphql-api/health-space/add-care-team-members-request-factory.js +23 -0
- package/dist/api/graphql-api/health-space/cancel-appointment-request-factory.js +2 -1
- package/dist/api/graphql-api/health-space/care-team-factory-utils.d.ts +23 -0
- package/dist/api/graphql-api/health-space/care-team-factory-utils.js +30 -0
- package/dist/api/graphql-api/health-space/care-team-members-request-factory.d.ts +12 -0
- package/dist/api/graphql-api/health-space/care-team-members-request-factory.js +17 -0
- package/dist/api/graphql-api/health-space/graphql-health-space-manager.d.ts +62 -5
- package/dist/api/graphql-api/health-space/graphql-health-space-manager.js +163 -9
- package/dist/api/graphql-api/health-space/index.d.ts +4 -0
- package/dist/api/graphql-api/health-space/index.js +4 -0
- package/dist/api/graphql-api/health-space/remove-care-team-member-request-factory.d.ts +16 -0
- package/dist/api/graphql-api/health-space/remove-care-team-member-request-factory.js +24 -0
- package/dist/api/graphql-api/health-space/update-care-team-member-request-factory.d.ts +16 -0
- package/dist/api/graphql-api/health-space/update-care-team-member-request-factory.js +20 -0
- package/dist/api/graphql-api/healthdata/graphql-diagnostic-reports-bwell-request-factory.d.ts +6 -0
- package/dist/api/graphql-api/healthdata/graphql-diagnostic-reports-bwell-request-factory.js +12 -0
- package/dist/api/graphql-api/healthdata/graphql-get-medication-dispense-bwell-response-factory.d.ts +10 -0
- package/dist/api/graphql-api/healthdata/graphql-get-medication-dispense-bwell-response-factory.js +35 -0
- package/dist/api/graphql-api/healthdata/graphql-get-medication-request-bwell-response-factory.d.ts +10 -0
- package/dist/api/graphql-api/healthdata/graphql-get-medication-request-bwell-response-factory.js +35 -0
- package/dist/api/graphql-api/healthdata/graphql-health-manager.d.ts +41 -30
- package/dist/api/graphql-api/healthdata/graphql-health-manager.js +256 -311
- package/dist/api/graphql-api/healthdata/graphql-update-medication-statement-request-factory.d.ts +6 -0
- package/dist/api/graphql-api/healthdata/graphql-update-medication-statement-request-factory.js +11 -0
- package/dist/api/graphql-api/identity/graphql-identity-manager.d.ts +1 -2
- package/dist/api/graphql-api/identity/graphql-identity-manager.js +3 -5
- package/dist/api/graphql-api/questionnaire/get-questionnaire-responses-request-factory.d.ts +9 -0
- package/dist/api/graphql-api/questionnaire/get-questionnaire-responses-request-factory.js +22 -0
- package/dist/api/graphql-api/questionnaire/get-questionnaires-request-factory.d.ts +6 -0
- package/dist/api/graphql-api/questionnaire/get-questionnaires-request-factory.js +16 -0
- package/dist/api/graphql-api/questionnaire/graphql-questionnaire-manager.d.ts +22 -4
- package/dist/api/graphql-api/questionnaire/graphql-questionnaire-manager.js +69 -4
- package/dist/api/graphql-api/questionnaire/index.d.ts +2 -0
- package/dist/api/graphql-api/questionnaire/index.js +2 -0
- package/dist/api/graphql-api/search/connection-search-request-factory.d.ts +7 -0
- package/dist/api/graphql-api/search/connection-search-request-factory.js +21 -0
- package/dist/api/graphql-api/search/graphql-search-manager.d.ts +6 -4
- package/dist/api/graphql-api/search/graphql-search-manager.js +71 -9
- package/dist/api/graphql-api/search/index.d.ts +1 -0
- package/dist/api/graphql-api/search/index.js +1 -0
- package/dist/api/graphql-api/search/provider-search-request-factory.d.ts +7 -0
- package/dist/api/graphql-api/search/provider-search-request-factory.js +21 -0
- package/dist/api/graphql-api/search/request-connection-request-factory.d.ts +6 -0
- package/dist/api/graphql-api/search/{submit-provider-for-review-request-factory.js → request-connection-request-factory.js} +1 -1
- package/dist/api/graphql-api/search/search-health-resources-request-factory.js +11 -12
- package/dist/api/graphql-api/search/search-request-factory.d.ts +6 -0
- package/dist/api/graphql-api/search/search-request-factory.js +44 -0
- package/dist/api/graphql-api/support/create-support-comment-request-factory.d.ts +6 -0
- package/dist/api/graphql-api/support/create-support-comment-request-factory.js +12 -0
- package/dist/api/graphql-api/support/create-support-request-request-factory.d.ts +6 -0
- package/dist/api/graphql-api/support/create-support-request-request-factory.js +19 -0
- package/dist/api/graphql-api/support/delete-support-attachment-request-factory.d.ts +6 -0
- package/dist/api/graphql-api/support/delete-support-attachment-request-factory.js +10 -0
- package/dist/api/graphql-api/support/get-support-articles-bwell-request-factory.d.ts +6 -0
- package/dist/api/graphql-api/support/get-support-articles-bwell-request-factory.js +15 -0
- package/dist/api/graphql-api/support/get-support-attachment-request-factory.d.ts +6 -0
- package/dist/api/graphql-api/support/get-support-attachment-request-factory.js +11 -0
- package/dist/api/graphql-api/support/get-support-comments-bwell-request-factory.d.ts +6 -0
- package/dist/api/graphql-api/support/get-support-comments-bwell-request-factory.js +14 -0
- package/dist/api/graphql-api/support/get-support-requests-bwell-request-factory.d.ts +6 -0
- package/dist/api/graphql-api/support/get-support-requests-bwell-request-factory.js +16 -0
- package/dist/api/graphql-api/support/graphql-support-manager.d.ts +28 -0
- package/dist/api/graphql-api/support/graphql-support-manager.js +210 -0
- package/dist/api/graphql-api/support/index.d.ts +1 -0
- package/dist/api/graphql-api/support/index.js +1 -0
- package/dist/api/graphql-api/support/upload-support-attachment-request-factory.d.ts +6 -0
- package/dist/api/graphql-api/support/upload-support-attachment-request-factory.js +11 -0
- package/dist/api/graphql-api/user/create-data-export-direct-download-url-request-factory.d.ts +6 -0
- package/dist/api/graphql-api/user/create-data-export-direct-download-url-request-factory.js +9 -0
- package/dist/api/graphql-api/user/get-consent-request-factory.d.ts +2 -1
- package/dist/api/graphql-api/user/get-consent-request-factory.js +1 -5
- package/dist/api/graphql-api/user/graphql-user-manager.d.ts +11 -10
- package/dist/api/graphql-api/user/graphql-user-manager.js +10 -11
- package/dist/api/graphql-api/user/update-profile-request-factory.js +2 -1
- package/dist/api/identity-manager-factory.js +1 -1
- package/dist/auth/auth-code-strategy.d.ts +1 -2
- package/dist/auth/auth-strategy.d.ts +1 -1
- package/dist/auth/credentials.d.ts +1 -1
- package/dist/auth/credentials.js +2 -2
- package/dist/auth/oauth-strategy.d.ts +1 -2
- package/dist/auth/username-password-strategy.d.ts +1 -2
- package/dist/auth/username-password-strategy.js +2 -2
- package/dist/bwell-sdk/bwell-sdk.d.ts +48 -319
- package/dist/bwell-sdk/bwell-sdk.js +53 -368
- package/dist/config/bwell-config.d.ts +12 -12
- package/dist/config/bwell-config.js +5 -2
- package/dist/config/sdk-config.d.ts +3 -2
- package/dist/config/sdk-config.js +6 -4
- package/dist/errors/authentication-error.d.ts +0 -7
- package/dist/errors/authentication-error.js +0 -7
- package/dist/errors/bwell-error.d.ts +2 -12
- package/dist/errors/bwell-error.js +2 -5
- package/dist/errors/illegal-argument-error.d.ts +0 -7
- package/dist/errors/illegal-argument-error.js +0 -7
- package/dist/errors/illegal-state-error.d.ts +0 -7
- package/dist/errors/illegal-state-error.js +0 -7
- package/dist/errors/invalid-client-key-error.d.ts +0 -7
- package/dist/errors/invalid-client-key-error.js +0 -7
- package/dist/errors/invalid-credentials-type-error.d.ts +0 -7
- package/dist/errors/invalid-credentials-type-error.js +0 -7
- package/dist/errors/invalid-token-error.d.ts +1 -4
- package/dist/errors/invalid-token-error.js +1 -4
- package/dist/errors/network-error.d.ts +0 -7
- package/dist/errors/network-error.js +0 -7
- package/dist/errors/operation-outcome-error.d.ts +1 -8
- package/dist/errors/operation-outcome-error.js +0 -7
- package/dist/errors/unknown-error.d.ts +0 -7
- package/dist/errors/unknown-error.js +0 -7
- package/dist/errors/validation-error.d.ts +0 -7
- package/dist/errors/validation-error.js +0 -7
- package/dist/graphql/operations/index.d.ts +315 -116
- package/dist/graphql/operations/index.js +2235 -1815
- package/dist/graphql/operations/types.d.ts +17800 -15757
- package/dist/graphql/schema.d.ts +5904 -68232
- package/dist/graphql/schema.js +484 -1
- package/dist/index.d.ts +5 -7
- package/dist/index.js +4 -5
- package/dist/language/language-manager.d.ts +10 -25
- package/dist/language/language-manager.js +0 -5
- package/dist/models/coding.d.ts +5 -0
- package/dist/models/fhir-error.d.ts +9 -0
- package/dist/models/index.d.ts +4 -12
- package/dist/models/index.js +4 -12
- package/dist/models/user.d.ts +4 -0
- package/dist/requests/paged-request.d.ts +0 -35
- package/dist/requests/paged-request.js +0 -22
- package/dist/requests/request.d.ts +0 -16
- package/dist/requests/request.js +0 -8
- package/dist/requests/validator.d.ts +0 -15
- package/dist/requests/validator.js +0 -7
- package/dist/results/bwell-query-result.d.ts +0 -5
- package/dist/results/bwell-query-result.js +0 -5
- package/dist/results/bwell-transaction-result.d.ts +3 -17
- package/dist/results/bwell-transaction-result.js +1 -15
- package/dist/results/index.d.ts +0 -1
- package/dist/results/index.js +0 -1
- package/dist/telemetry/open-telemetry-instrumentation.js +4 -1
- package/dist/tokens/index.d.ts +0 -2
- package/dist/tokens/index.js +0 -2
- package/dist/tokens/jwt-token-manager.d.ts +7 -3
- package/dist/tokens/jwt-token-manager.js +8 -9
- package/dist/tokens/token-storage.d.ts +0 -20
- package/dist/tokens/token-storage.js +0 -19
- package/dist/utils/date-utils.d.ts +6 -0
- package/dist/utils/date-utils.js +8 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/parsing-utils.d.ts +1 -11
- package/dist/utils/parsing-utils.js +1 -33
- package/package.json +19 -23
- package/dist/api/base/device/constants.d.ts +0 -3
- package/dist/api/base/device/constants.js +0 -3
- package/dist/api/base/health-data/health-data-response-factory.d.ts +0 -27
- package/dist/api/base/health-space/cancellation-reasons-request.d.ts +0 -28
- package/dist/api/base/requests/field-sort-order.d.ts +0 -11
- package/dist/api/base/search/submit-provider-for-review-request.d.ts +0 -33
- package/dist/api/base/search/submit-provider-for-review-request.js +0 -9
- package/dist/api/base/user/validators.d.ts +0 -5
- package/dist/api/base/user/validators.js +0 -13
- package/dist/api/graphql-api/activity/get-tasks-request-factory.js +0 -56
- package/dist/api/graphql-api/connection/connection-response-factory.d.ts +0 -7
- package/dist/api/graphql-api/connection/connection-response-factory.js +0 -101
- package/dist/api/graphql-api/financial/coverage-request-factory.d.ts +0 -9
- package/dist/api/graphql-api/financial/coverage-request-factory.js +0 -19
- package/dist/api/graphql-api/financial/explanation-of-benefit-request-factory.js +0 -19
- package/dist/api/graphql-api/healthdata/get-encounters-request-factory.d.ts +0 -7
- package/dist/api/graphql-api/healthdata/get-encounters-request-factory.js +0 -76
- package/dist/api/graphql-api/healthdata/get-medication-dispenses-request-factory.d.ts +0 -6
- package/dist/api/graphql-api/healthdata/get-medication-dispenses-request-factory.js +0 -25
- package/dist/api/graphql-api/healthdata/health-data-request-factory.d.ts +0 -18
- package/dist/api/graphql-api/healthdata/health-data-request-factory.js +0 -25
- package/dist/api/graphql-api/healthdata/health-data-response-factory.d.ts +0 -8
- package/dist/api/graphql-api/healthdata/health-data-response-factory.js +0 -58
- package/dist/api/graphql-api/search/submit-provider-for-review-request-factory.d.ts +0 -6
- package/dist/models/activity/index.d.ts +0 -1
- package/dist/models/activity/task.d.ts +0 -77
- package/dist/models/activity/task.js +0 -1
- package/dist/models/common/address.d.ts +0 -41
- package/dist/models/common/address.js +0 -1
- package/dist/models/common/annotation.d.ts +0 -18
- package/dist/models/common/annotation.js +0 -1
- package/dist/models/common/attachment.d.ts +0 -18
- package/dist/models/common/attachment.js +0 -1
- package/dist/models/common/bundle.d.ts +0 -83
- package/dist/models/common/bundle.js +0 -1
- package/dist/models/common/codeable-concept.d.ts +0 -17
- package/dist/models/common/codeable-concept.js +0 -1
- package/dist/models/common/coding.d.ts +0 -18
- package/dist/models/common/component.d.ts +0 -23
- package/dist/models/common/component.js +0 -1
- package/dist/models/common/contact-point.d.ts +0 -32
- package/dist/models/common/contact-point.js +0 -1
- package/dist/models/common/dispense-request.d.ts +0 -67
- package/dist/models/common/dispense-request.js +0 -1
- package/dist/models/common/dosage.d.ts +0 -68
- package/dist/models/common/dosage.js +0 -1
- package/dist/models/common/endpoint.d.ts +0 -23
- package/dist/models/common/endpoint.js +0 -1
- package/dist/models/common/expression.d.ts +0 -20
- package/dist/models/common/expression.js +0 -1
- package/dist/models/common/extension.d.ts +0 -49
- package/dist/models/common/extension.js +0 -1
- package/dist/models/common/fhir-error.d.ts +0 -23
- package/dist/models/common/human-name.d.ts +0 -20
- package/dist/models/common/human-name.js +0 -1
- package/dist/models/common/identifier.d.ts +0 -19
- package/dist/models/common/identifier.js +0 -1
- package/dist/models/common/index.d.ts +0 -38
- package/dist/models/common/index.js +0 -2
- package/dist/models/common/location.d.ts +0 -51
- package/dist/models/common/location.js +0 -1
- package/dist/models/common/medication.d.ts +0 -42
- package/dist/models/common/medication.js +0 -1
- package/dist/models/common/meta.d.ts +0 -21
- package/dist/models/common/meta.js +0 -1
- package/dist/models/common/money.d.ts +0 -15
- package/dist/models/common/money.js +0 -1
- package/dist/models/common/narrative.d.ts +0 -14
- package/dist/models/common/narrative.js +0 -1
- package/dist/models/common/operation-outcome.d.ts +0 -48
- package/dist/models/common/operation-outcome.js +0 -1
- package/dist/models/common/organization.d.ts +0 -46
- package/dist/models/common/organization.js +0 -1
- package/dist/models/common/paging-info.d.ts +0 -18
- package/dist/models/common/paging-info.js +0 -1
- package/dist/models/common/patient.d.ts +0 -13
- package/dist/models/common/patient.js +0 -1
- package/dist/models/common/period.d.ts +0 -14
- package/dist/models/common/period.js +0 -1
- package/dist/models/common/practitioner-role.d.ts +0 -42
- package/dist/models/common/practitioner-role.js +0 -1
- package/dist/models/common/practitioner.d.ts +0 -17
- package/dist/models/common/practitioner.js +0 -1
- package/dist/models/common/quantity.d.ts +0 -20
- package/dist/models/common/quantity.js +0 -1
- package/dist/models/common/range.d.ts +0 -15
- package/dist/models/common/range.js +0 -1
- package/dist/models/common/ratio.d.ts +0 -15
- package/dist/models/common/ratio.js +0 -1
- package/dist/models/common/reference-range.d.ts +0 -13
- package/dist/models/common/reference-range.js +0 -1
- package/dist/models/common/reference.d.ts +0 -27
- package/dist/models/common/reference.js +0 -1
- package/dist/models/common/related-person.d.ts +0 -34
- package/dist/models/common/related-person.js +0 -1
- package/dist/models/common/score.d.ts +0 -16
- package/dist/models/common/score.js +0 -1
- package/dist/models/common/service-request.d.ts +0 -21
- package/dist/models/common/service-request.js +0 -1
- package/dist/models/common/specimen.d.ts +0 -30
- package/dist/models/common/specimen.js +0 -7
- package/dist/models/common/timing.d.ts +0 -107
- package/dist/models/common/timing.js +0 -1
- package/dist/models/common/value.d.ts +0 -22
- package/dist/models/common/value.js +0 -1
- package/dist/models/connection/base-connection.d.ts +0 -27
- package/dist/models/connection/base-connection.js +0 -1
- package/dist/models/connection/connection-status.d.ts +0 -15
- package/dist/models/connection/connection-status.js +0 -1
- package/dist/models/connection/connection.d.ts +0 -32
- package/dist/models/connection/connection.js +0 -1
- package/dist/models/connection/data-source.d.ts +0 -27
- package/dist/models/connection/data-source.js +0 -1
- package/dist/models/connection/index.d.ts +0 -6
- package/dist/models/connection/index.js +0 -1
- package/dist/models/connection/member-connection.d.ts +0 -37
- package/dist/models/connection/member-connection.js +0 -1
- package/dist/models/connection/oauth-url.d.ts +0 -12
- package/dist/models/connection/oauth-url.js +0 -1
- package/dist/models/device/device-registration-results.d.ts +0 -12
- package/dist/models/device/device-registration-results.js +0 -1
- package/dist/models/device/index.d.ts +0 -1
- package/dist/models/device/index.js +0 -1
- package/dist/models/enums/category-code.d.ts +0 -11
- package/dist/models/enums/category-code.js +0 -13
- package/dist/models/enums/connection-category.d.ts +0 -9
- package/dist/models/enums/connection-category.js +0 -1
- package/dist/models/enums/consent-provision-type.d.ts +0 -11
- package/dist/models/enums/consent-provision-type.js +0 -2
- package/dist/models/enums/consent-status.d.ts +0 -11
- package/dist/models/enums/consent-status.js +0 -9
- package/dist/models/enums/data-connection-status.d.ts +0 -9
- package/dist/models/enums/data-connection-status.js +0 -1
- package/dist/models/enums/data-connection-type.d.ts +0 -9
- package/dist/models/enums/data-connection-type.js +0 -1
- package/dist/models/enums/data-set.d.ts +0 -10
- package/dist/models/enums/data-set.js +0 -1
- package/dist/models/enums/device-platform.d.ts +0 -11
- package/dist/models/enums/device-platform.js +0 -2
- package/dist/models/enums/endpoint-status.d.ts +0 -9
- package/dist/models/enums/endpoint-status.js +0 -1
- package/dist/models/enums/filter-field.d.ts +0 -9
- package/dist/models/enums/filter-field.js +0 -1
- package/dist/models/enums/gender.d.ts +0 -9
- package/dist/models/enums/gender.js +0 -1
- package/dist/models/enums/index.d.ts +0 -18
- package/dist/models/enums/index.js +0 -5
- package/dist/models/enums/log-level.d.ts +0 -8
- package/dist/models/enums/log-level.js +0 -1
- package/dist/models/enums/person-gender.d.ts +0 -11
- package/dist/models/enums/person-gender.js +0 -7
- package/dist/models/enums/search-context.d.ts +0 -10
- package/dist/models/enums/search-context.js +0 -1
- package/dist/models/enums/search-result-type.d.ts +0 -9
- package/dist/models/enums/search-result-type.js +0 -1
- package/dist/models/enums/sort-field.d.ts +0 -10
- package/dist/models/enums/sort-field.js +0 -1
- package/dist/models/enums/sort-order.d.ts +0 -9
- package/dist/models/enums/sort-order.js +0 -1
- package/dist/models/enums/sync-status.d.ts +0 -9
- package/dist/models/enums/sync-status.js +0 -1
- package/dist/models/financial/coverage-bundle.d.ts +0 -18
- package/dist/models/financial/coverage-bundle.js +0 -1
- package/dist/models/financial/coverage.d.ts +0 -65
- package/dist/models/financial/coverage.js +0 -1
- package/dist/models/financial/explanation-of-benefit-bundle.d.ts +0 -26
- package/dist/models/financial/explanation-of-benefit-bundle.js +0 -1
- package/dist/models/financial/explanation-of-benefit.d.ts +0 -274
- package/dist/models/financial/explanation-of-benefit.js +0 -1
- package/dist/models/financial/index.d.ts +0 -4
- package/dist/models/financial/index.js +0 -4
- package/dist/models/health-data/allergy-intolerance-bundle.d.ts +0 -11
- package/dist/models/health-data/allergy-intolerance-bundle.js +0 -1
- package/dist/models/health-data/allergy-intolerance-group.d.ts +0 -44
- package/dist/models/health-data/allergy-intolerance-group.js +0 -1
- package/dist/models/health-data/allergy-intolerance-reaction.d.ts +0 -23
- package/dist/models/health-data/allergy-intolerance-reaction.js +0 -1
- package/dist/models/health-data/allergy-intolerance.d.ts +0 -54
- package/dist/models/health-data/allergy-intolerance.js +0 -1
- package/dist/models/health-data/care-plan-group.d.ts +0 -42
- package/dist/models/health-data/care-plan-group.js +0 -1
- package/dist/models/health-data/care-plan.d.ts +0 -134
- package/dist/models/health-data/care-plan.js +0 -1
- package/dist/models/health-data/care-team.d.ts +0 -77
- package/dist/models/health-data/care-team.js +0 -1
- package/dist/models/health-data/condition-group.d.ts +0 -42
- package/dist/models/health-data/condition-group.js +0 -1
- package/dist/models/health-data/condition.d.ts +0 -104
- package/dist/models/health-data/condition.js +0 -1
- package/dist/models/health-data/diagnostic-report-lab-group.d.ts +0 -45
- package/dist/models/health-data/diagnostic-report-lab-group.js +0 -1
- package/dist/models/health-data/diagnostic-report.d.ts +0 -90
- package/dist/models/health-data/diagnostic-report.js +0 -1
- package/dist/models/health-data/encounter-group.d.ts +0 -48
- package/dist/models/health-data/encounter-group.js +0 -1
- package/dist/models/health-data/encounter.d.ts +0 -79
- package/dist/models/health-data/encounter.js +0 -1
- package/dist/models/health-data/health-summary.d.ts +0 -18
- package/dist/models/health-data/health-summary.js +0 -1
- package/dist/models/health-data/immunization-group.d.ts +0 -41
- package/dist/models/health-data/immunization-group.js +0 -1
- package/dist/models/health-data/immunization.d.ts +0 -150
- package/dist/models/health-data/immunization.js +0 -1
- package/dist/models/health-data/index.d.ts +0 -30
- package/dist/models/health-data/index.js +0 -1
- package/dist/models/health-data/lab-bundle.d.ts +0 -26
- package/dist/models/health-data/lab-bundle.js +0 -1
- package/dist/models/health-data/lab-group.d.ts +0 -51
- package/dist/models/health-data/lab-group.js +0 -1
- package/dist/models/health-data/lab-knowledge.d.ts +0 -28
- package/dist/models/health-data/lab-knowledge.js +0 -1
- package/dist/models/health-data/medication-dispense.d.ts +0 -108
- package/dist/models/health-data/medication-dispense.js +0 -1
- package/dist/models/health-data/medication-group.d.ts +0 -43
- package/dist/models/health-data/medication-group.js +0 -1
- package/dist/models/health-data/medication-knowledge.d.ts +0 -30
- package/dist/models/health-data/medication-knowledge.js +0 -1
- package/dist/models/health-data/medication-pricing.d.ts +0 -28
- package/dist/models/health-data/medication-pricing.js +0 -1
- package/dist/models/health-data/medication-request.d.ts +0 -107
- package/dist/models/health-data/medication-request.js +0 -1
- package/dist/models/health-data/medication-statement.d.ts +0 -68
- package/dist/models/health-data/medication-statement.js +0 -1
- package/dist/models/health-data/observation.d.ts +0 -102
- package/dist/models/health-data/observation.js +0 -1
- package/dist/models/health-data/procedure-group.d.ts +0 -43
- package/dist/models/health-data/procedure-group.js +0 -1
- package/dist/models/health-data/procedure.d.ts +0 -84
- package/dist/models/health-data/procedure.js +0 -1
- package/dist/models/health-data/vital-sign-bundle.d.ts +0 -18
- package/dist/models/health-data/vital-sign-bundle.js +0 -1
- package/dist/models/health-data/vital-sign-group.d.ts +0 -51
- package/dist/models/health-data/vital-sign-group.js +0 -1
- package/dist/models/health-space/appointment-bundle.d.ts +0 -11
- package/dist/models/health-space/appointment-bundle.js +0 -1
- package/dist/models/health-space/appointment-participant.d.ts +0 -17
- package/dist/models/health-space/appointment-participant.js +0 -1
- package/dist/models/health-space/appointment-update.d.ts +0 -14
- package/dist/models/health-space/appointment-update.js +0 -1
- package/dist/models/health-space/appointment.d.ts +0 -30
- package/dist/models/health-space/appointment.js +0 -1
- package/dist/models/health-space/cancellation-reasons.d.ts +0 -32
- package/dist/models/health-space/cancellation-reasons.js +0 -1
- package/dist/models/health-space/index.d.ts +0 -5
- package/dist/models/health-space/index.js +0 -1
- package/dist/models/identity/auth-tokens.d.ts +0 -25
- package/dist/models/identity/auth-tokens.js +0 -1
- package/dist/models/identity/create-guest-access-token-results.d.ts +0 -12
- package/dist/models/identity/create-guest-access-token-results.js +0 -1
- package/dist/models/identity/index.d.ts +0 -4
- package/dist/models/identity/index.js +0 -1
- package/dist/models/identity/refresh-token-results.d.ts +0 -8
- package/dist/models/identity/refresh-token-results.js +0 -1
- package/dist/models/identity/sdk-configuration-result.d.ts +0 -26
- package/dist/models/identity/sdk-configuration-result.js +0 -1
- package/dist/models/questionnaire/index.d.ts +0 -5
- package/dist/models/questionnaire/index.js +0 -1
- package/dist/models/questionnaire/questionnaire-item.d.ts +0 -38
- package/dist/models/questionnaire/questionnaire-item.js +0 -1
- package/dist/models/questionnaire/questionnaire-response-answer.d.ts +0 -33
- package/dist/models/questionnaire/questionnaire-response-answer.js +0 -1
- package/dist/models/questionnaire/questionnaire-response-item.d.ts +0 -19
- package/dist/models/questionnaire/questionnaire-response-item.js +0 -1
- package/dist/models/questionnaire/questionnaire-response.d.ts +0 -29
- package/dist/models/questionnaire/questionnaire-response.js +0 -1
- package/dist/models/questionnaire/questionnaire.d.ts +0 -30
- package/dist/models/questionnaire/questionnaire.js +0 -1
- package/dist/models/search/health-resources.d.ts +0 -133
- package/dist/models/search/health-resources.js +0 -1
- package/dist/models/search/index.d.ts +0 -2
- package/dist/models/search/index.js +0 -1
- package/dist/models/search/provider-review-result.d.ts +0 -15
- package/dist/models/search/provider-review-result.js +0 -1
- package/dist/models/user/consent.d.ts +0 -100
- package/dist/models/user/consent.js +0 -1
- package/dist/models/user/index.d.ts +0 -4
- package/dist/models/user/index.js +0 -1
- package/dist/models/user/person.d.ts +0 -43
- package/dist/models/user/person.js +0 -1
- package/dist/models/user/user.d.ts +0 -12
- package/dist/models/user/user.js +0 -1
- package/dist/models/user/verification-result.d.ts +0 -30
- package/dist/models/user/verification-result.js +0 -1
- package/dist/tokens/load-auth-tokens.d.ts +0 -6
- package/dist/tokens/load-auth-tokens.js +0 -43
- package/dist/tokens/token-manager.d.ts +0 -12
- package/dist/tokens/token-manager.js +0 -5
- package/dist/utils/search-token-utils.d.ts +0 -8
- package/dist/utils/search-token-utils.js +0 -23
- /package/dist/api/base/{health-data/health-data-response-factory.js → event/event-manager.js} +0 -0
- /package/dist/api/base/{requests/field-sort-order.js → support/support-manager.js} +0 -0
- /package/dist/models/{common/coding.js → coding.js} +0 -0
- /package/dist/models/{common/fhir-error.js → fhir-error.js} +0 -0
- /package/dist/{results → models}/operation-outcome.d.ts +0 -0
- /package/dist/{results → models}/operation-outcome.js +0 -0
- /package/dist/models/{activity/index.js → user.js} +0 -0
|
@@ -1,55 +1,58 @@
|
|
|
1
1
|
import { ValidationError } from "../../../errors/index.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ProviderSearchQueryResults, RequestConnectionMutationResults, SearchHealthResourcesQueryResults } from "../../../graphql/operations/types.js";
|
|
3
3
|
import type { BWellQueryResult, BWellTransactionResult } from "../../../results/index.js";
|
|
4
4
|
import { BaseManagerError } from "../errors.js";
|
|
5
|
+
import { RequestConnectionRequest } from "./request-connection-request.js";
|
|
5
6
|
import { SearchHealthResourcesRequest } from "./search-health-resources-request.js";
|
|
6
|
-
import {
|
|
7
|
+
import { SearchRequest } from "./search-request.js";
|
|
8
|
+
type SearchResultsType = ProviderSearchQueryResults["providers"];
|
|
9
|
+
export interface SearchResults extends SearchResultsType {
|
|
10
|
+
}
|
|
11
|
+
export type SearchHealthResourcesResults = SearchHealthResourcesQueryResults["searchHealthResources"];
|
|
12
|
+
export type RequestConnectionResults = RequestConnectionMutationResults["requestConnection"];
|
|
7
13
|
/**
|
|
8
|
-
*
|
|
9
|
-
* Provides methods for searching health resources and submitting providers for review.
|
|
10
|
-
*
|
|
11
|
-
* @title SearchManager
|
|
12
|
-
* @excerpt Search Manager for healthcare provider and resource discovery
|
|
13
|
-
* @category Managers
|
|
14
|
+
* The SearchManager interface provides methods for searching for providers and connections.
|
|
14
15
|
*/
|
|
15
16
|
export interface SearchManager {
|
|
17
|
+
/**
|
|
18
|
+
* Performs a general search based on a SearchRequest
|
|
19
|
+
*
|
|
20
|
+
* @param {SearchRequest} request - Object representing search parameters
|
|
21
|
+
* @returns {Promise<BWellQueryResult<SearchResults, BaseManagerError | ValidationError>>} - An object containing the collection
|
|
22
|
+
* of matching search results
|
|
23
|
+
*/
|
|
24
|
+
search(request: SearchRequest): Promise<BWellQueryResult<SearchResults, BaseManagerError | ValidationError>>;
|
|
25
|
+
/**
|
|
26
|
+
* Performs a provider search based on a SearchRequest
|
|
27
|
+
*
|
|
28
|
+
* @param {SearchRequest} request - Object representing search parameters
|
|
29
|
+
* @returns {Promise<BWellQueryResult<SearchResults, BaseManagerError | ValidationError>>} - An object containing the collection
|
|
30
|
+
* of matching search results
|
|
31
|
+
*/
|
|
32
|
+
searchProviders(request: SearchRequest): Promise<BWellQueryResult<SearchResults, BaseManagerError | ValidationError>>;
|
|
33
|
+
/**
|
|
34
|
+
* Performs a connection search based on a SearchRequest
|
|
35
|
+
*
|
|
36
|
+
* @param {SearchRequest} request - Object representing search parameters
|
|
37
|
+
* @returns {Promise<BWellQueryResult<SearchResults, BaseManagerError | ValidationError>>} - An object containing the collection
|
|
38
|
+
* of matching search results
|
|
39
|
+
*/
|
|
40
|
+
searchConnections(request: SearchRequest): Promise<BWellQueryResult<SearchResults, BaseManagerError | ValidationError>>;
|
|
16
41
|
/**
|
|
17
42
|
* Searches for health resources based on the provided request.
|
|
18
|
-
* Finds healthcare providers, facilities, and other health-related resources.
|
|
19
43
|
*
|
|
20
|
-
* @param {SearchHealthResourcesRequest} request -
|
|
21
|
-
* @returns {Promise<BWellQueryResult<
|
|
44
|
+
* @param {SearchHealthResourcesRequest} request - Object containing the details of the search being requested
|
|
45
|
+
* @returns {Promise<BWellQueryResult<SearchHealthResourcesResults, BaseManagerError | ValidationError>>} - An object containing the collection
|
|
46
|
+
* of matching search results
|
|
22
47
|
* @experimental
|
|
23
|
-
* @example
|
|
24
|
-
* ```typescript
|
|
25
|
-
* const results = await sdk.search.searchHealthResources(
|
|
26
|
-
* new SearchHealthResourcesRequest({
|
|
27
|
-
* search: 'cardiologist',
|
|
28
|
-
* searchLocation: { zipCode: '10001' }
|
|
29
|
-
* })
|
|
30
|
-
* );
|
|
31
|
-
* ```
|
|
32
48
|
*/
|
|
33
|
-
searchHealthResources(request: SearchHealthResourcesRequest): Promise<BWellQueryResult<
|
|
49
|
+
searchHealthResources(request: SearchHealthResourcesRequest): Promise<BWellQueryResult<SearchHealthResourcesResults, BaseManagerError | ValidationError>>;
|
|
34
50
|
/**
|
|
35
|
-
*
|
|
36
|
-
* The request undergoes an administrative approval process before inclusion.
|
|
37
|
-
*
|
|
38
|
-
* Users can provide details such as institution, provider name, state, and city to facilitate review and potential addition of the healthcare resource.
|
|
51
|
+
* Requests a new connection based on the provided information.
|
|
39
52
|
*
|
|
40
|
-
* @param {
|
|
41
|
-
* @returns {Promise<BWellTransactionResult<
|
|
42
|
-
* @example
|
|
43
|
-
* ```typescript
|
|
44
|
-
* await sdk.search.submitProviderForReview(
|
|
45
|
-
* new SubmitProviderForReviewRequest({
|
|
46
|
-
* provider: 'Dr. Jane Smith',
|
|
47
|
-
* institution: 'City Medical Center',
|
|
48
|
-
* city: 'Boston',
|
|
49
|
-
* state: 'MA'
|
|
50
|
-
* })
|
|
51
|
-
* );
|
|
52
|
-
* ```
|
|
53
|
+
* @param {RequestConnectionRequest} request - Object containing the details of the connection being requested
|
|
54
|
+
* @returns {Promise<BWellTransactionResult<RequestConnectionResults, BaseManagerError>>} - Indicates the outcome of the request
|
|
53
55
|
*/
|
|
54
|
-
|
|
56
|
+
requestConnection(request: RequestConnectionRequest): Promise<BWellTransactionResult<RequestConnectionResults, BaseManagerError>>;
|
|
55
57
|
}
|
|
58
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { FilterField as GraphQLFilterField, OrganizationType as GraphQLOrganizationType, SortField as GraphQLSortField, SortOrder as GraphQLSortOrder } from "../../../graphql/schema.js";
|
|
2
|
+
import { Coding } from "../../../models/index.js";
|
|
3
|
+
import { PagedRequest, PagedRequestInput, PagedRequestValidator } from "../../../requests/index.js";
|
|
4
|
+
import { PersonGender } from "../user/index.js";
|
|
5
|
+
export type FilterField = `${GraphQLFilterField}`;
|
|
6
|
+
export type OrganizationType = `${GraphQLOrganizationType}`;
|
|
7
|
+
export type SortField = `${GraphQLSortField}`;
|
|
8
|
+
export type SortOrder = `${GraphQLSortOrder}`;
|
|
9
|
+
/**
|
|
10
|
+
* The provider location to search by
|
|
11
|
+
*/
|
|
12
|
+
export type SearchPosition = {
|
|
13
|
+
/**
|
|
14
|
+
* Latitude
|
|
15
|
+
*/
|
|
16
|
+
lat: number;
|
|
17
|
+
/**
|
|
18
|
+
* Longitude
|
|
19
|
+
*/
|
|
20
|
+
lon: number;
|
|
21
|
+
/**
|
|
22
|
+
* Search radius (miles) from the specified lat/lon
|
|
23
|
+
*/
|
|
24
|
+
distance?: number;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Type representing a provider search result sorting
|
|
28
|
+
*/
|
|
29
|
+
export type OrderBy = {
|
|
30
|
+
/**
|
|
31
|
+
* The provider search field to sort by
|
|
32
|
+
*/
|
|
33
|
+
field?: SortField;
|
|
34
|
+
/**
|
|
35
|
+
* The direction to sort by
|
|
36
|
+
*/
|
|
37
|
+
order?: SortOrder;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Prepresents the parameters for a search request.
|
|
41
|
+
*/
|
|
42
|
+
export type SearchRequestInput = PagedRequestInput & {
|
|
43
|
+
/**
|
|
44
|
+
* Provides the main ability to filter searches by a given term. This can be something like an organization name, location, address, or phone number.
|
|
45
|
+
*/
|
|
46
|
+
searchTerm?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Array of strings that can be used to filter results by specialty. specialtyFilters are not useful for searching generally, since it would limit results to providers..
|
|
49
|
+
*/
|
|
50
|
+
specialtyFilters?: Coding | Coding[];
|
|
51
|
+
/**
|
|
52
|
+
* Array of strings that can be used to filter results by organization type..
|
|
53
|
+
*/
|
|
54
|
+
organizationTypeFilters?: OrganizationType[];
|
|
55
|
+
/**
|
|
56
|
+
* Only return Providers that have PROA connections. Defaults to false
|
|
57
|
+
*/
|
|
58
|
+
includePopulatedPROAonly?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Filter providers to the specified gender
|
|
61
|
+
*/
|
|
62
|
+
gender?: PersonGender;
|
|
63
|
+
/**
|
|
64
|
+
* Location object that can be used to filter results by location
|
|
65
|
+
*/
|
|
66
|
+
location?: SearchPosition;
|
|
67
|
+
/**
|
|
68
|
+
* Specifies sort options for the search.
|
|
69
|
+
*/
|
|
70
|
+
sortBy?: OrderBy;
|
|
71
|
+
/**
|
|
72
|
+
* Specifies which fields should be used for aggregations. For example, you can
|
|
73
|
+
* search for ‘smith’ and request ‘gender’ as a FilterField and along with the search
|
|
74
|
+
* result, you will also get ‘X of males, Y of females’.
|
|
75
|
+
*/
|
|
76
|
+
filterFields?: FilterField[];
|
|
77
|
+
};
|
|
78
|
+
export declare class SearchRequest extends PagedRequest<SearchRequestInput> {
|
|
79
|
+
protected validator: PagedRequestValidator<SearchRequestInput>;
|
|
80
|
+
}
|
|
81
|
+
export declare function isValidOrganizationType(orgType: string): orgType is GraphQLOrganizationType;
|
|
82
|
+
export declare function isValidSortField(sortField: string): sortField is GraphQLSortField;
|
|
83
|
+
export declare function isValidSortOrder(sortOrder: string): sortOrder is GraphQLSortOrder;
|
|
84
|
+
export declare function isValidFilterField(filterField: string): filterField is GraphQLFilterField;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
+
};
|
|
6
|
+
var _SearchRequestValidator_instances, _SearchRequestValidator_validateOrganizationTypeFilters, _SearchRequestValidator_validateSortBy, _SearchRequestValidator_validateFilterFields, _SearchRequestValidator_validateGender;
|
|
7
|
+
import { FilterField as GraphQLFilterField, OrganizationType as GraphQLOrganizationType, SortField as GraphQLSortField, SortOrder as GraphQLSortOrder, } from "../../../graphql/schema.js";
|
|
8
|
+
import { PagedRequest, PagedRequestValidator, } from "../../../requests/index.js";
|
|
9
|
+
import { isNotUndefined } from "../../../utils/index.js";
|
|
10
|
+
import { isValidPersonGender } from "../user/types.js";
|
|
11
|
+
export class SearchRequest extends PagedRequest {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.validator = new SearchRequestValidator();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
class SearchRequestValidator extends PagedRequestValidator {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
_SearchRequestValidator_instances.add(this);
|
|
21
|
+
}
|
|
22
|
+
validate(data, errors) {
|
|
23
|
+
super.validate(data, errors);
|
|
24
|
+
if (isNotUndefined(data.organizationTypeFilters)) {
|
|
25
|
+
__classPrivateFieldGet(this, _SearchRequestValidator_instances, "m", _SearchRequestValidator_validateOrganizationTypeFilters).call(this, data.organizationTypeFilters, errors);
|
|
26
|
+
}
|
|
27
|
+
if (isNotUndefined(data.sortBy)) {
|
|
28
|
+
__classPrivateFieldGet(this, _SearchRequestValidator_instances, "m", _SearchRequestValidator_validateSortBy).call(this, data.sortBy, errors);
|
|
29
|
+
}
|
|
30
|
+
if (isNotUndefined(data.filterFields)) {
|
|
31
|
+
__classPrivateFieldGet(this, _SearchRequestValidator_instances, "m", _SearchRequestValidator_validateFilterFields).call(this, data.filterFields, errors);
|
|
32
|
+
}
|
|
33
|
+
if (isNotUndefined(data.gender)) {
|
|
34
|
+
__classPrivateFieldGet(this, _SearchRequestValidator_instances, "m", _SearchRequestValidator_validateGender).call(this, data.gender, errors);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
_SearchRequestValidator_instances = new WeakSet(), _SearchRequestValidator_validateOrganizationTypeFilters = function _SearchRequestValidator_validateOrganizationTypeFilters(organizationTypeFilters, errors) {
|
|
39
|
+
for (const orgType of organizationTypeFilters) {
|
|
40
|
+
if (isValidOrganizationType(orgType)) {
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
errors.add(`Invalid organizationTypeFilters value: "${orgType}"`);
|
|
44
|
+
}
|
|
45
|
+
}, _SearchRequestValidator_validateSortBy = function _SearchRequestValidator_validateSortBy(orderBy, errors) {
|
|
46
|
+
if (isNotUndefined(orderBy.field) && !isValidSortField(orderBy.field)) {
|
|
47
|
+
errors.add(`Invalid sortBy.field value: "${orderBy.field}"`);
|
|
48
|
+
}
|
|
49
|
+
if (isNotUndefined(orderBy.order) && !isValidSortOrder(orderBy.order)) {
|
|
50
|
+
errors.add(`Invalid sortBy.order value: "${orderBy.order}"`);
|
|
51
|
+
}
|
|
52
|
+
}, _SearchRequestValidator_validateFilterFields = function _SearchRequestValidator_validateFilterFields(filterFields, errors) {
|
|
53
|
+
for (const filterField of filterFields) {
|
|
54
|
+
if (!isValidFilterField(filterField)) {
|
|
55
|
+
errors.add(`Invalid filterField value: "${filterField}"`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}, _SearchRequestValidator_validateGender = function _SearchRequestValidator_validateGender(gender, errors) {
|
|
59
|
+
if (!isValidPersonGender(gender)) {
|
|
60
|
+
errors.add(`Invalid gender value: "${gender}"`);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const organizationValueCache = new Set(Object.values(GraphQLOrganizationType));
|
|
64
|
+
export function isValidOrganizationType(orgType) {
|
|
65
|
+
return organizationValueCache.has(orgType);
|
|
66
|
+
}
|
|
67
|
+
const sortFieldValueCache = new Set(Object.values(GraphQLSortField));
|
|
68
|
+
export function isValidSortField(sortField) {
|
|
69
|
+
return sortFieldValueCache.has(sortField);
|
|
70
|
+
}
|
|
71
|
+
const sortOrderValueCache = new Set(Object.values(GraphQLSortOrder));
|
|
72
|
+
export function isValidSortOrder(sortOrder) {
|
|
73
|
+
return sortOrderValueCache.has(sortOrder);
|
|
74
|
+
}
|
|
75
|
+
const filterFieldValueCache = new Set(Object.values(GraphQLFilterField));
|
|
76
|
+
export function isValidFilterField(filterField) {
|
|
77
|
+
return filterFieldValueCache.has(filterField);
|
|
78
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ErrorsCollector, ValidationRequest, Validator } from "../../../requests/index.js";
|
|
2
|
+
export type CreateSupportCommentRequestInput = {
|
|
3
|
+
body: string;
|
|
4
|
+
uploads?: string[];
|
|
5
|
+
requestId: number;
|
|
6
|
+
};
|
|
7
|
+
declare class CreateSupportCommentRequestValidator implements Validator<CreateSupportCommentRequestInput> {
|
|
8
|
+
validate(data: CreateSupportCommentRequestInput, errors: ErrorsCollector): void;
|
|
9
|
+
}
|
|
10
|
+
export declare class CreateSupportCommentRequest extends ValidationRequest<CreateSupportCommentRequestInput> {
|
|
11
|
+
protected validator: CreateSupportCommentRequestValidator;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ValidationRequest, } from "../../../requests/index.js";
|
|
2
|
+
import { isNullOrUndefinedOrEmptyString } from "../../../utils/type-utils.js";
|
|
3
|
+
class CreateSupportCommentRequestValidator {
|
|
4
|
+
validate(data, errors) {
|
|
5
|
+
if (data.requestId < 0) {
|
|
6
|
+
errors.add("Request ID must be a non-negative integer");
|
|
7
|
+
}
|
|
8
|
+
if (isNullOrUndefinedOrEmptyString(data.body.trim())) {
|
|
9
|
+
errors.add("Comment body is required");
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export class CreateSupportCommentRequest extends ValidationRequest {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.validator = new CreateSupportCommentRequestValidator();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ErrorsCollector, ValidationRequest, Validator } from "../../../requests/index.js";
|
|
2
|
+
export type CommentInput = {
|
|
3
|
+
body: string;
|
|
4
|
+
uploads?: string[];
|
|
5
|
+
};
|
|
6
|
+
export type SupportRequestFieldsInput = {
|
|
7
|
+
category: string;
|
|
8
|
+
};
|
|
9
|
+
export type CreateSupportRequestRequestInput = {
|
|
10
|
+
comment: CommentInput;
|
|
11
|
+
email?: string;
|
|
12
|
+
fields: SupportRequestFieldsInput;
|
|
13
|
+
name?: string;
|
|
14
|
+
subject: string;
|
|
15
|
+
};
|
|
16
|
+
declare class CreateSupportRequestRequestValidator implements Validator<CreateSupportRequestRequestInput> {
|
|
17
|
+
validate(data: CreateSupportRequestRequestInput, errors: ErrorsCollector): void;
|
|
18
|
+
}
|
|
19
|
+
export declare class CreateSupportRequestRequest extends ValidationRequest<CreateSupportRequestRequestInput> {
|
|
20
|
+
protected validator: CreateSupportRequestRequestValidator;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ValidationRequest, } from "../../../requests/index.js";
|
|
2
|
+
class CreateSupportRequestRequestValidator {
|
|
3
|
+
validate(data, errors) {
|
|
4
|
+
if (!data.subject.trim()) {
|
|
5
|
+
errors.add("Subject is required");
|
|
6
|
+
}
|
|
7
|
+
if (!data.comment.body.trim()) {
|
|
8
|
+
errors.add("Comment body is required");
|
|
9
|
+
}
|
|
10
|
+
if (!data.fields.category.trim()) {
|
|
11
|
+
errors.add("Category is required");
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export class CreateSupportRequestRequest extends ValidationRequest {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.validator = new CreateSupportRequestRequestValidator();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ErrorsCollector, ValidationRequest, Validator } from "../../../requests/index.js";
|
|
2
|
+
export type DeleteSupportAttachmentRequestInput = {
|
|
3
|
+
attachmentId: string;
|
|
4
|
+
};
|
|
5
|
+
declare class DeleteSupportAttachmentRequestValidator implements Validator<DeleteSupportAttachmentRequestInput> {
|
|
6
|
+
validate(data: DeleteSupportAttachmentRequestInput, errors: ErrorsCollector): void;
|
|
7
|
+
}
|
|
8
|
+
export declare class DeleteSupportAttachmentRequest extends ValidationRequest<DeleteSupportAttachmentRequestInput> {
|
|
9
|
+
protected validator: DeleteSupportAttachmentRequestValidator;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ValidationRequest, } from "../../../requests/index.js";
|
|
2
|
+
class DeleteSupportAttachmentRequestValidator {
|
|
3
|
+
validate(data, errors) {
|
|
4
|
+
if (!data.attachmentId.trim()) {
|
|
5
|
+
errors.add("Attachment ID is required");
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export class DeleteSupportAttachmentRequest extends ValidationRequest {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.validator = new DeleteSupportAttachmentRequestValidator();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PagedRequest, PagedRequestInput, PagedRequestValidator } from "../../../requests/paged-request.js";
|
|
2
|
+
import { ErrorsCollector } from "../../../requests/validator.js";
|
|
3
|
+
export type GetSupportArticlesRequestInput = PagedRequestInput & {
|
|
4
|
+
labelNames?: string[];
|
|
5
|
+
locale?: string;
|
|
6
|
+
search?: string;
|
|
7
|
+
};
|
|
8
|
+
declare class GetSupportArticlesRequestValidator extends PagedRequestValidator<GetSupportArticlesRequestInput> {
|
|
9
|
+
validate(data: GetSupportArticlesRequestInput, errors: ErrorsCollector): void;
|
|
10
|
+
}
|
|
11
|
+
export declare class GetSupportArticlesRequest extends PagedRequest<GetSupportArticlesRequestInput> {
|
|
12
|
+
protected validator: GetSupportArticlesRequestValidator;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PagedRequest, PagedRequestValidator, } from "../../../requests/paged-request.js";
|
|
2
|
+
class GetSupportArticlesRequestValidator extends PagedRequestValidator {
|
|
3
|
+
validate(data, errors) {
|
|
4
|
+
super.validate(data, errors);
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export class GetSupportArticlesRequest extends PagedRequest {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.validator = new GetSupportArticlesRequestValidator();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ErrorsCollector, ValidationRequest, Validator } from "../../../requests/index.js";
|
|
2
|
+
export type GetSupportAttachmentRequestInput = {
|
|
3
|
+
/** The unique identifier of the support attachment. */
|
|
4
|
+
attachmentId: string;
|
|
5
|
+
/** Request ID is used to authenticate the request and validate the attachment belongs to the user. */
|
|
6
|
+
requestId: number;
|
|
7
|
+
};
|
|
8
|
+
declare class GetSupportAttachmentRequestValidator implements Validator<GetSupportAttachmentRequestInput> {
|
|
9
|
+
validate(data: GetSupportAttachmentRequestInput, errors: ErrorsCollector): void;
|
|
10
|
+
}
|
|
11
|
+
export declare class GetSupportAttachmentRequest extends ValidationRequest<GetSupportAttachmentRequestInput> {
|
|
12
|
+
protected validator: GetSupportAttachmentRequestValidator;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ValidationRequest, } from "../../../requests/index.js";
|
|
2
|
+
import { isNullOrUndefinedOrEmptyString } from "../../../utils/type-utils.js";
|
|
3
|
+
class GetSupportAttachmentRequestValidator {
|
|
4
|
+
validate(data, errors) {
|
|
5
|
+
if (isNullOrUndefinedOrEmptyString(data.attachmentId.trim())) {
|
|
6
|
+
errors.add("attachmentId must be a non-empty string");
|
|
7
|
+
}
|
|
8
|
+
if (data.requestId < 0) {
|
|
9
|
+
errors.add("requestId must be a non-negative number");
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export class GetSupportAttachmentRequest extends ValidationRequest {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.validator = new GetSupportAttachmentRequestValidator();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SortOrderEnum } from "../../../graphql/schema.js";
|
|
2
|
+
import { PagedRequest, PagedRequestInput, PagedRequestValidator } from "../../../requests/paged-request.js";
|
|
3
|
+
import { ErrorsCollector } from "../../../requests/validator.js";
|
|
4
|
+
export type GetSupportCommentsRequestInput = PagedRequestInput & {
|
|
5
|
+
requestId: number;
|
|
6
|
+
sortOrder?: SortOrderEnum;
|
|
7
|
+
};
|
|
8
|
+
declare class GetSupportCommentsRequestValidator extends PagedRequestValidator<GetSupportCommentsRequestInput> {
|
|
9
|
+
validate(data: GetSupportCommentsRequestInput, errors: ErrorsCollector): void;
|
|
10
|
+
}
|
|
11
|
+
export declare class GetSupportCommentsRequest extends PagedRequest<GetSupportCommentsRequestInput> {
|
|
12
|
+
protected validator: GetSupportCommentsRequestValidator;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PagedRequest, PagedRequestValidator, } from "../../../requests/paged-request.js";
|
|
2
|
+
class GetSupportCommentsRequestValidator extends PagedRequestValidator {
|
|
3
|
+
validate(data, errors) {
|
|
4
|
+
if (data.requestId < 0) {
|
|
5
|
+
errors.add("requestId must be a non-negative number");
|
|
6
|
+
}
|
|
7
|
+
super.validate(data, errors);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export class GetSupportCommentsRequest extends PagedRequest {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.validator = new GetSupportCommentsRequestValidator();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RequestStatus, SortBy, SortOrderEnum } from "../../../graphql/schema.js";
|
|
2
|
+
import { PagedRequest, PagedRequestInput, PagedRequestValidator } from "../../../requests/paged-request.js";
|
|
3
|
+
import { ErrorsCollector } from "../../../requests/validator.js";
|
|
4
|
+
export { RequestStatus, SortBy, SortOrderEnum };
|
|
5
|
+
export type GetSupportRequestsRequestInput = PagedRequestInput & {
|
|
6
|
+
search?: string;
|
|
7
|
+
sortBy?: SortBy;
|
|
8
|
+
sortOrder?: SortOrderEnum;
|
|
9
|
+
status?: RequestStatus[];
|
|
10
|
+
};
|
|
11
|
+
declare class GetSupportRequestsRequestValidator extends PagedRequestValidator<GetSupportRequestsRequestInput> {
|
|
12
|
+
validate(data: GetSupportRequestsRequestInput, errors: ErrorsCollector): void;
|
|
13
|
+
}
|
|
14
|
+
export declare class GetSupportRequestsRequest extends PagedRequest<GetSupportRequestsRequestInput> {
|
|
15
|
+
protected validator: GetSupportRequestsRequestValidator;
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RequestStatus, SortBy, SortOrderEnum, } from "../../../graphql/schema.js";
|
|
2
|
+
import { PagedRequest, PagedRequestValidator, } from "../../../requests/paged-request.js";
|
|
3
|
+
export { RequestStatus, SortBy, SortOrderEnum };
|
|
4
|
+
class GetSupportRequestsRequestValidator extends PagedRequestValidator {
|
|
5
|
+
validate(data, errors) {
|
|
6
|
+
super.validate(data, errors);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export class GetSupportRequestsRequest extends PagedRequest {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.validator = new GetSupportRequestsRequestValidator();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./support-manager.js";
|
|
2
|
+
export * from "./get-support-requests-request.js";
|
|
3
|
+
export * from "./upload-support-attachment-request.js";
|
|
4
|
+
export * from "./delete-support-attachment-request.js";
|
|
5
|
+
export * from "./create-support-request-request.js";
|
|
6
|
+
export * from "./get-support-articles-request.js";
|
|
7
|
+
export * from "./get-support-comments-request.js";
|
|
8
|
+
export * from "./create-support-comment-request.js";
|
|
9
|
+
export * from "./get-support-attachment-request.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./support-manager.js";
|
|
2
|
+
export * from "./get-support-requests-request.js";
|
|
3
|
+
export * from "./upload-support-attachment-request.js";
|
|
4
|
+
export * from "./delete-support-attachment-request.js";
|
|
5
|
+
export * from "./create-support-request-request.js";
|
|
6
|
+
export * from "./get-support-articles-request.js";
|
|
7
|
+
export * from "./get-support-comments-request.js";
|
|
8
|
+
export * from "./create-support-comment-request.js";
|
|
9
|
+
export * from "./get-support-attachment-request.js";
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { CreateSupportCommentMutationResults, CreateSupportRequestMutationResults, DeleteSupportAttachmentMutationResults, GetSupportArticlesQueryResults, GetSupportAttachmentQueryResults, GetSupportCategoriesQueryResults, GetSupportCommentsQueryResults, GetSupportRequestsQueryResults, UploadSupportAttachmentMutationResults } from "../../../graphql/operations/types.js";
|
|
2
|
+
import type { BWellQueryResult, BWellTransactionResult } from "../../../results/index.js";
|
|
3
|
+
import type { BaseManagerError } from "../errors.js";
|
|
4
|
+
import { CreateSupportCommentRequest } from "./create-support-comment-request.js";
|
|
5
|
+
import { CreateSupportRequestRequest } from "./create-support-request-request.js";
|
|
6
|
+
import { DeleteSupportAttachmentRequest } from "./delete-support-attachment-request.js";
|
|
7
|
+
import { GetSupportArticlesRequest } from "./get-support-articles-request.js";
|
|
8
|
+
import { GetSupportAttachmentRequest } from "./get-support-attachment-request.js";
|
|
9
|
+
import { GetSupportCommentsRequest } from "./get-support-comments-request.js";
|
|
10
|
+
import { GetSupportRequestsRequest } from "./get-support-requests-request.js";
|
|
11
|
+
import { UploadSupportAttachmentRequest } from "./upload-support-attachment-request.js";
|
|
12
|
+
export type GetSupportRequestsResults = GetSupportRequestsQueryResults["getSupportRequests"];
|
|
13
|
+
export type UploadSupportAttachmentResults = UploadSupportAttachmentMutationResults["uploadSupportAttachment"];
|
|
14
|
+
export type DeleteSupportAttachmentResults = DeleteSupportAttachmentMutationResults["deleteSupportAttachment"];
|
|
15
|
+
export type CreateSupportRequestResults = CreateSupportRequestMutationResults["createSupportRequest"];
|
|
16
|
+
export type GetSupportCategoriesResults = GetSupportCategoriesQueryResults["getSupportCategories"];
|
|
17
|
+
export type GetSupportArticlesResults = GetSupportArticlesQueryResults["getSupportArticles"];
|
|
18
|
+
export type GetSupportCommentsResults = GetSupportCommentsQueryResults["getSupportComments"];
|
|
19
|
+
export type CreateSupportCommentResults = CreateSupportCommentMutationResults["createSupportComment"];
|
|
20
|
+
export type GetSupportAttachmentResults = GetSupportAttachmentQueryResults["getSupportAttachment"];
|
|
21
|
+
/**
|
|
22
|
+
* The SupportManager interface provides methods for managing support requests.
|
|
23
|
+
*/
|
|
24
|
+
export interface SupportManager {
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves support requests based on the provided filters.
|
|
27
|
+
* @param request The request containing pagination, search, and filter parameters.
|
|
28
|
+
* @returns A promise that resolves to a query result with the support requests data.
|
|
29
|
+
*/
|
|
30
|
+
getSupportRequests(request: GetSupportRequestsRequest): Promise<BWellQueryResult<GetSupportRequestsResults, BaseManagerError>>;
|
|
31
|
+
/**
|
|
32
|
+
* Uploads an attachment for a support request.
|
|
33
|
+
* @param request The request containing the file content as a data URI (data:<MIME-type>;base64,<base64-data>) and file name.
|
|
34
|
+
* @returns A promise that resolves to a transaction result with the uploaded attachment data.
|
|
35
|
+
*/
|
|
36
|
+
uploadSupportAttachment(request: UploadSupportAttachmentRequest): Promise<BWellTransactionResult<UploadSupportAttachmentResults, BaseManagerError>>;
|
|
37
|
+
/**
|
|
38
|
+
* Deletes an attachment from a support request.
|
|
39
|
+
* @param request The request containing the attachment ID to delete.
|
|
40
|
+
* @returns A promise that resolves to a transaction result with the deletion status.
|
|
41
|
+
*/
|
|
42
|
+
deleteSupportAttachment(request: DeleteSupportAttachmentRequest): Promise<BWellTransactionResult<DeleteSupportAttachmentResults, BaseManagerError>>;
|
|
43
|
+
/**
|
|
44
|
+
* Creates a new support request.
|
|
45
|
+
* @param request The request containing the support request details (subject, comment, category, etc.).
|
|
46
|
+
* @returns A promise that resolves to a transaction result with the created support request data.
|
|
47
|
+
*/
|
|
48
|
+
createSupportRequest(request: CreateSupportRequestRequest): Promise<BWellTransactionResult<CreateSupportRequestResults, BaseManagerError>>;
|
|
49
|
+
/**
|
|
50
|
+
* Retrieves available support request categories.
|
|
51
|
+
* @returns A promise that resolves to a query result with the list of support categories.
|
|
52
|
+
*/
|
|
53
|
+
getSupportCategories(): Promise<BWellQueryResult<GetSupportCategoriesResults, BaseManagerError>>;
|
|
54
|
+
/**
|
|
55
|
+
* Retrieves support articles based on the provided filters.
|
|
56
|
+
* @param request The request containing pagination and search parameters.
|
|
57
|
+
* @returns A promise that resolves to a query result with the support articles data.
|
|
58
|
+
*/
|
|
59
|
+
getSupportArticles(request: GetSupportArticlesRequest): Promise<BWellQueryResult<GetSupportArticlesResults, BaseManagerError>>;
|
|
60
|
+
/**
|
|
61
|
+
* Retrieves comments for a specific support request.
|
|
62
|
+
* @param request The request containing the request ID, sortOrder and pagination parameters.
|
|
63
|
+
* @returns A promise that resolves to a query result with the support comments data.
|
|
64
|
+
*/
|
|
65
|
+
getSupportComments(request: GetSupportCommentsRequest): Promise<BWellQueryResult<GetSupportCommentsResults, BaseManagerError>>;
|
|
66
|
+
/**
|
|
67
|
+
* Creates a comment on a specific support request.
|
|
68
|
+
* @param request The request containing the comment body, uploads and request ID.
|
|
69
|
+
* @returns A promise that resolves to a transaction result with the created support comment data.
|
|
70
|
+
*/
|
|
71
|
+
createSupportComment(request: CreateSupportCommentRequest): Promise<BWellTransactionResult<CreateSupportCommentResults, BaseManagerError>>;
|
|
72
|
+
/**
|
|
73
|
+
* Retrieves a support attachment by attachment ID and request ID.
|
|
74
|
+
* @param request The request containing the attachment ID and request ID.
|
|
75
|
+
* @returns A promise that resolves to a query result with the support attachment data.
|
|
76
|
+
*/
|
|
77
|
+
getSupportAttachment(request: GetSupportAttachmentRequest): Promise<BWellQueryResult<GetSupportAttachmentResults, BaseManagerError>>;
|
|
78
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ErrorsCollector, ValidationRequest, Validator } from "../../../requests/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Input for uploading a support attachment.
|
|
4
|
+
*/
|
|
5
|
+
export type UploadSupportAttachmentRequestInput = {
|
|
6
|
+
/**
|
|
7
|
+
* The file content as a data URI with base64 encoding and MIME type.
|
|
8
|
+
* Format: data:<MIME-type>;base64,<base64-encoded-data>
|
|
9
|
+
* Example: "data:application/pdf;base64,JVBERi0xLjQKJeLjz9MK..."
|
|
10
|
+
*/
|
|
11
|
+
file: string;
|
|
12
|
+
fileName: string;
|
|
13
|
+
};
|
|
14
|
+
declare class UploadSupportAttachmentRequestValidator implements Validator<UploadSupportAttachmentRequestInput> {
|
|
15
|
+
private readonly dataURIRegex;
|
|
16
|
+
validate(data: UploadSupportAttachmentRequestInput, errors: ErrorsCollector): void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Request class for uploading support attachments.
|
|
20
|
+
* Validates that the file is provided as a data URI with base64 encoding and a MIME type.
|
|
21
|
+
*/
|
|
22
|
+
export declare class UploadSupportAttachmentRequest extends ValidationRequest<UploadSupportAttachmentRequestInput> {
|
|
23
|
+
protected validator: UploadSupportAttachmentRequestValidator;
|
|
24
|
+
}
|
|
25
|
+
export {};
|