@jbrowse/plugin-authentication 2.12.0 → 2.12.1
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/dist/DropboxOAuthModel/DropboxIcon.js +1 -1
- package/dist/DropboxOAuthModel/configSchema.d.ts +2 -6
- package/dist/DropboxOAuthModel/model.d.ts +24 -129
- package/dist/DropboxOAuthModel/util.js +1 -2
- package/dist/ExternalTokenModel/model.d.ts +17 -49
- package/dist/GoogleDriveOAuthModel/GoogleDriveIcon.js +1 -1
- package/dist/GoogleDriveOAuthModel/configSchema.d.ts +2 -6
- package/dist/GoogleDriveOAuthModel/model.d.ts +19 -23
- package/dist/GoogleDriveOAuthModel/model.js +1 -1
- package/dist/GoogleDriveOAuthModel/util.js +1 -2
- package/dist/HTTPBasicModel/HTTPBasicLoginForm.js +1 -2
- package/dist/HTTPBasicModel/model.d.ts +20 -71
- package/dist/OAuthModel/configSchema.d.ts +1 -3
- package/dist/OAuthModel/model.d.ts +21 -98
- package/dist/OAuthModel/util.js +4 -5
- package/dist/index.d.ts +69 -294
- package/dist/util.js +2 -3
- package/esm/DropboxOAuthModel/configSchema.d.ts +2 -6
- package/esm/DropboxOAuthModel/model.d.ts +24 -129
- package/esm/ExternalTokenModel/model.d.ts +17 -49
- package/esm/GoogleDriveOAuthModel/configSchema.d.ts +2 -6
- package/esm/GoogleDriveOAuthModel/model.d.ts +19 -23
- package/esm/HTTPBasicModel/model.d.ts +20 -71
- package/esm/OAuthModel/configSchema.d.ts +1 -3
- package/esm/OAuthModel/model.d.ts +21 -98
- package/esm/index.d.ts +69 -294
- package/package.json +2 -2
|
@@ -3,10 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = DropboxIcon;
|
|
6
7
|
const react_1 = __importDefault(require("react"));
|
|
7
8
|
const material_1 = require("@mui/material");
|
|
8
9
|
function DropboxIcon(props) {
|
|
9
10
|
return (react_1.default.createElement(material_1.SvgIcon, { ...props },
|
|
10
11
|
react_1.default.createElement("path", { d: "M3 6.2L8 9.39L13 6.2L8 3L3 6.2M13 6.2L18 9.39L23 6.2L18 3L13 6.2M3 12.55L8 15.74L13 12.55L8 9.35L3 12.55M18 9.35L13 12.55L18 15.74L23 12.55L18 9.35M8.03 16.8L13.04 20L18.04 16.8L13.04 13.61L8.03 16.8Z" })));
|
|
11
12
|
}
|
|
12
|
-
exports.default = DropboxIcon;
|
|
@@ -60,9 +60,7 @@ declare const DropboxOAuthConfigSchema: import("@jbrowse/core/configuration/conf
|
|
|
60
60
|
};
|
|
61
61
|
scopes: {
|
|
62
62
|
description: string;
|
|
63
|
-
type: string;
|
|
64
|
-
* #baseConfiguration
|
|
65
|
-
*/
|
|
63
|
+
type: string;
|
|
66
64
|
defaultValue: string;
|
|
67
65
|
};
|
|
68
66
|
state: {
|
|
@@ -84,9 +82,7 @@ declare const DropboxOAuthConfigSchema: import("@jbrowse/core/configuration/conf
|
|
|
84
82
|
description: {
|
|
85
83
|
description: string;
|
|
86
84
|
type: string;
|
|
87
|
-
defaultValue: string;
|
|
88
|
-
* #slot
|
|
89
|
-
*/
|
|
85
|
+
defaultValue: string;
|
|
90
86
|
};
|
|
91
87
|
authHeader: {
|
|
92
88
|
description: string;
|
|
@@ -1,105 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { UriLocation } from '@jbrowse/core/util/types';
|
|
3
3
|
import { Instance } from 'mobx-state-tree';
|
|
4
|
+
import { DropboxOAuthInternetAccountConfigModel } from './configSchema';
|
|
4
5
|
/**
|
|
5
6
|
* #stateModel DropboxOAuthInternetAccount
|
|
6
7
|
*/
|
|
7
|
-
declare const stateModelFactory: (configSchema: import("
|
|
8
|
-
authEndpoint: {
|
|
9
|
-
description: string;
|
|
10
|
-
type: string;
|
|
11
|
-
defaultValue: string;
|
|
12
|
-
};
|
|
13
|
-
tokenEndpoint: {
|
|
14
|
-
description: string;
|
|
15
|
-
type: string;
|
|
16
|
-
defaultValue: string;
|
|
17
|
-
};
|
|
18
|
-
needsPKCE: {
|
|
19
|
-
description: string;
|
|
20
|
-
type: string; /**
|
|
21
|
-
* #getter
|
|
22
|
-
* The FileSelector icon for Dropbox
|
|
23
|
-
*/
|
|
24
|
-
defaultValue: boolean;
|
|
25
|
-
};
|
|
26
|
-
domains: {
|
|
27
|
-
description: string;
|
|
28
|
-
type: string;
|
|
29
|
-
defaultValue: string[];
|
|
30
|
-
};
|
|
31
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
32
|
-
tokenType: {
|
|
33
|
-
description: string;
|
|
34
|
-
type: string;
|
|
35
|
-
defaultValue: string;
|
|
36
|
-
};
|
|
37
|
-
authEndpoint: {
|
|
38
|
-
description: string;
|
|
39
|
-
type: string;
|
|
40
|
-
defaultValue: string;
|
|
41
|
-
};
|
|
42
|
-
tokenEndpoint: {
|
|
43
|
-
description: string;
|
|
44
|
-
type: string;
|
|
45
|
-
defaultValue: string;
|
|
46
|
-
};
|
|
47
|
-
needsPKCE: {
|
|
48
|
-
description: string;
|
|
49
|
-
type: string;
|
|
50
|
-
defaultValue: boolean;
|
|
51
|
-
};
|
|
52
|
-
clientId: {
|
|
53
|
-
description: string;
|
|
54
|
-
type: string;
|
|
55
|
-
defaultValue: string;
|
|
56
|
-
}; /**
|
|
57
|
-
* #method
|
|
58
|
-
*/
|
|
59
|
-
scopes: {
|
|
60
|
-
description: string;
|
|
61
|
-
type: string;
|
|
62
|
-
defaultValue: string;
|
|
63
|
-
};
|
|
64
|
-
state: {
|
|
65
|
-
description: string;
|
|
66
|
-
type: string;
|
|
67
|
-
defaultValue: string;
|
|
68
|
-
};
|
|
69
|
-
responseType: {
|
|
70
|
-
description: string;
|
|
71
|
-
type: string;
|
|
72
|
-
defaultValue: string;
|
|
73
|
-
};
|
|
74
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
75
|
-
name: {
|
|
76
|
-
description: string;
|
|
77
|
-
type: string;
|
|
78
|
-
defaultValue: string;
|
|
79
|
-
};
|
|
80
|
-
description: {
|
|
81
|
-
description: string;
|
|
82
|
-
type: string;
|
|
83
|
-
defaultValue: string;
|
|
84
|
-
};
|
|
85
|
-
authHeader: {
|
|
86
|
-
description: string;
|
|
87
|
-
type: string; /**
|
|
88
|
-
* #stateModel DropboxOAuthInternetAccount
|
|
89
|
-
*/
|
|
90
|
-
defaultValue: string;
|
|
91
|
-
};
|
|
92
|
-
tokenType: {
|
|
93
|
-
description: string;
|
|
94
|
-
type: string;
|
|
95
|
-
defaultValue: string;
|
|
96
|
-
};
|
|
97
|
-
domains: {
|
|
98
|
-
description: string;
|
|
99
|
-
type: string;
|
|
100
|
-
defaultValue: never[];
|
|
101
|
-
};
|
|
102
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>, undefined>>) => import("mobx-state-tree").IModelType<{
|
|
8
|
+
declare const stateModelFactory: (configSchema: DropboxOAuthInternetAccountConfigModel) => import("mobx-state-tree").IModelType<{
|
|
103
9
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
104
10
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
105
11
|
configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
@@ -156,9 +62,7 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
|
|
|
156
62
|
description: string;
|
|
157
63
|
type: string;
|
|
158
64
|
defaultValue: string;
|
|
159
|
-
};
|
|
160
|
-
* #method
|
|
161
|
-
*/
|
|
65
|
+
};
|
|
162
66
|
scopes: {
|
|
163
67
|
description: string;
|
|
164
68
|
type: string;
|
|
@@ -187,9 +91,7 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
|
|
|
187
91
|
};
|
|
188
92
|
authHeader: {
|
|
189
93
|
description: string;
|
|
190
|
-
type: string;
|
|
191
|
-
* #stateModel DropboxOAuthInternetAccount
|
|
192
|
-
*/
|
|
94
|
+
type: string;
|
|
193
95
|
defaultValue: string;
|
|
194
96
|
};
|
|
195
97
|
tokenType: {
|
|
@@ -224,10 +126,7 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
|
|
|
224
126
|
};
|
|
225
127
|
needsPKCE: {
|
|
226
128
|
description: string;
|
|
227
|
-
type: string;
|
|
228
|
-
* #getter
|
|
229
|
-
* The FileSelector icon for Dropbox
|
|
230
|
-
*/
|
|
129
|
+
type: string;
|
|
231
130
|
defaultValue: boolean;
|
|
232
131
|
};
|
|
233
132
|
domains: {
|
|
@@ -260,9 +159,7 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
|
|
|
260
159
|
description: string;
|
|
261
160
|
type: string;
|
|
262
161
|
defaultValue: string;
|
|
263
|
-
};
|
|
264
|
-
* #method
|
|
265
|
-
*/
|
|
162
|
+
};
|
|
266
163
|
scopes: {
|
|
267
164
|
description: string;
|
|
268
165
|
type: string;
|
|
@@ -291,9 +188,7 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
|
|
|
291
188
|
};
|
|
292
189
|
authHeader: {
|
|
293
190
|
description: string;
|
|
294
|
-
type: string;
|
|
295
|
-
* #stateModel DropboxOAuthInternetAccount
|
|
296
|
-
*/
|
|
191
|
+
type: string;
|
|
297
192
|
defaultValue: string;
|
|
298
193
|
};
|
|
299
194
|
tokenType: {
|
|
@@ -327,23 +222,23 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
|
|
|
327
222
|
retrieveToken(): string | null;
|
|
328
223
|
validateToken(token: string, _loc: UriLocation): Promise<string>;
|
|
329
224
|
} & {
|
|
330
|
-
getToken(location?: UriLocation
|
|
225
|
+
getToken(location?: UriLocation): Promise<string>;
|
|
331
226
|
} & {
|
|
332
227
|
addAuthHeaderToInit(init: RequestInit | undefined, token: string): {
|
|
333
228
|
headers: Headers;
|
|
334
|
-
body?: BodyInit | null
|
|
335
|
-
cache?: RequestCache
|
|
336
|
-
credentials?: RequestCredentials
|
|
337
|
-
integrity?: string
|
|
338
|
-
keepalive?: boolean
|
|
339
|
-
method?: string
|
|
340
|
-
mode?: RequestMode
|
|
341
|
-
priority?: RequestPriority
|
|
342
|
-
redirect?: RequestRedirect
|
|
343
|
-
referrer?: string
|
|
344
|
-
referrerPolicy?: ReferrerPolicy
|
|
345
|
-
signal?: AbortSignal | null
|
|
346
|
-
window?: null
|
|
229
|
+
body?: BodyInit | null;
|
|
230
|
+
cache?: RequestCache;
|
|
231
|
+
credentials?: RequestCredentials;
|
|
232
|
+
integrity?: string;
|
|
233
|
+
keepalive?: boolean;
|
|
234
|
+
method?: string;
|
|
235
|
+
mode?: RequestMode;
|
|
236
|
+
priority?: RequestPriority;
|
|
237
|
+
redirect?: RequestRedirect;
|
|
238
|
+
referrer?: string;
|
|
239
|
+
referrerPolicy?: ReferrerPolicy;
|
|
240
|
+
signal?: AbortSignal | null;
|
|
241
|
+
window?: null;
|
|
347
242
|
};
|
|
348
243
|
getPreAuthorizationInformation(location: UriLocation): Promise<{
|
|
349
244
|
internetAccountType: string;
|
|
@@ -353,7 +248,7 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
|
|
|
353
248
|
};
|
|
354
249
|
}>;
|
|
355
250
|
} & {
|
|
356
|
-
getFetcher(loc?: UriLocation
|
|
251
|
+
getFetcher(loc?: UriLocation): (input: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
357
252
|
} & {
|
|
358
253
|
openLocation(location: UriLocation): import("@jbrowse/core/util/io").RemoteFileWithRangeCache;
|
|
359
254
|
} & {
|
|
@@ -376,12 +271,12 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
|
|
|
376
271
|
} & {
|
|
377
272
|
addMessageChannel(resolve: (token: string) => void, reject: (error: Error) => void): void;
|
|
378
273
|
deleteMessageChannel(): void;
|
|
379
|
-
finishOAuthWindow(event: MessageEvent
|
|
274
|
+
finishOAuthWindow(event: MessageEvent, resolve: (token: string) => void, reject: (error: Error) => void): Promise<void>;
|
|
380
275
|
useEndpointForAuthorization(resolve: (token: string) => void, reject: (error: Error) => void): Promise<void>;
|
|
381
276
|
getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): Promise<void>;
|
|
382
277
|
validateToken(token: string, location: UriLocation): Promise<string>;
|
|
383
278
|
} & {
|
|
384
|
-
getFetcher(loc?: UriLocation
|
|
279
|
+
getFetcher(loc?: UriLocation): (input: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
385
280
|
} & {
|
|
386
281
|
/**
|
|
387
282
|
* #getter
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDescriptiveErrorMessage =
|
|
3
|
+
exports.getDescriptiveErrorMessage = getDescriptiveErrorMessage;
|
|
4
4
|
const util_1 = require("../util");
|
|
5
5
|
/**
|
|
6
6
|
* Error messages from
|
|
@@ -24,4 +24,3 @@ async function getDescriptiveErrorMessage(response, reason) {
|
|
|
24
24
|
}
|
|
25
25
|
return (0, util_1.getResponseError)({ response, reason, statusText: errorMessage });
|
|
26
26
|
}
|
|
27
|
-
exports.getDescriptiveErrorMessage = getDescriptiveErrorMessage;
|
|
@@ -1,39 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { UriLocation } from '@jbrowse/core/util/types';
|
|
2
|
+
import { ExternalTokenInternetAccountConfigModel } from './configSchema';
|
|
3
3
|
import { Instance } from 'mobx-state-tree';
|
|
4
|
-
declare const stateModelFactory: (configSchema: import("
|
|
5
|
-
validateWithHEAD: {
|
|
6
|
-
description: string;
|
|
7
|
-
type: string;
|
|
8
|
-
defaultValue: boolean;
|
|
9
|
-
};
|
|
10
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
11
|
-
name: {
|
|
12
|
-
description: string;
|
|
13
|
-
type: string;
|
|
14
|
-
defaultValue: string;
|
|
15
|
-
};
|
|
16
|
-
description: {
|
|
17
|
-
description: string;
|
|
18
|
-
type: string;
|
|
19
|
-
defaultValue: string;
|
|
20
|
-
};
|
|
21
|
-
authHeader: {
|
|
22
|
-
description: string;
|
|
23
|
-
type: string;
|
|
24
|
-
defaultValue: string;
|
|
25
|
-
};
|
|
26
|
-
tokenType: {
|
|
27
|
-
description: string;
|
|
28
|
-
type: string;
|
|
29
|
-
defaultValue: string;
|
|
30
|
-
};
|
|
31
|
-
domains: {
|
|
32
|
-
description: string;
|
|
33
|
-
type: string;
|
|
34
|
-
defaultValue: never[];
|
|
35
|
-
};
|
|
36
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>) => import("mobx-state-tree").IModelType<{
|
|
4
|
+
declare const stateModelFactory: (configSchema: ExternalTokenInternetAccountConfigModel) => import("mobx-state-tree").IModelType<{
|
|
37
5
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
38
6
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
39
7
|
configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
@@ -118,23 +86,23 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
|
|
|
118
86
|
retrieveToken(): string | null;
|
|
119
87
|
validateToken(token: string, _loc: UriLocation): Promise<string>;
|
|
120
88
|
} & {
|
|
121
|
-
getToken(location?: UriLocation
|
|
89
|
+
getToken(location?: UriLocation): Promise<string>;
|
|
122
90
|
} & {
|
|
123
91
|
addAuthHeaderToInit(init: RequestInit | undefined, token: string): {
|
|
124
92
|
headers: Headers;
|
|
125
|
-
body?: BodyInit | null
|
|
126
|
-
cache?: RequestCache
|
|
127
|
-
credentials?: RequestCredentials
|
|
128
|
-
integrity?: string
|
|
129
|
-
keepalive?: boolean
|
|
130
|
-
method?: string
|
|
131
|
-
mode?: RequestMode
|
|
132
|
-
priority?: RequestPriority
|
|
133
|
-
redirect?: RequestRedirect
|
|
134
|
-
referrer?: string
|
|
135
|
-
referrerPolicy?: ReferrerPolicy
|
|
136
|
-
signal?: AbortSignal | null
|
|
137
|
-
window?: null
|
|
93
|
+
body?: BodyInit | null;
|
|
94
|
+
cache?: RequestCache;
|
|
95
|
+
credentials?: RequestCredentials;
|
|
96
|
+
integrity?: string;
|
|
97
|
+
keepalive?: boolean;
|
|
98
|
+
method?: string;
|
|
99
|
+
mode?: RequestMode;
|
|
100
|
+
priority?: RequestPriority;
|
|
101
|
+
redirect?: RequestRedirect;
|
|
102
|
+
referrer?: string;
|
|
103
|
+
referrerPolicy?: ReferrerPolicy;
|
|
104
|
+
signal?: AbortSignal | null;
|
|
105
|
+
window?: null;
|
|
138
106
|
};
|
|
139
107
|
getPreAuthorizationInformation(location: UriLocation): Promise<{
|
|
140
108
|
internetAccountType: string;
|
|
@@ -144,7 +112,7 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
|
|
|
144
112
|
};
|
|
145
113
|
}>;
|
|
146
114
|
} & {
|
|
147
|
-
getFetcher(loc?: UriLocation
|
|
115
|
+
getFetcher(loc?: UriLocation): (input: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
148
116
|
} & {
|
|
149
117
|
openLocation(location: UriLocation): import("@jbrowse/core/util/io").RemoteFileWithRangeCache;
|
|
150
118
|
} & {
|
|
@@ -3,10 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = GoogleDriveIcon;
|
|
6
7
|
const react_1 = __importDefault(require("react"));
|
|
7
8
|
const material_1 = require("@mui/material");
|
|
8
9
|
function GoogleDriveIcon(props) {
|
|
9
10
|
return (react_1.default.createElement(material_1.SvgIcon, { ...props },
|
|
10
11
|
react_1.default.createElement("path", { d: "M7.71,3.5L1.15,15L4.58,21L11.13,9.5M9.73,15L6.3,21H19.42L22.85,15M22.28,14L15.42,2H8.58L8.57,2L15.43,14H22.28Z" })));
|
|
11
12
|
}
|
|
12
|
-
exports.default = GoogleDriveIcon;
|
|
@@ -56,9 +56,7 @@ declare const GoogleDriveOAuthConfigSchema: import("@jbrowse/core/configuration/
|
|
|
56
56
|
clientId: {
|
|
57
57
|
description: string;
|
|
58
58
|
type: string;
|
|
59
|
-
defaultValue: string;
|
|
60
|
-
* #baseConfiguration
|
|
61
|
-
*/
|
|
59
|
+
defaultValue: string;
|
|
62
60
|
};
|
|
63
61
|
scopes: {
|
|
64
62
|
description: string;
|
|
@@ -93,9 +91,7 @@ declare const GoogleDriveOAuthConfigSchema: import("@jbrowse/core/configuration/
|
|
|
93
91
|
};
|
|
94
92
|
tokenType: {
|
|
95
93
|
description: string;
|
|
96
|
-
type: string;
|
|
97
|
-
* #slot
|
|
98
|
-
*/
|
|
94
|
+
type: string;
|
|
99
95
|
defaultValue: string;
|
|
100
96
|
};
|
|
101
97
|
domains: {
|
|
@@ -106,9 +106,7 @@ export default function stateModelFactory(configSchema: GoogleDriveOAuthInternet
|
|
|
106
106
|
domains: {
|
|
107
107
|
description: string;
|
|
108
108
|
type: string;
|
|
109
|
-
defaultValue: never[];
|
|
110
|
-
* #stateModel GoogleDriveOAuthInternetAccount
|
|
111
|
-
*/
|
|
109
|
+
defaultValue: never[];
|
|
112
110
|
};
|
|
113
111
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>;
|
|
114
112
|
} & {
|
|
@@ -205,9 +203,7 @@ export default function stateModelFactory(configSchema: GoogleDriveOAuthInternet
|
|
|
205
203
|
domains: {
|
|
206
204
|
description: string;
|
|
207
205
|
type: string;
|
|
208
|
-
defaultValue: never[];
|
|
209
|
-
* #stateModel GoogleDriveOAuthInternetAccount
|
|
210
|
-
*/
|
|
206
|
+
defaultValue: never[];
|
|
211
207
|
};
|
|
212
208
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>, undefined>>;
|
|
213
209
|
}, {
|
|
@@ -230,23 +226,23 @@ export default function stateModelFactory(configSchema: GoogleDriveOAuthInternet
|
|
|
230
226
|
retrieveToken(): string | null;
|
|
231
227
|
validateToken(token: string, _loc: UriLocation): Promise<string>;
|
|
232
228
|
} & {
|
|
233
|
-
getToken(location?: UriLocation
|
|
229
|
+
getToken(location?: UriLocation): Promise<string>;
|
|
234
230
|
} & {
|
|
235
231
|
addAuthHeaderToInit(init: RequestInit | undefined, token: string): {
|
|
236
232
|
headers: Headers;
|
|
237
|
-
body?: BodyInit | null
|
|
238
|
-
cache?: RequestCache
|
|
239
|
-
credentials?: RequestCredentials
|
|
240
|
-
integrity?: string
|
|
241
|
-
keepalive?: boolean
|
|
242
|
-
method?: string
|
|
243
|
-
mode?: RequestMode
|
|
244
|
-
priority?: RequestPriority
|
|
245
|
-
redirect?: RequestRedirect
|
|
246
|
-
referrer?: string
|
|
247
|
-
referrerPolicy?: ReferrerPolicy
|
|
248
|
-
signal?: AbortSignal | null
|
|
249
|
-
window?: null
|
|
233
|
+
body?: BodyInit | null;
|
|
234
|
+
cache?: RequestCache;
|
|
235
|
+
credentials?: RequestCredentials;
|
|
236
|
+
integrity?: string;
|
|
237
|
+
keepalive?: boolean;
|
|
238
|
+
method?: string;
|
|
239
|
+
mode?: RequestMode;
|
|
240
|
+
priority?: RequestPriority;
|
|
241
|
+
redirect?: RequestRedirect;
|
|
242
|
+
referrer?: string;
|
|
243
|
+
referrerPolicy?: ReferrerPolicy;
|
|
244
|
+
signal?: AbortSignal | null;
|
|
245
|
+
window?: null;
|
|
250
246
|
};
|
|
251
247
|
getPreAuthorizationInformation(location: UriLocation): Promise<{
|
|
252
248
|
internetAccountType: string;
|
|
@@ -256,7 +252,7 @@ export default function stateModelFactory(configSchema: GoogleDriveOAuthInternet
|
|
|
256
252
|
};
|
|
257
253
|
}>;
|
|
258
254
|
} & {
|
|
259
|
-
getFetcher(loc?: UriLocation
|
|
255
|
+
getFetcher(loc?: UriLocation): (input: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
260
256
|
} & {
|
|
261
257
|
openLocation(location: UriLocation): import("@jbrowse/core/util/io").RemoteFileWithRangeCache;
|
|
262
258
|
} & {
|
|
@@ -279,12 +275,12 @@ export default function stateModelFactory(configSchema: GoogleDriveOAuthInternet
|
|
|
279
275
|
} & {
|
|
280
276
|
addMessageChannel(resolve: (token: string) => void, reject: (error: Error) => void): void;
|
|
281
277
|
deleteMessageChannel(): void;
|
|
282
|
-
finishOAuthWindow(event: MessageEvent
|
|
278
|
+
finishOAuthWindow(event: MessageEvent, resolve: (token: string) => void, reject: (error: Error) => void): Promise<void>;
|
|
283
279
|
useEndpointForAuthorization(resolve: (token: string) => void, reject: (error: Error) => void): Promise<void>;
|
|
284
280
|
getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): Promise<void>;
|
|
285
281
|
validateToken(token: string, location: UriLocation): Promise<string>;
|
|
286
282
|
} & {
|
|
287
|
-
getFetcher(loc?: UriLocation
|
|
283
|
+
getFetcher(loc?: UriLocation): (input: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
288
284
|
} & {
|
|
289
285
|
/**
|
|
290
286
|
* #getter
|
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = stateModelFactory;
|
|
6
7
|
const react_1 = __importDefault(require("react"));
|
|
7
8
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
8
9
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
@@ -94,4 +95,3 @@ function stateModelFactory(configSchema) {
|
|
|
94
95
|
},
|
|
95
96
|
}));
|
|
96
97
|
}
|
|
97
|
-
exports.default = stateModelFactory;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDescriptiveErrorMessage =
|
|
3
|
+
exports.getDescriptiveErrorMessage = getDescriptiveErrorMessage;
|
|
4
4
|
const util_1 = require("../util");
|
|
5
5
|
async function getDescriptiveErrorMessage(response, reason) {
|
|
6
6
|
let errorMessage = '';
|
|
@@ -13,4 +13,3 @@ async function getDescriptiveErrorMessage(response, reason) {
|
|
|
13
13
|
}
|
|
14
14
|
return (0, util_1.getResponseError)({ response, reason, statusText: errorMessage });
|
|
15
15
|
}
|
|
16
|
-
exports.getDescriptiveErrorMessage = getDescriptiveErrorMessage;
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.HTTPBasicLoginForm =
|
|
26
|
+
exports.HTTPBasicLoginForm = HTTPBasicLoginForm;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
const material_1 = require("@mui/material");
|
|
29
29
|
const ui_1 = require("@jbrowse/core/ui");
|
|
@@ -47,4 +47,3 @@ function HTTPBasicLoginForm({ internetAccountId, handleClose, }) {
|
|
|
47
47
|
react_1.default.createElement(material_1.Button, { variant: "contained", color: "primary", type: "submit" }, "Submit"),
|
|
48
48
|
react_1.default.createElement(material_1.Button, { variant: "contained", color: "secondary", type: "submit", onClick: () => handleClose() }, "Cancel")))));
|
|
49
49
|
}
|
|
50
|
-
exports.HTTPBasicLoginForm = HTTPBasicLoginForm;
|
|
@@ -1,52 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { UriLocation } from '@jbrowse/core/util/types';
|
|
3
2
|
import { Instance } from 'mobx-state-tree';
|
|
3
|
+
import { HTTPBasicInternetAccountConfigModel } from './configSchema';
|
|
4
4
|
/**
|
|
5
5
|
* #stateModel HTTPBasicInternetAccount
|
|
6
6
|
*/
|
|
7
|
-
declare const stateModelFactory: (configSchema: import("
|
|
8
|
-
tokenType: {
|
|
9
|
-
description: string;
|
|
10
|
-
type: string;
|
|
11
|
-
defaultValue: string;
|
|
12
|
-
};
|
|
13
|
-
validateWithHEAD: {
|
|
14
|
-
description: string;
|
|
15
|
-
type: string;
|
|
16
|
-
defaultValue: boolean; /**
|
|
17
|
-
* #property
|
|
18
|
-
*/
|
|
19
|
-
};
|
|
20
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
21
|
-
name: {
|
|
22
|
-
description: string;
|
|
23
|
-
type: string;
|
|
24
|
-
defaultValue: string;
|
|
25
|
-
};
|
|
26
|
-
description: {
|
|
27
|
-
description: string;
|
|
28
|
-
type: string;
|
|
29
|
-
defaultValue: string;
|
|
30
|
-
};
|
|
31
|
-
authHeader: {
|
|
32
|
-
description: string;
|
|
33
|
-
type: string;
|
|
34
|
-
defaultValue: string;
|
|
35
|
-
};
|
|
36
|
-
tokenType: {
|
|
37
|
-
description: string;
|
|
38
|
-
type: string;
|
|
39
|
-
defaultValue: string;
|
|
40
|
-
};
|
|
41
|
-
domains: {
|
|
42
|
-
description: string;
|
|
43
|
-
type: string;
|
|
44
|
-
/**
|
|
45
|
-
* #property
|
|
46
|
-
*/
|
|
47
|
-
defaultValue: never[];
|
|
48
|
-
};
|
|
49
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>) => import("mobx-state-tree").IModelType<{
|
|
7
|
+
declare const stateModelFactory: (configSchema: HTTPBasicInternetAccountConfigModel) => import("mobx-state-tree").IModelType<{
|
|
50
8
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
51
9
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
52
10
|
configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
@@ -54,16 +12,12 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
|
|
|
54
12
|
description: string;
|
|
55
13
|
type: string;
|
|
56
14
|
defaultValue: string;
|
|
57
|
-
};
|
|
58
|
-
* #property
|
|
59
|
-
*/
|
|
15
|
+
};
|
|
60
16
|
description: {
|
|
61
17
|
description: string;
|
|
62
18
|
type: string;
|
|
63
19
|
defaultValue: string;
|
|
64
|
-
};
|
|
65
|
-
* #getter
|
|
66
|
-
*/
|
|
20
|
+
};
|
|
67
21
|
authHeader: {
|
|
68
22
|
description: string;
|
|
69
23
|
type: string;
|
|
@@ -97,9 +51,7 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
|
|
|
97
51
|
validateWithHEAD: {
|
|
98
52
|
description: string;
|
|
99
53
|
type: string;
|
|
100
|
-
defaultValue: boolean;
|
|
101
|
-
* #property
|
|
102
|
-
*/
|
|
54
|
+
defaultValue: boolean;
|
|
103
55
|
};
|
|
104
56
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
105
57
|
name: {
|
|
@@ -125,9 +77,6 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
|
|
|
125
77
|
domains: {
|
|
126
78
|
description: string;
|
|
127
79
|
type: string;
|
|
128
|
-
/**
|
|
129
|
-
* #property
|
|
130
|
-
*/
|
|
131
80
|
defaultValue: never[];
|
|
132
81
|
};
|
|
133
82
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>;
|
|
@@ -151,23 +100,23 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
|
|
|
151
100
|
retrieveToken(): string | null;
|
|
152
101
|
validateToken(token: string, _loc: UriLocation): Promise<string>;
|
|
153
102
|
} & {
|
|
154
|
-
getToken(location?: UriLocation
|
|
103
|
+
getToken(location?: UriLocation): Promise<string>;
|
|
155
104
|
} & {
|
|
156
105
|
addAuthHeaderToInit(init: RequestInit | undefined, token: string): {
|
|
157
106
|
headers: Headers;
|
|
158
|
-
body?: BodyInit | null
|
|
159
|
-
cache?: RequestCache
|
|
160
|
-
credentials?: RequestCredentials
|
|
161
|
-
integrity?: string
|
|
162
|
-
keepalive?: boolean
|
|
163
|
-
method?: string
|
|
164
|
-
mode?: RequestMode
|
|
165
|
-
priority?: RequestPriority
|
|
166
|
-
redirect?: RequestRedirect
|
|
167
|
-
referrer?: string
|
|
168
|
-
referrerPolicy?: ReferrerPolicy
|
|
169
|
-
signal?: AbortSignal | null
|
|
170
|
-
window?: null
|
|
107
|
+
body?: BodyInit | null;
|
|
108
|
+
cache?: RequestCache;
|
|
109
|
+
credentials?: RequestCredentials;
|
|
110
|
+
integrity?: string;
|
|
111
|
+
keepalive?: boolean;
|
|
112
|
+
method?: string;
|
|
113
|
+
mode?: RequestMode;
|
|
114
|
+
priority?: RequestPriority;
|
|
115
|
+
redirect?: RequestRedirect;
|
|
116
|
+
referrer?: string;
|
|
117
|
+
referrerPolicy?: ReferrerPolicy;
|
|
118
|
+
signal?: AbortSignal | null;
|
|
119
|
+
window?: null;
|
|
171
120
|
};
|
|
172
121
|
getPreAuthorizationInformation(location: UriLocation): Promise<{
|
|
173
122
|
internetAccountType: string;
|
|
@@ -177,7 +126,7 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
|
|
|
177
126
|
};
|
|
178
127
|
}>;
|
|
179
128
|
} & {
|
|
180
|
-
getFetcher(loc?: UriLocation
|
|
129
|
+
getFetcher(loc?: UriLocation): (input: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
181
130
|
} & {
|
|
182
131
|
openLocation(location: UriLocation): import("@jbrowse/core/util/io").RemoteFileWithRangeCache;
|
|
183
132
|
} & {
|