forked from canada-ca/tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.d.ts
More file actions
3443 lines (3443 loc) · 110 KB
/
Copy pathdatabase.d.ts
File metadata and controls
3443 lines (3443 loc) · 110 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/// <reference types="node" />
/**
* ```js
* import { Database } from "arangojs/database";
* ```
*
* The "database" module provides the {@link Database} class and associated
* types and interfaces for TypeScript.
*
* The Database class is also re-exported by the "index" module.
*
* @packageDocumentation
*/
import { Readable } from "stream";
import { Analyzer, AnalyzerDescription, CreateAnalyzerOptions } from "./analyzer";
import { AqlLiteral, AqlQuery } from "./aql";
import { ArangoCollection, Collection, CollectionMetadata, CollectionType, CreateCollectionOptions, DocumentCollection, EdgeCollection } from "./collection";
import { ArangoResponseMetadata, Config, Connection, Dict, Headers, RequestOptions } from "./connection";
import { ArrayCursor } from "./cursor";
import { FoxxManifest } from "./foxx-manifest";
import { EdgeDefinitionOptions, Graph, GraphCreateOptions, GraphInfo } from "./graph";
import { Blob } from "./lib/blob";
import { ArangojsResponse } from "./lib/request";
import { Route } from "./route";
import { Transaction } from "./transaction";
import { ArangoSearchView, ArangoSearchViewPropertiesOptions, ViewDescription } from "./view";
/**
* Indicates whether the given value represents a {@link Database}.
*
* @param database - A value that might be a database.
*/
export declare function isArangoDatabase(database: any): database is Database;
/**
* Collections involved in a transaction.
*/
export declare type TransactionCollections = {
/**
* An array of collections or a single collection that will be read from or
* written to during the transaction with no other writes being able to run
* in parallel.
*/
exclusive?: (string | ArangoCollection)[] | string | ArangoCollection;
/**
* An array of collections or a single collection that will be read from or
* written to during the transaction.
*
* If ArangoDB is using the MMFiles storage engine, this option behaves
* exactly like `exclusive`, i.e. no other writes will run in parallel.
*/
write?: (string | ArangoCollection)[] | string | ArangoCollection;
/**
* An array of collections or a single collection that will be read from
* during the transaction.
*/
read?: (string | ArangoCollection)[] | string | ArangoCollection;
};
/**
* Options for how the transaction should be performed.
*/
export declare type TransactionOptions = {
/**
* Whether the transaction may read from collections not specified for this
* transaction. If set to `false`, accessing any collections not specified
* will result in the transaction being aborted to avoid potential deadlocks.
*
* Default: `true`.
*/
allowImplicit?: boolean;
/**
* Determines whether to force the transaction to write all data to disk
* before returning.
*/
waitForSync?: boolean;
/**
* Determines how long the database will wait while attempting to gain locks
* on collections used by the transaction before timing out.
*/
lockTimeout?: number;
/**
* (RocksDB only.) Determines the transaction size limit in bytes.
*/
maxTransactionSize?: number;
/**
* (RocksDB only.) Determines the maximum number of operations after which an
* intermediate commit is performed automatically.
*
* @deprecated Removed in ArangoDB 3.4.
*/
intermediateCommitCount?: number;
/**
* (RocksDB only.) Determine the maximum total size of operations after which
* an intermediate commit is performed automatically.
*
* @deprecated Removed in ArangoDB 3.4.
*/
intermediateCommitSize?: number;
};
/**
* Options for executing a query.
*
* See {@link Database.query}.
*/
export declare type QueryOptions = {
/**
* If set to `true`, the query will be executed with support for dirty reads
* enabled, permitting ArangoDB to return a potentially dirty or stale result
* and arangojs will load balance the request without distinguishing between
* leaders and followers.
*
* Note that dirty reads are only supported for read-only queries, not data
* modification queries (e.g. using `INSERT`, `UPDATE`, `REPLACE` or
* `REMOVE`) and only when using ArangoDB 3.4 or later.
*
* Default: `false`
*/
allowDirtyRead?: boolean;
/**
* Maximum time in milliseconds arangojs will wait for a server response.
* Exceeding this value will result in the request being cancelled.
*
* **Note**: Setting a timeout for the client does not guarantee the query
* will be killed by ArangoDB if it is already being executed. See the
* `maxRuntime` option for limiting the execution time within ArangoDB.
*/
timeout?: number;
/**
* Unless set to `false`, the number of result values in the result set will
* be returned in the `count` attribute. This may be disabled by default in
* a future version of ArangoDB if calculating this value has a performance
* impact for some queries.
*
* Default: `true`.
*/
count?: boolean;
/**
* Number of result values to be transferred by the server in each
* network roundtrip (or "batch").
*
* Must be greater than zero.
*/
batchSize?: number;
/**
* If set to `false`, the AQL query results cache lookup will be skipped for
* this query.
*
* Default: `true`
*/
cache?: boolean;
/**
* Maximum memory size in bytes that the query is allowed to use.
* Exceeding this value will result in the query failing with an error.
*
* If set to `0`, the memory limit is disabled.
*
* Default: `0`
*/
memoryLimit?: number;
/**
* Maximum allowed execution time before the query will be killed in seconds.
*
* If set to `0`, the query will be allowed to run indefinitely.
*
* Default: `0`
*/
maxRuntime?: number;
/**
* Time-to-live for the cursor in seconds. The cursor results may be
* garbage collected by ArangoDB after this much time has passed.
*
* Default: `30`
*/
ttl?: number;
/**
* If set to `true`, the query will throw an exception and abort if it would
otherwise produce a warning.
*/
failOnWarning?: boolean;
/**
* If set to `1` or `true`, additional query profiling information will be
* returned in the `extra.profile` attribute if the query is not served from
* the result cache.
*
* If set to `2`, the query will return execution stats per query plan node
* in the `extra.stats.nodes` attribute. Additionally the query plan is
* returned in `extra.plan`.
*/
profile?: boolean | number;
/**
* If set to `true`, the query will be executed as a streaming query.
*/
stream?: boolean;
/**
* Limits the maximum number of warnings a query will return.
*/
maxWarningsCount?: number;
/**
* If set to `true` and the query has a `LIMIT` clause, the total number of
* values matched before the last top-level `LIMIT` in the query was applied
* will be returned in the `extra.stats.fullCount` attribute.
*/
fullCount?: boolean;
/**
* An object with a `rules` property specifying a list of optimizer rules to
* be included or excluded by the optimizer for this query. Prefix a rule
* name with `+` to include it, or `-` to exclude it. The name `all` acts as
* an alias matching all optimizer rules.
*/
optimizer?: {
rules: string[];
};
/**
* Limits the maximum number of plans that will be created by the AQL query
* optimizer.
*/
maxPlans?: number;
/**
* (RocksDB only.) Maximum size of transactions in bytes.
*/
maxTransactionSize?: number;
/**
* (RocksDB only.) Maximum number of operations after which an intermediate
* commit is automatically performed.
*/
intermediateCommitCount?: number;
/**
* (RocksDB only.) Maximum total size of operations in bytes after which an
* intermediate commit is automatically performed.
*/
intermediateCommitSize?: number;
/**
* (Enterprise Edition cluster only.) If set to `true`, collections
* inaccessible to current user will result in an access error instead
* of being treated as empty.
*/
skipInaccessibleCollections?: boolean;
/**
* (Enterprise Edition cluster only.) Limits the maximum time in seconds a
* DBServer will wait to bring satellite collections involved in the query
* into sync. Exceeding this value will result in the query being stopped.
*
* Default: `60`
*/
satelliteSyncWait?: number;
};
/**
* Options for explaining a query.
*
* See {@link Database.explain}.
*/
export declare type ExplainOptions = {
/**
* An object with a `rules` property specifying a list of optimizer rules to
* be included or excluded by the optimizer for this query. Prefix a rule
* name with `+` to include it, or `-` to exclude it. The name `all` acts as
* an alias matching all optimizer rules.
*/
optimizer?: {
rules: string[];
};
/**
* Maximum number of plans that the optimizer is allowed to generate.
* Setting this to a low value limits the amount of work the optimizer does.
*/
maxNumberOfPlans?: number;
/**
* If set to true, all possible execution plans will be returned as the
* `plans` property. Otherwise only the optimal execution plan will be
* returned as the `plan` property.
*
* Default: `false`
*/
allPlans?: boolean;
};
/**
* Details for a transaction.
*
* See also {@link TransactionStatus}.
*/
export declare type TransactionDetails = {
/**
* Unique identifier of the transaction.
*/
id: string;
/**
* Status (or "state") of the transaction.
*/
state: "running" | "committed" | "aborted";
};
/**
* Plan explaining query execution.
*/
export declare type ExplainPlan = {
/**
* Execution nodes in this plan.
*/
nodes: {
[key: string]: any;
type: string;
id: number;
dependencies: number[];
estimatedCost: number;
estimatedNrItems: number;
}[];
/**
* Rules applied by the optimizer.
*/
rules: string[];
/**
* Information about collections involved in the query.
*/
collections: {
name: string;
type: "read" | "write";
}[];
/**
* Variables used in the query.
*/
variables: {
id: number;
name: string;
}[];
/**
* Total estimated cost of the plan.
*/
estimatedCost: number;
/**
* Estimated number of items returned by the query.
*/
estimatedNrItems: number;
/**
* Whether the query is a data modification query.
*/
isModificationQuery: boolean;
};
/**
* Result of explaining a query with a single plan.
*/
export declare type SingleExplainResult = {
/**
* Query plan.
*/
plan: ExplainPlan;
/**
* Whether it would be possible to cache the query.
*/
cacheable: boolean;
/**
* Warnings encountered while planning the query execution.
*/
warnings: {
code: number;
message: string;
}[];
/**
* Statistical information about the query plan generation.
*/
stats: {
/**
* Total number of rules executed for this query.
*/
rulesExecuted: number;
/**
* Number of rules skipped for this query.
*/
rulesSkipped: number;
/**
* Total number of plans created.
*/
plansCreated: number;
};
};
/**
* Result of explaining a query with multiple plans.
*/
export declare type MultiExplainResult = {
/**
* Query plans.
*/
plans: ExplainPlan[];
/**
* Whether it would be possible to cache the query.
*/
cacheable: boolean;
/**
* Warnings encountered while planning the query execution.
*/
warnings: {
code: number;
message: string;
}[];
/**
* Statistical information about the query plan generation.
*/
stats: {
/**
* Total number of rules executed for this query.
*/
rulesExecuted: number;
/**
* Number of rules skipped for this query.
*/
rulesSkipped: number;
/**
* Total number of plans created.
*/
plansCreated: number;
};
};
/**
* Node in an AQL abstract syntax tree (AST).
*/
export declare type AstNode = {
[key: string]: any;
type: string;
subNodes: AstNode[];
};
/**
* Result of parsing a query.
*/
export declare type ParseResult = {
/**
* Whether the query was parsed.
*/
parsed: boolean;
/**
* Names of all collections involved in the query.
*/
collections: string[];
/**
* Names of all bind parameters used in the query.
*/
bindVars: string[];
/**
* Abstract syntax tree (AST) of the query.
*/
ast: AstNode[];
};
/**
* Information about query tracking.
*/
export declare type QueryTracking = {
/**
* Whether query tracking is enabled.
*/
enabled: boolean;
/**
* Maximum query string length in bytes that is kept in the list.
*/
maxQueryStringLength: number;
/**
* Maximum number of slow queries that is kept in the list.
*/
maxSlowQueries: number;
/**
* Threshold execution time in seconds for when a query is
* considered slow.
*/
slowQueryThreshold: number;
/**
* Whether bind parameters are being tracked along with queries.
*/
trackBindVars: boolean;
/**
* Whether slow queries are being tracked.
*/
trackSlowQueries: boolean;
};
/**
* Options for query tracking.
*
* See {@link Database.queryTracking}.
*/
export declare type QueryTrackingOptions = {
/**
* If set to `false`, neither queries nor slow queries will be tracked.
*/
enabled?: boolean;
/**
* Maximum query string length in bytes that will be kept in the list.
*/
maxQueryStringLength?: number;
/**
* Maximum number of slow queries to be kept in the list.
*/
maxSlowQueries?: number;
/**
* Threshold execution time in seconds for when a query will be
* considered slow.
*/
slowQueryThreshold?: number;
/**
* If set to `true`, bind parameters will be tracked along with queries.
*/
trackBindVars?: boolean;
/**
* If set to `true` and `enabled` is also set to `true`, slow queries will be
* tracked if their execution time exceeds `slowQueryThreshold`.
*/
trackSlowQueries?: boolean;
};
/**
* Object describing a query.
*/
export declare type QueryInfo = {
/**
* Unique identifier for this query.
*/
id: string;
/**
* Query string (potentially truncated).
*/
query: string;
/**
* Bind parameters used in the query.
*/
bindVars: Dict<any>;
/**
* Query's running time in seconds.
*/
runTime: number;
/**
* Date and time the query was started.
*/
started: string;
/**
* Query's current execution state.
*/
state: "executing" | "finished" | "killed";
/**
* Whether the query uses a streaming cursor.
*/
stream: boolean;
};
/**
* Database user to create with a database.
*/
export declare type CreateDatabaseUser = {
/**
* Username of the user to create.
*/
username: string;
/**
* Password of the user to create.
*
* Default: `""`
*/
passwd?: string;
/**
* Whether the user is active.
*
* Default: `true`
*/
active?: boolean;
/**
* Additional data to store with the user object.
*/
extra?: Dict<any>;
};
/**
* Options for creating a database.
*
* See {@link Database.createDatabase}.
*/
export declare type CreateDatabaseOptions = {
/**
* Database users to create with the database.
*/
users?: CreateDatabaseUser[];
/**
* (Cluster only.) The sharding method to use for new collections in the
* database.
*/
sharding?: "" | "flexible" | "single";
/**
* (Cluster only.) Default replication factor for new collections in this
* database.
*
* Setting this to `1` disables replication. Setting this to `"satellite"`
* will replicate to every DBServer.
*/
replicationFactor?: "satellite" | number;
/**
* (Cluster only.) Default write concern for new collections created in this
* database.
*/
writeConcern?: number;
/**
* (Cluster only.) Default write concern for new collections created in this
* database.
*
* @deprecated Renamed to `writeConcern` in ArangoDB 3.6.
*/
minReplicationFactor?: number;
};
/**
* Object describing a database.
*
* See {@link Database.get}.
*/
export declare type DatabaseInfo = {
/**
* Name of the database.
*/
name: string;
/**
* Unique identifier of the database.
*/
id: string;
/**
* File system path of the database.
*/
path: string;
/**
* Whether the database is the system database.
*/
isSystem: boolean;
/**
* (Cluster only.) The sharding method to use for new collections in the
* database.
*/
sharding?: "" | "flexible" | "single";
/**
* (Cluster only.) Default replication factor for new collections in this
* database.
*/
replicationFactor?: "satellite" | number;
/**
* (Cluster only.) Default write concern for new collections created in this
* database.
*/
writeConcern?: number;
/**
* (Cluster only.) Default write concern for new collections created in this
* database.
*
* @deprecated Renamed to `writeConcern` in ArangoDB 3.6.
*/
minReplicationFactor?: number;
};
/**
* Result of retrieving database version information.
*/
export declare type VersionInfo = {
/**
* Value identifying the server type, i.e. `"arango"`.
*/
server: string;
/**
* ArangoDB license type or "edition".
*/
license: "community" | "enterprise";
/**
* ArangoDB server version.
*/
version: string;
/**
* Additional information about the ArangoDB server.
*/
details?: {
[key: string]: string;
};
};
/**
* Definition of an AQL User Function.
*/
export declare type AqlUserFunction = {
/**
* Name of the AQL User Function.
*/
name: string;
/**
* Implementation of the AQL User Function.
*/
code: string;
/**
* Whether the function is deterministic.
*
* See {@link Database.createFunction}.
*/
isDeterministic: boolean;
};
/**
* Options for installing the service.
*
* See {@link Database.installService}.
*/
export declare type InstallServiceOptions = {
/**
* An object mapping configuration option names to values.
*
* See also {@link Database.getServiceConfiguration}.
*/
configuration?: Dict<any>;
/**
* An object mapping dependency aliases to mount points.
*
* See also {@link Database.getServiceDependencies}.
*/
dependencies?: Dict<string>;
/**
* Whether the service should be installed in development mode.
*
* See also {@link Database.setServiceDevelopmentMode}.
*
* Default: `false`
*/
development?: boolean;
/**
* Whether the service should be installed in legacy compatibility mode
*
* This overrides the `engines` option in the service manifest (if any).
*
* Default: `false`
*/
legacy?: boolean;
/**
* Whether the "setup" script should be executed.
*
* Default: `true`
*/
setup?: boolean;
};
/**
* Options for replacing a service.
*
* See {@link Database.replaceService}.
*/
export declare type ReplaceServiceOptions = {
/**
* An object mapping configuration option names to values.
*
* See also {@link Database.getServiceConfiguration}.
*/
configuration?: Dict<any>;
/**
* An object mapping dependency aliases to mount points.
*
* See also {@link Database.getServiceDependencies}.
*/
dependencies?: Dict<string>;
/**
* Whether the service should be installed in development mode.
*
* See also {@link Database.setServiceDevelopmentMode}.
*
* Default: `false`
*/
development?: boolean;
/**
* Whether the service should be installed in legacy compatibility mode
*
* This overrides the `engines` option in the service manifest (if any).
*
* Default: `false`
*/
legacy?: boolean;
/**
* Whether the "setup" script should be executed.
*
* Default: `true`
*/
setup?: boolean;
/**
* Whether the existing service's "teardown" script should be executed
* prior to removing that service.
*
* Default: `true`
*/
teardown?: boolean;
/**
* If set to `true`, replacing a service that does not already exist will
* fall back to installing the new service.
*
* Default: `false`
*/
force?: boolean;
};
/**
* Options for upgrading a service.
*
* See {@link Database.upgradeService}.
*/
export declare type UpgradeServiceOptions = {
/**
* An object mapping configuration option names to values.
*
* See also {@link Database.getServiceConfiguration}.
*/
configuration?: Dict<any>;
/**
* An object mapping dependency aliases to mount points.
*
* See also {@link Database.getServiceDependencies}.
*/
dependencies?: Dict<string>;
/**
* Whether the service should be installed in development mode.
*
* See also {@link Database.setServiceDevelopmentMode}.
*
* Default: `false`
*/
development?: boolean;
/**
* Whether the service should be installed in legacy compatibility mode
*
* This overrides the `engines` option in the service manifest (if any).
*
* Default: `false`
*/
legacy?: boolean;
/**
* Whether the "setup" script should be executed.
*
* Default: `true`
*/
setup?: boolean;
/**
* Whether the existing service's "teardown" script should be executed
* prior to upgrading that service.
*
* Default: `false`
*/
teardown?: boolean;
/**
* Unless set to `true`, upgrading a service that does not already exist will
* fall back to installing the new service.
*
* Default: `false`
*/
force?: boolean;
};
/**
* Options for uninstalling a service.
*
* See {@link Database.uninstallService}.
*/
export declare type UninstallServiceOptions = {
/**
* Whether the service's "teardown" script should be executed
* prior to removing that service.
*
* Default: `true`
*/
teardown?: boolean;
/**
* If set to `true`, uninstalling a service that does not already exist
* will be considered successful.
*
* Default: `false`
*/
force?: boolean;
};
/**
* Object briefly describing a Foxx service.
*/
export declare type ServiceSummary = {
/**
* Service mount point, relative to the database.
*/
mount: string;
/**
* Name defined in the service manifest.
*/
name?: string;
/**
* Version defined in the service manifest.
*/
version?: string;
/**
* Service dependencies the service expects to be able to match as a mapping
* from dependency names to versions the service is compatible with.
*/
provides: Dict<string>;
/**
* Whether development mode is enabled for this service.
*/
development: boolean;
/**
* Whether the service is running in legacy compatibility mode.
*/
legacy: boolean;
};
/**
* Object describing a Foxx service in detail.
*/
export declare type ServiceInfo = {
/**
* Service mount point, relative to the database.
*/
mount: string;
/**
* File system path of the service.
*/
path: string;
/**
* Name defined in the service manifest.
*/
name?: string;
/**
* Version defined in the service manifest.
*/
version?: string;
/**
* Whether development mode is enabled for this service.
*/
development: boolean;
/**
* Whether the service is running in legacy compatibility mode.
*/
legacy: boolean;
/**
* Content of the service manifest of this service.
*/
manifest: FoxxManifest;
/**
* Internal checksum of the service's initial source bundle.
*/
checksum: string;
/**
* Options for this service.
*/
options: {
/**
* Configuration values set for this service.
*/
configuration: Dict<any>;
/**
* Service dependency configuration of this service.
*/
dependencies: Dict<string>;
};
};
/**
* Object describing a configuration option of a Foxx service.
*/
export declare type ServiceConfiguration = {
/**
* Data type of the configuration value.
*
* **Note**: `"int"` and `"bool"` are historical synonyms for `"integer"` and
* `"boolean"`. The `"password"` type is synonymous with `"string"` but can
* be used to distinguish values which should not be displayed in plain text
* by software when managing the service.
*/
type: "integer" | "boolean" | "string" | "number" | "json" | "password" | "int" | "bool";
/**
* Current value of the configuration option as stored internally.
*/
currentRaw: any;
/**
* Processed current value of the configuration option as exposed in the
* service code.
*/
current: any;
/**
* Formatted name of the configuration option.
*/
title: string;
/**
* Human-readable description of the configuration option.
*/
description?: string;
/**
* Whether the configuration option must be set in order for the service
* to be operational.
*/
required: boolean;
/**
* Default value of the configuration option.
*/
default?: any;
};
/**
* Object describing a single-service dependency defined by a Foxx service.
*/
export declare type SingleServiceDependency = {
/**
* Whether this is a multi-service dependency.
*/
multiple: false;
/**
* Current mount point the dependency is resolved to.
*/
current?: string;
/**
* Formatted name of the dependency.
*/
title: string;
/**
* Name of the service the dependency expects to match.
*/
name: string;
/**
* Version of the service the dependency expects to match.
*/
version: string;
/**
* Human-readable description of the dependency.
*/