@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
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ValidationRequest, } from "../../../requests/index.js";
|
|
2
|
+
class UploadSupportAttachmentRequestValidator {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.dataURIRegex = /^data:[a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+;base64,([A-Za-z0-9+/]*={0,2})$/;
|
|
5
|
+
}
|
|
6
|
+
validate(data, errors) {
|
|
7
|
+
if (!data.file.trim()) {
|
|
8
|
+
errors.add("File content is required");
|
|
9
|
+
}
|
|
10
|
+
if (data.file.trim() && !this.dataURIRegex.test(data.file)) {
|
|
11
|
+
errors.add("File must be a valid data URI with base64 encoding (e.g., data:image/png;base64,...)");
|
|
12
|
+
}
|
|
13
|
+
if (!data.fileName.trim()) {
|
|
14
|
+
errors.add("File name is required");
|
|
15
|
+
}
|
|
16
|
+
}
|
|
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 class UploadSupportAttachmentRequest extends ValidationRequest {
|
|
23
|
+
constructor() {
|
|
24
|
+
super(...arguments);
|
|
25
|
+
this.validator = new UploadSupportAttachmentRequestValidator();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import { CategoryCode, ConsentProvisionType, ConsentStatus } from "../../../models/enums/index.js";
|
|
2
1
|
import { ErrorsCollector, ValidationRequest, Validator } from "../../../requests/index.js";
|
|
3
|
-
|
|
4
|
-
* Input type for creating user consents. Includes consent status, category, and provision details.
|
|
5
|
-
* @category Inputs
|
|
6
|
-
* @title CreateConsentRequestInput
|
|
7
|
-
* @excerpt Input for creating user consents with status and provisions
|
|
8
|
-
*/
|
|
2
|
+
import { type CategoryCode, type ConsentProvisionType, type ConsentStatus } from "./types.js";
|
|
9
3
|
export type CreateConsentRequestInput = {
|
|
10
4
|
status: ConsentStatus;
|
|
11
5
|
provision: ConsentProvisionType;
|
|
@@ -15,12 +9,6 @@ export type CreateConsentRequestInput = {
|
|
|
15
9
|
export declare class CreateConsentRequestValidator implements Validator<CreateConsentRequestInput> {
|
|
16
10
|
validate(data: CreateConsentRequestInput, errors: ErrorsCollector): void;
|
|
17
11
|
}
|
|
18
|
-
/**
|
|
19
|
-
* Request object for creating a consent.
|
|
20
|
-
* @category Requests
|
|
21
|
-
* @title CreateConsentRequest
|
|
22
|
-
* @excerpt Request object for creating a consent
|
|
23
|
-
*/
|
|
24
12
|
export declare class CreateConsentRequest extends ValidationRequest<CreateConsentRequestInput> {
|
|
25
13
|
protected validator: Validator<CreateConsentRequestInput>;
|
|
26
14
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { CategoryCode as GraphQLCategoryCode } from "../../../graphql/schema.js";
|
|
1
2
|
import { ValidationRequest, } from "../../../requests/index.js";
|
|
2
3
|
import { isBlank, isUndefined } from "../../../utils/index.js";
|
|
3
|
-
import { isValidCategoryCode, isValidConsentProvisionType, isValidConsentStatus, } from "./
|
|
4
|
+
import { isValidCategoryCode, isValidConsentProvisionType, isValidConsentStatus, } from "./types.js";
|
|
4
5
|
export class CreateConsentRequestValidator {
|
|
5
6
|
validate(data, errors) {
|
|
6
7
|
if (!isValidConsentStatus(data.status)) {
|
|
@@ -16,19 +17,13 @@ export class CreateConsentRequestValidator {
|
|
|
16
17
|
if (!isUndefined(data.organizationId) && isBlank(data.organizationId)) {
|
|
17
18
|
errors.add("organizationId cannot be empty");
|
|
18
19
|
}
|
|
19
|
-
// organizationId is required if category is
|
|
20
|
-
if (data.category ===
|
|
20
|
+
// organizationId is required if category is PROA_ATTESTATION
|
|
21
|
+
if (data.category === GraphQLCategoryCode.ProaAttestation &&
|
|
21
22
|
isUndefined(data.organizationId)) {
|
|
22
|
-
errors.add("organizationId must be provided when category is
|
|
23
|
+
errors.add("organizationId must be provided when category is PROA_ATTESTATION");
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
|
-
/**
|
|
27
|
-
* Request object for creating a consent.
|
|
28
|
-
* @category Requests
|
|
29
|
-
* @title CreateConsentRequest
|
|
30
|
-
* @excerpt Request object for creating a consent
|
|
31
|
-
*/
|
|
32
27
|
export class CreateConsentRequest extends ValidationRequest {
|
|
33
28
|
constructor() {
|
|
34
29
|
super(...arguments);
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import { ErrorsCollector, ValidationRequest, Validator } from "../../../requests/index.js";
|
|
2
|
-
/**
|
|
3
|
-
* Input type for creating a direct download URL for a data export. Requires export ID and password for secure access.
|
|
4
|
-
* @category Inputs
|
|
5
|
-
* @title CreateDataExportDirectDownloadUrlRequestInput
|
|
6
|
-
* @excerpt Input for creating data export direct download URLs
|
|
7
|
-
*/
|
|
8
2
|
export type CreateDataExportDirectDownloadUrlRequestInput = {
|
|
9
3
|
exportId: string;
|
|
10
4
|
password: string;
|
|
@@ -14,9 +8,6 @@ export declare class CreateDataExportDirectDownloadUrlRequestValidator implement
|
|
|
14
8
|
}
|
|
15
9
|
/**
|
|
16
10
|
* Request object for creating a direct download URL for a data export.
|
|
17
|
-
* @category Requests
|
|
18
|
-
* @title CreateDataExportDirectDownloadUrlRequest
|
|
19
|
-
* @excerpt Request object for creating a direct download URL for a data export
|
|
20
11
|
*/
|
|
21
12
|
export declare class CreateDataExportDirectDownloadUrlRequest extends ValidationRequest<CreateDataExportDirectDownloadUrlRequestInput> {
|
|
22
13
|
protected validator: Validator<CreateDataExportDirectDownloadUrlRequestInput>;
|
|
@@ -12,9 +12,6 @@ export class CreateDataExportDirectDownloadUrlRequestValidator {
|
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Request object for creating a direct download URL for a data export.
|
|
15
|
-
* @category Requests
|
|
16
|
-
* @title CreateDataExportDirectDownloadUrlRequest
|
|
17
|
-
* @excerpt Request object for creating a direct download URL for a data export
|
|
18
15
|
*/
|
|
19
16
|
export class CreateDataExportDirectDownloadUrlRequest extends ValidationRequest {
|
|
20
17
|
constructor() {
|
|
@@ -1,19 +1,7 @@
|
|
|
1
1
|
import { BaseRequest } from "../../../requests/index.js";
|
|
2
|
-
/**
|
|
3
|
-
* Input type for creating a verification URL. Optionally includes callback URL and attribute matching settings.
|
|
4
|
-
* @category Inputs
|
|
5
|
-
* @title CreateVerificationUrlRequestInput
|
|
6
|
-
* @excerpt Input for creating verification URLs with optional settings
|
|
7
|
-
*/
|
|
8
2
|
export type CreateVerificationUrlRequestInput = {
|
|
9
3
|
callbackUrl?: string;
|
|
10
4
|
includeAttributeMatchingCheck?: boolean;
|
|
11
5
|
};
|
|
12
|
-
/**
|
|
13
|
-
* Request object for creating a verification URL.
|
|
14
|
-
* @category Requests
|
|
15
|
-
* @title CreateVerificationUrlRequest
|
|
16
|
-
* @excerpt Request object for creating a verification URL
|
|
17
|
-
*/
|
|
18
6
|
export declare class CreateVerificationUrlRequest extends BaseRequest<CreateVerificationUrlRequestInput> {
|
|
19
7
|
}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
import { BaseRequest } from "../../../requests/index.js";
|
|
2
|
-
/**
|
|
3
|
-
* Request object for creating a verification URL.
|
|
4
|
-
* @category Requests
|
|
5
|
-
* @title CreateVerificationUrlRequest
|
|
6
|
-
* @excerpt Request object for creating a verification URL
|
|
7
|
-
*/
|
|
8
2
|
export class CreateVerificationUrlRequest extends BaseRequest {
|
|
9
3
|
}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { CategoryCode as GraphQLCategoryCode } from "../../../graphql/schema.js";
|
|
2
|
-
import { CategoryCode } from "../../../models/enums/index.js";
|
|
3
2
|
import { ErrorsCollector, ValidationRequest, Validator } from "../../../requests/index.js";
|
|
4
|
-
|
|
5
|
-
* Input type for getting user consents. Requires a category to filter consents by.
|
|
6
|
-
* @category Inputs
|
|
7
|
-
* @title GetConsentsRequestInput
|
|
8
|
-
* @excerpt Input for getting user consents by category
|
|
9
|
-
*/
|
|
3
|
+
import { CategoryCode } from "./types.js";
|
|
10
4
|
export type GetConsentsRequestInput = {
|
|
11
5
|
category: CategoryCode;
|
|
12
6
|
};
|
|
@@ -16,18 +10,6 @@ export type GetConsentRequestData = {
|
|
|
16
10
|
export declare class GetConsentsRequestValidator implements Validator<GetConsentsRequestInput> {
|
|
17
11
|
validate(data: GetConsentsRequestInput, errors: ErrorsCollector): void;
|
|
18
12
|
}
|
|
19
|
-
/**
|
|
20
|
-
* Request object for fetching consents data.
|
|
21
|
-
* @category Requests
|
|
22
|
-
* @title GetConsentsRequest
|
|
23
|
-
* @excerpt Request object for fetching consents data
|
|
24
|
-
*/
|
|
25
|
-
/**
|
|
26
|
-
* Request object for fetching user consents.
|
|
27
|
-
* @category Requests
|
|
28
|
-
* @title GetConsentsRequest
|
|
29
|
-
* @excerpt Request object for fetching user consents
|
|
30
|
-
*/
|
|
31
13
|
export declare class GetConsentsRequest extends ValidationRequest<GetConsentsRequestInput> {
|
|
32
14
|
protected validator: Validator<GetConsentsRequestInput>;
|
|
33
15
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ValidationRequest, } from "../../../requests/index.js";
|
|
2
|
-
import { isValidCategoryCode } from "./
|
|
2
|
+
import { isValidCategoryCode } from "./types.js";
|
|
3
3
|
export class GetConsentsRequestValidator {
|
|
4
4
|
validate(data, errors) {
|
|
5
5
|
if (!isValidCategoryCode(data.category)) {
|
|
@@ -7,18 +7,6 @@ export class GetConsentsRequestValidator {
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
/**
|
|
11
|
-
* Request object for fetching consents data.
|
|
12
|
-
* @category Requests
|
|
13
|
-
* @title GetConsentsRequest
|
|
14
|
-
* @excerpt Request object for fetching consents data
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* Request object for fetching user consents.
|
|
18
|
-
* @category Requests
|
|
19
|
-
* @title GetConsentsRequest
|
|
20
|
-
* @excerpt Request object for fetching user consents
|
|
21
|
-
*/
|
|
22
10
|
export class GetConsentsRequest extends ValidationRequest {
|
|
23
11
|
constructor() {
|
|
24
12
|
super(...arguments);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { UpdateProfileRequest, UpdateProfileRequestInput, } from "./update-profile-request.js";
|
|
2
2
|
export { GetConsentsRequestInput, GetConsentsRequest, } from "./get-consents-request.js";
|
|
3
3
|
export { CreateConsentRequest, CreateConsentRequestInput, } from "./create-consent-request.js";
|
|
4
|
-
export {
|
|
4
|
+
export type { CategoryCode, ConsentProvisionType, ConsentStatus, PersonGender, } from "./types.js";
|
|
5
|
+
export { ProfileResults, DeleteUserResults, UpdateProfileResults, GetConsentsResults, CreateConsentResults, UserManager, } from "./user-manager.js";
|
|
5
6
|
export { CreateDataExportDirectDownloadUrlRequest, CreateDataExportDirectDownloadUrlRequestInput, } from "./create-data-export-direct-download-url-request.js";
|
|
6
7
|
export { CreateVerificationUrlRequest, CreateVerificationUrlRequestInput, } from "./create-verification-url-request.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CategoryCode as GraphQLCategoryCode, ConsentProvisionType as GraphQLConsentProvisionType, ConsentStatus as GraphQLConsentStatus, FhirPersonGender as GraphQLFhirPersonGender } from "../../../graphql/schema.js";
|
|
2
|
+
export type PersonGender = `${GraphQLFhirPersonGender}`;
|
|
3
|
+
export type ConsentStatus = `${GraphQLConsentStatus}`;
|
|
4
|
+
export type CategoryCode = `${GraphQLCategoryCode}`;
|
|
5
|
+
export type ConsentProvisionType = `${GraphQLConsentProvisionType}`;
|
|
6
|
+
export declare function isValidPersonGender(gender: string): gender is GraphQLFhirPersonGender;
|
|
7
|
+
export declare function isValidConsentStatus(status: string): status is GraphQLConsentStatus;
|
|
8
|
+
export declare function isValidCategoryCode(categoryCode: string): categoryCode is GraphQLCategoryCode;
|
|
9
|
+
export declare function isValidConsentProvisionType(type: string): type is GraphQLConsentProvisionType;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CategoryCode as GraphQLCategoryCode, ConsentProvisionType as GraphQLConsentProvisionType, ConsentStatus as GraphQLConsentStatus, FhirPersonGender as GraphQLFhirPersonGender, } from "../../../graphql/schema.js";
|
|
2
|
+
const genderValueCache = new Set(Object.values(GraphQLFhirPersonGender));
|
|
3
|
+
export function isValidPersonGender(gender) {
|
|
4
|
+
return genderValueCache.has(gender);
|
|
5
|
+
}
|
|
6
|
+
const consentStatusCache = new Set(Object.values(GraphQLConsentStatus));
|
|
7
|
+
export function isValidConsentStatus(status) {
|
|
8
|
+
return consentStatusCache.has(status);
|
|
9
|
+
}
|
|
10
|
+
const categoryCodeValueCache = new Set(Object.values(GraphQLCategoryCode));
|
|
11
|
+
export function isValidCategoryCode(categoryCode) {
|
|
12
|
+
return categoryCodeValueCache.has(categoryCode);
|
|
13
|
+
}
|
|
14
|
+
const consentProvisionTypeCache = new Set(Object.values(GraphQLConsentProvisionType));
|
|
15
|
+
export function isValidConsentProvisionType(type) {
|
|
16
|
+
return consentProvisionTypeCache.has(type);
|
|
17
|
+
}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import { PersonGender } from "../../../models/enums/index.js";
|
|
2
1
|
import { ErrorsCollector, ValidationRequest, Validator } from "../../../requests/index.js";
|
|
3
|
-
|
|
4
|
-
* Input type for updating user profile information. All fields are optional for partial updates.
|
|
5
|
-
* @category Inputs
|
|
6
|
-
* @title UpdateProfileRequestInput
|
|
7
|
-
* @excerpt Input for updating user profile information
|
|
8
|
-
*/
|
|
2
|
+
import { type PersonGender } from "./types.js";
|
|
9
3
|
export type UpdateProfileRequestInput = {
|
|
10
4
|
id?: string;
|
|
11
5
|
firstName?: string;
|
|
@@ -26,10 +20,8 @@ export declare class UpdateProfileRequestValidator implements Validator<UpdatePr
|
|
|
26
20
|
validate(data: UpdateProfileRequestInput, errors: ErrorsCollector): void;
|
|
27
21
|
}
|
|
28
22
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* @title UpdateProfileRequest
|
|
32
|
-
* @excerpt Request object for updating user profile information
|
|
23
|
+
* A request class for passing along the new Profile Person information to the
|
|
24
|
+
* updateUserProfile API Mutation
|
|
33
25
|
*/
|
|
34
26
|
export declare class UpdateProfileRequest extends ValidationRequest<UpdateProfileRequestInput> {
|
|
35
27
|
protected validator: Validator<UpdateProfileRequestInput>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ValidationRequest, } from "../../../requests/index.js";
|
|
2
2
|
import { isUndefined } from "../../../utils/index.js";
|
|
3
|
-
import { isValidPersonGender } from "./
|
|
3
|
+
import { isValidPersonGender } from "./types.js";
|
|
4
4
|
export class UpdateProfileRequestValidator {
|
|
5
5
|
validate(data, errors) {
|
|
6
6
|
if (!isUndefined(data.gender) && !isValidPersonGender(data.gender)) {
|
|
@@ -9,10 +9,8 @@ export class UpdateProfileRequestValidator {
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* @title UpdateProfileRequest
|
|
15
|
-
* @excerpt Request object for updating user profile information
|
|
12
|
+
* A request class for passing along the new Profile Person information to the
|
|
13
|
+
* updateUserProfile API Mutation
|
|
16
14
|
*/
|
|
17
15
|
export class UpdateProfileRequest extends ValidationRequest {
|
|
18
16
|
constructor() {
|
|
@@ -1,135 +1,84 @@
|
|
|
1
1
|
import { ValidationError } from "../../../errors/validation-error.js";
|
|
2
|
-
import {
|
|
2
|
+
import { CreateConsentMutationResults, CreateDataExportDirectDownloadUrlMutationResults, CreateVerificationUrlMutationResults, DeleteMutationResults, GetProfileQueryResults, SearchConsentQueryResults, UpdateUserProfileMutationResults, VerificationStatusQueryResults } from "../../../graphql/operations/types.js";
|
|
3
3
|
import type { BWellQueryResult, BWellTransactionResult } from "../../../results/index.js";
|
|
4
4
|
import { BaseManagerError } from "../errors.js";
|
|
5
5
|
import { CreateConsentRequest } from "./create-consent-request.js";
|
|
6
|
+
import { CreateDataExportDirectDownloadUrlRequest } from "./create-data-export-direct-download-url-request.js";
|
|
6
7
|
import { CreateVerificationUrlRequest } from "./create-verification-url-request.js";
|
|
7
|
-
import {
|
|
8
|
+
import { GetConsentsRequest } from "./get-consents-request.js";
|
|
8
9
|
import { UpdateProfileRequest } from "./update-profile-request.js";
|
|
10
|
+
export type ProfileResults = GetProfileQueryResults["userProfile"];
|
|
11
|
+
export type DeleteUserResultsType = DeleteMutationResults["updateUserAccountStatus"];
|
|
12
|
+
export interface DeleteUserResults extends DeleteUserResultsType {
|
|
13
|
+
}
|
|
14
|
+
export type UpdateProfileResults = UpdateUserProfileMutationResults["updateUserProfile"];
|
|
15
|
+
export type GetConsentsResults = SearchConsentQueryResults["search"];
|
|
16
|
+
export type CreateConsentResults = CreateConsentMutationResults["createConsent"];
|
|
17
|
+
export type CreateDataExportDirectDownloadUrlResults = CreateDataExportDirectDownloadUrlMutationResults["createDataExportDirectDownloadUrl"];
|
|
18
|
+
export type CreateVerificationUrlResults = CreateVerificationUrlMutationResults["createVerificationUrl"];
|
|
19
|
+
export type GetVerificationStatusResults = VerificationStatusQueryResults["verificationStatus"];
|
|
9
20
|
/**
|
|
10
|
-
*
|
|
11
|
-
* Provides methods for managing user data, including FHIR Consent.
|
|
12
|
-
*
|
|
13
|
-
* @title UserManager
|
|
14
|
-
* @excerpt User Manager for profile management, consent handling, and identity verification
|
|
15
|
-
* @category Managers
|
|
21
|
+
* The UserManager interface provides methods for managing user data, including FHIR Consent (https://build.fhir.org/consent.html)
|
|
16
22
|
*/
|
|
17
23
|
export interface UserManager {
|
|
18
24
|
/**
|
|
19
|
-
* Retrieves
|
|
20
|
-
* Gets demographic data for the authenticated user.
|
|
25
|
+
* Retrieves a user's profile data.
|
|
21
26
|
*
|
|
22
|
-
* @returns {Promise<BWellQueryResult<
|
|
23
|
-
* @example
|
|
24
|
-
* ```typescript
|
|
25
|
-
* const profile = await sdk.user.getProfile();
|
|
26
|
-
* ```
|
|
27
|
+
* @returns {Promise<BWellQueryResult<ProfileResults>>} A promise resolving to an object holding the demographic data from the user.
|
|
27
28
|
*/
|
|
28
|
-
getProfile(): Promise<BWellQueryResult<
|
|
29
|
+
getProfile(): Promise<BWellQueryResult<ProfileResults, BaseManagerError>>;
|
|
29
30
|
/**
|
|
30
|
-
* Deletes
|
|
31
|
-
* Permanently removes the user from the system.
|
|
31
|
+
* Deletes a user’s account and associated user data.
|
|
32
32
|
*
|
|
33
|
-
* @returns {Promise<BWellTransactionResult<
|
|
34
|
-
* @example
|
|
35
|
-
* ```typescript
|
|
36
|
-
* await sdk.user.delete();
|
|
37
|
-
* ```
|
|
33
|
+
* @returns {Promise<BWellTransactionResult<OperationOutcome>>} A promise resolving to an object representing the outcome of the operation.
|
|
38
34
|
*/
|
|
39
35
|
delete(): Promise<BWellTransactionResult<null, BaseManagerError>>;
|
|
40
36
|
/**
|
|
41
|
-
* Updates the user
|
|
42
|
-
* Modifies demographic data for the authenticated user.
|
|
37
|
+
* Updates demographic information on the user profile.
|
|
43
38
|
*
|
|
44
|
-
* @
|
|
45
|
-
* @returns {Promise<BWellTransactionResult<Person, BaseManagerError>>} - The updated user profile
|
|
46
|
-
* @example
|
|
47
|
-
* ```typescript
|
|
48
|
-
* await sdk.user.updateProfile(
|
|
49
|
-
* new UpdateProfileRequest({
|
|
50
|
-
* firstName: 'John',
|
|
51
|
-
* lastName: 'Doe'
|
|
52
|
-
* })
|
|
53
|
-
* );
|
|
54
|
-
* ```
|
|
39
|
+
* @return {Promise<BWellTransactionResult<UpdateProfileResults, BaseManagerError>>} A promise resolving to an object representing the updated user profile
|
|
55
40
|
*/
|
|
56
|
-
updateProfile(request: UpdateProfileRequest): Promise<BWellTransactionResult<
|
|
41
|
+
updateProfile(request: UpdateProfileRequest): Promise<BWellTransactionResult<UpdateProfileResults, BaseManagerError>>;
|
|
57
42
|
/**
|
|
58
|
-
*
|
|
43
|
+
* Retreives a list of Consents.
|
|
59
44
|
*
|
|
60
|
-
* @param {GetConsentsRequest}
|
|
61
|
-
* @
|
|
62
|
-
* @example
|
|
63
|
-
* ```typescript
|
|
64
|
-
* const consents = await sdk.user.getConsents(
|
|
65
|
-
* new GetConsentsRequest({
|
|
66
|
-
* category: 'research'
|
|
67
|
-
* })
|
|
68
|
-
* );
|
|
69
|
-
* ```
|
|
45
|
+
* @param {GetConsentsRequest} request - Request object containing the consent category to search by
|
|
46
|
+
* @return {Promise<BWellQueryResult<GetConsentsResults, BaseManagerError>>} An object representing the consent data from the user
|
|
70
47
|
*/
|
|
71
|
-
getConsents(request?: GetConsentsRequest): Promise<BWellQueryResult<
|
|
48
|
+
getConsents(request?: GetConsentsRequest): Promise<BWellQueryResult<GetConsentsResults, BaseManagerError | ValidationError>>;
|
|
72
49
|
/**
|
|
73
|
-
* Creates a
|
|
74
|
-
* Stores consent preferences for the authenticated user.
|
|
50
|
+
* Creates a user's Consent
|
|
75
51
|
*
|
|
76
|
-
* @param {CreateConsentRequest} request - Request
|
|
77
|
-
* @returns {Promise<BWellTransactionResult<
|
|
78
|
-
* @example
|
|
79
|
-
* ```typescript
|
|
80
|
-
* await sdk.user.createConsent(
|
|
81
|
-
* new CreateConsentRequest({
|
|
82
|
-
* status: 'active',
|
|
83
|
-
* provision: 'permit',
|
|
84
|
-
* category: 'research'
|
|
85
|
-
* })
|
|
86
|
-
* );
|
|
87
|
-
* ```
|
|
52
|
+
* @param {CreateConsentRequest} request - Request object containing new consent data
|
|
53
|
+
* @returns {Promise<BWellTransactionResult<CreateConsentResults, BaseManagerError>>} Newly created user consent
|
|
88
54
|
*/
|
|
89
|
-
createConsent(request: CreateConsentRequest): Promise<BWellTransactionResult<
|
|
55
|
+
createConsent(request: CreateConsentRequest): Promise<BWellTransactionResult<CreateConsentResults, BaseManagerError | ValidationError>>;
|
|
90
56
|
/**
|
|
91
|
-
* Creates a
|
|
92
|
-
* Generates a URL for IAL2 verification flow.
|
|
57
|
+
* Creates a direct download URL for a user's data export.
|
|
93
58
|
*
|
|
94
|
-
* @param {
|
|
95
|
-
* @returns {Promise<BWellTransactionResult<
|
|
96
|
-
* @example
|
|
97
|
-
* ```typescript
|
|
98
|
-
* const verificationUrl = await sdk.user.createVerificationUrl(
|
|
99
|
-
* new CreateVerificationUrlRequest({
|
|
100
|
-
* callbackUrl: 'https://myapp.com/callback'
|
|
101
|
-
* })
|
|
102
|
-
* );
|
|
103
|
-
* ```
|
|
59
|
+
* @param {CreateDataExportDirectDownloadUrlRequest} request - Request object containing the data export ID and password
|
|
60
|
+
* @returns {Promise<BWellTransactionResult<CreateDataExportDirectDownloadUrlResults, BaseManagerError>>} A promise resolving to an object representing the direct download URL for the user's data export.
|
|
104
61
|
*/
|
|
105
|
-
|
|
62
|
+
createDataExportDirectDownloadUrl(request: CreateDataExportDirectDownloadUrlRequest): Promise<BWellTransactionResult<CreateDataExportDirectDownloadUrlResults, BaseManagerError>>;
|
|
106
63
|
/**
|
|
107
|
-
*
|
|
108
|
-
* Gets the current state of IAL2 verification.
|
|
64
|
+
* Creates a verification URL which can be used to initiate the IAL2 verification flow.
|
|
109
65
|
*
|
|
110
|
-
* @
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
66
|
+
* @param {CreateVerificationUrlRequest} request - Request object containing:
|
|
67
|
+
* - `callbackUrl` (optional):
|
|
68
|
+
* - A URL (must be whitelisted by b.well) to redirect to once verification is complete.
|
|
69
|
+
* - The URL redirect will include a `status` query param that will be set to either `success` or `failure`.
|
|
70
|
+
* - Defaults to `null`, in which case a simple Success or Failure HTML page will be displayed once verification is complete.
|
|
71
|
+
* - `includeAttributeMatchingCheck` (optional):
|
|
72
|
+
* - A boolean indicating whether to include an attribute matching check.
|
|
73
|
+
* - Compares the user's current FHIR Person with the verified person data returned by CLEAR and fails the verification if identifying information is not a close enough match (can help prevent bad actors).
|
|
74
|
+
* - Defaults to `false`.
|
|
75
|
+
* @returns {Promise<BWellTransactionResult<CreateVerificationUrlResults, BaseManagerError>>} A promise resolving to a URL string that can be used to initiate the IAL2 verification flow.
|
|
115
76
|
*/
|
|
116
|
-
|
|
77
|
+
createVerificationUrl(request: CreateVerificationUrlRequest): Promise<BWellTransactionResult<CreateVerificationUrlResults, BaseManagerError>>;
|
|
117
78
|
/**
|
|
118
|
-
*
|
|
119
|
-
* Requires a data export and associated web-hook to be set up first (see [docs](https://developer.bwell.com/reference/post_users-id-data-exports)).
|
|
120
|
-
* Please reach out to bwell customer support for further details.
|
|
79
|
+
* Retrieves the status of the user's IAL2 verification in the form of a VerificationResult FHIR object.
|
|
121
80
|
*
|
|
122
|
-
* @
|
|
123
|
-
* @returns {Promise<BWellTransactionResult<string | null, BaseManagerError>>} - The generated download URL or null if not available
|
|
124
|
-
* @example
|
|
125
|
-
* ```typescript
|
|
126
|
-
* const downloadUrl = await sdk.user.createDataExportDirectDownloadUrl(
|
|
127
|
-
* new CreateDataExportDirectDownloadUrlRequest({
|
|
128
|
-
* exportId: 'export123',
|
|
129
|
-
* password: 'securePassword'
|
|
130
|
-
* })
|
|
131
|
-
* );
|
|
132
|
-
* ```
|
|
81
|
+
* @returns {Promise<BWellTransactionResult<GetVerificationStatusResults, BaseManagerError>>} A promise resolving to null or a VerificationResult FHIR object of which the status value will be either "validated" or "val-fail".
|
|
133
82
|
*/
|
|
134
|
-
|
|
83
|
+
getVerificationStatus(): Promise<BWellTransactionResult<GetVerificationStatusResults, BaseManagerError>>;
|
|
135
84
|
}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { GetTasksQueryVariables } from "../../../graphql/operations/types.js";
|
|
2
2
|
import { RequestFactory } from "../../../requests/index.js";
|
|
3
3
|
import { GetTasksRequest } from "../../base/index.js";
|
|
4
|
+
export declare enum ActivitySystem {
|
|
5
|
+
ACTIVITY_CONTENT = "https://www.icanbwell.com/contentDescription",
|
|
6
|
+
ACTIVITY_ID = "https://www.icanbwell.com/activityId",
|
|
7
|
+
ACTIVITY_TOPIC = "https://www.icanbwell.com/activityTopic",
|
|
8
|
+
ACTIVITY_TYPE = "https://www.icanbwell.com/activityType",
|
|
9
|
+
PERFORMER_TYPE = "https://www.icanbwell.com/performerType"
|
|
10
|
+
}
|
|
4
11
|
export declare class GetTasksRequestFactory implements RequestFactory<GetTasksRequest, GetTasksQueryVariables> {
|
|
5
12
|
#private;
|
|
6
13
|
create(request: GetTasksRequest): GetTasksQueryVariables;
|
|
@@ -0,0 +1,70 @@
|
|
|
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 _GetTasksRequestFactory_instances, _GetTasksRequestFactory_toSearchToken;
|
|
7
|
+
import { isNotUndefined } from "../../../utils/index.js";
|
|
8
|
+
export var ActivitySystem;
|
|
9
|
+
(function (ActivitySystem) {
|
|
10
|
+
ActivitySystem["ACTIVITY_CONTENT"] = "https://www.icanbwell.com/contentDescription";
|
|
11
|
+
ActivitySystem["ACTIVITY_ID"] = "https://www.icanbwell.com/activityId";
|
|
12
|
+
ActivitySystem["ACTIVITY_TOPIC"] = "https://www.icanbwell.com/activityTopic";
|
|
13
|
+
ActivitySystem["ACTIVITY_TYPE"] = "https://www.icanbwell.com/activityType";
|
|
14
|
+
ActivitySystem["PERFORMER_TYPE"] = "https://www.icanbwell.com/performerType";
|
|
15
|
+
})(ActivitySystem || (ActivitySystem = {}));
|
|
16
|
+
export class GetTasksRequestFactory {
|
|
17
|
+
constructor() {
|
|
18
|
+
_GetTasksRequestFactory_instances.add(this);
|
|
19
|
+
}
|
|
20
|
+
create(request) {
|
|
21
|
+
var _a;
|
|
22
|
+
const input = request.data();
|
|
23
|
+
const data = {
|
|
24
|
+
page: input.page,
|
|
25
|
+
pageSize: input.pageSize,
|
|
26
|
+
};
|
|
27
|
+
if (isNotUndefined(input.id)) {
|
|
28
|
+
data.id = __classPrivateFieldGet(this, _GetTasksRequestFactory_instances, "m", _GetTasksRequestFactory_toSearchToken).call(this, input.id);
|
|
29
|
+
}
|
|
30
|
+
if (isNotUndefined(input.activityId)) {
|
|
31
|
+
data.identifier = __classPrivateFieldGet(this, _GetTasksRequestFactory_instances, "m", _GetTasksRequestFactory_toSearchToken).call(this, input.activityId, ActivitySystem.ACTIVITY_ID);
|
|
32
|
+
}
|
|
33
|
+
if (isNotUndefined(input.activityType)) {
|
|
34
|
+
data.code = __classPrivateFieldGet(this, _GetTasksRequestFactory_instances, "m", _GetTasksRequestFactory_toSearchToken).call(this, input.activityType, ActivitySystem.ACTIVITY_TYPE);
|
|
35
|
+
}
|
|
36
|
+
if (isNotUndefined(input.activityTopic)) {
|
|
37
|
+
data.tag = __classPrivateFieldGet(this, _GetTasksRequestFactory_instances, "m", _GetTasksRequestFactory_toSearchToken).call(this, input.activityTopic, ActivitySystem.ACTIVITY_TOPIC);
|
|
38
|
+
}
|
|
39
|
+
if (isNotUndefined(input.status)) {
|
|
40
|
+
data.status = __classPrivateFieldGet(this, _GetTasksRequestFactory_instances, "m", _GetTasksRequestFactory_toSearchToken).call(this, input.status);
|
|
41
|
+
}
|
|
42
|
+
if (isNotUndefined(input.subject)) {
|
|
43
|
+
data.subject = __classPrivateFieldGet(this, _GetTasksRequestFactory_instances, "m", _GetTasksRequestFactory_toSearchToken).call(this, input.subject);
|
|
44
|
+
}
|
|
45
|
+
if (isNotUndefined(input.performerType)) {
|
|
46
|
+
data.performer = __classPrivateFieldGet(this, _GetTasksRequestFactory_instances, "m", _GetTasksRequestFactory_toSearchToken).call(this, input.performerType, ActivitySystem.PERFORMER_TYPE);
|
|
47
|
+
}
|
|
48
|
+
data.sortMethod = input.smartSort === true ? "smartSort" : "";
|
|
49
|
+
if (isNotUndefined(input.enrichContent)) {
|
|
50
|
+
data.enrichContent = input.enrichContent;
|
|
51
|
+
}
|
|
52
|
+
// default to english
|
|
53
|
+
data.contentLanguage = (_a = input.contentLanguage) !== null && _a !== void 0 ? _a : "en";
|
|
54
|
+
return {
|
|
55
|
+
request: data,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
_GetTasksRequestFactory_instances = new WeakSet(), _GetTasksRequestFactory_toSearchToken = function _GetTasksRequestFactory_toSearchToken(value, system) {
|
|
60
|
+
const valueArr = Array.isArray(value) ? value : [value];
|
|
61
|
+
const searchTokenValues = {
|
|
62
|
+
value: valueArr.join(","),
|
|
63
|
+
};
|
|
64
|
+
if (isNotUndefined(system)) {
|
|
65
|
+
searchTokenValues.system = system;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
values: [searchTokenValues],
|
|
69
|
+
};
|
|
70
|
+
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { BWellQueryResult } from "../../../results/index.js";
|
|
4
|
-
import { ActivityManager
|
|
5
|
-
import {
|
|
1
|
+
import type { ValidationError } from "../../../errors/validation-error.js";
|
|
2
|
+
import { type LoggerProvider } from "../../../logger/index.js";
|
|
3
|
+
import { BWellQueryResult, BWellTransactionResult } from "../../../results/index.js";
|
|
4
|
+
import type { ActivityManager } from "../../base/activity/activity-manager.js";
|
|
5
|
+
import type { GetTasksRequest, GetTasksResults, UpdateTaskStatusRequest, UpdateTaskStatusResults } from "../../base/activity/index.js";
|
|
6
|
+
import type { BaseManagerError } from "../../base/errors.js";
|
|
6
7
|
import { GraphQLManager } from "../graphql-manager/index.js";
|
|
7
8
|
import type { GraphQLSdk } from "../graphql-sdk/index.js";
|
|
8
9
|
export declare class GraphQLActivityManager extends GraphQLManager implements ActivityManager {
|
|
9
10
|
#private;
|
|
10
11
|
constructor(sdk: GraphQLSdk, loggerProvider?: LoggerProvider);
|
|
11
|
-
getTasks(request: GetTasksRequest): Promise<BWellQueryResult<
|
|
12
|
+
getTasks(request: GetTasksRequest): Promise<BWellQueryResult<GetTasksResults, BaseManagerError | ValidationError>>;
|
|
13
|
+
updateTaskStatus(request: UpdateTaskStatusRequest): Promise<BWellTransactionResult<UpdateTaskStatusResults, BaseManagerError | ValidationError>>;
|
|
12
14
|
}
|