@icanbwell/bwell-sdk-ts 0.5.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * This file is automatically generated. Please do not edit this file directly.
3
3
  */
4
- export declare const VERSION = "0.5.0";
4
+ export declare const VERSION = "1.0.0";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * This file is automatically generated. Please do not edit this file directly.
3
3
  */
4
- export const VERSION = "0.5.0";
4
+ export const VERSION = "1.0.0";
@@ -12,6 +12,10 @@ export type UsernamePasswordAuthenticateRequest = {
12
12
  email: string;
13
13
  password: string;
14
14
  };
15
+ export type AuthCodeAuthenticateRequest = {
16
+ clientKey: string;
17
+ authCode: string;
18
+ };
15
19
  export type RefreshTokensRequest = {
16
20
  refreshToken: string;
17
21
  clientKey: string;
@@ -28,5 +32,6 @@ export interface IdentityManager {
28
32
  initialize(clientKey: string): Promise<BWellTransactionResult<SdkConfigurationResult, BaseManagerError>>;
29
33
  authenticateWithOauth(authenticateRequest: OauthAuthenticateRequest): Promise<BWellTransactionResult<AuthTokens, BaseManagerError>>;
30
34
  authenticateWithUsernamePassword(authenticateRequest: UsernamePasswordAuthenticateRequest): Promise<BWellTransactionResult<AuthTokens, BaseManagerError>>;
35
+ authenticateWithAuthCode(authenticateRequest: AuthCodeAuthenticateRequest): Promise<BWellTransactionResult<AuthTokens, BaseManagerError>>;
31
36
  refreshAccessToken(refreshTokensRequest: RefreshTokensRequest): Promise<BWellTransactionResult<RefreshTokenResults, BaseManagerError>>;
32
37
  }
@@ -0,0 +1,14 @@
1
+ import { ErrorsCollector, ValidationRequest, Validator } from "../../../requests/index.js";
2
+ export type CreateDataExportDirectDownloadUrlRequestInput = {
3
+ exportId: string;
4
+ password: string;
5
+ };
6
+ export declare class CreateDataExportDirectDownloadUrlRequestValidator implements Validator<CreateDataExportDirectDownloadUrlRequestInput> {
7
+ validate(data: CreateDataExportDirectDownloadUrlRequestInput, errors: ErrorsCollector): void;
8
+ }
9
+ /**
10
+ * Request object for creating a direct download URL for a data export.
11
+ */
12
+ export declare class CreateDataExportDirectDownloadUrlRequest extends ValidationRequest<CreateDataExportDirectDownloadUrlRequestInput> {
13
+ protected validator: Validator<CreateDataExportDirectDownloadUrlRequestInput>;
14
+ }
@@ -0,0 +1,21 @@
1
+ import { ValidationRequest, } from "../../../requests/index.js";
2
+ import { isNullOrUndefinedOrEmptyString } from "../../../utils/type-utils.js";
3
+ export class CreateDataExportDirectDownloadUrlRequestValidator {
4
+ validate(data, errors) {
5
+ if (isNullOrUndefinedOrEmptyString(data.exportId)) {
6
+ errors.add("exportId is required");
7
+ }
8
+ if (isNullOrUndefinedOrEmptyString(data.password)) {
9
+ errors.add("password is required");
10
+ }
11
+ }
12
+ }
13
+ /**
14
+ * Request object for creating a direct download URL for a data export.
15
+ */
16
+ export class CreateDataExportDirectDownloadUrlRequest extends ValidationRequest {
17
+ constructor() {
18
+ super(...arguments);
19
+ this.validator = new CreateDataExportDirectDownloadUrlRequestValidator();
20
+ }
21
+ }
@@ -3,3 +3,4 @@ export { GetConsentsRequestInput, GetConsentsRequest, } from "./get-consents-req
3
3
  export { CreateConsentRequest, CreateConsentRequestInput, } from "./create-consent-request.js";
4
4
  export type { CategoryCode, ConsentProvisionType, ConsentStatus, PersonGender, } from "./types.js";
5
5
  export { ProfileResults, DeleteUserResults, UpdateProfileResults, GetConsentsResults, CreateConsentResults, UserManager, } from "./user-manager.js";
6
+ export { CreateDataExportDirectDownloadUrlRequest, CreateDataExportDirectDownloadUrlRequestInput, } from "./create-data-export-direct-download-url-request.js";
@@ -1,3 +1,4 @@
1
1
  export { UpdateProfileRequest, } from "./update-profile-request.js";
2
2
  export { GetConsentsRequest, } from "./get-consents-request.js";
3
3
  export { CreateConsentRequest, } from "./create-consent-request.js";
4
+ export { CreateDataExportDirectDownloadUrlRequest, } from "./create-data-export-direct-download-url-request.js";
@@ -1,8 +1,9 @@
1
1
  import { ValidationError } from "../../../errors/validation-error.js";
2
- import { CreateConsentMutationResults, DeleteMutationResults, GetProfileQueryResults, SearchConsentQueryResults, UpdateUserProfileMutationResults } from "../../../graphql/operations/types.js";
2
+ import { CreateConsentMutationResults, CreateDataExportDirectDownloadUrlMutationResults, DeleteMutationResults, GetProfileQueryResults, SearchConsentQueryResults, UpdateUserProfileMutationResults } 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 { GetConsentsRequest } from "./get-consents-request.js";
7
8
  import { UpdateProfileRequest } from "./update-profile-request.js";
8
9
  export type ProfileResults = GetProfileQueryResults["userProfile"];
@@ -12,6 +13,7 @@ export interface DeleteUserResults extends DeleteUserResultsType {
12
13
  export type UpdateProfileResults = UpdateUserProfileMutationResults["updateUserProfile"];
13
14
  export type GetConsentsResults = SearchConsentQueryResults["search"];
14
15
  export type CreateConsentResults = CreateConsentMutationResults["createConsent"];
16
+ export type CreateDataExportDirectDownloadUrlResults = CreateDataExportDirectDownloadUrlMutationResults["createDataExportDirectDownloadUrl"];
15
17
  /**
16
18
  * The UserManager interface provides methods for managing user data, including FHIR Consent (https://build.fhir.org/consent.html)
17
19
  */
@@ -48,4 +50,11 @@ export interface UserManager {
48
50
  * @returns {Promise<BWellTransactionResult<CreateConsentResults, BaseManagerError>>} Newly created user consent
49
51
  */
50
52
  createConsent(request: CreateConsentRequest): Promise<BWellTransactionResult<CreateConsentResults, BaseManagerError | ValidationError>>;
53
+ /**
54
+ * Creates a direct download URL for a user's data export.
55
+ *
56
+ * @param {CreateDataExportDirectDownloadUrlRequest} request - Request object containing the data export ID and password
57
+ * @returns {Promise<BWellTransactionResult<CreateDataExportDirectDownloadUrlResults, BaseManagerError>>} A promise resolving to an object representing the direct download URL for the user's data export.
58
+ */
59
+ createDataExportDirectDownloadUrl(request: CreateDataExportDirectDownloadUrlRequest): Promise<BWellTransactionResult<CreateDataExportDirectDownloadUrlResults, BaseManagerError>>;
51
60
  }
@@ -82,8 +82,8 @@ export function getBwellErrorFromGraphQLResponse(errors = []) {
82
82
  }
83
83
  function getFhirErrorFromGraphQLError(error) {
84
84
  const extension = error.extensions;
85
- const code = extension["code"];
86
- const resource = extension["resource"];
85
+ const code = extension === null || extension === void 0 ? void 0 : extension.code;
86
+ const resource = extension === null || extension === void 0 ? void 0 : extension.resource;
87
87
  if (code === undefined || resource === undefined) {
88
88
  return null;
89
89
  }
@@ -1,7 +1,7 @@
1
1
  import { type LoggerProvider } from "../../../logger/index.js";
2
2
  import { BWellTransactionResult } from "../../../results/index.js";
3
3
  import { BaseManagerError } from "../../base/errors.js";
4
- import { IdentityManager, UsernamePasswordAuthenticateRequest, type AuthTokens, type OauthAuthenticateRequest, type RefreshTokenResults, type RefreshTokensRequest, type SdkConfigurationResult } from "../../base/identity/index.js";
4
+ import { AuthCodeAuthenticateRequest, IdentityManager, UsernamePasswordAuthenticateRequest, type AuthTokens, type OauthAuthenticateRequest, type RefreshTokenResults, type RefreshTokensRequest, type SdkConfigurationResult } from "../../base/identity/index.js";
5
5
  import { GraphQLManager } from "../graphql-manager/index.js";
6
6
  import type { GraphQLSdk } from "../graphql-sdk/index.js";
7
7
  export declare class GraphQLIdentityManager extends GraphQLManager implements IdentityManager {
@@ -10,5 +10,6 @@ export declare class GraphQLIdentityManager extends GraphQLManager implements Id
10
10
  initialize(clientKey: string): Promise<BWellTransactionResult<SdkConfigurationResult, BaseManagerError>>;
11
11
  authenticateWithOauth(authenticateRequest: OauthAuthenticateRequest): Promise<BWellTransactionResult<AuthTokens, BaseManagerError>>;
12
12
  authenticateWithUsernamePassword(authenticateRequest: UsernamePasswordAuthenticateRequest): Promise<BWellTransactionResult<AuthTokens, BaseManagerError>>;
13
+ authenticateWithAuthCode(authenticateRequest: AuthCodeAuthenticateRequest): Promise<BWellTransactionResult<AuthTokens, BaseManagerError>>;
13
14
  refreshAccessToken(refreshTokensRequest: RefreshTokensRequest): Promise<BWellTransactionResult<RefreshTokenResults, BaseManagerError>>;
14
15
  }
@@ -91,6 +91,27 @@ export class GraphQLIdentityManager extends GraphQLManager {
91
91
  return BWellTransactionResult.success(authenticateResults);
92
92
  });
93
93
  }
94
+ authenticateWithAuthCode(authenticateRequest) {
95
+ return __awaiter(this, void 0, void 0, function* () {
96
+ __classPrivateFieldGet(this, _GraphQLIdentityManager_logger, "f").verbose("executing authenticateWithAuthCode query...");
97
+ const authResponse = yield this.handleTransaction(__classPrivateFieldGet(this, _GraphQLIdentityManager_sdk, "f").ExchangeAuthCode({
98
+ authCode: authenticateRequest.authCode,
99
+ }));
100
+ __classPrivateFieldGet(this, _GraphQLIdentityManager_logger, "f").verbose("authenticateWithAuthCode query complete", authResponse);
101
+ if (authResponse.failure()) {
102
+ __classPrivateFieldGet(this, _GraphQLIdentityManager_logger, "f").error("authenticateWithAuthCode failed", authResponse);
103
+ return authResponse.intoFailure();
104
+ }
105
+ __classPrivateFieldGet(this, _GraphQLIdentityManager_logger, "f").info("authenticateWithAuthCode successful");
106
+ const data = authResponse.data();
107
+ const authenticateResults = {
108
+ accessToken: data.exchangeAuthCode.accessToken.jwtToken,
109
+ idToken: data.exchangeAuthCode.idToken.jwtToken,
110
+ refreshToken: data.exchangeAuthCode.refreshToken.token,
111
+ };
112
+ return BWellTransactionResult.success(authenticateResults);
113
+ });
114
+ }
94
115
  refreshAccessToken(refreshTokensRequest) {
95
116
  return __awaiter(this, void 0, void 0, function* () {
96
117
  __classPrivateFieldGet(this, _GraphQLIdentityManager_logger, "f").verbose("executing refreshAccessToken query...");
@@ -0,0 +1,6 @@
1
+ import { CreateDataExportDirectDownloadUrlMutationVariables } from "../../../graphql/operations/types.js";
2
+ import { RequestFactory } from "../../../requests/index.js";
3
+ import { CreateDataExportDirectDownloadUrlRequest } from "../../base/user/create-data-export-direct-download-url-request.js";
4
+ export declare class CreateDataExportDirectDownloadUrlRequestFactory implements RequestFactory<CreateDataExportDirectDownloadUrlRequest, CreateDataExportDirectDownloadUrlMutationVariables> {
5
+ create(request: CreateDataExportDirectDownloadUrlRequest): CreateDataExportDirectDownloadUrlMutationVariables;
6
+ }
@@ -0,0 +1,9 @@
1
+ export class CreateDataExportDirectDownloadUrlRequestFactory {
2
+ create(request) {
3
+ const input = request.data();
4
+ return {
5
+ exportId: input.exportId,
6
+ password: input.password,
7
+ };
8
+ }
9
+ }
@@ -3,8 +3,9 @@ import { LoggerProvider } from "../../../logger/index.js";
3
3
  import { BWellQueryResult, BWellTransactionResult } from "../../../results/index.js";
4
4
  import { BaseManagerError } from "../../base/errors.js";
5
5
  import { CreateConsentResults, GetConsentsResults, ProfileResults, UpdateProfileResults } from "../../base/index.js";
6
+ import { CreateDataExportDirectDownloadUrlRequest } from "../../base/user/create-data-export-direct-download-url-request.js";
6
7
  import { CreateConsentRequest, GetConsentsRequest, UpdateProfileRequest } from "../../base/user/index.js";
7
- import type { UserManager } from "../../base/user/user-manager.js";
8
+ import type { CreateDataExportDirectDownloadUrlResults, UserManager } from "../../base/user/user-manager.js";
8
9
  import { GraphQLManager } from "../graphql-manager/index.js";
9
10
  import type { GraphQLSdk } from "../graphql-sdk/index.js";
10
11
  export declare class GraphQLUserManager extends GraphQLManager implements UserManager {
@@ -15,4 +16,5 @@ export declare class GraphQLUserManager extends GraphQLManager implements UserMa
15
16
  updateProfile(request: UpdateProfileRequest): Promise<BWellTransactionResult<UpdateProfileResults, BaseManagerError>>;
16
17
  getConsents(request?: GetConsentsRequest): Promise<BWellQueryResult<GetConsentsResults, BaseManagerError | ValidationError>>;
17
18
  createConsent(request: CreateConsentRequest): Promise<BWellTransactionResult<CreateConsentResults, BaseManagerError | ValidationError>>;
19
+ createDataExportDirectDownloadUrl(request: CreateDataExportDirectDownloadUrlRequest): Promise<BWellTransactionResult<CreateDataExportDirectDownloadUrlResults, BaseManagerError>>;
18
20
  }
@@ -18,11 +18,12 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
18
18
  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");
19
19
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
20
20
  };
21
- var _GraphQLUserManager_sdk, _GraphQLUserManager_logger, _GraphQLUserManager_createConsentRequestFactory, _GraphQLUserManager_updateProfileRequestFactory, _GraphQLUserManager_getConsentRequestFactory;
21
+ var _GraphQLUserManager_sdk, _GraphQLUserManager_logger, _GraphQLUserManager_createConsentRequestFactory, _GraphQLUserManager_updateProfileRequestFactory, _GraphQLUserManager_getConsentRequestFactory, _GraphQLUserManager_createDataExportDirectDownloadUrlRequestFactory;
22
22
  import { ConsoleLoggerProvider, } from "../../../logger/index.js";
23
23
  import { BWellQueryResult, BWellTransactionResult, } from "../../../results/index.js";
24
24
  import { GraphQLManager } from "../graphql-manager/index.js";
25
25
  import { CreateConsentRequestFactory } from "./create-consent-request-factory.js";
26
+ import { CreateDataExportDirectDownloadUrlRequestFactory } from "./create-data-export-direct-download-url-request-factory.js";
26
27
  import { GetConsentRequestFactory } from "./get-consent-request-factory.js";
27
28
  import { UpdateProfileRequestFactory } from "./update-profile-request-factory.js";
28
29
  export class GraphQLUserManager extends GraphQLManager {
@@ -33,6 +34,7 @@ export class GraphQLUserManager extends GraphQLManager {
33
34
  _GraphQLUserManager_createConsentRequestFactory.set(this, new CreateConsentRequestFactory());
34
35
  _GraphQLUserManager_updateProfileRequestFactory.set(this, new UpdateProfileRequestFactory());
35
36
  _GraphQLUserManager_getConsentRequestFactory.set(this, new GetConsentRequestFactory());
37
+ _GraphQLUserManager_createDataExportDirectDownloadUrlRequestFactory.set(this, new CreateDataExportDirectDownloadUrlRequestFactory());
36
38
  __classPrivateFieldSet(this, _GraphQLUserManager_sdk, sdk, "f");
37
39
  __classPrivateFieldSet(this, _GraphQLUserManager_logger, loggerProvider.getLogger("GraphQLUserManager"), "f");
38
40
  }
@@ -117,5 +119,22 @@ export class GraphQLUserManager extends GraphQLManager {
117
119
  return BWellTransactionResult.success(result.data().createConsent);
118
120
  });
119
121
  }
122
+ createDataExportDirectDownloadUrl(request) {
123
+ return __awaiter(this, void 0, void 0, function* () {
124
+ const validationResult = request.validate();
125
+ if (validationResult.failure()) {
126
+ return validationResult;
127
+ }
128
+ __classPrivateFieldGet(this, _GraphQLUserManager_logger, "f").verbose("calling createDataExportDirectDownloadUrl mutation...");
129
+ const result = yield this.handleTransaction(__classPrivateFieldGet(this, _GraphQLUserManager_sdk, "f").CreateDataExportDirectDownloadUrl(__classPrivateFieldGet(this, _GraphQLUserManager_createDataExportDirectDownloadUrlRequestFactory, "f").create(request)));
130
+ __classPrivateFieldGet(this, _GraphQLUserManager_logger, "f").verbose("createDataExportDirectDownloadUrl mutation complete");
131
+ if (result.failure()) {
132
+ __classPrivateFieldGet(this, _GraphQLUserManager_logger, "f").error("createDataExportDirectDownloadUrl mutation error", result);
133
+ return result.intoFailure();
134
+ }
135
+ __classPrivateFieldGet(this, _GraphQLUserManager_logger, "f").info("createDataExportDirectDownloadUrl mutation success");
136
+ return BWellTransactionResult.success(result.data().createDataExportDirectDownloadUrl);
137
+ });
138
+ }
120
139
  }
121
- _GraphQLUserManager_sdk = new WeakMap(), _GraphQLUserManager_logger = new WeakMap(), _GraphQLUserManager_createConsentRequestFactory = new WeakMap(), _GraphQLUserManager_updateProfileRequestFactory = new WeakMap(), _GraphQLUserManager_getConsentRequestFactory = new WeakMap();
140
+ _GraphQLUserManager_sdk = new WeakMap(), _GraphQLUserManager_logger = new WeakMap(), _GraphQLUserManager_createConsentRequestFactory = new WeakMap(), _GraphQLUserManager_updateProfileRequestFactory = new WeakMap(), _GraphQLUserManager_getConsentRequestFactory = new WeakMap(), _GraphQLUserManager_createDataExportDirectDownloadUrlRequestFactory = new WeakMap();
@@ -0,0 +1,11 @@
1
+ import { AuthTokens, IdentityManager } from "../api/base/identity/index.js";
2
+ import { SdkConfig } from "../config/index.js";
3
+ import { LoggerProvider } from "../logger/index.js";
4
+ import { BWellTransactionResult } from "../results/index.js";
5
+ import { AuthenticateErrors, AuthStrategy } from "./auth-strategy.js";
6
+ import { Credentials } from "./credentials.js";
7
+ export declare class AuthCodeStrategy implements AuthStrategy {
8
+ #private;
9
+ constructor(sdkConfig: SdkConfig, identityManager: IdentityManager, loggerProvider?: LoggerProvider);
10
+ authenticate(credentials: Credentials): Promise<BWellTransactionResult<AuthTokens, AuthenticateErrors>>;
11
+ }
@@ -0,0 +1,51 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11
+ if (kind === "m") throw new TypeError("Private method is not writable");
12
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
13
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
14
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
15
+ };
16
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
17
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
18
+ 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");
19
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
20
+ };
21
+ var _AuthCodeStrategy_identityManager, _AuthCodeStrategy_logger, _AuthCodeStrategy_sdkConfig;
22
+ import { InvalidCredentialsTypeError } from "../errors/index.js";
23
+ import { ConsoleLoggerProvider, } from "../logger/index.js";
24
+ import { BWellTransactionResult } from "../results/index.js";
25
+ import { isAuthCodeCredentials } from "./credentials.js";
26
+ export class AuthCodeStrategy {
27
+ constructor(sdkConfig, identityManager, loggerProvider = new ConsoleLoggerProvider()) {
28
+ _AuthCodeStrategy_identityManager.set(this, void 0);
29
+ _AuthCodeStrategy_logger.set(this, void 0);
30
+ _AuthCodeStrategy_sdkConfig.set(this, void 0);
31
+ __classPrivateFieldSet(this, _AuthCodeStrategy_identityManager, identityManager, "f");
32
+ __classPrivateFieldSet(this, _AuthCodeStrategy_sdkConfig, sdkConfig, "f");
33
+ __classPrivateFieldSet(this, _AuthCodeStrategy_logger, loggerProvider.getLogger("AuthCodeStrategy"), "f");
34
+ }
35
+ authenticate(credentials) {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ if (!isAuthCodeCredentials(credentials)) {
38
+ __classPrivateFieldGet(this, _AuthCodeStrategy_logger, "f").error("Incorrect credentials type provided to AuthCodeStrategy");
39
+ return BWellTransactionResult.failure(new InvalidCredentialsTypeError("Expected AuthCodeCredentials", credentials));
40
+ }
41
+ __classPrivateFieldGet(this, _AuthCodeStrategy_logger, "f").verbose("authenticating via AuthCode strategy...");
42
+ const authResults = yield __classPrivateFieldGet(this, _AuthCodeStrategy_identityManager, "f").authenticateWithAuthCode({
43
+ authCode: credentials.authCode,
44
+ clientKey: __classPrivateFieldGet(this, _AuthCodeStrategy_sdkConfig, "f").context.clientKey,
45
+ });
46
+ __classPrivateFieldGet(this, _AuthCodeStrategy_logger, "f").verbose("finished AuthCode authentication");
47
+ return authResults;
48
+ });
49
+ }
50
+ }
51
+ _AuthCodeStrategy_identityManager = new WeakMap(), _AuthCodeStrategy_logger = new WeakMap(), _AuthCodeStrategy_sdkConfig = new WeakMap();
@@ -1,5 +1,6 @@
1
1
  import { ConsoleLoggerProvider } from "../logger/index.js";
