harperdb 4.4.0-alpha.1 → 4.4.0-beta.2

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 (130) hide show
  1. package/README.md +12 -3
  2. package/application-template/config.yaml +2 -5
  3. package/bin/harperdb.js +85 -67
  4. package/bin/lite.js +118 -27
  5. package/config/yaml/defaultConfig.yaml +3 -3
  6. package/config/yaml/defaultNatsConfig.yaml +1 -1
  7. package/index.js +3 -12
  8. package/json/hdbConnectorOptions.json +14 -14
  9. package/json/interNodeConnectorOptions.json +15 -15
  10. package/json/systemSchema.json +260 -260
  11. package/launchServiceScripts/launchInstallNATSServer.js +3 -3
  12. package/launchServiceScripts/launchNatsIngestService.js +118 -27
  13. package/launchServiceScripts/launchNatsReplyService.js +118 -27
  14. package/launchServiceScripts/launchUpdateNodes4-0-0.js +118 -27
  15. package/logs/README.md +1 -1
  16. package/npm-shrinkwrap.json +7556 -7555
  17. package/package.json +130 -133
  18. package/resources/ErrorResource.d.ts +26 -0
  19. package/resources/IterableEventQueue.d.ts +6 -0
  20. package/resources/Resource.d.ts +6 -0
  21. package/resources/ResourceInterface.d.ts +1 -1
  22. package/resources/Table.d.ts +14 -3
  23. package/resources/auditStore.d.ts +5 -5
  24. package/resources/crdt.d.ts +1 -1
  25. package/resources/databases.d.ts +13 -1
  26. package/resources/search.d.ts +15 -2
  27. package/resources/tracked.d.ts +1 -1
  28. package/server/jobs/jobProcess.js +118 -27
  29. package/server/serverHelpers/Headers.d.ts +1 -1
  30. package/server/threads/threadServer.js +118 -27
  31. package/studio/build-local/asset-manifest.json +47 -46
  32. package/studio/build-local/index.html +1 -1
  33. package/studio/build-local/static/css/main.fee3019a.css +13 -0
  34. package/studio/build-local/static/js/23.3b9f7144.chunk.js +1 -0
  35. package/studio/build-local/static/js/239.183c6cbc.chunk.js +2 -0
  36. package/studio/build-local/static/js/{228.302d7db9.chunk.js → 279.7890bce3.chunk.js} +1 -1
  37. package/studio/build-local/static/js/311.9e648b13.chunk.js +2 -0
  38. package/studio/build-local/static/js/311.9e648b13.chunk.js.LICENSE.txt +38 -0
  39. package/studio/build-local/static/js/43.73dc432d.chunk.js +2 -0
  40. package/studio/build-local/static/js/452.d771b05a.chunk.js +2 -0
  41. package/studio/build-local/static/js/{446.5237e847.chunk.js.LICENSE.txt → 452.d771b05a.chunk.js.LICENSE.txt} +2 -2
  42. package/studio/build-local/static/js/545.be2e36f9.chunk.js +1 -0
  43. package/studio/build-local/static/js/759.7c5150cd.chunk.js +2 -0
  44. package/studio/build-local/static/js/805.6aab06e2.chunk.js +1 -0
  45. package/studio/build-local/static/js/806.afb99f70.chunk.js +1 -0
  46. package/studio/build-local/static/js/833.5b133801.chunk.js +1 -0
  47. package/studio/build-local/static/js/851.4c6536d6.chunk.js +1 -0
  48. package/studio/build-local/static/js/860.727e7fc8.chunk.js +1 -0
  49. package/studio/build-local/static/js/browse-csvupload.02fdfbea.chunk.js +1 -0
  50. package/studio/build-local/static/js/browse-datatable.0e20a171.chunk.js +1 -0
  51. package/studio/build-local/static/js/browse-entitymanager.0db076c3.chunk.js +1 -0
  52. package/studio/build-local/static/js/browse-jsonviewer.b690b1bb.chunk.js +1 -0
  53. package/studio/build-local/static/js/custom-functions.04b93135.chunk.js +1 -0
  54. package/studio/build-local/static/js/instance-charts.217c477d.chunk.js +1 -0
  55. package/studio/build-local/static/js/instance-cluster.0ba07710.chunk.js +1 -0
  56. package/studio/build-local/static/js/instance-config.2274de0a.chunk.js +1 -0
  57. package/studio/build-local/static/js/instance-query.fdc5f922.chunk.js +1 -0
  58. package/studio/build-local/static/js/instance-roles.38ef8e77.chunk.js +1 -0
  59. package/studio/build-local/static/js/instance-status.d09551b0.chunk.js +1 -0
  60. package/studio/build-local/static/js/instance-users-datatable.9b5617bc.chunk.js +1 -0
  61. package/studio/build-local/static/js/instance-users-edit.6ea9cc6f.chunk.js +1 -0
  62. package/studio/build-local/static/js/instance-users.876f6070.chunk.js +1 -0
  63. package/studio/build-local/static/js/instance.ad30f892.chunk.js +1 -0
  64. package/studio/build-local/static/js/instances.f4fec0cb.chunk.js +1 -0
  65. package/studio/build-local/static/js/main.e70e768f.js +2 -0
  66. package/studio/build-local/static/js/{main.4fd117ad.js.LICENSE.txt → main.e70e768f.js.LICENSE.txt} +0 -33
  67. package/studio/build-local/static/js/offline-app.31ad36fc.chunk.js +1 -0
  68. package/studio/build-local/static/js/online-app.91033fd0.chunk.js +1 -0
  69. package/studio/build-local/static/js/organization-billing.21b2d3c9.chunk.js +1 -0
  70. package/studio/build-local/static/js/organization-users.6f50ca02.chunk.js +1 -0
  71. package/studio/build-local/static/js/organization.89b902c4.chunk.js +1 -0
  72. package/studio/build-local/static/js/organizations.4933fdbc.chunk.js +1 -0
  73. package/studio/build-local/static/js/profile.c05c7042.chunk.js +1 -0
  74. package/studio/build-local/static/js/resetPassword.3478535b.chunk.js +1 -0
  75. package/studio/build-local/static/js/roles-jsonviewer.bf1011d5.chunk.js +1 -0
  76. package/studio/build-local/static/js/signIn.996cf7ee.chunk.js +1 -0
  77. package/studio/build-local/static/js/signUp.c8fce52d.chunk.js +1 -0
  78. package/studio/build-local/static/js/structure-reloader.f65842a1.chunk.js +1 -0
  79. package/studio/build-local/static/js/topnav.0fa4de77.chunk.js +1 -0
  80. package/studio/build-local/static/js/updatePassword.bc881b36.chunk.js +1 -0
  81. package/utility/install/README.md +23 -0
  82. package/utility/scripts/restartHdb.js +118 -27
  83. package/application-template/routes/index.js +0 -14
  84. package/studio/build-local/static/css/main.6c0f1b63.css +0 -13
  85. package/studio/build-local/static/js/110.ca4244a6.chunk.js +0 -2
  86. package/studio/build-local/static/js/287.21477cf9.chunk.js +0 -1
  87. package/studio/build-local/static/js/409.17daa4fe.chunk.js +0 -2
  88. package/studio/build-local/static/js/424.ad87c8fd.chunk.js +0 -1
  89. package/studio/build-local/static/js/446.5237e847.chunk.js +0 -2
  90. package/studio/build-local/static/js/662.92e32ffc.chunk.js +0 -1
  91. package/studio/build-local/static/js/718.74e9355d.chunk.js +0 -1
  92. package/studio/build-local/static/js/723.c58acced.chunk.js +0 -2
  93. package/studio/build-local/static/js/731.8a941eb3.chunk.js +0 -1
  94. package/studio/build-local/static/js/807.510f66df.chunk.js +0 -2
  95. package/studio/build-local/static/js/807.510f66df.chunk.js.LICENSE.txt +0 -5
  96. package/studio/build-local/static/js/926.88d6f9ce.chunk.js +0 -1
  97. package/studio/build-local/static/js/browse-csvupload.453237f3.chunk.js +0 -1
  98. package/studio/build-local/static/js/browse-datatable.b9ef2d28.chunk.js +0 -1
  99. package/studio/build-local/static/js/browse-entitymanager.50827a5a.chunk.js +0 -1
  100. package/studio/build-local/static/js/browse-jsonviewer.a2534004.chunk.js +0 -1
  101. package/studio/build-local/static/js/custom-functions.dd7e182c.chunk.js +0 -1
  102. package/studio/build-local/static/js/instance-charts.34d15f02.chunk.js +0 -1
  103. package/studio/build-local/static/js/instance-cluster.5bce430c.chunk.js +0 -1
  104. package/studio/build-local/static/js/instance-config.70c17b53.chunk.js +0 -1
  105. package/studio/build-local/static/js/instance-query.4f6eec62.chunk.js +0 -1
  106. package/studio/build-local/static/js/instance-roles.507a4ed0.chunk.js +0 -1
  107. package/studio/build-local/static/js/instance-status.ce9d7f64.chunk.js +0 -1
  108. package/studio/build-local/static/js/instance-users-datatable.190640fd.chunk.js +0 -1
  109. package/studio/build-local/static/js/instance-users-edit.d2444479.chunk.js +0 -1
  110. package/studio/build-local/static/js/instance-users.eabfbbde.chunk.js +0 -1
  111. package/studio/build-local/static/js/instance.a163623f.chunk.js +0 -1
  112. package/studio/build-local/static/js/instances.6b88a87c.chunk.js +0 -1
  113. package/studio/build-local/static/js/main.4fd117ad.js +0 -2
  114. package/studio/build-local/static/js/offline-app.7371216b.chunk.js +0 -1
  115. package/studio/build-local/static/js/online-app.db436eec.chunk.js +0 -1
  116. package/studio/build-local/static/js/organization-billing.b2f260f0.chunk.js +0 -1
  117. package/studio/build-local/static/js/organization-users.b6171b18.chunk.js +0 -1
  118. package/studio/build-local/static/js/organization.7800f16a.chunk.js +0 -1
  119. package/studio/build-local/static/js/organizations.8bb505f2.chunk.js +0 -1
  120. package/studio/build-local/static/js/profile.292bdd86.chunk.js +0 -1
  121. package/studio/build-local/static/js/resetPassword.8fdfba77.chunk.js +0 -1
  122. package/studio/build-local/static/js/roles-jsonviewer.c11f1816.chunk.js +0 -1
  123. package/studio/build-local/static/js/signIn.b11bdc50.chunk.js +0 -1
  124. package/studio/build-local/static/js/signUp.564d4e0b.chunk.js +0 -1
  125. package/studio/build-local/static/js/structure-reloader.b6de4091.chunk.js +0 -1
  126. package/studio/build-local/static/js/topnav.4fd41d60.chunk.js +0 -1
  127. package/studio/build-local/static/js/updatePassword.e23019c7.chunk.js +0 -1
  128. /package/studio/build-local/static/js/{723.c58acced.chunk.js.LICENSE.txt → 239.183c6cbc.chunk.js.LICENSE.txt} +0 -0
  129. /package/studio/build-local/static/js/{110.ca4244a6.chunk.js.LICENSE.txt → 43.73dc432d.chunk.js.LICENSE.txt} +0 -0
  130. /package/studio/build-local/static/js/{409.17daa4fe.chunk.js.LICENSE.txt → 759.7c5150cd.chunk.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -1,135 +1,132 @@
1
1
  {
2
- "name": "harperdb",
3
- "version": "4.4.0-alpha.1",
4
- "description": "HarperDB is a distributed database, caching service, streaming broker, and application development platform focused on performance and ease of use.",
5
- "keywords": [
6
- "database",
7
- "nosql",
8
- "api",
9
- "distributed",
10
- "broker",
11
- "mqtt",
12
- "real-time",
13
- "enterprise",
14
- "Fastify",
15
- "NATS",
16
- "HarperDB",
17
- "Harper",
18
- "clustering",
19
- "replication",
20
- "REST",
21
- "WebSockets",
22
- "decentralized",
23
- "server-sent events",
24
- "document store"
25
- ],
26
- "main": "harperdb.js",
27
- "bin": {
28
- "harperdb": "./bin/harperdb.js"
29
- },
30
- "engines": {
31
- "minimum-node": "16.0.0",
32
- "go-lang": "1.21.7",
33
- "nats-server": "2.10.11"
34
- },
35
- "exports": {
36
- ".": "./index.js"
37
- },
38
- "homepage": "https://www.harperdb.io/",
39
- "bugs": "support@harperdb.io",
40
- "author": {
41
- "name": "HarperDB",
42
- "email": "support@harperdb.io"
43
- },
44
- "license": "SEE LICENSE IN LICENSE",
45
- "dependencies": {
46
- "@aws-sdk/client-s3": "3.635.0",
47
- "@aws-sdk/lib-storage": "3.635.0",
48
- "@endo/static-module-record": "^1.0.4",
49
- "@fastify/autoload": "5.10.0",
50
- "@fastify/compress": "~6.5.0",
51
- "@fastify/cors": "~9.0.1",
52
- "@fastify/static": "~7.0.4",
53
- "@turf/area": "6.5.0",
54
- "@turf/boolean-contains": "6.5.0",
55
- "@turf/boolean-disjoint": "6.5.0",
56
- "@turf/boolean-equal": "6.5.0",
57
- "@turf/circle": "6.5.0",
58
- "@turf/difference": "6.5.0",
59
- "@turf/distance": "6.5.0",
60
- "@turf/helpers": "6.5.0",
61
- "@turf/length": "6.5.0",
62
- "alasql": "4.1.10",
63
- "cbor-x": "1.6.0",
64
- "chalk": "4.1.2",
65
- "cli-progress": "3.12.0",
66
- "clone": "2.1.2",
67
- "fast-glob": "3.3.2",
68
- "fastify": "~4.28.1",
69
- "fastify-plugin": "~4.5.1",
70
- "fs-extra": "11.2.0",
71
- "graphql": "^16.9.0",
72
- "gunzip-maybe": "1.4.2",
73
- "human-readable-ids": "1.0.4",
74
- "inquirer": "8.2.6",
75
- "is-number": "7.0.0",
76
- "joi": "17.12.2",
77
- "json-bigint-fixes": "1.1.0",
78
- "json2csv": "5.0.7",
79
- "jsonata": "1.8.7",
80
- "jsonwebtoken": "9.0.2",
81
- "lmdb": "3.0.14",
82
- "lodash": "4.17.21",
83
- "mathjs": "11.12.0",
84
- "minimist": "1.2.8",
85
- "moment": "2.30.1",
86
- "mqtt-packet": "~9.0.0",
87
- "msgpackr": "1.11.0",
88
- "nats": "2.19.0",
89
- "needle": "3.3.1",
90
- "node-forge": "^1.3.1",
91
- "node-stream-zip": "1.15.0",
92
- "node-unix-socket": "0.2.5",
93
- "normalize-path": "^3.0.0",
94
- "ora": "5.4.1",
95
- "ordered-binary": "1.5.1",
96
- "papaparse": "5.4.1",
97
- "passport": "0.6.0",
98
- "passport-http": "0.3.0",
99
- "passport-local": "1.0.0",
100
- "pino": "8.16.0",
101
- "pm2": "5.4.1",
102
- "prompt": "1.3.0",
103
- "properties-reader": "2.3.0",
104
- "recursive-iterator": "3.3.0",
105
- "semver": "7.5.4",
106
- "send": "^0.18.0",
107
- "serve-static": "1.15.0",
108
- "ses": "1.1.0",
109
- "stream-chain": "2.2.5",
110
- "stream-json": "1.8.0",
111
- "systeminformation": "5.23.5",
112
- "tar-fs": "3.0.6",
113
- "ulidx": "0.5.0",
114
- "uuid": "10.0.0",
115
- "validate.js": "0.13.1",
116
- "ws": "8.18.0",
117
- "yaml": "2.5.0"
118
- },
119
- "overrides": {
120
- "eslint-plugin-radar": {
121
- "eslint": "8.22.0"
122
- },
123
- "alasql": {
124
- "xlsx": "0.18.5"
125
- }
126
- },
127
- "optionalDependencies": {
128
- "bufferutil": "^4.0.7",
129
- "segfault-handler": "^1.3.0",
130
- "utf-8-validate": "^5.0.10"
131
- },
132
- "scripts": {
133
- "postinstall": "node ./launchServiceScripts/launchInstallNATSServer.js"
134
- }
2
+ "name": "harperdb",
3
+ "version": "4.4.0-beta.2",
4
+ "description": "HarperDB is a distributed database, caching service, streaming broker, and application development platform focused on performance and ease of use.",
5
+ "keywords": [
6
+ "database",
7
+ "nosql",
8
+ "api",
9
+ "distributed",
10
+ "broker",
11
+ "mqtt",
12
+ "real-time",
13
+ "enterprise",
14
+ "Fastify",
15
+ "NATS",
16
+ "HarperDB",
17
+ "Harper",
18
+ "clustering",
19
+ "replication",
20
+ "REST",
21
+ "WebSockets",
22
+ "decentralized",
23
+ "server-sent events",
24
+ "document store"
25
+ ],
26
+ "main": "harperdb.js",
27
+ "bin": {
28
+ "harperdb": "./bin/harperdb.js"
29
+ },
30
+ "engines": {
31
+ "minimum-node": "16.0.0",
32
+ "go-lang": "1.21.7",
33
+ "nats-server": "2.10.11"
34
+ },
35
+ "exports": {
36
+ ".": "./index.js"
37
+ },
38
+ "homepage": "https://www.harperdb.io/",
39
+ "bugs": "support@harperdb.io",
40
+ "author": {
41
+ "name": "HarperDB",
42
+ "email": "support@harperdb.io"
43
+ },
44
+ "license": "SEE LICENSE IN LICENSE",
45
+ "dependencies": {
46
+ "@aws-sdk/client-s3": "3.635.0",
47
+ "@aws-sdk/lib-storage": "3.635.0",
48
+ "@endo/static-module-record": "^1.0.4",
49
+ "@fastify/autoload": "5.10.0",
50
+ "@fastify/compress": "~6.5.0",
51
+ "@fastify/cors": "~9.0.1",
52
+ "@fastify/static": "~7.0.4",
53
+ "@turf/area": "6.5.0",
54
+ "@turf/boolean-contains": "6.5.0",
55
+ "@turf/boolean-disjoint": "6.5.0",
56
+ "@turf/boolean-equal": "6.5.0",
57
+ "@turf/circle": "6.5.0",
58
+ "@turf/difference": "6.5.0",
59
+ "@turf/distance": "6.5.0",
60
+ "@turf/helpers": "6.5.0",
61
+ "@turf/length": "6.5.0",
62
+ "alasql": "4.1.10",
63
+ "cbor-x": "1.6.0",
64
+ "chalk": "4.1.2",
65
+ "cli-progress": "3.12.0",
66
+ "clone": "2.1.2",
67
+ "fast-glob": "3.3.2",
68
+ "fastify": "~4.28.1",
69
+ "fastify-plugin": "~4.5.1",
70
+ "fs-extra": "11.2.0",
71
+ "graphql": "^16.9.0",
72
+ "gunzip-maybe": "1.4.2",
73
+ "human-readable-ids": "1.0.4",
74
+ "inquirer": "8.2.6",
75
+ "is-number": "7.0.0",
76
+ "joi": "17.12.2",
77
+ "json-bigint-fixes": "1.1.0",
78
+ "json2csv": "5.0.7",
79
+ "jsonata": "1.8.7",
80
+ "jsonwebtoken": "9.0.2",
81
+ "lmdb": "3.1.3",
82
+ "lodash": "4.17.21",
83
+ "mathjs": "11.12.0",
84
+ "minimist": "1.2.8",
85
+ "moment": "2.30.1",
86
+ "mqtt-packet": "~9.0.0",
87
+ "msgpackr": "1.11.0",
88
+ "nats": "2.19.0",
89
+ "needle": "3.3.1",
90
+ "node-forge": "^1.3.1",
91
+ "node-stream-zip": "1.15.0",
92
+ "node-unix-socket": "0.2.5",
93
+ "normalize-path": "^3.0.0",
94
+ "ora": "5.4.1",
95
+ "ordered-binary": "1.5.2",
96
+ "papaparse": "5.4.1",
97
+ "passport": "0.6.0",
98
+ "passport-http": "0.3.0",
99
+ "passport-local": "1.0.0",
100
+ "pino": "8.16.0",
101
+ "pm2": "5.4.1",
102
+ "prompt": "1.3.0",
103
+ "properties-reader": "2.3.0",
104
+ "recursive-iterator": "3.3.0",
105
+ "semver": "7.5.4",
106
+ "send": "^1.1.0",
107
+ "serve-static": "2.1.0",
108
+ "ses": "1.1.0",
109
+ "stream-chain": "2.2.5",
110
+ "stream-json": "1.8.0",
111
+ "systeminformation": "5.23.5",
112
+ "tar-fs": "3.0.6",
113
+ "ulidx": "0.5.0",
114
+ "uuid": "10.0.0",
115
+ "validate.js": "0.13.1",
116
+ "ws": "8.18.0",
117
+ "yaml": "2.5.0"
118
+ },
119
+ "overrides": {
120
+ "alasql": {
121
+ "xlsx": "0.18.5"
122
+ }
123
+ },
124
+ "optionalDependencies": {
125
+ "bufferutil": "^4.0.7",
126
+ "segfault-handler": "^1.3.0",
127
+ "utf-8-validate": "^5.0.10"
128
+ },
129
+ "scripts": {
130
+ "postinstall": "node ./launchServiceScripts/launchInstallNATSServer.js"
131
+ }
135
132
  }
@@ -0,0 +1,26 @@
1
+ import { Resource } from './Resource';
2
+ import { Context } from './ResourceInterface';
3
+ /**
4
+ * ErrorResource is a Resource that throws an error on any request, communicating to the client when attempts are made
5
+ * to access endpoints/resources that had an internal error in their configuration or setup. This helps ensure that
6
+ * if there is a problem with a resource, it is immediately apparent and can be fixed.
7
+ */
8
+ export declare class ErrorResource implements Resource {
9
+ error: Error;
10
+ constructor(error: Error);
11
+ isError: boolean;
12
+ allowRead(): never;
13
+ allowUpdate(): never;
14
+ allowCreate(): never;
15
+ allowDelete(): never;
16
+ getId(): never;
17
+ getContext(): Context;
18
+ get(): never;
19
+ post(): never;
20
+ put(): never;
21
+ delete(): never;
22
+ connect(): never;
23
+ getResource(): this;
24
+ publish(): never;
25
+ subscribe(): never;
26
+ }
@@ -3,10 +3,16 @@ export declare class IterableEventQueue extends EventEmitter {
3
3
  resolveNext: Function;
4
4
  queue: any[];
5
5
  hasDataListeners: boolean;
6
+ drainCloseListener: boolean;
7
+ currentDrainResolver: Function;
6
8
  [Symbol.asyncIterator](): EventQueueIterator;
7
9
  push(message: any): void;
8
10
  send(message: any): void;
9
11
  getNextMessage(): any;
12
+ /**
13
+ * Wait for the queue to be drained, resolving to true to continue or false if the queue was closed before draining.
14
+ */
15
+ waitForDrain(): Promise<boolean>;
10
16
  on(event_name: any, listener: any): this;
11
17
  }
12
18
  declare class EventQueueIterator {
@@ -135,4 +135,10 @@ export declare class Resource implements ResourceInterface {
135
135
  getContext(): Context;
136
136
  }
137
137
  export declare function snake_case(camelCase: string): string;
138
+ /**
139
+ * An array for ids that toString's back to slash-delimited string
140
+ */
141
+ export declare class MultiPartId extends Array {
142
+ toString(): string;
143
+ }
138
144
  export declare function transformForSelect(select: any, resource: any): (object: any) => any;
@@ -37,7 +37,7 @@ export interface Context {
37
37
  /** An array of nodes to replicate to */
38
38
  replicateTo?: string[];
39
39
  }
40
- interface DirectCondition {
40
+ export interface DirectCondition {
41
41
  attribute: string;
42
42
  comparator?: string;
43
43
  value: any;
@@ -14,6 +14,8 @@ type Attribute = {
14
14
  expiresAt?: boolean;
15
15
  isPrimaryKey?: boolean;
16
16
  };
17
+ export declare const INVALIDATED = 1;
18
+ export declare const EVICTED = 8;
17
19
  export interface Table {
18
20
  primaryStore: Database;
19
21
  auditStore: Database;
@@ -23,13 +25,12 @@ export interface Table {
23
25
  databaseName: string;
24
26
  attributes: any[];
25
27
  primaryKey: string;
28
+ splitSegments?: boolean;
26
29
  replicate?: boolean;
27
30
  subscriptions: Map<any, Function[]>;
28
31
  expirationMS: number;
29
32
  indexingOperations?: Promise<void>;
30
- sources: {
31
- new (): ResourceInterface;
32
- }[];
33
+ sources: (new () => ResourceInterface)[];
33
34
  Transaction: ReturnType<typeof makeTable>;
34
35
  }
35
36
  /**
@@ -116,9 +117,12 @@ export declare function makeTable(options: any): {
116
117
  resolveNext: Function;
117
118
  queue: any[];
118
119
  hasDataListeners: boolean;
120
+ drainCloseListener: boolean;
121
+ currentDrainResolver: Function;
119
122
  push(message: any): void;
120
123
  send(message: any): void;
121
124
  getNextMessage(): any;
125
+ waitForDrain(): Promise<boolean>;
122
126
  on(event_name: any, listener: any): any;
123
127
  [Symbol.asyncIterator](): {
124
128
  queue: import("./IterableEventQueue").IterableEventQueue;
@@ -181,6 +185,7 @@ export declare function makeTable(options: any): {
181
185
  attributes: any;
182
186
  replicate: any;
183
187
  sealed: any;
188
+ splitSegments: any;
184
189
  createdTimeProperty: Attribute;
185
190
  updatedTimeProperty: Attribute;
186
191
  propertyResolvers: any;
@@ -284,9 +289,12 @@ export declare function makeTable(options: any): {
284
289
  resolveNext: Function;
285
290
  queue: any[];
286
291
  hasDataListeners: boolean;
292
+ drainCloseListener: boolean;
293
+ currentDrainResolver: Function;
287
294
  push(message: any): void;
288
295
  send(message: any): void;
289
296
  getNextMessage(): any;
297
+ waitForDrain(): Promise<boolean>;
290
298
  on(event_name: any, listener: any): any;
291
299
  [Symbol.asyncIterator](): {
292
300
  queue: import("./IterableEventQueue").IterableEventQueue;
@@ -413,9 +421,12 @@ export declare function makeTable(options: any): {
413
421
  resolveNext: Function;
414
422
  queue: any[];
415
423
  hasDataListeners: boolean;
424
+ drainCloseListener: boolean;
425
+ currentDrainResolver: Function;
416
426
  push(message: any): void;
417
427
  send(message: any): void;
418
428
  getNextMessage(): any;
429
+ waitForDrain(): Promise<boolean>;
419
430
  on(event_name: any, listener: any): any;
420
431
  [Symbol.asyncIterator](): {
421
432
  queue: import("./IterableEventQueue").IterableEventQueue;
@@ -33,18 +33,18 @@ export declare const HAS_EXPIRATION_EXTENDED_TYPE = 4096;
33
33
  * @param previous_residency_id
34
34
  */
35
35
  export declare function createAuditEntry(txn_time: any, table_id: any, record_id: any, previous_local_time: any, node_id: any, username: any, type: any, encoded_record: any, extended_type: any, residency_id: any, previous_residency_id: any, expires_at: any, originating_operation?: string): Buffer;
36
- export declare function readAuditEntry(buffer: any): {
36
+ export declare function readAuditEntry(buffer: Uint8Array, start?: number, end?: any): {
37
37
  type: any;
38
38
  tableId: any;
39
39
  nodeId: any;
40
40
  readonly recordId: import("ordered-binary").Key;
41
- getBinaryRecordId(): any;
41
+ getBinaryRecordId(): Uint8Array;
42
42
  version: any;
43
43
  previousLocalTime: any;
44
44
  readonly user: import("ordered-binary").Key;
45
- encoded: any;
45
+ readonly encoded: Uint8Array;
46
46
  getValue(store: any, full_record?: any, audit_time?: any): any;
47
- getBinaryValue(): any;
47
+ getBinaryValue(): Uint8Array;
48
48
  extendedType: any;
49
49
  residencyId: any;
50
50
  previousResidencyId: any;
@@ -59,7 +59,7 @@ export declare function readAuditEntry(buffer: any): {
59
59
  version?: undefined;
60
60
  previousLocalTime?: undefined;
61
61
  readonly user?: undefined;
62
- encoded?: undefined;
62
+ readonly encoded?: undefined;
63
63
  getValue?: undefined;
64
64
  getBinaryValue?: undefined;
65
65
  extendedType?: undefined;
@@ -7,7 +7,7 @@ export declare namespace add {
7
7
  * @param update
8
8
  * @param newer_update
9
9
  */
10
- export declare function rebuildUpdateBefore(update: any, newer_update: any): any;
10
+ export declare function rebuildUpdateBefore(update: any, newer_update: any, full_update?: boolean): any;
11
11
  export declare function applyReverse(record: any, update: any): void;
12
12
  /**
13
13
  * Reconstruct the record state at a given timestamp by going back through the audit history and reversing any changes
@@ -39,6 +39,7 @@ interface TableDefinition {
39
39
  scanInterval?: number;
40
40
  audit?: boolean;
41
41
  sealed?: boolean;
42
+ splitSegments?: boolean;
42
43
  replicate?: boolean;
43
44
  trackDeletes?: boolean;
44
45
  attributes: any[];
@@ -70,9 +71,10 @@ export declare function dropDatabase(database_name: any): Promise<void>;
70
71
  * @param attributes
71
72
  * @param audit
72
73
  * @param sealed
74
+ * @param splitSegments
73
75
  * @param replicate
74
76
  */
75
- export declare function table({ table: table_name, database: database_name, expiration, eviction, scanInterval: scan_interval, attributes, audit, sealed, replicate, trackDeletes: track_deletes, schemaDefined: schema_defined, origin, }: TableDefinition): {
77
+ export declare function table(table_definition: TableDefinition): {
76
78
  new (identifier: import("./ResourceInterface").Id, source: any): {
77
79
  ensureLoaded(): any;
78
80
  get(query?: import("./ResourceInterface").Query | string): Promise<object | void> | object | void;
@@ -105,9 +107,12 @@ export declare function table({ table: table_name, database: database_name, expi
105
107
  resolveNext: Function;
106
108
  queue: any[];
107
109
  hasDataListeners: boolean;
110
+ drainCloseListener: boolean;
111
+ currentDrainResolver: Function;
108
112
  push(message: any): void;
109
113
  send(message: any): void;
110
114
  getNextMessage(): any;
115
+ waitForDrain(): Promise<boolean>;
111
116
  on(event_name: any, listener: any): any;
112
117
  [Symbol.asyncIterator](): {
113
118
  queue: import("./IterableEventQueue").IterableEventQueue;
@@ -163,6 +168,7 @@ export declare function table({ table: table_name, database: database_name, expi
163
168
  attributes: any;
164
169
  replicate: any;
165
170
  sealed: any;
171
+ splitSegments: any;
166
172
  createdTimeProperty: {
167
173
  name: string;
168
174
  type: string;
@@ -218,9 +224,12 @@ export declare function table({ table: table_name, database: database_name, expi
218
224
  resolveNext: Function;
219
225
  queue: any[];
220
226
  hasDataListeners: boolean;
227
+ drainCloseListener: boolean;
228
+ currentDrainResolver: Function;
221
229
  push(message: any): void;
222
230
  send(message: any): void;
223
231
  getNextMessage(): any;
232
+ waitForDrain(): Promise<boolean>;
224
233
  on(event_name: any, listener: any): any;
225
234
  [Symbol.asyncIterator](): {
226
235
  queue: import("./IterableEventQueue").IterableEventQueue;
@@ -294,9 +303,12 @@ export declare function table({ table: table_name, database: database_name, expi
294
303
  resolveNext: Function;
295
304
  queue: any[];
296
305
  hasDataListeners: boolean;
306
+ drainCloseListener: boolean;
307
+ currentDrainResolver: Function;
297
308
  push(message: any): void;
298
309
  send(message: any): void;
299
310
  getNextMessage(): any;
311
+ waitForDrain(): Promise<boolean>;
300
312
  on(event_name: any, listener: any): any;
301
313
  [Symbol.asyncIterator](): {
302
314
  queue: import("./IterableEventQueue").IterableEventQueue;
@@ -1,3 +1,4 @@
1
+ import { DirectCondition, Id } from './ResourceInterface';
1
2
  export declare const COERCIBLE_OPERATORS: {
2
3
  lt: boolean;
3
4
  le: boolean;
@@ -7,7 +8,19 @@ export declare const COERCIBLE_OPERATORS: {
7
8
  eq: boolean;
8
9
  };
9
10
  export declare function executeConditions(conditions: any, operator: any, table: any, txn: any, request: any, context: any, transformToEntries: any, filtered: any): any;
10
- export declare function searchByIndex(search_condition: any, transaction: any, reverse: any, Table: any, allow_full_scan?: any, filtered?: any): any;
11
+ /**
12
+ * Search for records or keys, based on the search condition, using an index if available
13
+ * @param search_condition
14
+ * @param transaction
15
+ * @param reverse
16
+ * @param Table
17
+ * @param allow_full_scan
18
+ * @param filtered
19
+ */
20
+ export declare function searchByIndex(search_condition: DirectCondition, transaction: any, reverse: boolean, Table: any, allow_full_scan?: boolean, filtered?: boolean): AsyncIterable<Id | {
21
+ key: Id;
22
+ value: any;
23
+ }>;
11
24
  export declare function findAttribute(attributes: any, attribute_name: any): any;
12
25
  /**
13
26
  * Create a filter based on the search condition that can be used to test each supplied record.
@@ -28,5 +41,5 @@ export declare class SimpleURLQuery {
28
41
  url: string;
29
42
  constructor(url: string);
30
43
  get(): void;
31
- [Symbol.iterator](): IterableIterator<any>;
44
+ [Symbol.iterator](): ArrayIterator<any>;
32
45
  }
@@ -24,7 +24,7 @@ export declare function collapseData(target: any): any;
24
24
  * @param target
25
25
  * @returns
26
26
  */
27
- export declare function deepFreeze(target: any, changes?: any): any;
27
+ export declare function updateAndFreeze(target: any, changes?: any): any;
28
28
  /**
29
29
  * Determine if any changes have been made to this tracked object
30
30
  * @param target