@icanbwell/bwell-sdk-ts 1.96.0 → 1.97.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 = "1.96.0";
4
+ export declare const VERSION = "1.97.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 = "1.96.0";
4
+ export const VERSION = "1.97.0";
@@ -16,6 +16,7 @@ export type GraphQLClientInitializeResult = {
16
16
  client: GraphQLClient;
17
17
  sdk: GraphQLSdk;
18
18
  };
19
+ export declare const SDK_CLIENT_NAME = "bwell-typescript-v1";
19
20
  export declare function graphQLSDKFactory(endpoint: string, tokenManager?: TokenManager, language?: Nullable<Language>): GraphQLClientInitializeResult;
20
21
  /**
21
22
  * Create a graphql-request request middleware that uses the provided token manager
@@ -8,13 +8,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { GraphQLClient } from "graphql-request";
11
+ import { VERSION } from "../../../__version__.js";
11
12
  import { getSdk } from "../../../graphql/index.js";
13
+ import { getPlatformHeader } from "../../../utils/platform.js";
14
+ export const SDK_CLIENT_NAME = "bwell-typescript-v1";
12
15
  export function graphQLSDKFactory(endpoint, tokenManager, language) {
13
16
  let requestMiddleware = undefined;
14
17
  if (tokenManager !== undefined) {
15
18
  requestMiddleware = createAuthMiddleware(tokenManager);
16
19
  }
17
- const headers = {};
20
+ const headers = {
21
+ "apollographql-client-name": SDK_CLIENT_NAME,
22
+ "apollographql-client-version": VERSION,
23
+ "bwell-platform": getPlatformHeader(),
24
+ };
18
25
  if (language !== undefined && language !== null) {
19
26
  headers["accept-language"] = language;
20
27
  }
@@ -100,7 +100,7 @@ export declare const ActivateDirectConnectionDocument = "\n mutation activate
100
100
  export declare const CreateConnectionDocument = "\n mutation createConnection($connectionId: String!, $username: String, $password: String, $integrationType: IntegrationType) {\n createConnection(\n connectionId: $connectionId\n username: $username\n password: $password\n integrationType: $integrationType\n ) {\n id\n status\n name\n category\n type\n isDirect\n syncStatus\n statusUpdated\n lastSynced\n created\n }\n}\n ";
101
101
  export declare const DeleteConnectionDocument = "\n mutation deleteConnection($connectionId: String!) {\n deleteConnection(connectionId: $connectionId) {\n status\n statusUpdated\n }\n}\n ";
102
102
  export declare const DisconnectConnectionDocument = "\n mutation disconnectConnection($connectionId: String!) {\n disconnectConnection(connectionId: $connectionId) {\n status\n statusUpdated\n }\n}\n ";
103
- export declare const GetDataSourceDocument = "\n query getDataSource($connectionId: String!) {\n getDataSource(connectionId: $connectionId) {\n id\n name\n category\n type\n isDirect\n }\n}\n ";
103
+ export declare const GetDataSourceDocument = "\n query getDataSource($connectionId: String!) {\n getDataSource(connectionId: $connectionId) {\n id\n name\n category\n type\n isDirect\n consentPolicyUrl\n consentValidityDuration\n integrationType\n endpointStatus\n }\n}\n ";
104
104
  export declare const GetMemberConnectionsDocument = "\n query getMemberConnections($integrationType: [String!] = null, $status: [String!] = null) {\n getMemberConnections(integrationType: $integrationType, status: $status) {\n id\n name\n category\n type\n status\n syncStatus\n statusUpdated\n lastSynced\n created\n isDirect\n integrationType\n }\n subscription_subscription {\n entry {\n resource {\n service_slug\n subscriptionStatus {\n error {\n ...CodeableConceptFields\n }\n extension {\n id\n url\n valueString\n }\n }\n }\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 ";
105
105
  export declare const GetOauthUrlDocument = "\n query getOauthUrl($connectionId: String!) {\n getOauthUrl(connectionId: $connectionId) {\n redirectUrl\n }\n}\n ";
106
106
  export declare const AcceptDataSharingInvitationDocument = "\n mutation AcceptDataSharingInvitation($code: String!) {\n acceptDataSharingInvitation(input: {code: $code}) {\n resourceType\n id\n issue {\n severity\n code\n details {\n text\n coding {\n system\n code\n display\n }\n }\n }\n }\n}\n ";
@@ -2006,6 +2006,10 @@ export const GetDataSourceDocument = `
2006
2006
  category
2007
2007
  type
2008
2008
  isDirect
2009
+ consentPolicyUrl
2010
+ consentValidityDuration
2011
+ integrationType
2012
+ endpointStatus
2009
2013
  }
2010
2014
  }
2011
2015
  `;
@@ -9079,6 +9079,10 @@ export type GetDataSourceQueryResults = {
9079
9079
  category: Types.ConnectionCategory;
9080
9080
  type: Types.DataConnectionType;
9081
9081
  isDirect: boolean;
9082
+ consentPolicyUrl: string | null;
9083
+ consentValidityDuration: string | null;
9084
+ integrationType: string | null;
9085
+ endpointStatus: string | null;
9082
9086
  };
9083
9087
  };
9084
9088
  export type GetMemberConnectionsQueryVariables = Types.Exact<{
@@ -1,6 +1,7 @@
1
1
  export * from "./base64.js";
2
2
  export * from "./date-utils.js";
3
3
  export * from "./parsing-utils.js";
4
+ export * from "./platform.js";
4
5
  export * from "./runtime.js";
5
6
  export * from "./string-utils.js";
6
7
  export * from "./type-utils.js";
@@ -1,6 +1,7 @@
1
1
  export * from "./base64.js";
2
2
  export * from "./date-utils.js";
3
3
  export * from "./parsing-utils.js";
4
+ export * from "./platform.js";
4
5
  export * from "./runtime.js";
5
6
  export * from "./string-utils.js";
6
7
  export * from "./type-utils.js";
@@ -0,0 +1 @@
1
+ export declare function getPlatformHeader(): string;
@@ -0,0 +1,21 @@
1
+ import { executeForRuntime } from "./runtime.js";
2
+ const BROWSERS = [
3
+ { name: "Edge", tokens: ["Edg"] },
4
+ { name: "Chrome", tokens: ["CriOS", "Chrome"] },
5
+ { name: "Firefox", tokens: ["FxiOS", "Firefox"] },
6
+ { name: "Safari", tokens: ["Safari"] },
7
+ ];
8
+ function detectBrowser(ua) {
9
+ for (const browser of BROWSERS) {
10
+ if (browser.tokens.some((token) => ua.includes(token))) {
11
+ return browser.name;
12
+ }
13
+ }
14
+ return "Unknown";
15
+ }
16
+ export function getPlatformHeader() {
17
+ return executeForRuntime({
18
+ node: () => `Node/${process.versions.node}`,
19
+ browser: () => `Browser/${detectBrowser(navigator.userAgent)}`,
20
+ });
21
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icanbwell/bwell-sdk-ts",
3
- "version": "1.96.0",
3
+ "version": "1.97.0",
4
4
  "description": "b.well TypeScript SDK",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",