2
- import { isOauthCredentials, isUserPassCredentials, } from "./credentials.js";
2
+ import { AuthCodeStrategy } from "./auth-code-strategy.js";
3
+ import { isAuthCodeCredentials, isOauthCredentials, isUserPassCredentials, } from "./credentials.js";
3
4
  import { OAuthStrategy } from "./oauth-strategy.js";
4
5
  import { UsernamePasswordStrategy } from "./username-password-strategy.js";
5
6
  /**
@@ -7,15 +8,15 @@ import { UsernamePasswordStrategy } from "./username-password-strategy.js";
7
8
  */
8
9
  export class AuthStrategyFactory {
9
10
  createAuthStrategy(config, identityManager, credentials, loggerProvider = new ConsoleLoggerProvider()) {
10
- if (isUserPassCredentials(credentials) && isOauthCredentials(credentials)) {
11
- throw new Error("Invalid credentials type provided; expected UserPassCredentials or OauthCredentials, but not both.");
12
- }
13
11
  if (isUserPassCredentials(credentials)) {
14
12
  return new UsernamePasswordStrategy(config, identityManager, loggerProvider);
15
13
  }
16
14
  if (isOauthCredentials(credentials)) {
17
15
  return new OAuthStrategy(config, identityManager, loggerProvider);
18
16
  }
19
- throw new Error("Invalid credentials type provided; expected UserPassCredentials or OauthCredentials");
17
+ if (isAuthCodeCredentials(credentials)) {
18
+ return new AuthCodeStrategy(config, identityManager, loggerProvider);
19
+ }
20
+ throw new Error("Invalid credentials type provided; expected UserPassCredentials, OauthCredentials or AuthCodeCredentials.");
20
21
  }
21
22
  }
