@jbrowse/plugin-authentication 2.4.2 → 2.6.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.
Files changed (102) hide show
  1. package/dist/DropboxOAuthModel/configSchema.d.ts +105 -1
  2. package/dist/DropboxOAuthModel/configSchema.js +0 -8
  3. package/dist/DropboxOAuthModel/configSchema.js.map +1 -1
  4. package/dist/DropboxOAuthModel/model.d.ts +304 -8
  5. package/dist/DropboxOAuthModel/model.js +26 -35
  6. package/dist/DropboxOAuthModel/model.js.map +1 -1
  7. package/dist/DropboxOAuthModel/util.d.ts +1 -0
  8. package/dist/DropboxOAuthModel/util.js +28 -0
  9. package/dist/DropboxOAuthModel/util.js.map +1 -0
  10. package/dist/ExternalTokenModel/ExternalTokenEntryForm.d.ts +2 -2
  11. package/dist/ExternalTokenModel/ExternalTokenEntryForm.js +10 -11
  12. package/dist/ExternalTokenModel/ExternalTokenEntryForm.js.map +1 -1
  13. package/dist/ExternalTokenModel/configSchema.d.ts +36 -1
  14. package/dist/ExternalTokenModel/model.d.ts +93 -3
  15. package/dist/GoogleDriveOAuthModel/GoogleDriveFilehandle.d.ts +15 -0
  16. package/dist/GoogleDriveOAuthModel/GoogleDriveFilehandle.js +20 -0
  17. package/dist/GoogleDriveOAuthModel/GoogleDriveFilehandle.js.map +1 -0
  18. package/dist/GoogleDriveOAuthModel/configSchema.d.ts +105 -1
  19. package/dist/GoogleDriveOAuthModel/model.d.ts +219 -20
  20. package/dist/GoogleDriveOAuthModel/model.js +38 -51
  21. package/dist/GoogleDriveOAuthModel/model.js.map +1 -1
  22. package/dist/GoogleDriveOAuthModel/util.d.ts +1 -0
  23. package/dist/GoogleDriveOAuthModel/util.js +17 -0
  24. package/dist/GoogleDriveOAuthModel/util.js.map +1 -0
  25. package/dist/HTTPBasicModel/HTTPBasicLoginForm.d.ts +2 -2
  26. package/dist/HTTPBasicModel/HTTPBasicLoginForm.js +17 -21
  27. package/dist/HTTPBasicModel/HTTPBasicLoginForm.js.map +1 -1
  28. package/dist/HTTPBasicModel/configSchema.d.ts +44 -1
  29. package/dist/HTTPBasicModel/model.d.ts +135 -3
  30. package/dist/HTTPBasicModel/model.js +24 -9
  31. package/dist/HTTPBasicModel/model.js.map +1 -1
  32. package/dist/OAuthModel/configSchema.d.ts +94 -1
  33. package/dist/OAuthModel/configSchema.js +1 -9
  34. package/dist/OAuthModel/configSchema.js.map +1 -1
  35. package/dist/OAuthModel/model.d.ts +263 -8
  36. package/dist/OAuthModel/model.js +165 -113
  37. package/dist/OAuthModel/model.js.map +1 -1
  38. package/dist/OAuthModel/util.d.ts +7 -0
  39. package/dist/OAuthModel/util.js +60 -0
  40. package/dist/OAuthModel/util.js.map +1 -0
  41. package/dist/index.d.ts +954 -105
  42. package/dist/util.d.ts +6 -0
  43. package/dist/util.js +23 -0
  44. package/dist/util.js.map +1 -0
  45. package/esm/DropboxOAuthModel/configSchema.d.ts +105 -1
  46. package/esm/DropboxOAuthModel/configSchema.js +0 -8
  47. package/esm/DropboxOAuthModel/configSchema.js.map +1 -1
  48. package/esm/DropboxOAuthModel/model.d.ts +304 -8
  49. package/esm/DropboxOAuthModel/model.js +26 -35
  50. package/esm/DropboxOAuthModel/model.js.map +1 -1
  51. package/esm/DropboxOAuthModel/util.d.ts +1 -0
  52. package/esm/DropboxOAuthModel/util.js +24 -0
  53. package/esm/DropboxOAuthModel/util.js.map +1 -0
  54. package/esm/ExternalTokenModel/ExternalTokenEntryForm.d.ts +2 -2
  55. package/esm/ExternalTokenModel/ExternalTokenEntryForm.js +10 -11
  56. package/esm/ExternalTokenModel/ExternalTokenEntryForm.js.map +1 -1
  57. package/esm/ExternalTokenModel/configSchema.d.ts +36 -1
  58. package/esm/ExternalTokenModel/model.d.ts +93 -3
  59. package/esm/GoogleDriveOAuthModel/GoogleDriveFilehandle.d.ts +15 -0
  60. package/esm/GoogleDriveOAuthModel/GoogleDriveFilehandle.js +16 -0
  61. package/esm/GoogleDriveOAuthModel/GoogleDriveFilehandle.js.map +1 -0
  62. package/esm/GoogleDriveOAuthModel/configSchema.d.ts +105 -1
  63. package/esm/GoogleDriveOAuthModel/model.d.ts +219 -20
  64. package/esm/GoogleDriveOAuthModel/model.js +37 -49
  65. package/esm/GoogleDriveOAuthModel/model.js.map +1 -1
  66. package/esm/GoogleDriveOAuthModel/util.d.ts +1 -0
  67. package/esm/GoogleDriveOAuthModel/util.js +13 -0
  68. package/esm/GoogleDriveOAuthModel/util.js.map +1 -0
  69. package/esm/HTTPBasicModel/HTTPBasicLoginForm.d.ts +2 -2
  70. package/esm/HTTPBasicModel/HTTPBasicLoginForm.js +18 -22
  71. package/esm/HTTPBasicModel/HTTPBasicLoginForm.js.map +1 -1
  72. package/esm/HTTPBasicModel/configSchema.d.ts +44 -1
  73. package/esm/HTTPBasicModel/model.d.ts +135 -3
  74. package/esm/HTTPBasicModel/model.js +24 -9
  75. package/esm/HTTPBasicModel/model.js.map +1 -1
  76. package/esm/OAuthModel/configSchema.d.ts +94 -1
  77. package/esm/OAuthModel/configSchema.js +1 -9
  78. package/esm/OAuthModel/configSchema.js.map +1 -1
  79. package/esm/OAuthModel/model.d.ts +263 -8
  80. package/esm/OAuthModel/model.js +164 -86
  81. package/esm/OAuthModel/model.js.map +1 -1
  82. package/esm/OAuthModel/util.d.ts +7 -0
  83. package/esm/OAuthModel/util.js +30 -0
  84. package/esm/OAuthModel/util.js.map +1 -0
  85. package/esm/index.d.ts +954 -105
  86. package/esm/util.d.ts +6 -0
  87. package/esm/util.js +18 -0
  88. package/esm/util.js.map +1 -0
  89. package/package.json +3 -4
  90. package/src/DropboxOAuthModel/configSchema.ts +0 -8
  91. package/src/DropboxOAuthModel/model.tsx +35 -54
  92. package/src/DropboxOAuthModel/util.ts +36 -0
  93. package/src/ExternalTokenModel/ExternalTokenEntryForm.tsx +39 -41
  94. package/src/GoogleDriveOAuthModel/GoogleDriveFilehandle.ts +38 -0
  95. package/src/GoogleDriveOAuthModel/model.tsx +54 -104
  96. package/src/GoogleDriveOAuthModel/util.ts +29 -0
  97. package/src/HTTPBasicModel/HTTPBasicLoginForm.tsx +53 -56
  98. package/src/HTTPBasicModel/model.tsx +26 -11
  99. package/src/OAuthModel/configSchema.ts +2 -9
  100. package/src/OAuthModel/model.tsx +190 -108
  101. package/src/OAuthModel/util.ts +33 -0
  102. package/src/util.ts +25 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ExternalTokenEntryForm.js","sourceRoot":"","sources":["../../src/ExternalTokenModel/ExternalTokenEntryForm.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAuC;AACvC,4CAA+E;AAC/E,yCAAyC;AAElC,MAAM,sBAAsB,GAAG,CAAC,EACrC,iBAAiB,EACjB,WAAW,GAIZ,EAAE,EAAE;IACH,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,CAAC,CAAA;IAEtC,OAAO,CACL;QACE,8BAAC,WAAM,IACL,IAAI,QACJ,QAAQ,EAAC,IAAI,iBACD,oBAAoB,EAChC,KAAK,EAAE,mBAAmB,iBAAiB,EAAE;YAE7C,8BAAC,wBAAa,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE;gBAChE,8BAAC,oBAAS,IACR,QAAQ,QACR,KAAK,EAAC,aAAa,EACnB,OAAO,EAAC,UAAU,EAClB,UAAU,EAAE,EAAE,aAAa,EAAE,qBAAqB,EAAE,EACpD,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAC/C,MAAM,EAAC,OAAO,GACd,CACY;YAChB,8BAAC,wBAAa;gBACZ,8BAAC,iBAAM,IACL,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,SAAS,EACf,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,KAAK,EAChB,OAAO,EAAE,GAAG,EAAE;wBACZ,IAAI,KAAK,EAAE;4BACT,WAAW,CAAC,KAAK,CAAC,CAAA;yBACnB;oBACH,CAAC,UAGM;gBACT,8BAAC,iBAAM,IACL,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,aAGrB,CACK,CACT,CACR,CACJ,CAAA;AACH,CAAC,CAAA;AApDY,QAAA,sBAAsB,0BAoDlC"}
