arangojs 7.8.0 → 8.0.0
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/CHANGELOG.md +264 -3
- package/CONTRIBUTING.md +1 -1
- package/MIGRATING.md +126 -2
- package/README.md +7 -13
- package/analyzer.d.ts +531 -253
- package/analyzer.d.ts.map +1 -1
- package/analyzer.js +9 -8
- package/analyzer.js.map +1 -1
- package/aql.d.ts +122 -139
- package/aql.d.ts.map +1 -1
- package/aql.js +146 -148
- package/aql.js.map +1 -1
- package/collection.d.ts +311 -310
- package/collection.d.ts.map +1 -1
- package/collection.js +163 -96
- package/collection.js.map +1 -1
- package/connection.d.ts +65 -52
- package/connection.d.ts.map +1 -1
- package/connection.js +142 -140
- package/connection.js.map +1 -1
- package/cursor.d.ts +108 -26
- package/cursor.d.ts.map +1 -1
- package/cursor.js +24 -23
- package/cursor.js.map +1 -1
- package/database.d.ts +298 -330
- package/database.d.ts.map +1 -1
- package/database.js +178 -252
- package/database.js.map +1 -1
- package/documents.d.ts +3 -4
- package/documents.d.ts.map +1 -1
- package/documents.js +0 -1
- package/documents.js.map +1 -1
- package/error.d.ts +3 -6
- package/error.d.ts.map +1 -1
- package/error.js +5 -7
- package/error.js.map +1 -1
- package/foxx-manifest.d.ts +7 -8
- package/foxx-manifest.d.ts.map +1 -1
- package/foxx-manifest.js +1 -1
- package/foxx-manifest.js.map +1 -1
- package/graph.d.ts +38 -56
- package/graph.d.ts.map +1 -1
- package/graph.js +59 -63
- package/graph.js.map +1 -1
- package/index.d.ts +6 -8
- package/index.d.ts.map +1 -1
- package/index.js +1 -6
- package/index.js.map +1 -1
- package/indexes.d.ts +348 -127
- package/indexes.d.ts.map +1 -1
- package/indexes.js +1 -3
- package/indexes.js.map +1 -1
- package/lib/blob.d.ts +0 -2
- package/lib/blob.d.ts.map +1 -1
- package/lib/blob.js +0 -1
- package/lib/blob.js.map +1 -1
- package/lib/btoa.d.ts +1 -3
- package/lib/btoa.d.ts.map +1 -1
- package/lib/btoa.js +3 -5
- package/lib/btoa.js.map +1 -1
- package/lib/btoa.web.d.ts +1 -3
- package/lib/btoa.web.d.ts.map +1 -1
- package/lib/btoa.web.js +4 -6
- package/lib/btoa.web.js.map +1 -1
- package/lib/codes.d.ts +2 -2
- package/lib/codes.d.ts.map +1 -1
- package/lib/codes.js +3 -3
- package/lib/codes.js.map +1 -1
- package/lib/errback.d.ts +0 -2
- package/lib/errback.d.ts.map +1 -1
- package/lib/errback.js.map +1 -1
- package/lib/joinPath.d.ts +0 -2
- package/lib/joinPath.d.ts.map +1 -1
- package/lib/joinPath.js +0 -2
- package/lib/joinPath.js.map +1 -1
- package/lib/joinPath.web.d.ts +1 -3
- package/lib/joinPath.web.d.ts.map +1 -1
- package/lib/joinPath.web.js +7 -4
- package/lib/joinPath.web.js.map +1 -1
- package/lib/multipart.d.ts +0 -4
- package/lib/multipart.d.ts.map +1 -1
- package/lib/multipart.js +16 -37
- package/lib/multipart.js.map +1 -1
- package/lib/multipart.web.d.ts +0 -2
- package/lib/multipart.web.d.ts.map +1 -1
- package/lib/multipart.web.js +0 -2
- package/lib/multipart.web.js.map +1 -1
- package/lib/normalizeUrl.d.ts +0 -2
- package/lib/normalizeUrl.d.ts.map +1 -1
- package/lib/normalizeUrl.js +0 -2
- package/lib/normalizeUrl.js.map +1 -1
- package/lib/omit.d.ts +1 -3
- package/lib/omit.d.ts.map +1 -1
- package/lib/omit.js +1 -2
- package/lib/omit.js.map +1 -1
- package/lib/querystringify.d.ts +4 -0
- package/lib/querystringify.d.ts.map +1 -0
- package/lib/querystringify.js +20 -0
- package/lib/querystringify.js.map +1 -0
- package/lib/querystringify.web.d.ts +2 -0
- package/lib/querystringify.web.d.ts.map +1 -0
- package/lib/querystringify.web.js +30 -0
- package/lib/querystringify.web.js.map +1 -0
- package/lib/request.d.ts +0 -1
- package/lib/request.d.ts.map +1 -1
- package/lib/request.js +6 -3
- package/lib/request.js.map +1 -1
- package/lib/request.node.d.ts +2 -8
- package/lib/request.node.d.ts.map +1 -1
- package/lib/request.node.js +16 -7
- package/lib/request.node.js.map +1 -1
- package/lib/request.web.d.ts +2 -3
- package/lib/request.web.d.ts.map +1 -1
- package/lib/request.web.js +26 -29
- package/lib/request.web.js.map +1 -1
- package/lib/xhr.d.ts +1 -3
- package/lib/xhr.d.ts.map +1 -1
- package/lib/xhr.js +0 -2
- package/lib/xhr.js.map +1 -1
- package/package.json +5 -6
- package/route.d.ts +1 -2
- package/route.d.ts.map +1 -1
- package/route.js +1 -2
- package/route.js.map +1 -1
- package/transaction.d.ts +31 -6
- package/transaction.d.ts.map +1 -1
- package/transaction.js +13 -6
- package/transaction.js.map +1 -1
- package/view.d.ts +237 -181
- package/view.d.ts.map +1 -1
- package/view.js +17 -25
- package/view.js.map +1 -1
- package/web.js +1 -1
- package/web.js.map +1 -1
- package/lib/error.d.ts +0 -18
- package/lib/error.d.ts.map +0 -1
- package/lib/error.js +0 -18
- package/lib/error.js.map +0 -1
package/connection.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
2
3
|
/**
|
|
3
4
|
* ```ts
|
|
4
5
|
* import type { Config } from "arangojs/connection";
|
|
@@ -14,14 +15,6 @@ import { AgentOptions as NodeAgentOptions } from "https";
|
|
|
14
15
|
import { LinkedList } from "x3-linkedlist";
|
|
15
16
|
import { Database } from "./database";
|
|
16
17
|
import { ArangojsError, ArangojsResponse, RequestFunction } from "./lib/request";
|
|
17
|
-
/**
|
|
18
|
-
* Generic type representing an object with values of a given value type.
|
|
19
|
-
*
|
|
20
|
-
* @param T - Type of the object's property values.
|
|
21
|
-
*/
|
|
22
|
-
export declare type Dict<T> = {
|
|
23
|
-
[key: string]: T;
|
|
24
|
-
};
|
|
25
18
|
/**
|
|
26
19
|
* Determines the behavior when multiple URLs are used:
|
|
27
20
|
*
|
|
@@ -41,12 +34,12 @@ export declare type LoadBalancingStrategy = "NONE" | "ROUND_ROBIN" | "ONE_RANDOM
|
|
|
41
34
|
*
|
|
42
35
|
* Header names should always be lowercase.
|
|
43
36
|
*/
|
|
44
|
-
export declare type Headers =
|
|
37
|
+
export declare type Headers = Record<string, string>;
|
|
45
38
|
/**
|
|
46
39
|
* An arbitrary object with scalar values representing query string parameters
|
|
47
40
|
* and their values.
|
|
48
41
|
*/
|
|
49
|
-
export declare type Params =
|
|
42
|
+
export declare type Params = Record<string, any>;
|
|
50
43
|
/**
|
|
51
44
|
* Generic properties shared by all ArangoDB HTTP API responses.
|
|
52
45
|
*/
|
|
@@ -60,6 +53,10 @@ export declare type ArangoResponseMetadata = {
|
|
|
60
53
|
*/
|
|
61
54
|
code: number;
|
|
62
55
|
};
|
|
56
|
+
/**
|
|
57
|
+
* Extends the given base type `T` with the generic HTTP API response properties.
|
|
58
|
+
*/
|
|
59
|
+
export declare type ArangoApiResponse<T> = T & ArangoResponseMetadata;
|
|
63
60
|
/**
|
|
64
61
|
* Credentials for HTTP Basic authentication.
|
|
65
62
|
*/
|
|
@@ -84,7 +81,6 @@ export declare type BearerAuthCredentials = {
|
|
|
84
81
|
};
|
|
85
82
|
/**
|
|
86
83
|
* @internal
|
|
87
|
-
* @hidden
|
|
88
84
|
*/
|
|
89
85
|
declare type UrlInfo = {
|
|
90
86
|
absolutePath?: boolean;
|
|
@@ -97,7 +93,7 @@ declare type UrlInfo = {
|
|
|
97
93
|
* arangojs in the browser. Additionally `maxSockets` can be used to control
|
|
98
94
|
* the maximum number of parallel requests.
|
|
99
95
|
*
|
|
100
|
-
* See also:
|
|
96
|
+
* See also: [`xhr` on npm](https://www.npmjs.com/package/xhr).
|
|
101
97
|
*/
|
|
102
98
|
export declare type XhrOptions = {
|
|
103
99
|
/**
|
|
@@ -133,7 +129,7 @@ export declare type XhrOptions = {
|
|
|
133
129
|
* Specifies whether browser credentials (e.g. cookies) should be sent if
|
|
134
130
|
* performing a cross-domain request.
|
|
135
131
|
*
|
|
136
|
-
* See
|
|
132
|
+
* See [`XMLHttpRequest.withCredentials`](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials).
|
|
137
133
|
*/
|
|
138
134
|
withCredentials?: boolean;
|
|
139
135
|
};
|
|
@@ -170,7 +166,7 @@ export declare type RequestOptions = {
|
|
|
170
166
|
*
|
|
171
167
|
* Identifier of a specific ArangoDB host to use when more than one is known.
|
|
172
168
|
*/
|
|
173
|
-
|
|
169
|
+
hostUrl?: string;
|
|
174
170
|
/**
|
|
175
171
|
* HTTP method to use in order to perform the request.
|
|
176
172
|
*
|
|
@@ -201,7 +197,7 @@ export declare type RequestOptions = {
|
|
|
201
197
|
* If set to a positive number, the request will automatically be retried at
|
|
202
198
|
* most this many times if it results in a write-write conflict.
|
|
203
199
|
*
|
|
204
|
-
* Default: `
|
|
200
|
+
* Default: `config.retryOnConflict`
|
|
205
201
|
*/
|
|
206
202
|
retryOnConflict?: number;
|
|
207
203
|
/**
|
|
@@ -231,15 +227,15 @@ export declare type RequestOptions = {
|
|
|
231
227
|
};
|
|
232
228
|
/**
|
|
233
229
|
* @internal
|
|
234
|
-
* @hidden
|
|
235
230
|
*/
|
|
236
231
|
declare type Task = {
|
|
237
|
-
|
|
232
|
+
hostUrl?: string;
|
|
238
233
|
stack?: () => string;
|
|
239
234
|
allowDirtyRead: boolean;
|
|
240
235
|
retryOnConflict: number;
|
|
241
|
-
resolve: (
|
|
236
|
+
resolve: (result: any) => void;
|
|
242
237
|
reject: (error: Error) => void;
|
|
238
|
+
transform?: (res: ArangojsResponse) => any;
|
|
243
239
|
retries: number;
|
|
244
240
|
options: {
|
|
245
241
|
method: string;
|
|
@@ -258,10 +254,10 @@ declare type Task = {
|
|
|
258
254
|
*
|
|
259
255
|
* In browser environments this option can be used to pass additional options
|
|
260
256
|
* to the underlying calls of the
|
|
261
|
-
*
|
|
257
|
+
* [xhr module](https://www.npmjs.com/package/xhr).
|
|
262
258
|
*
|
|
263
|
-
* See also
|
|
264
|
-
* and
|
|
259
|
+
* See also [`http.Agent`](https://nodejs.org/api/http.html#http_new_agent_options)
|
|
260
|
+
* and [`https.Agent`](https://nodejs.org/api/https.html#https_new_agent_options)
|
|
265
261
|
* (when using TLS).
|
|
266
262
|
*/
|
|
267
263
|
export declare type AgentOptions = NodeAgentOptions | XhrOptions;
|
|
@@ -279,7 +275,7 @@ export declare type Config = {
|
|
|
279
275
|
* Base URL of the ArangoDB server or list of server URLs.
|
|
280
276
|
*
|
|
281
277
|
* When working with a cluster or a single server with leader/follower
|
|
282
|
-
* failover, the method {@link Database
|
|
278
|
+
* failover, the method {@link database.Database#acquireHostList} can be used to
|
|
283
279
|
* automatically pick up additional coordinators/followers at any point.
|
|
284
280
|
*
|
|
285
281
|
* When running ArangoDB on a unix socket, e.g. `/tmp/arangodb.sock`, the
|
|
@@ -293,8 +289,8 @@ export declare type Config = {
|
|
|
293
289
|
* `tcp` is treated as synonymous with `http`, so the following URLs are
|
|
294
290
|
* considered identical:
|
|
295
291
|
*
|
|
296
|
-
* - `tcp://
|
|
297
|
-
* - `ssl://
|
|
292
|
+
* - `tcp://127.0.0.1:8529` and `http://127.0.0.1:8529`
|
|
293
|
+
* - `ssl://127.0.0.1:8529` and `https://127.0.0.1:8529`
|
|
298
294
|
* - `tcp+unix:///tmp/arangodb.sock` and `http+unix:///tmp/arangodb.sock`
|
|
299
295
|
* - `ssl+unix:///tmp/arangodb.sock` and `https+unix:///tmp/arangodb.sock`
|
|
300
296
|
* - `tcp://unix:/tmp/arangodb.sock` and `http://unix:/tmp/arangodb.sock`
|
|
@@ -302,13 +298,14 @@ export declare type Config = {
|
|
|
302
298
|
*
|
|
303
299
|
* See also `auth` for passing authentication credentials.
|
|
304
300
|
*
|
|
305
|
-
* Default: `"http://
|
|
301
|
+
* Default: `"http://127.0.0.1:8529"`
|
|
306
302
|
*/
|
|
307
303
|
url?: string | string[];
|
|
308
304
|
/**
|
|
309
305
|
* Credentials to use for authentication.
|
|
310
306
|
*
|
|
311
|
-
* See also {@link Database
|
|
307
|
+
* See also {@link database.Database#useBasicAuth} and
|
|
308
|
+
* {@link database.Database#useBearerAuth}.
|
|
312
309
|
*
|
|
313
310
|
* Default: `{ username: "root", password: "" }`
|
|
314
311
|
*/
|
|
@@ -322,7 +319,7 @@ export declare type Config = {
|
|
|
322
319
|
* Depending on this value certain methods may become unavailable or change
|
|
323
320
|
* their behavior to remain compatible with different versions of ArangoDB.
|
|
324
321
|
*
|
|
325
|
-
* Default: `
|
|
322
|
+
* Default: `30900`
|
|
326
323
|
*/
|
|
327
324
|
arangoVersion?: number;
|
|
328
325
|
/**
|
|
@@ -343,7 +340,7 @@ export declare type Config = {
|
|
|
343
340
|
/**
|
|
344
341
|
* Determines the behavior when a request fails because the underlying
|
|
345
342
|
* connection to the server could not be opened
|
|
346
|
-
* (i.e.
|
|
343
|
+
* (i.e. [`ECONNREFUSED` in Node.js](https://nodejs.org/api/errors.html#errors_common_system_errors)):
|
|
347
344
|
*
|
|
348
345
|
* - `false`: the request fails immediately.
|
|
349
346
|
*
|
|
@@ -352,7 +349,7 @@ export declare type Config = {
|
|
|
352
349
|
* the initial failed request).
|
|
353
350
|
*
|
|
354
351
|
* - any other number: the request is retried until a server can be reached
|
|
355
|
-
* the request has been retried a total of `maxRetries` number of times
|
|
352
|
+
* or the request has been retried a total of `maxRetries` number of times
|
|
356
353
|
* (not including the initial failed request).
|
|
357
354
|
*
|
|
358
355
|
* When working with a single server without leader/follower failover, the
|
|
@@ -363,9 +360,19 @@ export declare type Config = {
|
|
|
363
360
|
* **Note**: Requests bound to a specific server (e.g. fetching query results)
|
|
364
361
|
* will never be retried automatically and ignore this setting.
|
|
365
362
|
*
|
|
363
|
+
* **Note**: To set the number of retries when a write-write conflict is
|
|
364
|
+
* encountered, see `retryOnConflict` instead.
|
|
365
|
+
*
|
|
366
366
|
* Default: `0`
|
|
367
367
|
*/
|
|
368
368
|
maxRetries?: false | number;
|
|
369
|
+
/**
|
|
370
|
+
* If set to a positive number, requests will automatically be retried at
|
|
371
|
+
* most this many times if they result in a write-write conflict.
|
|
372
|
+
*
|
|
373
|
+
* Default: `0`
|
|
374
|
+
*/
|
|
375
|
+
retryOnConflict?: number;
|
|
369
376
|
/**
|
|
370
377
|
* An http `Agent` instance to use for connections.
|
|
371
378
|
*
|
|
@@ -373,8 +380,8 @@ export declare type Config = {
|
|
|
373
380
|
*
|
|
374
381
|
* This option has no effect when using the browser version of arangojs.
|
|
375
382
|
*
|
|
376
|
-
* See also
|
|
377
|
-
* and
|
|
383
|
+
* See also [`http.Agent`](https://nodejs.org/api/http.html#http_new_agent_options)
|
|
384
|
+
* and [`https.Agent`](https://nodejs.org/api/https.html#https_new_agent_options)
|
|
378
385
|
* (when using TLS).
|
|
379
386
|
*/
|
|
380
387
|
agent?: any;
|
|
@@ -403,7 +410,7 @@ export declare type Config = {
|
|
|
403
410
|
* An object with additional headers to send with every request.
|
|
404
411
|
*
|
|
405
412
|
* If an `"authorization"` header is provided, it will be overridden when
|
|
406
|
-
* using {@link Database
|
|
413
|
+
* using {@link database.Database#useBasicAuth}, {@link database.Database#useBearerAuth} or
|
|
407
414
|
* the `auth` configuration option.
|
|
408
415
|
*/
|
|
409
416
|
headers?: Headers;
|
|
@@ -418,7 +425,7 @@ export declare type Config = {
|
|
|
418
425
|
precaptureStackTraces?: boolean;
|
|
419
426
|
/**
|
|
420
427
|
* Limits the number of values of server-reported response queue times that
|
|
421
|
-
* will be stored and accessible using {@link Database
|
|
428
|
+
* will be stored and accessible using {@link database.Database#queueTime}. If set to
|
|
422
429
|
* a finite value, older values will be discarded to make room for new values
|
|
423
430
|
* when that limit is reached.
|
|
424
431
|
*
|
|
@@ -432,14 +439,12 @@ export declare type Config = {
|
|
|
432
439
|
* @param connection - A value that might be a connection.
|
|
433
440
|
*
|
|
434
441
|
* @internal
|
|
435
|
-
* @hidden
|
|
436
442
|
*/
|
|
437
443
|
export declare function isArangoConnection(connection: any): connection is Connection;
|
|
438
444
|
/**
|
|
439
445
|
* Represents a connection pool shared by one or more databases.
|
|
440
446
|
*
|
|
441
447
|
* @internal
|
|
442
|
-
* @hidden
|
|
443
448
|
*/
|
|
444
449
|
export declare class Connection {
|
|
445
450
|
protected _activeTasks: number;
|
|
@@ -450,20 +455,19 @@ export declare class Connection {
|
|
|
450
455
|
protected _arangoVersion: number;
|
|
451
456
|
protected _headers: Headers;
|
|
452
457
|
protected _loadBalancingStrategy: LoadBalancingStrategy;
|
|
453
|
-
protected
|
|
454
|
-
protected
|
|
455
|
-
protected _maxRetries: number;
|
|
458
|
+
protected _maxRetries: number | false;
|
|
459
|
+
protected _retryOnConflict: number;
|
|
456
460
|
protected _maxTasks: number;
|
|
457
461
|
protected _queue: LinkedList<Task>;
|
|
458
462
|
protected _databases: Map<string, Database>;
|
|
459
463
|
protected _hosts: RequestFunction[];
|
|
460
|
-
protected
|
|
461
|
-
protected
|
|
462
|
-
protected
|
|
464
|
+
protected _hostUrls: string[];
|
|
465
|
+
protected _activeHostUrl: string;
|
|
466
|
+
protected _activeDirtyHostUrl: string;
|
|
463
467
|
protected _transactionId: string | null;
|
|
464
468
|
protected _precaptureStackTraces: boolean;
|
|
465
|
-
protected _responseQueueTimeSamples: number;
|
|
466
469
|
protected _queueTimes: LinkedList<[number, number]>;
|
|
470
|
+
protected _responseQueueTimeSamples: number;
|
|
467
471
|
/**
|
|
468
472
|
* @internal
|
|
469
473
|
*
|
|
@@ -471,7 +475,6 @@ export declare class Connection {
|
|
|
471
475
|
*
|
|
472
476
|
* @param config - An object with configuration options.
|
|
473
477
|
*
|
|
474
|
-
* @hidden
|
|
475
478
|
*/
|
|
476
479
|
constructor(config?: Omit<Config, "databaseName">);
|
|
477
480
|
/**
|
|
@@ -499,7 +502,7 @@ export declare class Connection {
|
|
|
499
502
|
/**
|
|
500
503
|
* @internal
|
|
501
504
|
*
|
|
502
|
-
* Fetches a {@link Database} instance for the given database name from the
|
|
505
|
+
* Fetches a {@link database.Database} instance for the given database name from the
|
|
503
506
|
* internal cache, if available.
|
|
504
507
|
*
|
|
505
508
|
* @param databaseName - Name of the database.
|
|
@@ -508,7 +511,7 @@ export declare class Connection {
|
|
|
508
511
|
/**
|
|
509
512
|
* @internal
|
|
510
513
|
*
|
|
511
|
-
* Adds a {@link Database} instance for the given database name to the
|
|
514
|
+
* Adds a {@link database.Database} instance for the given database name to the
|
|
512
515
|
* internal cache.
|
|
513
516
|
*
|
|
514
517
|
* @param databaseName - Name of the database.
|
|
@@ -518,23 +521,33 @@ export declare class Connection {
|
|
|
518
521
|
/**
|
|
519
522
|
* @internal
|
|
520
523
|
*
|
|
521
|
-
* Clears any {@link Database} instance stored for the given database name
|
|
524
|
+
* Clears any {@link database.Database} instance stored for the given database name
|
|
522
525
|
* from the internal cache, if present.
|
|
523
526
|
*
|
|
524
527
|
* @param databaseName - Name of the database.
|
|
525
528
|
* @param database - Must be `null`.
|
|
526
529
|
*/
|
|
527
530
|
database(databaseName: string, database: null): undefined;
|
|
531
|
+
/**
|
|
532
|
+
* @internal
|
|
533
|
+
*
|
|
534
|
+
* Replaces the host list with the given URLs.
|
|
535
|
+
*
|
|
536
|
+
* See {@link Connection#acquireHostList}.
|
|
537
|
+
*
|
|
538
|
+
* @param urls - URLs to use as host list.
|
|
539
|
+
*/
|
|
540
|
+
setHostList(urls: string[]): void;
|
|
528
541
|
/**
|
|
529
542
|
* @internal
|
|
530
543
|
*
|
|
531
544
|
* Adds the given URL or URLs to the host list.
|
|
532
545
|
*
|
|
533
|
-
* See {@link Connection
|
|
546
|
+
* See {@link Connection#acquireHostList}.
|
|
534
547
|
*
|
|
535
548
|
* @param urls - URL or URLs to add.
|
|
536
549
|
*/
|
|
537
|
-
addToHostList(urls: string | string[]):
|
|
550
|
+
addToHostList(urls: string | string[]): string[];
|
|
538
551
|
/**
|
|
539
552
|
* @internal
|
|
540
553
|
*
|
|
@@ -544,7 +557,7 @@ export declare class Connection {
|
|
|
544
557
|
* within the transaction if possible. Setting the ID manually may cause
|
|
545
558
|
* unexpected behavior.
|
|
546
559
|
*
|
|
547
|
-
* See also {@link Connection
|
|
560
|
+
* See also {@link Connection#clearTransactionId}.
|
|
548
561
|
*
|
|
549
562
|
* @param transactionId - ID of the active transaction.
|
|
550
563
|
*/
|
|
@@ -570,7 +583,7 @@ export declare class Connection {
|
|
|
570
583
|
*
|
|
571
584
|
* Closes all open connections.
|
|
572
585
|
*
|
|
573
|
-
* See {@link Database
|
|
586
|
+
* See {@link database.Database#close}.
|
|
574
587
|
*/
|
|
575
588
|
close(): void;
|
|
576
589
|
/**
|
|
@@ -578,7 +591,7 @@ export declare class Connection {
|
|
|
578
591
|
*
|
|
579
592
|
* Waits for propagation.
|
|
580
593
|
*
|
|
581
|
-
* See {@link Database
|
|
594
|
+
* See {@link database.Database#waitForPropagation}.
|
|
582
595
|
*
|
|
583
596
|
* @param request - Request to perform against each coordinator.
|
|
584
597
|
* @param timeout - Maximum number of milliseconds to wait for propagation.
|
|
@@ -589,7 +602,7 @@ export declare class Connection {
|
|
|
589
602
|
*
|
|
590
603
|
* Performs a request using the arangojs connection pool.
|
|
591
604
|
*/
|
|
592
|
-
request<T = ArangojsResponse>({
|
|
605
|
+
request<T = ArangojsResponse>({ hostUrl, method, body, expectBinary, isBinary, allowDirtyRead, retryOnConflict, timeout, headers, ...urlInfo }: RequestOptions, transform?: (res: ArangojsResponse) => T): Promise<T>;
|
|
593
606
|
}
|
|
594
607
|
export {};
|
|
595
608
|
//# sourceMappingURL=connection.d.ts.map
|
package/connection.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,OAAO,CAAC;A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