@@ -5,6 +5,10 @@ export type UserPassCredentials = {
5
5
  email: string;
6
6
  password: string;
7
7
  };
8
- export type Credentials = OAuthCredentials | UserPassCredentials;
8
+ export type AuthCodeCredentials = {
9
+ authCode: string;
10
+ };
11
+ export type Credentials = OAuthCredentials | UserPassCredentials | AuthCodeCredentials;
9
12
  export declare function isOauthCredentials(credentials: Credentials): credentials is OAuthCredentials;
10
13
  export declare function isUserPassCredentials(credentials: Credentials): credentials is UserPassCredentials;
14
+ export declare function isAuthCodeCredentials(credentials: Credentials): credentials is AuthCodeCredentials;
@@ -1,6 +1,16 @@
1
+ function hasOnlyKeys(object, keys) {
2
+ const objectKeys = Object.keys(object);
3
+ return (objectKeys.length === keys.length &&
4
+ objectKeys.every((key) => keys.includes(key)));
5
+ }
1
6
  export function isOauthCredentials(credentials) {
2
- return "token" in credentials;
7
+ return "token" in credentials && hasOnlyKeys(credentials, ["token"]);
3
8
  }
4
9
  export function isUserPassCredentials(credentials) {
5
- return "email" in credentials && "password" in credentials;
10
+ return ("email" in credentials &&
11
+ "password" in credentials &&
12
+ hasOnlyKeys(credentials, ["email", "password"]));
13
+ }
14
+ export function isAuthCodeCredentials(credentials) {
15
+ return "authCode" in credentials && hasOnlyKeys(credentials, ["authCode"]);
6
16
  }
@@ -57,7 +57,7 @@ export declare const GetAllergyIntolerancesDocument = "\n query getAllergyInt
57
57
  export declare const GetCarePlanGroupsDocument = "\n query getCarePlanGroups($request: CarePlanGroupQueryRequest) {\n getCarePlanGroups(request: $request) {\n paging_info {\n ...PagingFields\n }\n resources {\n id\n name\n references\n coding {\n ...CodingFields\n }\n source\n period {\n ...PeriodFields\n }\n sourceDisplay\n }\n }\n}\n \n fragment PagingFields on PagingResults {\n page_number\n page_size\n total_pages\n total_items\n}\n \n\n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n ";
