@mindline/sync 1.0.51 → 1.0.53
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
CHANGED
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -3,8 +3,16 @@ declare module "@mindline/sync" {
|
|
|
3
3
|
export function sum(a: number, b: number): number;
|
|
4
4
|
export function helloNpm(): string;
|
|
5
5
|
|
|
6
|
+
export class APIResult {
|
|
7
|
+
result: boolean;
|
|
8
|
+
status: number;
|
|
9
|
+
error: string;
|
|
10
|
+
version: string;
|
|
11
|
+
array: Array<Object> | null;
|
|
12
|
+
constructor();
|
|
13
|
+
}
|
|
6
14
|
export class graphConfig {
|
|
7
|
-
static environmentTag: string
|
|
15
|
+
static environmentTag: string;
|
|
8
16
|
// config API endpoints
|
|
9
17
|
static adminEndpoint(): string;
|
|
10
18
|
static adminIncompleteEndpoint(): string;
|
|
@@ -33,7 +41,7 @@ declare module "@mindline/sync" {
|
|
|
33
41
|
static authorityUSRegex: RegExp;
|
|
34
42
|
static authorityCN: string;
|
|
35
43
|
static authorityCNRegex: RegExp;
|
|
36
|
-
}
|
|
44
|
+
}
|
|
37
45
|
export class Group {
|
|
38
46
|
id: string;
|
|
39
47
|
displayName: string;
|
|
@@ -134,6 +142,7 @@ declare module "@mindline/sync" {
|
|
|
134
142
|
constructor();
|
|
135
143
|
}
|
|
136
144
|
export class InitInfo {
|
|
145
|
+
version: string;
|
|
137
146
|
tab: number;
|
|
138
147
|
us: User[];
|
|
139
148
|
ts: Tenant[];
|
|
@@ -250,13 +259,6 @@ declare module "@mindline/sync" {
|
|
|
250
259
|
constructor(tid: string, name: string);
|
|
251
260
|
update(total: number, read: number, written: number, deferred: number): void;
|
|
252
261
|
}
|
|
253
|
-
export class APIResult {
|
|
254
|
-
result: boolean;
|
|
255
|
-
status: number;
|
|
256
|
-
error: string;
|
|
257
|
-
array: Array<Object> | null;
|
|
258
|
-
constructor();
|
|
259
|
-
}
|
|
260
262
|
//
|
|
261
263
|
// Azure AD Graph API
|
|
262
264
|
//
|
package/index.ts
CHANGED
|
@@ -20,6 +20,14 @@ export function helloNpm(): string {
|
|
|
20
20
|
return "hello NPM";
|
|
21
21
|
}
|
|
22
22
|
// main application exports
|
|
23
|
+
export class APIResult {
|
|
24
|
+
result: boolean;
|
|
25
|
+
status: number;
|
|
26
|
+
error: string;
|
|
27
|
+
version: string;
|
|
28
|
+
array: Array<Object> | null;
|
|
29
|
+
constructor() { this.result = true; this.status = 200; this.error = ""; this.version = version; this.array = null; }
|
|
30
|
+
}
|
|
23
31
|
export class graphConfig {
|
|
24
32
|
static environmentTag: string = "dev";
|
|
25
33
|
// config API endpoints
|
|
@@ -262,6 +270,7 @@ function storageAvailable(type) {
|
|
|
262
270
|
}
|
|
263
271
|
}
|
|
264
272
|
export class InitInfo {
|
|
273
|
+
version: string;
|
|
265
274
|
tab: number;
|
|
266
275
|
us: User[];
|
|
267
276
|
ts: Tenant[];
|
|
@@ -297,6 +306,7 @@ export class InitInfo {
|
|
|
297
306
|
var workspacesString = JSON.stringify(workspaces);
|
|
298
307
|
try {
|
|
299
308
|
this.tab = 0;
|
|
309
|
+
this.version = version;
|
|
300
310
|
this.us = deserializeArray(User, usersString);
|
|
301
311
|
this.ts = deserializeArray(Tenant, tenantsString);
|
|
302
312
|
this.cs = deserializeArray(Config, configsString);
|
|
@@ -1189,13 +1199,6 @@ export class TenantNode {
|
|
|
1189
1199
|
}
|
|
1190
1200
|
}
|
|
1191
1201
|
}
|
|
1192
|
-
export class APIResult {
|
|
1193
|
-
result: boolean;
|
|
1194
|
-
status: number;
|
|
1195
|
-
error: string;
|
|
1196
|
-
array: Array<Object> | null;
|
|
1197
|
-
constructor() { this.result = true; this.status = 200; this.error = ""; this.array = null; }
|
|
1198
|
-
}
|
|
1199
1202
|
//
|
|
1200
1203
|
// Azure AD Graph API
|
|
1201
1204
|
//
|
|
@@ -1273,7 +1276,8 @@ export function requestAdminConsent(user: User, scope: string): void {
|
|
|
1273
1276
|
adminConsentURL += "/adminconsent";
|
|
1274
1277
|
let url: URL = new URL(adminConsentURL);
|
|
1275
1278
|
url.searchParams.append("client_id", "63100afe-506e-4bb2-8ff7-d8d5ab373129");
|
|
1276
|
-
url.searchParams.append("
|
|
1279
|
+
url.searchParams.append("redirect_uri", window.location.origin);
|
|
1280
|
+
url.searchParams.append("domain_hint", user.companyDomain);
|
|
1277
1281
|
window.location.assign(url.href);
|
|
1278
1282
|
}
|
|
1279
1283
|
export async function signOut(user: User): Promise<boolean>{
|
|
@@ -1572,14 +1576,7 @@ export async function initGet(instance: IPublicClientApplication, authorizedUser
|
|
|
1572
1576
|
result = await workspaceInfoGet(instance, authorizedUser, user, ii, debug);
|
|
1573
1577
|
tasks.setTaskEnd("GET workspaces", new Date(), result.result ? "complete" : "failed");
|
|
1574
1578
|
}
|
|
1575
|
-
|
|
1576
|
-
if (result.result) {
|
|
1577
|
-
result.error = version;
|
|
1578
|
-
}
|
|
1579
|
-
// if failed, output version information to the log
|
|
1580
|
-
else {
|
|
1581
|
-
console.log("@mindline/sync package version: " + version);
|
|
1582
|
-
}
|
|
1579
|
+
console.log("initGet complete. Version: " + version);
|
|
1583
1580
|
return result;
|
|
1584
1581
|
}
|
|
1585
1582
|
else {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mindline/sync",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.53",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"exports": "./index.ts",
|
|
7
7
|
"description": "sync is a node.js package encapsulating javscript classes required for configuring Mindline sync service.",
|
|
Binary file
|