@icanbwell/bwell-sdk-ts 2.0.0-alpha.0-rc.1755885512 → 2.0.0-alpha.0-rc.1756480161
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/dist/__version__.d.ts +1 -1
- package/dist/__version__.js +1 -1
- package/dist/api/base/device/device-request.d.ts +3 -2
- package/dist/api/base/device/device-request.js +2 -2
- package/dist/api/base/device/index.d.ts +0 -1
- package/dist/api/base/device/index.js +0 -1
- package/dist/api/base/search/index.d.ts +1 -1
- package/dist/api/base/search/search-health-resources-request.d.ts +12 -0
- package/dist/api/base/search/search-health-resources-request.js +3 -0
- package/dist/api/base/search/submit-provider-for-review-request.d.ts +9 -0
- package/dist/api/base/search/submit-provider-for-review-request.js +6 -0
- package/dist/api/base/user/create-data-export-direct-download-url-request.d.ts +4 -0
- package/dist/api/base/user/user-manager.d.ts +25 -2
- package/dist/bwell-sdk/bwell-sdk.d.ts +2 -0
- package/dist/bwell-sdk/bwell-sdk.js +2 -0
- package/dist/graphql/schema.d.ts +2 -10
- package/dist/models/device/device-registration-results.d.ts +12 -0
- package/dist/models/device/device-registration-results.js +1 -0
- package/dist/models/device/index.d.ts +1 -3
- package/dist/models/search/health-resources.d.ts +8 -0
- package/dist/models/search/provider-review-result.d.ts +10 -0
- package/package.json +1 -1
package/dist/__version__.d.ts
CHANGED
package/dist/__version__.js
CHANGED
|
@@ -15,7 +15,7 @@ export type RegisterDeviceRequestInput = {
|
|
|
15
15
|
* Validator for RegisterDeviceRequestInput.
|
|
16
16
|
* Validates device token, platform name, and application name fields.
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
declare class RegisterDeviceRequestValidator implements Validator<RegisterDeviceRequestInput> {
|
|
19
19
|
validate(data: RegisterDeviceRequestInput, errors: ErrorsCollector): void;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
@@ -40,7 +40,7 @@ export type DeregisterDeviceRequestInput = {
|
|
|
40
40
|
* Validator for DeregisterDeviceRequestInput.
|
|
41
41
|
* Validates the device token field.
|
|
42
42
|
*/
|
|
43
|
-
|
|
43
|
+
declare class DeregisterDeviceRequestValidator implements Validator<DeregisterDeviceRequestInput> {
|
|
44
44
|
validate(data: DeregisterDeviceRequestInput, errors: ErrorsCollector): void;
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
@@ -52,3 +52,4 @@ export declare class DeregisterDeviceRequestValidator implements Validator<Dereg
|
|
|
52
52
|
export declare class DeregisterDeviceRequest extends ValidationRequest<DeregisterDeviceRequestInput> {
|
|
53
53
|
protected validator: DeregisterDeviceRequestValidator;
|
|
54
54
|
}
|
|
55
|
+
export {};
|
|
@@ -9,7 +9,7 @@ const isValidDevicePlatform = (value) => {
|
|
|
9
9
|
* Validator for RegisterDeviceRequestInput.
|
|
10
10
|
* Validates device token, platform name, and application name fields.
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
class RegisterDeviceRequestValidator {
|
|
13
13
|
validate(data, errors) {
|
|
14
14
|
if (isBlank(data.deviceToken)) {
|
|
15
15
|
errors.add(INVALID_DEVICE_TOKEN_ERROR);
|
|
@@ -38,7 +38,7 @@ export class RegisterDeviceRequest extends ValidationRequest {
|
|
|
38
38
|
* Validator for DeregisterDeviceRequestInput.
|
|
39
39
|
* Validates the device token field.
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
class DeregisterDeviceRequestValidator {
|
|
42
42
|
validate(data, errors) {
|
|
43
43
|
if (isBlank(data.deviceToken)) {
|
|
44
44
|
errors.add(INVALID_DEVICE_TOKEN_ERROR);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export type { SearchManager } from "./search-manager.js";
|
|
2
2
|
export { SubmitProviderForReviewRequestInput, SubmitProviderForReviewRequest, } from "./submit-provider-for-review-request.js";
|
|
3
|
-
export { SearchHealthResourcesRequest, SearchHealthResourcesRequestInput, } from "./search-health-resources-request.js";
|
|
3
|
+
export { SearchHealthResourcesRequest, SearchHealthResourcesRequestInput, SearchPosition, OrderBy, } from "./search-health-resources-request.js";
|
|
@@ -3,6 +3,9 @@ import { SortField, SortOrder } from "../../../models/enums/index.js";
|
|
|
3
3
|
import { PagedRequest, PagedRequestInput, PagedRequestValidator } from "../../../requests/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* The provider location to search by
|
|
6
|
+
* @category Inputs
|
|
7
|
+
* @title SearchPosition
|
|
8
|
+
* @excerpt Position coordinates for location-based searches
|
|
6
9
|
*/
|
|
7
10
|
export type SearchPosition = {
|
|
8
11
|
/**
|
|
@@ -20,6 +23,9 @@ export type SearchPosition = {
|
|
|
20
23
|
};
|
|
21
24
|
/**
|
|
22
25
|
* Type representing a provider search result sorting
|
|
26
|
+
* @category Inputs
|
|
27
|
+
* @title OrderBy
|
|
28
|
+
* @excerpt Sorting configuration for search results
|
|
23
29
|
*/
|
|
24
30
|
export type OrderBy = {
|
|
25
31
|
/**
|
|
@@ -34,6 +40,9 @@ export type OrderBy = {
|
|
|
34
40
|
/**
|
|
35
41
|
* Represents the parameters for a search request.
|
|
36
42
|
* @experimental
|
|
43
|
+
* @category Inputs
|
|
44
|
+
* @title SearchHealthResourcesRequestInput
|
|
45
|
+
* @excerpt Input parameters for searching health resources
|
|
37
46
|
*/
|
|
38
47
|
export type SearchHealthResourcesRequestInput = PagedRequestInput & {
|
|
39
48
|
/**
|
|
@@ -65,6 +74,9 @@ export type SearchHealthResourcesRequestInput = PagedRequestInput & {
|
|
|
65
74
|
/**
|
|
66
75
|
* Request for searching health resources.
|
|
67
76
|
* @experimental
|
|
77
|
+
* @category Requests
|
|
78
|
+
* @title SearchHealthResourcesRequest
|
|
79
|
+
* @excerpt Request class for searching health resources
|
|
68
80
|
*/
|
|
69
81
|
export declare class SearchHealthResourcesRequest extends PagedRequest<SearchHealthResourcesRequestInput> {
|
|
70
82
|
protected validator: PagedRequestValidator<SearchHealthResourcesRequestInput>;
|
|
@@ -2,6 +2,9 @@ import { PagedRequest, PagedRequestValidator, } from "../../../requests/index.js
|
|
|
2
2
|
/**
|
|
3
3
|
* Request for searching health resources.
|
|
4
4
|
* @experimental
|
|
5
|
+
* @category Requests
|
|
6
|
+
* @title SearchHealthResourcesRequest
|
|
7
|
+
* @excerpt Request class for searching health resources
|
|
5
8
|
*/
|
|
6
9
|
export class SearchHealthResourcesRequest extends PagedRequest {
|
|
7
10
|
constructor() {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { BaseRequest } from "../../../requests/index.js";
|
|
2
2
|
/**
|
|
3
3
|
* Parameters for submitting a provider or facility request
|
|
4
|
+
* @category Inputs
|
|
5
|
+
* @title SubmitProviderForReviewRequestInput
|
|
6
|
+
* @excerpt Input parameters for submitting a provider or facility for review
|
|
4
7
|
*/
|
|
5
8
|
export type SubmitProviderForReviewRequestInput = {
|
|
6
9
|
/**
|
|
@@ -20,5 +23,11 @@ export type SubmitProviderForReviewRequestInput = {
|
|
|
20
23
|
*/
|
|
21
24
|
city?: string;
|
|
22
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* Request class for submitting a provider or facility for review.
|
|
28
|
+
* @category Requests
|
|
29
|
+
* @title SubmitProviderForReviewRequest
|
|
30
|
+
* @excerpt Request for submitting a provider or facility for review
|
|
31
|
+
*/
|
|
23
32
|
export declare class SubmitProviderForReviewRequest extends BaseRequest<SubmitProviderForReviewRequestInput> {
|
|
24
33
|
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import { BaseRequest } from "../../../requests/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Request class for submitting a provider or facility for review.
|
|
4
|
+
* @category Requests
|
|
5
|
+
* @title SubmitProviderForReviewRequest
|
|
6
|
+
* @excerpt Request for submitting a provider or facility for review
|
|
7
|
+
*/
|
|
2
8
|
export class SubmitProviderForReviewRequest extends BaseRequest {
|
|
3
9
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { ErrorsCollector, ValidationRequest, Validator } from "../../../requests/index.js";
|
|
2
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
|
|
3
7
|
*/
|
|
4
8
|
export type CreateDataExportDirectDownloadUrlRequestInput = {
|
|
5
9
|
exportId: string;
|
|
@@ -18,6 +18,8 @@ export interface UserManager {
|
|
|
18
18
|
/**
|
|
19
19
|
* Retrieves the current user's profile information.
|
|
20
20
|
* Gets demographic data for the authenticated user.
|
|
21
|
+
*
|
|
22
|
+
* @returns {Promise<BWellQueryResult<Person, BaseManagerError>>} - The user's profile information
|
|
21
23
|
* @example
|
|
22
24
|
* ```typescript
|
|
23
25
|
* const profile = await sdk.user.getProfile();
|
|
@@ -27,6 +29,8 @@ export interface UserManager {
|
|
|
27
29
|
/**
|
|
28
30
|
* Deletes the current user's account and all associated data.
|
|
29
31
|
* Permanently removes the user from the system.
|
|
32
|
+
*
|
|
33
|
+
* @returns {Promise<BWellTransactionResult<null, BaseManagerError>>} - The result of the deletion operation
|
|
30
34
|
* @example
|
|
31
35
|
* ```typescript
|
|
32
36
|
* await sdk.user.delete();
|
|
@@ -36,6 +40,9 @@ export interface UserManager {
|
|
|
36
40
|
/**
|
|
37
41
|
* Updates the user's profile information.
|
|
38
42
|
* Modifies demographic data for the authenticated user.
|
|
43
|
+
*
|
|
44
|
+
* @param {UpdateProfileRequest} request - Object containing the profile fields to update
|
|
45
|
+
* @returns {Promise<BWellTransactionResult<Person, BaseManagerError>>} - The updated user profile
|
|
39
46
|
* @example
|
|
40
47
|
* ```typescript
|
|
41
48
|
* await sdk.user.updateProfile({ firstName: 'John', lastName: 'Doe' });
|
|
@@ -44,13 +51,21 @@ export interface UserManager {
|
|
|
44
51
|
updateProfile(request: UpdateProfileRequest): Promise<BWellTransactionResult<Person, BaseManagerError>>;
|
|
45
52
|
/**
|
|
46
53
|
* Retrieves a list of consents for the current user, optionally filtered by category.
|
|
47
|
-
*
|
|
48
|
-
* @
|
|
54
|
+
*
|
|
55
|
+
* @param {GetConsentsRequest} [request] - Optional request object to filter consents by category
|
|
56
|
+
* @returns {Promise<BWellQueryResult<ConsentBundle, BaseManagerError>>} - A promise that resolves to a query result containing a bundle of consents
|
|
57
|
+
* @example
|
|
58
|
+
* ```typescript
|
|
59
|
+
* const consents = await sdk.user.getConsents({ category: 'research' });
|
|
60
|
+
* ```
|
|
49
61
|
*/
|
|
50
62
|
getConsents(request?: GetConsentsRequest): Promise<BWellQueryResult<ConsentBundle, BaseManagerError>>;
|
|
51
63
|
/**
|
|
52
64
|
* Creates a new user consent.
|
|
53
65
|
* Stores consent preferences for the authenticated user.
|
|
66
|
+
*
|
|
67
|
+
* @param {CreateConsentRequest} request - Object containing the consent details to create
|
|
68
|
+
* @returns {Promise<BWellTransactionResult<Consent, BaseManagerError | ValidationError>>} - The created consent object
|
|
54
69
|
* @example
|
|
55
70
|
* ```typescript
|
|
56
71
|
* await sdk.user.createConsent({ category: 'research', permitted: true });
|
|
@@ -60,6 +75,9 @@ export interface UserManager {
|
|
|
60
75
|
/**
|
|
61
76
|
* Creates a verification URL for identity verification.
|
|
62
77
|
* Generates a URL for IAL2 verification flow.
|
|
78
|
+
*
|
|
79
|
+
* @param {CreateVerificationUrlRequest} request - Object containing verification URL configuration including callback URL
|
|
80
|
+
* @returns {Promise<BWellTransactionResult<string, BaseManagerError>>} - The generated verification URL
|
|
63
81
|
* @example
|
|
64
82
|
* ```typescript
|
|
65
83
|
* const verificationUrl = await sdk.user.createVerificationUrl({
|
|
@@ -71,6 +89,8 @@ export interface UserManager {
|
|
|
71
89
|
/**
|
|
72
90
|
* Retrieves the user's identity verification status.
|
|
73
91
|
* Gets the current state of IAL2 verification.
|
|
92
|
+
*
|
|
93
|
+
* @returns {Promise<BWellTransactionResult<VerificationResult, BaseManagerError>>} - The user's current verification status
|
|
74
94
|
* @example
|
|
75
95
|
* ```typescript
|
|
76
96
|
* const status = await sdk.user.getVerificationStatus();
|
|
@@ -81,6 +101,9 @@ export interface UserManager {
|
|
|
81
101
|
* Generates a URL to download exported user data.
|
|
82
102
|
* 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)).
|
|
83
103
|
* Please reach out to bwell customer support for further details.
|
|
104
|
+
*
|
|
105
|
+
* @param {CreateDataExportDirectDownloadUrlRequest} request - Object containing export ID and password for data export access
|
|
106
|
+
* @returns {Promise<BWellTransactionResult<string | null, BaseManagerError>>} - The generated download URL or null if not available
|
|
84
107
|
* @example
|
|
85
108
|
* ```typescript
|
|
86
109
|
* const downloadUrl = await sdk.user.createDataExportDirectDownloadUrl({
|
|
@@ -17,6 +17,7 @@ import { BWellTransactionResult } from "../results/index.js";
|
|
|
17
17
|
* - User management (profiles, consent, identity verification)
|
|
18
18
|
* - Appointment management (scheduling, viewing, canceling)
|
|
19
19
|
* - Connection management (external healthcare providers)
|
|
20
|
+
* - Device management (push notifications, device registration)
|
|
20
21
|
* - Search operations (healthcare provider and resource discovery)
|
|
21
22
|
* - Questionnaire processing (dynamic forms and responses)
|
|
22
23
|
*
|
|
@@ -38,6 +39,7 @@ import { BWellTransactionResult } from "../results/index.js";
|
|
|
38
39
|
* @see {@link UserManager} for user management operations
|
|
39
40
|
* @see {@link HealthSpaceManager} for appointment management
|
|
40
41
|
* @see {@link ConnectionManager} for provider connections
|
|
42
|
+
* @see {@link DeviceManager} for device management operations
|
|
41
43
|
* @see {@link SearchManager} for search operations
|
|
42
44
|
* @see {@link QuestionnaireManager} for questionnaire processing
|
|
43
45
|
*
|
|
@@ -38,6 +38,7 @@ import { isNotNullOrUndefined, parseUserFromIdToken } from "../utils/index.js";
|
|
|
38
38
|
* - User management (profiles, consent, identity verification)
|
|
39
39
|
* - Appointment management (scheduling, viewing, canceling)
|
|
40
40
|
* - Connection management (external healthcare providers)
|
|
41
|
+
* - Device management (push notifications, device registration)
|
|
41
42
|
* - Search operations (healthcare provider and resource discovery)
|
|
42
43
|
* - Questionnaire processing (dynamic forms and responses)
|
|
43
44
|
*
|
|
@@ -59,6 +60,7 @@ import { isNotNullOrUndefined, parseUserFromIdToken } from "../utils/index.js";
|
|
|
59
60
|
* @see {@link UserManager} for user management operations
|
|
60
61
|
* @see {@link HealthSpaceManager} for appointment management
|
|
61
62
|
* @see {@link ConnectionManager} for provider connections
|
|
63
|
+
* @see {@link DeviceManager} for device management operations
|
|
62
64
|
* @see {@link SearchManager} for search operations
|
|
63
65
|
* @see {@link QuestionnaireManager} for questionnaire processing
|
|
64
66
|
*
|
package/dist/graphql/schema.d.ts
CHANGED
|
@@ -1059,14 +1059,6 @@ export type Address = {
|
|
|
1059
1059
|
/** The purpose of this address. */
|
|
1060
1060
|
use?: Maybe<Scalars['Code']['output']>;
|
|
1061
1061
|
};
|
|
1062
|
-
export type AddressG = {
|
|
1063
|
-
__typename?: 'AddressG';
|
|
1064
|
-
country: Scalars['String']['output'];
|
|
1065
|
-
locality: Scalars['String']['output'];
|
|
1066
|
-
postal_code: Scalars['String']['output'];
|
|
1067
|
-
region: Scalars['String']['output'];
|
|
1068
|
-
street_address: Scalars['String']['output'];
|
|
1069
|
-
};
|
|
1070
1062
|
export type AddressInput = {
|
|
1071
1063
|
city?: InputMaybe<Scalars['String']['input']>;
|
|
1072
1064
|
country?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -29174,8 +29166,8 @@ export type ExplanationOfBenefitTotal = {
|
|
|
29174
29166
|
};
|
|
29175
29167
|
/**
|
|
29176
29168
|
* Expression
|
|
29177
|
-
* A expression that is evaluated in a specified context and returns a value.
|
|
29178
|
-
* context of use of the expression must specify the context in which the
|
|
29169
|
+
* A expression that is evaluated in a specified context and returns a value.
|
|
29170
|
+
* The context of use of the expression must specify the context in which the
|
|
29179
29171
|
* expression is evaluated, and how the result of the expression is used.
|
|
29180
29172
|
* If the element is present, it must have a value for at least one of the
|
|
29181
29173
|
* defined elements, an @id referenced from the Narrative, or extensions
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Device registration result.
|
|
3
|
+
* Returned when a device is successfully registered in the system.
|
|
4
|
+
*
|
|
5
|
+
* @category Models
|
|
6
|
+
* @title DeviceRegistrationResults
|
|
7
|
+
* @excerpt Device registration result with unique identifier
|
|
8
|
+
*/
|
|
9
|
+
export type DeviceRegistrationResults = {
|
|
10
|
+
/** Unique device identifier assigned during registration */
|
|
11
|
+
id: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -6,6 +6,14 @@ import { Score } from "../common/score.js";
|
|
|
6
6
|
import { FilterField } from "../enums/filter-field.js";
|
|
7
7
|
import { Gender } from "../enums/gender.js";
|
|
8
8
|
import { SearchResultType } from "../enums/search-result-type.js";
|
|
9
|
+
/**
|
|
10
|
+
* Health resource location with distance information.
|
|
11
|
+
* Extends the base Location type with additional distance data for search results.
|
|
12
|
+
*
|
|
13
|
+
* @category Models
|
|
14
|
+
* @title HealthResourceLocation
|
|
15
|
+
* @excerpt Location with distance information for health resource searches
|
|
16
|
+
*/
|
|
9
17
|
export type HealthResourceLocation = Location & {
|
|
10
18
|
/** Distance in miles from the search location */
|
|
11
19
|
distanceInMiles: number | null;
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { OperationOutcomeIssue } from "../common/operation-outcome.js";
|
|
2
|
+
/**
|
|
3
|
+
* Provider review operation result.
|
|
4
|
+
* Contains the outcome of a provider review operation with any issues encountered.
|
|
5
|
+
*
|
|
6
|
+
* @category Models
|
|
7
|
+
* @title ProviderReviewResult
|
|
8
|
+
* @excerpt Provider review operation result with resource type and issues
|
|
9
|
+
*/
|
|
2
10
|
export type ProviderReviewResult = {
|
|
11
|
+
/** The type of resource being returned */
|
|
3
12
|
resourceType: string | null;
|
|
13
|
+
/** Any issues encountered during the provider review operation */
|
|
4
14
|
issue: OperationOutcomeIssue[] | null;
|
|
5
15
|
};
|