58
58
  export declare const GetCarePlansDocument = "\n query getCarePlans($request: CarePlanRequest) {\n getCarePlans(request: $request) {\n paging_info {\n ...PagingFields\n }\n resources {\n meta {\n ...MetaFields\n }\n id\n title\n category {\n ...CodeableConceptFields\n }\n text {\n div\n status\n }\n status {\n display\n code\n }\n intent {\n display\n code\n }\n subject {\n _resourceType\n id\n }\n period {\n ...PeriodFields\n }\n created\n activity {\n ...ActivityFields\n }\n note {\n authorString\n time\n text\n }\n }\n }\n}\n \n fragment PagingFields on PagingResults {\n page_number\n page_size\n total_pages\n total_items\n}\n \n\n fragment MetaFields on Meta {\n versionId\n lastUpdated\n source\n security {\n ...CodingFields\n }\n tag {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment ActivityFields on Activity {\n detail {\n ...DetailFields\n }\n}\n \n fragment DetailFields on Detail {\n kind {\n display\n code\n }\n code {\n ...CodeableConceptFields\n }\n status {\n display\n code\n }\n scheduledPeriod {\n ...PeriodFields\n }\n scheduledString\n scheduledTiming {\n ...TimingFields\n }\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment TimingFields on Timing {\n id\n code {\n ...CodeableConceptFields\n }\n event\n repeat {\n id\n boundsDuration {\n ...QuantityFields\n }\n boundsPeriod {\n ...PeriodFields\n }\n boundsRange {\n ...RangeFields\n }\n count\n countMax\n dayOfWeek {\n code\n display\n }\n duration\n durationMax\n durationUnit {\n code\n display\n }\n frequency\n frequencyMax\n offset\n period\n periodMax\n periodUnit {\n display\n code\n }\n timeOfDay\n when {\n code\n display\n }\n }\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment RangeFields on Range {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n ";
59
59
  export declare const GetConditionGroupsDocument = "\n query getConditionGroups($request: ConditionGroupQueryRequest) {\n getConditionGroups(request: $request) {\n paging_info {\n ...PagingFields\n }\n resources {\n id\n name\n coding {\n ...CodingFields\n }\n references\n recordedDate\n source\n sourceDisplay\n }\n }\n}\n \n fragment PagingFields on PagingResults {\n page_number\n page_size\n total_pages\n total_items\n}\n \n\n fragment CodingFields on Coding {\n system\n code\n display\n}\n ";
60
- export declare const GetConditionsDocument = "\n query getConditions($request: ConditionRequest) {\n getConditions(request: $request) {\n paging_info {\n ...PagingFields\n }\n resources {\n id\n meta {\n ...MetaFields\n }\n code {\n ...CodeableConceptFields\n }\n clinicalStatus {\n ...CodeableConceptFields\n }\n onsetDateTime\n recordedDate\n recorder {\n ...RecorderFields\n }\n note {\n authorString\n time\n text\n }\n onsetPeriod {\n ...PeriodFields\n }\n abatementDateTime\n abatementPeriod {\n ...PeriodFields\n }\n subject {\n __typename\n ... on Patient {\n name {\n ...HumanNameFields\n }\n }\n }\n category {\n ...CodeableConceptFields\n }\n severity {\n ...CodeableConceptFields\n }\n verificationStatus {\n ...CodeableConceptFields\n }\n bodySite {\n ...CodeableConceptFields\n }\n asserter {\n ... on Practitioner {\n name {\n ...HumanNameFields\n }\n }\n }\n }\n }\n}\n \n fragment PagingFields on PagingResults {\n page_number\n page_size\n total_pages\n total_items\n}\n \n\n fragment MetaFields on Meta {\n versionId\n lastUpdated\n source\n security {\n ...CodingFields\n }\n tag {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment RecorderFields on Recorder {\n __typename\n ... on Patient {\n name {\n ...HumanNameFields\n }\n }\n ... on Practitioner {\n name {\n ...HumanNameFields\n }\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n ";
60
+ export declare const GetConditionsDocument = "\n query getConditions($request: ConditionRequest) {\n getConditions(request: $request) {\n paging_info {\n ...PagingFields\n }\n resources {\n id\n meta {\n ...MetaFields\n }\n code {\n ...CodeableConceptFields\n }\n clinicalStatus {\n ...CodeableConceptFields\n }\n onsetDateTime\n recordedDate\n recorder {\n ...RecorderFields\n }\n note {\n authorString\n time\n text\n }\n onsetPeriod {\n ...PeriodFields\n }\n abatementDateTime\n abatementPeriod {\n ...PeriodFields\n }\n subject {\n __typename\n ... on Patient {\n name {\n ...HumanNameFields\n }\n }\n }\n category {\n ...CodeableConceptFields\n }\n severity {\n ...CodeableConceptFields\n }\n verificationStatus {\n ...CodeableConceptFields\n }\n bodySite {\n ...CodeableConceptFields\n }\n asserter {\n ... on Practitioner {\n name {\n ...HumanNameFields\n }\n }\n }\n encounter {\n ...EncounterFields\n }\n }\n }\n}\n \n fragment PagingFields on PagingResults {\n page_number\n page_size\n total_pages\n total_items\n}\n \n\n fragment MetaFields on Meta {\n versionId\n lastUpdated\n source\n security {\n ...CodingFields\n }\n tag {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment RecorderFields on Recorder {\n __typename\n ... on Patient {\n name {\n ...HumanNameFields\n }\n }\n ... on Practitioner {\n name {\n ...HumanNameFields\n }\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment EncounterFields on EncounterResource {\n meta {\n ...MetaFields\n }\n id\n identifier {\n type {\n ...CodeableConceptFields\n }\n system\n value\n }\n type {\n ...CodeableConceptFields\n }\n status {\n display\n code\n }\n participant {\n ...ParticipantFields\n }\n period {\n start\n end\n }\n reasonCode {\n ...CodeableConceptFields\n }\n class {\n system\n code\n display\n }\n location {\n name\n }\n serviceProvider {\n name\n endpoint {\n name\n status\n connectionType {\n system\n code\n display\n }\n address\n }\n }\n subject {\n id\n name {\n ...HumanNameFields\n }\n gender\n birthDate\n communication {\n language {\n ...CodeableConceptFields\n }\n }\n }\n reasonReference {\n id\n meta {\n ...MetaFields\n }\n code {\n ...CodeableConceptFields\n }\n clinicalStatus {\n ...CodeableConceptFields\n }\n onsetDateTime\n recordedDate\n recorder {\n ...RecorderFields\n }\n note {\n authorString\n time\n text\n }\n onsetPeriod {\n ...PeriodFields\n }\n abatementDateTime\n abatementPeriod {\n ...PeriodFields\n }\n category {\n ...CodeableConceptFields\n }\n severity {\n ...CodeableConceptFields\n }\n verificationStatus {\n ...CodeableConceptFields\n }\n bodySite {\n ...CodeableConceptFields\n }\n }\n hospitalization {\n dischargeDisposition {\n ...CodeableConceptFields\n }\n }\n}\n \n fragment MetaFields on Meta {\n versionId\n lastUpdated\n source\n security {\n ...CodingFields\n }\n tag {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment ParticipantFields on Participant {\n individual {\n id\n name {\n ...HumanNameFields\n }\n }\n type {\n ...CodeableConceptFields\n }\n period {\n ...PeriodFields\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment RecorderFields on Recorder {\n __typename\n ... on Patient {\n name {\n ...HumanNameFields\n }\n }\n ... on Practitioner {\n name {\n ...HumanNameFields\n }\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n ";
61
61
  export declare const GetEncountersGroupDocument = "\n query getEncountersGroup($request: EncounterGroupQueryRequest) {\n getEncounterGroups(request: $request) {\n paging_info {\n ...PagingFields\n }\n resources {\n id\n name\n references\n class {\n ...CodingFields\n }\n type {\n ...CodingFields\n }\n participant\n coding {\n ...CodingFields\n }\n date\n source\n sourceDisplay\n }\n }\n}\n \n fragment PagingFields on PagingResults {\n page_number\n page_size\n total_pages\n total_items\n}\n \n\n fragment CodingFields on Coding {\n system\n code\n display\n}\n ";
62
62
  export declare const GetEncounterQueryDocument = "\n query getEncounterQuery($request: EncounterRequest) {\n getEncounters(request: $request) {\n paging_info {\n ...PagingFields\n }\n resources {\n ...EncounterFields\n }\n }\n}\n \n fragment PagingFields on PagingResults {\n page_number\n page_size\n total_pages\n total_items\n}\n \n\n fragment EncounterFields on EncounterResource {\n meta {\n ...MetaFields\n }\n id\n identifier {\n type {\n ...CodeableConceptFields\n }\n system\n value\n }\n type {\n ...CodeableConceptFields\n }\n status {\n display\n code\n }\n participant {\n ...ParticipantFields\n }\n period {\n start\n end\n }\n reasonCode {\n ...CodeableConceptFields\n }\n class {\n system\n code\n display\n }\n location {\n name\n }\n serviceProvider {\n name\n endpoint {\n name\n status\n connectionType {\n system\n code\n display\n }\n address\n }\n }\n subject {\n id\n name {\n ...HumanNameFields\n }\n gender\n birthDate\n communication {\n language {\n ...CodeableConceptFields\n }\n }\n }\n reasonReference {\n id\n meta {\n ...MetaFields\n }\n code {\n ...CodeableConceptFields\n }\n clinicalStatus {\n ...CodeableConceptFields\n }\n onsetDateTime\n recordedDate\n recorder {\n ...RecorderFields\n }\n note {\n authorString\n time\n text\n }\n onsetPeriod {\n ...PeriodFields\n }\n abatementDateTime\n abatementPeriod {\n ...PeriodFields\n }\n category {\n ...CodeableConceptFields\n }\n severity {\n ...CodeableConceptFields\n }\n verificationStatus {\n ...CodeableConceptFields\n }\n bodySite {\n ...CodeableConceptFields\n }\n }\n hospitalization {\n dischargeDisposition {\n ...CodeableConceptFields\n }\n }\n}\n \n fragment MetaFields on Meta {\n versionId\n lastUpdated\n source\n security {\n ...CodingFields\n }\n tag {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment ParticipantFields on Participant {\n individual {\n id\n name {\n ...HumanNameFields\n }\n }\n type {\n ...CodeableConceptFields\n }\n period {\n ...PeriodFields\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment RecorderFields on Recorder {\n __typename\n ... on Patient {\n name {\n ...HumanNameFields\n }\n }\n ... on Practitioner {\n name {\n ...HumanNameFields\n }\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n ";
