@mindline/sync 1.0.33 → 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.
- package/.vs/slnx.sqlite +0 -0
- package/.vs/sync/FileContentIndex/d66b84a1-9161-4980-846d-006358a14cf0.vsidx +0 -0
- package/.vs/sync/v17/.wsuo +0 -0
- package/README.md +1 -0
- package/hybridspa.ts +9 -3
- package/index.d.ts +1 -1
- package/index.ts +1030 -934
- package/package.json +1 -1
- package/.vs/sync/FileContentIndex/0ce1eeba-1f09-47e1-a427-aa0c39a8194a.vsidx +0 -0
package/.vs/slnx.sqlite
CHANGED
|
Binary file
|
package/.vs/sync/v17/.wsuo
CHANGED
|
Binary file
|
package/README.md
CHANGED
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
|
-
|
|
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.
|
|
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
|
@@ -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
|
-
|
|
139
|
+
startSync(instance: IPublicClientApplication, authorizedUser: User|undefined, config: Config|null|undefined): void;
|
|
140
140
|
}
|
|
141
141
|
export class TenantNode {
|
|
142
142
|
expanded: boolean;
|