@mindline/sync 1.0.32 → 1.0.34

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.
@@ -2,6 +2,6 @@
2
2
  "ExpandedNodes": [
3
3
  ""
4
4
  ],
5
- "SelectedNode": "\\package-lock.json",
5
+ "SelectedNode": "\\index.d.ts",
6
6
  "PreviewInSolutionExplorer": false
7
7
  }
package/.vs/slnx.sqlite CHANGED
Binary file
Binary file
package/README.md CHANGED
@@ -21,6 +21,7 @@ npm install @azure/msal-browser --save
21
21
  # 6. Publish
22
22
  ### `npm login`
23
23
  username, password, OTP code required
24
+ ### `npm version patch`
24
25
  ### `npm publish --access=public --otp=XXXXXX`
25
26
  ### `npm publish --dry-run`
26
27
  publishes package
package/hybridspa.ts CHANGED
@@ -42,7 +42,8 @@ export const graphConfig = {
42
42
  "https://graph.microsoft.com/beta/tenantRelationships/findTenantInformationByTenantId",
43
43
  graphUsersEndpoint: "https://graph.microsoft.com/v1.0/users",
44
44
  // reader endpoint to trigger sync start
45
- readerEndpoint: "https://dev-fn-reader-westus.azurewebsites.net/api/startSync/"
45
+ readerStartSyncEndpoint: "https://dev-fn-reader-westus.azurewebsites.net/api/startSync/",
46
+ readerApiEndpoint: "https://dev-fn-reader-westus.azurewebsites.net/api/lookup/"
46
47
  };
47
48
  // helper functions
48
49
  async function defineHeaders(
@@ -863,17 +864,22 @@ export async function readerPost(
863
864
  return result;
864
865
  }
865
866
  // create reader endpoint with config ID
866
- let readerEndpoint: string = graphConfig.readerEndpoint + config.id;
867
+ //let readerEndpoint: string = graphConfig.readerStartSyncEndpoint + config.id;
868
+ let readerEndpoint: string = graphConfig.readerApiEndpoint + config.id;
867
869
  // create headers
868
870
  const headers = await defineHeaders(instance, authorizedUser);
869
871
  // make reader endpoint call
870
872
  let options = { method: "POST", headers: headers };
871
873
  try {
872
- console.log("Attempting POST to /startSync: " + readerEndpoint);
873
874
  debugger;
875
+ console.log("Attempting POST to /startSync: " + readerEndpoint);
874
876
  let response = await fetch(readerEndpoint, options);
875
877
  if (response.status === 200 && response.statusText === "OK") {
876
878
  console.log(`Successful POST to /startSync: ${readerEndpoint}`);
879
+
880
+ let textResponse = await response.text();
881
+ textResponse = textResponse;
882
+
877
883
  return result;
878
884
  } else {
879
885
  result.error = await processErrors(response);
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { IPublicClientApplication } from "@azure/msal-browser/dist";
1
+ import { IPublicClientApplication } from "@azure/msal-browser";
2
2
 
3
3
  declare module "@mindline/sync" {
4
4
  export function sum(a: number, b: number): number;
@@ -136,7 +136,7 @@ declare module "@mindline/sync" {
136
136
  constructor(config: Config|null, syncPortalGlobalState: InitInfo|null, bClearLocalStorage: boolean);
137
137
  // populate tenantNodes based on config tenants
138
138
  init(config: Config|null, syncPortalGlobalState: InitInfo|null, bClearLocalStorage: boolean): void;
139
- test(instance: IPublicClientApplication, authorizedUser: User, config: Config): void;
139
+ startSync(instance: IPublicClientApplication, authorizedUser: User|undefined, config: Config|null|undefined): void;
140
140
  }
141
141
  export class TenantNode {
142
142
  expanded: boolean;