63
63
  export declare const GetHealthSummaryDocument = "\n query GetHealthSummary {\n getHealthSummary {\n resources {\n category\n total\n }\n }\n}\n ";
@@ -74,12 +74,14 @@ export declare const GetMedicationGroupsDocument = "\n query getMedicationGro
74
74
  export declare const GetMedicationKnowledgeDocument = "\n query getMedicationKnowledge($request: MedicationKnowledgeRequest) {\n getMedicationKnowledge(request: $request) {\n paging_info {\n ...PagingFields\n }\n resources {\n __typename\n title\n content\n }\n }\n}\n \n fragment PagingFields on PagingResults {\n page_number\n page_size\n total_pages\n total_items\n}\n ";
75
75
  export declare const GetMedicationStatementsDocument = "\n query getMedicationStatements($request: MedicationStatementQueryRequest) {\n getMedicationStatements(request: $request) {\n paging_info {\n ...PagingFields\n }\n resources {\n id\n meta {\n ...MetaFields\n }\n status {\n code\n display\n }\n medication {\n ...CodeableConceptFields\n }\n reasonCode {\n ...CodeableConceptFields\n }\n authoredOn\n requester {\n ...ActorFields\n }\n effectiveDate {\n start\n end\n }\n dosageInstruction {\n id\n additionalInstruction {\n ...CodeableConceptFields\n }\n asNeededBoolean\n asNeededCodeableConcept {\n ...CodeableConceptFields\n }\n doseAndRate {\n id\n doseQuantity {\n ...QuantityFields\n }\n doseRange {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n }\n rateQuantity {\n ...QuantityFields\n }\n rateRange {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n }\n rateRatio {\n numerator {\n ...QuantityFields\n }\n denominator {\n ...QuantityFields\n }\n }\n type {\n ...CodeableConceptFields\n }\n }\n maxDosePerAdministration {\n ...QuantityFields\n }\n maxDosePerLifetime {\n ...QuantityFields\n }\n maxDosePerPeriod {\n numerator {\n ...QuantityFields\n }\n denominator {\n ...QuantityFields\n }\n }\n method {\n ...CodeableConceptFields\n }\n patientInstruction\n route {\n ...CodeableConceptFields\n }\n sequence\n site {\n ...CodeableConceptFields\n }\n text\n timing {\n ...TimingFields\n }\n }\n dispenseRequest {\n id\n dispenseInterval {\n ...QuantityFields\n }\n expectedSupplyDuration {\n ...QuantityFields\n }\n initialFill {\n duration {\n ...QuantityFields\n }\n quantity {\n ...QuantityFields\n }\n }\n numberOfRepeatsAllowed\n performer {\n name\n }\n validityPeriod {\n start\n end\n }\n quantity {\n ...QuantityFields\n }\n }\n source\n }\n }\n}\n \n fragment PagingFields on PagingResults {\n page_number\n page_size\n total_pages\n total_items\n}\n \n\n fragment MetaFields on Meta {\n versionId\n lastUpdated\n source\n security {\n ...CodingFields\n }\n tag {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment ActorFields on Actor {\n __typename\n ... on Practitioner {\n name {\n ...HumanNameFields\n }\n }\n ... on Patient {\n name {\n ...HumanNameFields\n }\n }\n ... on Organization {\n organizationName: name\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment TimingFields on Timing {\n id\n code {\n ...CodeableConceptFields\n }\n event\n repeat {\n id\n boundsDuration {\n ...QuantityFields\n }\n boundsPeriod {\n ...PeriodFields\n }\n boundsRange {\n ...RangeFields\n }\n count\n countMax\n dayOfWeek {\n code\n display\n }\n duration\n durationMax\n durationUnit {\n code\n display\n }\n frequency\n frequencyMax\n offset\n period\n periodMax\n periodUnit {\n display\n code\n }\n timeOfDay\n when {\n code\n display\n }\n }\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment RangeFields on Range {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n ";
76
76
  export declare const AuthenticateDocument = "\n query authenticate {\n getToken {\n accessToken {\n jwtToken\n }\n idToken {\n jwtToken\n }\n refreshToken {\n token\n }\n }\n}\n ";
77
+ export declare const ExchangeAuthCodeDocument = "\n mutation ExchangeAuthCode($authCode: String!) {\n exchangeAuthCode(authCode: $authCode) {\n accessToken {\n jwtToken\n }\n idToken {\n jwtToken\n }\n refreshToken {\n token\n }\n }\n}\n ";
77
78
  export declare const InitializeDocument = "\n query initialize($clientKey: String!) {\n initSdk(clientKey: $clientKey) {\n httpClient {\n requestTimeout\n retry {\n interval\n attempts\n }\n }\n graphQLClient {\n url\n authUrl\n fetchPolicy\n cache {\n maxSizeBytes\n }\n }\n logLevel\n telemetry {\n enabled\n collectorUrl\n }\n }\n}\n ";
78
79
  export declare const LoginDocument = "\n query login($email: String!, $password: String!) {\n login(email: $email, password: $password) {\n accessToken {\n jwtToken\n }\n idToken {\n jwtToken\n }\n refreshToken {\n token\n }\n }\n}\n ";
79
80
  export declare const RefreshTokensDocument = "\n query refreshTokens {\n refresh {\n accessToken\n idToken\n }\n}\n ";
80
81
  export declare const ProviderSearchDocument = "\n query providerSearch($client: [Client], $searchTerm: String, $includePopulatedPROAonly: Boolean, $specialtyFilters: [InputCoding], $organizationTypeFilters: [OrganizationType], $gender: Gender, $location: SearchPosition, $sortBy: [OrderBy], $filterFields: [FilterField], $page: Int, $pageSize: Int) {\n providers(\n client: $client\n search: $searchTerm\n specialty: $specialtyFilters\n organization_type: $organizationTypeFilters\n include_populated_PROA_only: $includePopulatedPROAonly\n gender: $gender\n search_position: $location\n order_by: $sortBy\n filter_values: $filterFields\n page_number: $page\n page_size: $pageSize\n ) {\n paging_info {\n page_number\n page_size\n total_items\n total_pages\n }\n filter_values {\n field\n values {\n value\n count\n }\n }\n results {\n endpoint {\n identifier {\n type {\n coding {\n code\n system\n display\n }\n text\n }\n value\n system\n }\n name\n status\n connectionType {\n code\n system\n display\n }\n address\n }\n iconString\n organization_type {\n coding {\n code\n system\n display\n }\n text\n }\n content\n gender\n location {\n name\n identifier {\n type {\n text\n coding {\n system\n code\n display\n }\n }\n value\n system\n }\n alias\n description\n address {\n use\n type\n text\n line\n city\n district\n state\n postalCode\n country\n }\n position {\n lat\n lon\n }\n distanceInMiles\n telecom {\n system\n value\n rank\n }\n }\n specialty {\n code\n system\n display\n }\n id\n photo {\n contentType\n url\n title\n }\n name {\n ...HumanNameFields\n }\n telecom {\n system\n value\n rank\n }\n practitioner_qualification {\n identifier {\n type {\n coding {\n code\n system\n display\n }\n text\n }\n value\n system\n }\n code {\n coding {\n code\n system\n display\n }\n text\n }\n period {\n start\n end\n }\n issuer {\n reference\n display\n }\n }\n provider_type\n characteristic {\n code\n system\n display\n }\n organization {\n name\n endpoint {\n identifier {\n type {\n coding {\n code\n system\n display\n }\n text\n }\n value\n system\n }\n name\n status\n connectionType {\n code\n system\n display\n }\n address\n }\n }\n }\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n ";
81
82
  export declare const RequestConnectionDocument = "\n mutation requestConnection($city: String, $institution: String, $provider: String, $state: String) {\n requestConnection(\n city: $city\n institution: $institution\n provider: $provider\n state: $state\n ) {\n resourceType\n issue {\n severity\n code\n details {\n text\n }\n }\n }\n}\n ";