1
+ {"version":3,"file":"ExternalTokenEntryForm.js","sourceRoot":"","sources":["../../src/ExternalTokenModel/ExternalTokenEntryForm.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAuC;AACvC,4CAA+E;AAC/E,yCAAyC;AAElC,MAAM,sBAAsB,GAAG,CAAC,EACrC,iBAAiB,EACjB,WAAW,GAIZ,EAAE,EAAE;IACH,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,CAAC,CAAA;IAEtC,OAAO,CACL,8BAAC,WAAM,IACL,IAAI,QACJ,QAAQ,EAAC,IAAI,iBACD,oBAAoB,EAChC,KAAK,EAAE,mBAAmB,iBAAiB,EAAE;QAE7C,8BAAC,wBAAa,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE;YAChE,8BAAC,oBAAS,IACR,QAAQ,QACR,KAAK,EAAC,aAAa,EACnB,OAAO,EAAC,UAAU,EAClB,UAAU,EAAE,EAAE,aAAa,EAAE,qBAAqB,EAAE,EACpD,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAC/C,MAAM,EAAC,OAAO,GACd,CACY;QAChB,8BAAC,wBAAa;YACZ,8BAAC,iBAAM,IACL,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,SAAS,EACf,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,KAAK,EAChB,OAAO,EAAE,GAAG,EAAE;oBACZ,IAAI,KAAK,EAAE;wBACT,WAAW,CAAC,KAAK,CAAC,CAAA;qBACnB;gBACH,CAAC,UAGM;YACT,8BAAC,iBAAM,IACL,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,WAAW,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,aAGrB,CACK,CACT,CACV,CAAA;AACH,CAAC,CAAA;AAlDY,QAAA,sBAAsB,0BAkDlC"}
@@ -1,5 +1,40 @@
1
1
  import { Instance } from 'mobx-state-tree';
2
- declare const ExternalTokenConfigSchema: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
2
+ declare const ExternalTokenConfigSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
3
+ /**
4
+ * #slot
5
+ */
6
+ validateWithHEAD: {
7
+ description: string;
8
+ type: string;
9
+ defaultValue: boolean;
10
+ };
11
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
12
+ name: {
13
+ description: string;
14
+ type: string;
15
+ defaultValue: string;
16
+ };
17
+ description: {
18
+ description: string;
19
+ type: string;
20
+ defaultValue: string;
21
+ };
22
+ authHeader: {
23
+ description: string;
24
+ type: string;
25
+ defaultValue: string;
26
+ };
27
+ tokenType: {
28
+ description: string;
29
+ type: string;
30
+ defaultValue: string;
31
+ };
32
+ domains: {
33
+ description: string;
34
+ type: string;
35
+ defaultValue: never[];
36
+ };
37
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>;
3
38
  export type ExternalTokenInternetAccountConfigModel = typeof ExternalTokenConfigSchema;
4
39
  export type ExternalTokenInternetAccountConfig = Instance<ExternalTokenInternetAccountConfigModel>;
5
40
  export default ExternalTokenConfigSchema;
@@ -1,13 +1,103 @@
1
1
  /// <reference types="react" />
2
2
  import { UriLocation } from '@jbrowse/core/util/types';
3
- import { ExternalTokenInternetAccountConfigModel } from './configSchema';
4
3
  import { Instance } from 'mobx-state-tree';
5
- declare const stateModelFactory: (configSchema: ExternalTokenInternetAccountConfigModel) => import("mobx-state-tree").IModelType<{
4
+ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
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<{
6
37
  id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
7
38
  type: import("mobx-state-tree").ISimpleType<string>;
39
+ configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
40
+ name: {
41
+ description: string;
42
+ type: string;
43
+ defaultValue: string;
44
+ };
45
+ description: {
46
+ description: string;
47
+ type: string;
48
+ defaultValue: string;
49
+ };
50
+ authHeader: {
51
+ description: string;
52
+ type: string;
53
+ defaultValue: string;
54
+ };
55
+ tokenType: {
56
+ description: string;
57
+ type: string;
58
+ defaultValue: string;
59
+ };
60
+ domains: {
61
+ description: string;
62
+ type: string;
63
+ defaultValue: never[];
64
+ };
65
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>;
8
66
  } & {
9
67
  type: import("mobx-state-tree").ISimpleType<"ExternalTokenInternetAccount">;
10
- configuration: import("mobx-state-tree").ITypeUnion<any, any, any>;
68
+ configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
69
+ validateWithHEAD: {
70
+ description: string;
71
+ type: string;
72
+ defaultValue: boolean;
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
+ defaultValue: string;
89
+ };
90
+ tokenType: {
91
+ description: string;
92
+ type: string;
93
+ defaultValue: string;
94
+ };
95
+ domains: {
96
+ description: string;
97
+ type: string;
98
+ defaultValue: never[];
99
+ };
100
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>;
11
101
  }, {
12
102
  readonly name: string;
13
103
  readonly description: string;
@@ -0,0 +1,15 @@
1
+ import { RemoteFileWithRangeCache } from '@jbrowse/core/util/io';
2
+ import { FilehandleOptions, Stats, PolyfilledResponse } from 'generic-filehandle';
3
+ export interface RequestInitWithMetadata extends RequestInit {
4
+ metadataOnly?: boolean;
5
+ }
6
+ interface GoogleDriveFilehandleOptions extends FilehandleOptions {
7
+ fetch(input: RequestInfo, opts?: RequestInitWithMetadata): Promise<PolyfilledResponse>;
8
+ }
9
+ export declare class GoogleDriveFile extends RemoteFileWithRangeCache {
10
+ private statsPromise;
11
+ constructor(source: string, opts: GoogleDriveFilehandleOptions);
12
+ fetch(input: RequestInfo, opts?: RequestInitWithMetadata): Promise<PolyfilledResponse>;
13
+ stat(): Promise<Stats>;
14
+ }
15
+ export {};
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GoogleDriveFile = void 0;
4
+ const io_1 = require("@jbrowse/core/util/io");
5
+ class GoogleDriveFile extends io_1.RemoteFileWithRangeCache {
6
+ constructor(source, opts) {
7
+ super(source, opts);
8
+ this.statsPromise = this.fetch(source, {
9
+ metadataOnly: true,
10
+ }).then((response) => response.json());
11
+ }
12
+ async fetch(input, opts) {
13
+ return super.fetch(input, opts);
14
+ }
15
+ async stat() {
16
+ return this.statsPromise;
17
+ }
18
+ }
19
+ exports.GoogleDriveFile = GoogleDriveFile;
20
+ //# sourceMappingURL=GoogleDriveFilehandle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GoogleDriveFilehandle.js","sourceRoot":"","sources":["../../src/GoogleDriveOAuthModel/GoogleDriveFilehandle.ts"],"names":[],"mappings":";;;AAAA,8CAAgE;AAkBhE,MAAa,eAAgB,SAAQ,6BAAwB;IAE3D,YAAY,MAAc,EAAE,IAAkC;QAC5D,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;QACnB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;YACrC,YAAY,EAAE,IAAI;SACnB,CAAC,CAAC,IAAI,CAAC,CAAC,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;IAClD,CAAC;IAED,KAAK,CAAC,KAAK,CACT,KAAkB,EAClB,IAA8B;QAE9B,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,KAAK,CAAC,IAAI;QACR,OAAO,IAAI,CAAC,YAAY,CAAA;IAC1B,CAAC;CACF;AAnBD,0CAmBC"}
@@ -1,5 +1,109 @@
1
1
  import { Instance } from 'mobx-state-tree';
2
- declare const GoogleDriveOAuthConfigSchema: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
2
+ declare const GoogleDriveOAuthConfigSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
3
+ /**
4
+ * #slot
5
+ */
6
+ authEndpoint: {
7
+ description: string;
8
+ type: string;
9
+ defaultValue: string;
10
+ };
11
+ /**
12
+ * #slot
13
+ */
14
+ scopes: {
15
+ description: string;
16
+ type: string;
17
+ defaultValue: string;
18
+ };
19
+ /**
20
+ * #slot
21
+ */
22
+ domains: {
23
+ description: string;
24
+ type: string;
25
+ defaultValue: string[];
26
+ };
27
+ /**
28
+ * #slot
29
+ */
30
+ responseType: {
31
+ description: string;
32
+ type: string;
33
+ defaultValue: string;
34
+ };
35
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
36
+ tokenType: {
37
+ description: string;
38
+ type: string;
39
+ defaultValue: string;
40
+ };
41
+ authEndpoint: {
42
+ description: string;
43
+ type: string;
44
+ defaultValue: string;
45
+ };
46
+ tokenEndpoint: {
47
+ description: string;
48
+ type: string;
49
+ defaultValue: string;
50
+ };
51
+ needsPKCE: {
52
+ description: string;
53
+ type: string;
54
+ defaultValue: boolean;
55
+ };
56
+ clientId: {
57
+ description: string;
58
+ type: string;
59
+ defaultValue: string; /**
60
+ * #baseConfiguration
61
+ */
62
+ };
63
+ scopes: {
64
+ description: string;
65
+ type: string;
66
+ defaultValue: string;
67
+ };
68
+ state: {
69
+ description: string;
70
+ type: string;
71
+ defaultValue: string;
72
+ };
73
+ responseType: {
74
+ description: string;
75
+ type: string;
76
+ defaultValue: string;
77
+ };
78
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
79
+ name: {
80
+ description: string;
81
+ type: string;
82
+ defaultValue: string;
83
+ };
84
+ description: {
85
+ description: string;
86
+ type: string;
87
+ defaultValue: string;
88
+ };
89
+ authHeader: {
90
+ description: string;
91
+ type: string;
92
+ defaultValue: string;
93
+ };
94
+ tokenType: {
95
+ description: string;
96
+ type: string; /**
97
+ * #slot
98
+ */
99
+ defaultValue: string;
100
+ };
101
+ domains: {
102
+ description: string;
103
+ type: string;
104
+ defaultValue: never[];
105
+ };
106
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>, undefined>>;
3
107
  export type GoogleDriveOAuthInternetAccountConfigModel = typeof GoogleDriveOAuthConfigSchema;
4
108
  export type GoogleDriveOAuthInternetAccountConfig = Instance<GoogleDriveOAuthInternetAccountConfigModel>;
5
109
  export default GoogleDriveOAuthConfigSchema;
@@ -1,30 +1,211 @@
1
1
  import React from 'react';
2
2
  import { Instance } from 'mobx-state-tree';
3
- import { RemoteFileWithRangeCache } from '@jbrowse/core/util/io';
4
3
  import { UriLocation } from '@jbrowse/core/util/types';
5
- import { FilehandleOptions, Stats, PolyfilledResponse } from 'generic-filehandle';
6
4
  import { GoogleDriveOAuthInternetAccountConfigModel } from './configSchema';
5
+ import { GoogleDriveFile } from './GoogleDriveFilehandle';
7
6
  export interface RequestInitWithMetadata extends RequestInit {
8
7
  metadataOnly?: boolean;
9
8
  }
10
- interface GoogleDriveFilehandleOptions extends FilehandleOptions {
11
- fetch(input: RequestInfo, opts?: RequestInitWithMetadata): Promise<PolyfilledResponse>;
12
- }
13
- export declare class GoogleDriveFile extends RemoteFileWithRangeCache {
14
- private statsPromise;
15
- constructor(source: string, opts: GoogleDriveFilehandleOptions);
16
- fetch(input: RequestInfo, opts?: RequestInitWithMetadata): Promise<PolyfilledResponse>;
17
- stat(): Promise<Stats>;
18
- }
19
- declare const stateModelFactory: (configSchema: GoogleDriveOAuthInternetAccountConfigModel) => import("mobx-state-tree").IModelType<{
9
+ /**
10
+ * #stateModel GoogleDriveOAuthInternetAccount
11
+ */
12
+ export default function stateModelFactory(configSchema: GoogleDriveOAuthInternetAccountConfigModel): import("mobx-state-tree").IModelType<{
20
13
  id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
21
14
  type: import("mobx-state-tree").ISimpleType<string>;
15
+ configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
16
+ name: {
17
+ description: string;
18
+ type: string;
19
+ defaultValue: string;
20
+ };
21
+ description: {
22
+ description: string;
23
+ type: string;
24
+ defaultValue: string;
25
+ };
26
+ authHeader: {
27
+ description: string;
28
+ type: string;
29
+ defaultValue: string;
30
+ };
31
+ tokenType: {
32
+ description: string;
33
+ type: string;
34
+ defaultValue: string;
35
+ };
36
+ domains: {
37
+ description: string;
38
+ type: string;
39
+ defaultValue: never[];
40
+ };
41
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>;
22
42
  } & {
23
43
  type: import("mobx-state-tree").ISimpleType<"OAuthInternetAccount">;
24
- configuration: import("mobx-state-tree").ITypeUnion<any, any, any>;
44
+ configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
45
+ tokenType: {
46
+ description: string;
47
+ type: string;
48
+ defaultValue: string;
49
+ };
50
+ authEndpoint: {
51
+ description: string;
52
+ type: string;
53
+ defaultValue: string;
54
+ };
55
+ tokenEndpoint: {
56
+ description: string;
57
+ type: string;
58
+ defaultValue: string;
59
+ };
60
+ needsPKCE: {
61
+ description: string;
62
+ type: string;
63
+ defaultValue: boolean;
64
+ };
65
+ clientId: {
66
+ description: string;
67
+ type: string;
68
+ defaultValue: string;
69
+ };
70
+ scopes: {
71
+ description: string;
72
+ type: string;
73
+ defaultValue: string;
74
+ };
75
+ state: {
76
+ description: string;
77
+ type: string;
78
+ defaultValue: string;
79
+ };
80
+ responseType: {
81
+ description: string;
82
+ type: string;
83
+ defaultValue: string;
84
+ };
85
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
86
+ name: {
87
+ description: string;
88
+ type: string;
89
+ defaultValue: string;
90
+ };
91
+ description: {
92
+ description: string;
93
+ type: string;
94
+ defaultValue: string;
95
+ };
96
+ authHeader: {
97
+ description: string;
98
+ type: string;
99
+ defaultValue: string;
100
+ };
101
+ tokenType: {
102
+ description: string;
103
+ type: string;
104
+ defaultValue: string;
105
+ };
106
+ domains: {
107
+ description: string;
108
+ type: string;
109
+ defaultValue: never[];
110
+ };
111
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>;
25
112
  } & {
113
+ /**
114
+ * #property
115
+ */
26
116
  type: import("mobx-state-tree").ISimpleType<"GoogleDriveOAuthInternetAccount">;
27
- configuration: import("mobx-state-tree").ITypeUnion<any, any, any>;
117
+ /**
118
+ * #property
119
+ */
120
+ configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
121
+ authEndpoint: {
122
+ description: string;
123
+ type: string;
124
+ defaultValue: string;
125
+ };
126
+ scopes: {
127
+ description: string;
128
+ type: string;
129
+ defaultValue: string;
130
+ };
131
+ domains: {
132
+ description: string;
133
+ type: string;
134
+ defaultValue: string[];
135
+ };
136
+ responseType: {
137
+ description: string;
138
+ type: string;
139
+ defaultValue: string;
140
+ };
141
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
142
+ tokenType: {
143
+ description: string;
144
+ type: string;
145
+ defaultValue: string;
146
+ };
147
+ authEndpoint: {
148
+ description: string;
149
+ type: string;
150
+ defaultValue: string;
151
+ };
152
+ tokenEndpoint: {
153
+ description: string;
154
+ type: string;
155
+ defaultValue: string;
156
+ };
157
+ needsPKCE: {
158
+ description: string;
159
+ type: string;
160
+ defaultValue: boolean;
161
+ };
162
+ clientId: {
163
+ description: string;
164
+ type: string;
165
+ defaultValue: string;
166
+ };
167
+ scopes: {
168
+ description: string;
169
+ type: string;
170
+ defaultValue: string;
171
+ };
172
+ state: {
173
+ description: string;
174
+ type: string;
175
+ defaultValue: string;
176
+ };
177
+ responseType: {
178
+ description: string;
179
+ type: string;
180
+ defaultValue: string;
181
+ };
182
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
183
+ name: {
184
+ description: string;
185
+ type: string;
186
+ defaultValue: string;
187
+ };
188
+ description: {
189
+ description: string;
190
+ type: string;
191
+ defaultValue: string;
192
+ };
193
+ authHeader: {
194
+ description: string;
195
+ type: string;
196
+ defaultValue: string;
197
+ };
198
+ tokenType: {
199
+ description: string;
200
+ type: string;
201
+ defaultValue: string;
202
+ };
203
+ domains: {
204
+ description: string;
205
+ type: string;
206
+ defaultValue: never[];
207
+ };
208
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>, undefined>>;
28
209
  }, {
29
210
  readonly name: string;
30
211
  readonly description: string;
@@ -72,18 +253,19 @@ declare const stateModelFactory: (configSchema: GoogleDriveOAuthInternetAccountC
72
253
  } & {
73
254
  getFetcher(loc?: UriLocation | undefined): (input: RequestInfo, init?: RequestInit | undefined) => Promise<Response>;
74
255
  } & {
75
- openLocation(location: UriLocation): RemoteFileWithRangeCache;
256
+ openLocation(location: UriLocation): import("@jbrowse/core/util/io").RemoteFileWithRangeCache;
76
257
  } & {
77
258
  readonly codeVerifierPKCE: string;
78
259
  } & {
79
260
  readonly authEndpoint: string;
80
- readonly tokenEndpoint: string;
261
+ readonly tokenEndpoint: string; /**
262
+ * #method
263
+ */
81
264
  readonly needsPKCE: boolean;
82
265
  readonly clientId: string;
83
266
  readonly scopes: string;
84
267
  state(): string | undefined;
85
268
  readonly responseType: "code" | "token";
86
- readonly hasRefreshToken: boolean;
87
269
  readonly refreshTokenKey: string;
88
270
  } & {
89
271
  storeRefreshToken(refreshToken: string): void;
@@ -99,13 +281,30 @@ declare const stateModelFactory: (configSchema: GoogleDriveOAuthInternetAccountC
99
281
  getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): Promise<void>;
100
282
  validateToken(token: string, location: UriLocation): Promise<string>;
101
283
  } & {
102
- readonly toggleContents: JSX.Element;
284
+ getFetcher(loc?: UriLocation | undefined): (input: RequestInfo, init?: RequestInit | undefined) => Promise<Response>;
285
+ } & {
286
+ /**
287
+ * #getter
288
+ * The FileSelector icon for Google drive
289
+ */
290
+ readonly toggleContents: React.JSX.Element;
291
+ /**
292
+ * #getter
293
+ */
103
294
  readonly selectorLabel: string;
104
295
  } & {
105
- getFetcher(location?: UriLocation): (input: RequestInfo, init?: RequestInit) => Promise<Response>;
296
+ /**
297
+ * #method
298
+ */
299
+ getFetcher(location?: UriLocation): (input: RequestInfo, init?: RequestInitWithMetadata) => Promise<Response>;
300
+ /**
301
+ * #method
302
+ */
106
303
  openLocation(location: UriLocation): GoogleDriveFile;
304
+ /**
305
+ * #action
306
+ */
107
307
  validateToken(token: string, location: UriLocation): Promise<string>;
108
308
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
109
- export default stateModelFactory;
110
309
  export type GoogleDriveOAuthStateModel = ReturnType<typeof stateModelFactory>;
111
310
  export type GoogleDriveOAuthModel = Instance<GoogleDriveOAuthStateModel>;