17
17
* limitations under the License.
18
18
*/
19
19
20
- import {inSafeRange, int, isInt, toNumber, toString} from "./integer";
20
+ import Integer, {inSafeRange, int, isInt, toNumber, toString} from "./integer";
21
21
import {Node, Path, PathSegment, Relationship, UnboundRelationship} from "./graph-types";
22
22
import {Neo4jError, PROTOCOL_ERROR, SERVICE_UNAVAILABLE, SESSION_EXPIRED} from "./error";
23
- import Result from "./result";
24
- import ResultSummary from "./result-summary";
23
+ import Result, {Observer, StatementResult} from "./result";
24
+ import ResultSummary, {
25
+ Notification,
26
+ NotificationPosition,
27
+ Plan,
28
+ ProfiledPlan,
29
+ ServerInfo,
30
+ StatementStatistic
31
+ } from "./result-summary";
25
32
import Record from "./record";
26
33
import Session from "./session";
27
- import {AuthToken, Config, Driver, READ, WRITE} from "./driver";
34
+ import {AuthToken, Config, Driver, EncryptionLevel, READ, SessionMode, TrustStrategy , WRITE} from "./driver";
28
35
import Transaction from "./transaction";
29
36
import {Parameters} from "./statement-runner";
30
37
@@ -74,19 +81,48 @@ declare const integer: {
74
81
inSafeRange: typeof inSafeRange;
75
82
};
76
83
84
+ /*
85
+ Both default and non-default exports declare all visible types so that they can be used in client code like this:
86
+
87
+ import neo4j from "neo4j-driver";
88
+ const driver: neo4j.Driver = neo4j.driver("bolt://localhost");
89
+ const session: neo4j.Session = driver.session();
90
+ ...
91
+ */
92
+
77
93
declare const forExport: {
78
94
driver: typeof driver;
79
95
int: typeof int;
80
96
isInt: typeof isInt;
81
97
integer: typeof integer;
82
- Neo4jError: typeof Neo4jError;
83
98
auth: typeof auth;
84
99
types: typeof types;
85
100
session: typeof session;
86
101
error: typeof error;
87
102
Driver: Driver;
88
103
AuthToken: AuthToken;
89
104
Config: Config;
105
+ EncryptionLevel: EncryptionLevel;
106
+ TrustStrategy: TrustStrategy;
107
+ SessionMode: SessionMode;
108
+ Neo4jError: Neo4jError;
109
+ Node: Node;
110
+ Relationship: Relationship;
111
+ UnboundRelationship: UnboundRelationship;
112
+ PathSegment: PathSegment;
113
+ Path: Path;
114
+ Integer: Integer;
115
+ Record: Record;
116
+ Result: Result;
117
+ StatementResult: StatementResult;
118
+ Observer: Observer;
119
+ ResultSummary: ResultSummary;
120
+ Plan: Plan,
121
+ ProfiledPlan: ProfiledPlan,
122
+ StatementStatistic: StatementStatistic,
123
+ Notification: Notification,
124
+ ServerInfo: ServerInfo,
125
+ NotificationPosition: NotificationPosition,
90
126
Session: Session;
91
127
Transaction: Transaction;
92
128
};
@@ -96,14 +132,36 @@ export {
96
132
int,
97
133
isInt,
98
134
integer,
99
- Neo4jError,
100
135
auth,
101
136
types,
102
137
session,
103
138
error,
139
+ Driver,
104
140
AuthToken,
105
- Session,
106
141
Config,
142
+ EncryptionLevel,
143
+ TrustStrategy,
144
+ SessionMode,
145
+ Neo4jError,
146
+ Node,
147
+ Relationship,
148
+ UnboundRelationship,
149
+ PathSegment,
150
+ Path,
151
+ Integer,
152
+ Record,
153
+ Result,
154
+ StatementResult,
155
+ Observer,
156
+ ResultSummary,
157
+ Plan,
158
+ ProfiledPlan,
159
+ StatementStatistic,
160
+ Notification,
161
+ ServerInfo,
162
+ NotificationPosition,
163
+ Session,
164
+ Transaction
107
165
}
108
166
109
167
export default forExport;
0 commit comments