82
83
  export declare const CreateConsentDocument = "\n mutation createConsent($consentInput: ConsentInput!) {\n createConsent(consentInput: $consentInput) {\n id\n meta {\n source\n versionId\n lastUpdated\n security {\n ...CodingFields\n }\n tag {\n ...CodingFields\n }\n }\n status\n scope {\n coding {\n code\n system\n display\n }\n text\n }\n category {\n coding {\n code\n system\n display\n }\n text\n }\n patient {\n reference\n identifier {\n id\n system\n value\n }\n type\n display\n }\n dateTime\n performer {\n reference\n identifier {\n id\n system\n value\n }\n type\n display\n }\n organization {\n reference\n identifier {\n id\n system\n value\n }\n type\n display\n }\n policy {\n authority\n uri\n }\n policyRule {\n coding {\n code\n system\n display\n }\n text\n }\n provision {\n type\n period {\n ...PeriodFields\n }\n }\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n ";
84
+ export declare const CreateDataExportDirectDownloadUrlDocument = "\n mutation CreateDataExportDirectDownloadUrl($exportId: String!, $password: String!) {\n createDataExportDirectDownloadUrl(exportId: $exportId, password: $password)\n}\n ";
83
85
  export declare const DeleteDocument = "\n mutation delete {\n updateUserAccountStatus(operation: REQUEST_DELETE) {\n resourceType\n issue {\n code\n severity\n details {\n text\n }\n }\n }\n}\n ";
84
86
  export declare const GetProfileDocument = "\n query getProfile {\n userProfile {\n id\n address {\n line\n city\n state\n postalCode\n }\n telecom {\n system\n value\n use\n }\n gender\n birthDate\n name {\n family\n given\n }\n language\n }\n}\n ";
85
87
  export declare const SearchConsentDocument = "\n query searchConsent($categoryCode: CategoryCode) {\n search(params: {category: $categoryCode}) {\n resourceType\n id\n meta {\n ...MetaFields\n }\n status\n scope {\n text\n coding {\n code\n system\n display\n }\n }\n category {\n text\n coding {\n code\n system\n display\n }\n }\n patient {\n reference\n }\n provision {\n type\n }\n }\n}\n \n fragment MetaFields on Meta {\n versionId\n lastUpdated\n source\n security {\n ...CodingFields\n }\n tag {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n ";
@@ -317,6 +319,13 @@ export declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionW
317
319
  headers: Headers;
318
320
  status: number;
319
321
  }>;
322
+ ExchangeAuthCode(variables: Types.ExchangeAuthCodeMutationVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{
323
+ data: Types.ExchangeAuthCodeMutationResults;
324
+ errors?: GraphQLError[];
325
+ extensions?: any;
326
+ headers: Headers;
327
+ status: number;
328
+ }>;
320
329
  initialize(variables: Types.InitializeQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{
321
330
  data: Types.InitializeQueryResults;
322
331
  errors?: GraphQLError[];
@@ -359,6 +368,13 @@ export declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionW
359
368
  headers: Headers;
360
369
  status: number;
361
370
  }>;
371
+ CreateDataExportDirectDownloadUrl(variables: Types.CreateDataExportDirectDownloadUrlMutationVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{
372
+ data: Types.CreateDataExportDirectDownloadUrlMutationResults;
373
+ errors?: GraphQLError[];
374
+ extensions?: any;
375
+ headers: Headers;
376
+ status: number;
377
+ }>;
362
378
  delete(variables?: Types.DeleteMutationVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{
363
379
  data: Types.DeleteMutationResults;
364
380
  errors?: GraphQLError[];
@@ -918,6 +918,9 @@ export const GetConditionsDocument = `
918
918
  }
919
919
  }
920
920
  }
921
+ encounter {
922
+ ...EncounterFields
923
+ }
921
924
  }
922
925
  }
923
926
  }
@@ -926,7 +929,8 @@ ${MetaFieldsFragmentDoc}
926
929
  ${CodeableConceptFieldsFragmentDoc}
927
930
  ${RecorderFieldsFragmentDoc}
928
931
  ${PeriodFieldsFragmentDoc}
929
- ${HumanNameFieldsFragmentDoc}`;
932
+ ${HumanNameFieldsFragmentDoc}
933
+ ${EncounterFieldsFragmentDoc}`;
930
934
  export const GetEncountersGroupDocument = `
931
935
  query getEncountersGroup($request: EncounterGroupQueryRequest) {
932
936
  getEncounterGroups(request: $request) {
@@ -1501,6 +1505,21 @@ export const AuthenticateDocument = `
1501
1505
  }
1502
1506
  }
1503
1507
  `;
1508
+ export const ExchangeAuthCodeDocument = `
1509
+ mutation ExchangeAuthCode($authCode: String!) {
1510
+ exchangeAuthCode(authCode: $authCode) {
1511
+ accessToken {
1512
+ jwtToken
1513
+ }
1514
+ idToken {
1515
+ jwtToken
1516
+ }
1517
+ refreshToken {
1518
+ token
1519
+ }
1520
+ }
1521
+ }
1522
+ `;
1504
1523
  export const InitializeDocument = `
1505
1524
  query initialize($clientKey: String!) {
1506
1525
  initSdk(clientKey: $clientKey) {
@@ -1838,6 +1857,11 @@ export const CreateConsentDocument = `
1838
1857
  }
1839
1858
  ${CodingFieldsFragmentDoc}
1840
1859
  ${PeriodFieldsFragmentDoc}`;
1860
+ export const CreateDataExportDirectDownloadUrlDocument = `
1861
+ mutation CreateDataExportDirectDownloadUrl($exportId: String!, $password: String!) {
1862
+ createDataExportDirectDownloadUrl(exportId: $exportId, password: $password)
1863
+ }
1864
+ `;
1841
1865
  export const DeleteDocument = `
1842
1866
  mutation delete {
1843
1867
  updateUserAccountStatus(operation: REQUEST_DELETE) {
@@ -2038,6 +2062,9 @@ export function getSdk(client, withWrapper = defaultWrapper) {
2038
2062
  authenticate(variables, requestHeaders) {
2039
2063
  return withWrapper((wrappedRequestHeaders) => client.rawRequest(AuthenticateDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'authenticate', 'query', variables);
2040
2064
  },
2065
+ ExchangeAuthCode(variables, requestHeaders) {
2066
+ return withWrapper((wrappedRequestHeaders) => client.rawRequest(ExchangeAuthCodeDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'ExchangeAuthCode', 'mutation', variables);
2067
+ },
2041
2068
  initialize(variables, requestHeaders) {
2042
2069
  return withWrapper((wrappedRequestHeaders) => client.rawRequest(InitializeDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'initialize', 'query', variables);
2043
2070
  },
@@ -2056,6 +2083,9 @@ export function getSdk(client, withWrapper = defaultWrapper) {
2056
2083
  createConsent(variables, requestHeaders) {
2057
2084
  return withWrapper((wrappedRequestHeaders) => client.rawRequest(CreateConsentDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'createConsent', 'mutation', variables);
2058
2085
  },
2086
+ CreateDataExportDirectDownloadUrl(variables, requestHeaders) {
2087
+ return withWrapper((wrappedRequestHeaders) => client.rawRequest(CreateDataExportDirectDownloadUrlDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'CreateDataExportDirectDownloadUrl', 'mutation', variables);
2088
+ },
2059
2089
  delete(variables, requestHeaders) {
2060
2090
  return withWrapper((wrappedRequestHeaders) => client.rawRequest(DeleteDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'delete', 'mutation', variables);
2061
2091
  },
@@ -2999,6 +2999,238 @@ export type GetConditionsQueryResults = {
2999
2999
  suffix: Array<string | null> | null;
3000
3000
  }> | null;
3001
3001
  } | null;
3002
+ encounter: {
3003
+ id: string;
3004
+ meta: {
3005
+ versionId: string | null;
3006
+ lastUpdated: any | null;
3007
+ source: string | null;
3008
+ security: Array<{
3009
+ system: string | null;
3010
+ code: string | null;
3011
+ display: string | null;
3012
+ } | null> | null;
3013
+ tag: Array<{
3014
+ system: string | null;
3015
+ code: string | null;
3016
+ display: string | null;
3017
+ } | null> | null;
3018
+ } | null;
3019
+ identifier: {
3020
+ system: string | null;
3021
+ value: string | null;
3022
+ type: {
3023
+ text: string | null;
3024
+ coding: Array<{
3025
+ system: string | null;
3026
+ code: string | null;
3027
+ display: string | null;
3028
+ } | null> | null;
3029
+ } | null;
3030
+ } | null;
3031
+ type: Array<{
3032
+ text: string | null;
3033
+ coding: Array<{
3034
+ system: string | null;
3035
+ code: string | null;
3036
+ display: string | null;
3037
+ } | null> | null;
3038
+ } | null> | null;
3039
+ status: {
3040
+ code: string | null;
3041
+ display: string | null;
3042
+ };
3043
+ participant: Array<{
3044
+ individual: {
3045
+ id: string | null;
3046
+ name: Array<{
3047
+ text: string | null;
3048
+ family: string | null;
3049
+ given: Array<string | null> | null;
3050
+ prefix: Array<string | null> | null;
3051
+ suffix: Array<string | null> | null;
3052
+ }> | null;
3053
+ } | null;
3054
+ type: {
3055
+ text: string | null;
3056
+ coding: Array<{
3057
+ system: string | null;
3058
+ code: string | null;
3059
+ display: string | null;
3060
+ } | null> | null;
3061
+ } | null;
3062
+ period: {
3063
+ start: any | null;
3064
+ end: any | null;
3065
+ } | null;
3066
+ } | null> | null;
3067
+ period: {
3068
+ start: any | null;
3069
+ end: any | null;
3070
+ } | null;
3071
+ reasonCode: Array<{
3072
+ text: string | null;
3073
+ coding: Array<{
3074
+ system: string | null;
3075
+ code: string | null;
3076
+ display: string | null;
3077
+ } | null> | null;
3078
+ } | null> | null;
3079
+ class: {
3080
+ system: string | null;
3081
+ code: string | null;
3082
+ display: string | null;
3083
+ } | null;
3084
+ location: {
3085
+ name: string | null;
3086
+ } | null;
3087
+ serviceProvider: {
3088
+ name: string | null;
3089
+ endpoint: Array<{
3090
+ name: string | null;
3091
+ status: Types.EndpointStatus | null;
3092
+ address: string | null;
3093
+ connectionType: {
3094
+ system: string | null;
3095
+ code: string | null;
3096
+ display: string | null;
3097
+ } | null;
3098
+ } | null> | null;
3099
+ } | null;
3100
+ subject: {
3101
+ id: string;
3102
+ gender: string | null;
3103
+ birthDate: any | null;
3104
+ name: Array<{
3105
+ text: string | null;
3106
+ family: string | null;
3107
+ given: Array<string | null> | null;
3108
+ prefix: Array<string | null> | null;
3109
+ suffix: Array<string | null> | null;
3110
+ }> | null;
3111
+ communication: Array<{
3112
+ language: {
3113
+ text: string | null;
3114
+ coding: Array<{
3115
+ system: string | null;
3116
+ code: string | null;
3117
+ display: string | null;
3118
+ } | null> | null;
3119
+ } | null;
3120
+ }> | null;
3121
+ } | null;
3122
+ reasonReference: Array<{
3123
+ id: string;
3124
+ onsetDateTime: any | null;
3125
+ recordedDate: any | null;
3126
+ abatementDateTime: any | null;
3127
+ meta: {
3128
+ versionId: string | null;
3129
+ lastUpdated: any | null;
3130
+ source: string | null;
3131
+ security: Array<{
3132
+ system: string | null;
3133
+ code: string | null;
3134
+ display: string | null;
3135
+ } | null> | null;
3136
+ tag: Array<{
3137
+ system: string | null;
3138
+ code: string | null;
3139
+ display: string | null;
3140
+ } | null> | null;
3141
+ } | null;
3142
+ code: {
3143
+ text: string | null;
3144
+ coding: Array<{
3145
+ system: string | null;
3146
+ code: string | null;
3147
+ display: string | null;
3148
+ } | null> | null;
3149
+ } | null;
3150
+ clinicalStatus: {
3151
+ text: string | null;
3152
+ coding: Array<{
3153
+ system: string | null;
3154
+ code: string | null;
3155
+ display: string | null;
3156
+ } | null> | null;
3157
+ } | null;
3158
+ recorder: {
3159
+ __typename: 'Patient';
3160
+ name: Array<{
3161
+ text: string | null;
3162
+ family: string | null;
3163
+ given: Array<string | null> | null;
3164
+ prefix: Array<string | null> | null;
3165
+ suffix: Array<string | null> | null;
3166
+ }> | null;
3167
+ } | {
3168
+ __typename: 'Practitioner';
3169
+ name: Array<{
3170
+ text: string | null;
3171
+ family: string | null;
3172
+ given: Array<string | null> | null;
3173
+ prefix: Array<string | null> | null;
3174
+ suffix: Array<string | null> | null;
3175
+ }> | null;
3176
+ } | null;
3177
+ note: Array<{
3178
+ authorString: string | null;
3179
+ time: any | null;
3180
+ text: string | null;
3181
+ } | null> | null;
3182
+ onsetPeriod: {
3183
+ start: any | null;
3184
+ end: any | null;
3185
+ } | null;
3186
+ abatementPeriod: {
3187
+ start: any | null;
3188
+ end: any | null;
3189
+ } | null;
3190
+ category: Array<{
3191
+ text: string | null;
3192
+ coding: Array<{
3193
+ system: string | null;
3194
+ code: string | null;
3195
+ display: string | null;
3196
+ } | null> | null;
3197
+ } | null> | null;
3198
+ severity: {
3199
+ text: string | null;
3200
+ coding: Array<{
3201
+ system: string | null;
3202
+ code: string | null;
3203
+ display: string | null;
3204
+ } | null> | null;
3205
+ } | null;
3206
+ verificationStatus: {
3207
+ text: string | null;
3208
+ coding: Array<{
3209
+ system: string | null;
3210
+ code: string | null;
3211
+ display: string | null;
3212
+ } | null> | null;
3213
+ } | null;
3214
+ bodySite: Array<{
3215
+ text: string | null;
3216
+ coding: Array<{
3217
+ system: string | null;
3218
+ code: string | null;
3219
+ display: string | null;
3220
+ } | null> | null;
3221
+ } | null> | null;
3222
+ } | null> | null;
3223
+ hospitalization: {
3224
+ dischargeDisposition: {
3225
+ text: string | null;
3226
+ coding: Array<{
3227
+ system: string | null;
3228
+ code: string | null;
3229
+ display: string | null;
3230
+ } | null> | null;
3231
+ } | null;
3232
+ } | null;
3233
+ } | null;
3002
3234
  }>;
3003
3235
  };
3004
3236
  };
@@ -6370,6 +6602,22 @@ export type AuthenticateQueryResults = {
6370
6602
  };
6371
6603
  };
6372
6604
  };
6605
+ export type ExchangeAuthCodeMutationVariables = Types.Exact<{
6606
+ authCode: Types.Scalars['String']['input'];
6607
+ }>;
6608
+ export type ExchangeAuthCodeMutationResults = {
6609
+ exchangeAuthCode: {
6610
+ accessToken: {
6611
+ jwtToken: string;
6612
+ };
6613
+ idToken: {
6614
+ jwtToken: string;
6615
+ };
6616
+ refreshToken: {
6617
+ token: string;
6618
+ };
6619
+ };
6620
+ };
6373
6621
  export type InitializeQueryVariables = Types.Exact<{
6374
6622
  clientKey: Types.Scalars['String']['input'];
6375
6623
  }>;
@@ -6718,6 +6966,13 @@ export type CreateConsentMutationResults = {
6718
6966
  } | null;
6719
6967
  } | null;
6720
6968
  };
6969
+ export type CreateDataExportDirectDownloadUrlMutationVariables = Types.Exact<{
6970
+ exportId: Types.Scalars['String']['input'];
6971
+ password: Types.Scalars['String']['input'];
6972
+ }>;
6973
+ export type CreateDataExportDirectDownloadUrlMutationResults = {
6974
+ createDataExportDirectDownloadUrl: string | null;
6975
+ };
6721
6976
  export type DeleteMutationVariables = Types.Exact<{
6722
6977
  [key: string]: never;
6723
6978
  }>;
@@ -339,6 +339,10 @@ export type AttachmentInput = {
339
339
  title?: InputMaybe<Scalars['String']['input']>;
340
340
  url?: InputMaybe<Scalars['url']['input']>;
341
341
  };
342
+ export type AuthCode = {
343
+ __typename?: 'AuthCode';
344
+ authCode: Scalars['String']['output'];
345
+ };
342
346
  export type AuthTokens = {
343
347
  __typename?: 'AuthTokens';
344
348
  accessToken: TokenPayload;
@@ -480,7 +484,6 @@ export type Client = {
480
484
  data_sets?: InputMaybe<Array<InputMaybe<DataSets>>>;
481
485
  id?: InputMaybe<ClientId>;
482
486
  name?: InputMaybe<Scalars['String']['input']>;
483
- version?: Scalars['Float']['input'];
484
487
  };
485
488
  export declare enum ClientId {
486
489
  Proa = "proa",
@@ -503,7 +506,6 @@ export type ClientInput = {
503
506
  dataSets?: InputMaybe<Array<InputMaybe<DataSetsEnum>>>;
504
507
  id?: InputMaybe<ClientIdEnum>;
505
508
  name?: InputMaybe<Scalars['String']['input']>;
506
- version?: Scalars['Float']['input'];
507
509
  };
508
510
  export type ClientSlugAndIdentifierInput = {
509
511
  addBwellPatientIfMissing?: InputMaybe<Scalars['Boolean']['input']>;
@@ -940,6 +942,7 @@ export declare enum DataConnectionType {
940
942
  Clinical = "CLINICAL",
941
943
  Insurance = "INSURANCE",
942
944
  Lab = "LAB",
945
+ Pharmacy = "PHARMACY",
943
946
  Practitioner = "PRACTITIONER"
944
947
  }
945
948
  export declare enum DataSets {
@@ -1938,14 +1941,17 @@ export type Money = {
1938
1941
  };
1939
1942
  export type Mutation = {
1940
1943
  __typename?: 'Mutation';
1944
+ createAuthCode: AuthCode;
1941
1945
  createConnection: Connection;
1942
1946
  createConsent?: Maybe<Consent>;
1947
+ createDataExportDirectDownloadUrl?: Maybe<Scalars['String']['output']>;
1943
1948
  createMissingConsents?: Maybe<Scalars['String']['output']>;
1944
1949
  createPersonWithClientId?: Maybe<PersonWithMetadata>;
1945
1950
  createQuestionnaireResponse?: Maybe<QuestionnaireResponse>;
1946
1951
  deleteConnection: ConnectionStatusUpdate;
1947
1952
  deletePersonAndPatient?: Maybe<UpdatedPersonMetadata>;
1948
1953
  disconnectConnection: DisconnectConnection;
1954
+ exchangeAuthCode: AuthTokens;
1949
1955
  interacted?: Maybe<Scalars['Boolean']['output']>;
1950
1956
  itemInteracted?: Maybe<Scalars['Boolean']['output']>;
1951
1957
  patchUpdatePersonAndPatient?: Maybe<Array<Maybe<Person>>>;
@@ -1966,6 +1972,11 @@ export type Mutation = {
1966
1972
  upsertPerson?: Maybe<PersonWithMetadata>;
1967
1973
  upsertPersonWithRegCode?: Maybe<TaskWithMetadata>;
1968
1974
  };
1975
+ export type MutationCreateAuthCodeArgs = {
1976
+ clientKey: Scalars['String']['input'];
1977
+ clientPersonId: Scalars['String']['input'];
1978
+ expirationDate: Scalars['String']['input'];
1979
+ };
1969
1980
  export type MutationCreateConnectionArgs = {
1970
1981
  connectionId: Scalars['String']['input'];
1971
1982
  password: Scalars['String']['input'];
@@ -1974,6 +1985,10 @@ export type MutationCreateConnectionArgs = {
1974
1985
  export type MutationCreateConsentArgs = {
1975
1986
  consentInput: ConsentInput;
1976
1987
  };
1988
+ export type MutationCreateDataExportDirectDownloadUrlArgs = {
1989
+ exportId: Scalars['String']['input'];
1990
+ password: Scalars['String']['input'];
1991
+ };
1977
1992
  export type MutationCreateMissingConsentsArgs = {
1978
1993
  endDate?: InputMaybe<Scalars['dateTime']['input']>;
1979
1994
  patientId?: InputMaybe<Scalars['String']['input']>;
@@ -2003,6 +2018,9 @@ export type MutationDeletePersonAndPatientArgs = {
2003
2018
  export type MutationDisconnectConnectionArgs = {
2004
2019
  connectionId: Scalars['String']['input'];
2005
2020
  };
2021
+ export type MutationExchangeAuthCodeArgs = {
2022
+ authCode: Scalars['String']['input'];
2023
+ };
2006
2024
  export type MutationInteractedArgs = {
2007
2025
  interaction?: InputMaybe<InteractionType>;
2008
2026
  result_id?: InputMaybe<Scalars['String']['input']>;
@@ -2567,6 +2585,11 @@ export type PractitionerReference = {
2567
2585
  name?: Maybe<Array<HumanName>>;
2568
2586
  telecom?: Maybe<Array<ContactPoint>>;
2569
2587
  };
2588
+ export type ProaOrganization = {
2589
+ __typename?: 'ProaOrganization';
2590
+ endpoint?: Maybe<Array<Maybe<Endpoint>>>;
2591
+ name?: Maybe<Scalars['String']['output']>;
2592
+ };
2570
2593
  export type ProcedureGroup = ResourceGroup & {
2571
2594
  __typename?: 'ProcedureGroup';
2572
2595
  /** Coding representing the kind of Procedure in this composition */
@@ -2721,7 +2744,7 @@ export type ProviderResult = {
2721
2744
  /** npi numbers for provider */
2722
2745
  npi?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
2723
2746
  /** Organizations/Health Systems a Provider has practiced at */
2724
- organization?: Maybe<Array<Maybe<Organization>>>;
2747
+ organization?: Maybe<Array<Maybe<ProaOrganization>>>;
2725
2748
  /** FHIR types of Organization or PROA categories */
2726
2749
  organization_type?: Maybe<Array<Maybe<CodeableConcept>>>;
2727
2750
  /** url to the photo of this provider */
@@ -3013,6 +3036,7 @@ export type QueryProvidersArgs = {
3013
3036
  organization_type?: InputMaybe<Array<InputMaybe<OrganizationType>>>;
3014
3037
  page_number?: InputMaybe<Scalars['Int']['input']>;
3015
3038
  page_size?: InputMaybe<Scalars['Int']['input']>;
3039
+ query_source?: InputMaybe<SourceEnum>;
3016
3040
  search?: InputMaybe<Scalars['String']['input']>;
3017
3041
  search_position?: InputMaybe<SearchPosition>;
3018
3042
  specialty?: InputMaybe<Array<InputMaybe<InputCoding>>>;
@@ -3389,6 +3413,8 @@ export type SearchProvidersInput = {
3389
3413
  pageNumber?: InputMaybe<Scalars['Int']['input']>;
3390
3414
  /** Size of each page of results, default is 25 */
3391
3415
  pageSize?: InputMaybe<Scalars['Int']['input']>;
3416
+ /** query source */
3417
+ querySource?: InputMaybe<SourceEnum>;
3392
3418
  /** a free form search text. */
3393
3419
  search?: InputMaybe<Scalars['String']['input']>;
3394
3420
  /** return only providers that are within `distance` of this location */
@@ -3422,7 +3448,7 @@ export type SearchProvidersResult = {
3422
3448
  name?: Maybe<Array<Maybe<HumanName>>>;
3423
3449
  /** npi numbers for provider */
3424
3450
  npi?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
3425
- /** Organizations/Health Systems a Provider has practiced at */
3451
+ /** PROA connection information for Organizations/Health Systems a Provider has practiced at */
3426
3452
  organization?: Maybe<Array<Maybe<OrganizationTypeNew>>>;
3427
3453
  /** FHIR types of Organization or PROA categories */
3428
3454
  organizationType?: Maybe<Array<Maybe<CodeableConcept>>>;
@@ -3517,6 +3543,14 @@ export declare enum SortOrderEnum {
3517
3543
  Asc = "ASC",
3518
3544
  Desc = "DESC"
3519
3545
  }
3546
+ /** Query Source enum */
3547
+ export declare enum SourceEnum {
3548
+ CareSearch = "CARE_SEARCH",
3549
+ Proa = "PROA",
3550
+ ProviderDetails = "PROVIDER_DETAILS",
3551
+ Sayt = "SAYT",
3552
+ Unspecified = "UNSPECIFIED"
3553
+ }
3520
3554
  export type SpecimenResource = {
3521
3555
  __typename?: 'SpecimenResource';
3522
3556
  accessionIdentifier?: Maybe<Identifier>;
@@ -86,6 +86,7 @@ export var DataConnectionType;
86
86
  DataConnectionType["Clinical"] = "CLINICAL";
87
87
  DataConnectionType["Insurance"] = "INSURANCE";
88
88
  DataConnectionType["Lab"] = "LAB";
89
+ DataConnectionType["Pharmacy"] = "PHARMACY";
89
90
  DataConnectionType["Practitioner"] = "PRACTITIONER";
90
91
  })(DataConnectionType || (DataConnectionType = {}));
91
92
  export var DataSets;
@@ -364,6 +365,15 @@ export var SortOrderEnum;
364
365
  SortOrderEnum["Asc"] = "ASC";
365
366
  SortOrderEnum["Desc"] = "DESC";
366
367
  })(SortOrderEnum || (SortOrderEnum = {}));
368
+ /** Query Source enum */
369
+ export var SourceEnum;
370
+ (function (SourceEnum) {
371
+ SourceEnum["CareSearch"] = "CARE_SEARCH";
372
+ SourceEnum["Proa"] = "PROA";
373
+ SourceEnum["ProviderDetails"] = "PROVIDER_DETAILS";
374
+ SourceEnum["Sayt"] = "SAYT";
375
+ SourceEnum["Unspecified"] = "UNSPECIFIED";
376
+ })(SourceEnum || (SourceEnum = {}));
367
377
  export var SyncStatus;
368
378
  (function (SyncStatus) {
369
379
  SyncStatus["Error"] = "ERROR";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icanbwell/bwell-sdk-ts",
3
- "version": "0.5.0",
3
+ "version": "1.0.0",
4
4
  "description": "b.well TypeScript SDK",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",