harperdb 4.7.0-beta.2 → 4.7.0-beta.4

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 (44) hide show
  1. package/README.md +1 -1
  2. package/bin/harperdb.js +79 -79
  3. package/bin/lite.js +77 -77
  4. package/config/yaml/defaultConfig.yaml +1 -1
  5. package/json/systemSchema.json +30 -0
  6. package/launchServiceScripts/launchNatsIngestService.js +77 -77
  7. package/launchServiceScripts/launchNatsReplyService.js +77 -77
  8. package/launchServiceScripts/launchUpdateNodes4-0-0.js +77 -77
  9. package/npm-shrinkwrap.json +302 -294
  10. package/package.json +3 -1
  11. package/resources/RequestTarget.d.ts +2 -0
  12. package/resources/Table.d.ts +34 -34
  13. package/resources/analytics/hostnames.d.ts +5 -477
  14. package/resources/blob.d.ts +6 -3
  15. package/resources/databases.d.ts +1 -478
  16. package/resources/openApi.d.ts +27 -0
  17. package/security/certificateVerification/certificateVerificationSource.d.ts +18 -0
  18. package/security/certificateVerification/configValidation.d.ts +14 -0
  19. package/security/certificateVerification/crlVerification.d.ts +29 -0
  20. package/security/certificateVerification/index.d.ts +31 -0
  21. package/security/certificateVerification/ocspVerification.d.ts +23 -0
  22. package/security/certificateVerification/types.d.ts +105 -0
  23. package/security/certificateVerification/verificationConfig.d.ts +29 -0
  24. package/security/certificateVerification/verificationUtils.d.ts +79 -0
  25. package/server/jobs/jobProcess.js +77 -77
  26. package/server/operationsServer.d.ts +13 -3
  27. package/server/replication/replicator.d.ts +6 -0
  28. package/server/threads/threadServer.js +77 -77
  29. package/studio/web/assets/index-BsZJSz4i.js +1 -0
  30. package/studio/web/assets/index-BwVqw4zI.js +453 -0
  31. package/studio/web/assets/index-OpljqLtb.css +4 -0
  32. package/studio/web/assets/profiler-CW5dV_9B.js +1 -0
  33. package/studio/web/assets/startRecording--YUj61DT.js +2 -0
  34. package/studio/web/index.html +2 -2
  35. package/studio/web/running.html +90 -0
  36. package/utility/hdbTerms.d.ts +22 -3
  37. package/utility/scripts/restartHdb.js +77 -77
  38. package/security/certificateVerification.d.ts +0 -87
  39. package/studio/web/assets/index-B797owPM.js +0 -1
  40. package/studio/web/assets/index-CXaPu3wc.js +0 -445
  41. package/studio/web/assets/index-Dj8x6atJ.css +0 -4
  42. package/studio/web/assets/profiler-CgmzpljF.js +0 -1
  43. package/studio/web/assets/startRecording-DiD-ht9H.js +0 -2
  44. /package/security/{pkijs-ed25519-patch.d.ts → certificateVerification/pkijs-ed25519-patch.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harperdb",
3
- "version": "4.7.0-beta.2",
3
+ "version": "4.7.0-beta.4",
4
4
  "description": "HarperDB is a distributed database, caching service, streaming broker, and application development platform focused on performance and ease of use.",
5
5
  "keywords": [
6
6
  "database",
@@ -62,6 +62,7 @@
62
62
  "@turf/length": "6.5.0",
63
63
  "alasql": "4.6.6",
64
64
  "argon2": "0.43.0",
65
+ "asn1js": "3.0.6",
65
66
  "cbor-x": "1.6.0",
66
67
  "chalk": "4.1.2",
67
68
  "chokidar": "^4.0.3",
@@ -104,6 +105,7 @@
104
105
  "passport-http": "0.3.0",
105
106
  "passport-local": "1.0.0",
106
107
  "pino": "8.16.0",
108
+ "pkijs": "3.2.5",
107
109
  "prompt": "1.3.0",
108
110
  "properties-reader": "2.3.0",
109
111
  "recursive-iterator": "3.3.0",
@@ -37,6 +37,8 @@ export declare class RequestTarget extends URLSearchParams {
37
37
  originatingOperation?: string;
38
38
  previousResidency?: string[];
39
39
  checkPermission?: Permission | boolean;
40
+ allowFullScan?: boolean;
41
+ allowConditionsOnDynamicAttributes?: boolean;
40
42
  constructor(target?: string);
41
43
  toString(): string;
42
44
  get url(): string;
@@ -43,12 +43,12 @@ type ResidencyDefinition = number | string[] | void;
43
43
  */
44
44
  export declare function makeTable(options: any): {
45
45
  new (identifier: Id, source: any): {
46
- #record: any;
47
- #changes: any;
48
- #version?: number;
49
- #entry?: Entry;
50
- #saveMode?: boolean;
51
- #loadedFromSource?: boolean;
46
+ "__#private@#record": any;
47
+ "__#private@#changes": any;
48
+ "__#private@#version"?: number;
49
+ "__#private@#entry"?: Entry;
50
+ "__#private@#saveMode"?: boolean;
51
+ "__#private@#loadedFromSource"?: boolean;
52
52
  getProperty: (name: string) => any;
53
53
  /**
54
54
  * This is a request to explicitly ensure that the record is loaded from source, rather than only using the local record.
@@ -98,8 +98,8 @@ export declare function makeTable(options: any): {
98
98
  getExpiresAt(): number;
99
99
  addTo(property: string, value: number | bigint): void;
100
100
  subtractFrom(property: string, value: number | bigint): void;
101
- #record: any;
102
- #changes: any;
101
+ "__#private@#record": any;
102
+ "__#private@#changes": any;
103
103
  getRecord(): any;
104
104
  setRecord(record: any): void;
105
105
  getChanges(): any;
@@ -196,9 +196,9 @@ export declare function makeTable(options: any): {
196
196
  validate(record: any, patch?: boolean): void;
197
197
  getUpdatedTime(): number;
198
198
  wasLoadedFromSource(): boolean | void;
199
- readonly #id: Id;
200
- readonly #context: Context;
201
- #isCollection: boolean;
199
+ readonly "__#private@#id": Id;
200
+ readonly "__#private@#context": Context;
201
+ "__#private@#isCollection": boolean;
202
202
  post(newRecord: any): Promise<any>;
203
203
  get isCollection(): boolean;
204
204
  connect(incomingMessages: import("./IterableEventQueue.js").IterableEventQueue, query?: {}): AsyncIterable<any>;
@@ -252,12 +252,12 @@ export declare function makeTable(options: any): {
252
252
  * @returns
253
253
  */
254
254
  getResource(id: Id, request: Context, resourceOptions?: any): Promise<{
255
- #record: any;
256
- #changes: any;
257
- #version?: number;
258
- #entry?: Entry;
259
- #saveMode?: boolean;
260
- #loadedFromSource?: boolean;
255
+ "__#private@#record": any;
256
+ "__#private@#changes": any;
257
+ "__#private@#version"?: number;
258
+ "__#private@#entry"?: Entry;
259
+ "__#private@#saveMode"?: boolean;
260
+ "__#private@#loadedFromSource"?: boolean;
261
261
  getProperty: (name: string) => any;
262
262
  /**
263
263
  * This is a request to explicitly ensure that the record is loaded from source, rather than only using the local record.
@@ -307,8 +307,8 @@ export declare function makeTable(options: any): {
307
307
  getExpiresAt(): number;
308
308
  addTo(property: string, value: number | bigint): void;
309
309
  subtractFrom(property: string, value: number | bigint): void;
310
- #record: any;
311
- #changes: any;
310
+ "__#private@#record": any;
311
+ "__#private@#changes": any;
312
312
  getRecord(): any;
313
313
  setRecord(record: any): void;
314
314
  getChanges(): any;
@@ -405,21 +405,21 @@ export declare function makeTable(options: any): {
405
405
  validate(record: any, patch?: boolean): void;
406
406
  getUpdatedTime(): number;
407
407
  wasLoadedFromSource(): boolean | void;
408
- readonly #id: Id;
409
- readonly #context: Context;
410
- #isCollection: boolean;
408
+ readonly "__#private@#id": Id;
409
+ readonly "__#private@#context": Context;
410
+ "__#private@#isCollection": boolean;
411
411
  post(newRecord: any): Promise<any>;
412
412
  get isCollection(): boolean;
413
413
  connect(incomingMessages: import("./IterableEventQueue.js").IterableEventQueue, query?: {}): AsyncIterable<any>;
414
414
  getId(): Id;
415
415
  getContext(): Context | import("./ResourceInterface.ts").SourceContext;
416
416
  }> | {
417
- #record: any;
418
- #changes: any;
419
- #version?: number;
420
- #entry?: Entry;
421
- #saveMode?: boolean;
422
- #loadedFromSource?: boolean;
417
+ "__#private@#record": any;
418
+ "__#private@#changes": any;
419
+ "__#private@#version"?: number;
420
+ "__#private@#entry"?: Entry;
421
+ "__#private@#saveMode"?: boolean;
422
+ "__#private@#loadedFromSource"?: boolean;
423
423
  getProperty: (name: string) => any;
424
424
  /**
425
425
  * This is a request to explicitly ensure that the record is loaded from source, rather than only using the local record.
@@ -469,8 +469,8 @@ export declare function makeTable(options: any): {
469
469
  getExpiresAt(): number;
470
470
  addTo(property: string, value: number | bigint): void;
471
471
  subtractFrom(property: string, value: number | bigint): void;
472
- #record: any;
473
- #changes: any;
472
+ "__#private@#record": any;
473
+ "__#private@#changes": any;
474
474
  getRecord(): any;
475
475
  setRecord(record: any): void;
476
476
  getChanges(): any;
@@ -567,9 +567,9 @@ export declare function makeTable(options: any): {
567
567
  validate(record: any, patch?: boolean): void;
568
568
  getUpdatedTime(): number;
569
569
  wasLoadedFromSource(): boolean | void;
570
- readonly #id: Id;
571
- readonly #context: Context;
572
- #isCollection: boolean;
570
+ readonly "__#private@#id": Id;
571
+ readonly "__#private@#context": Context;
572
+ "__#private@#isCollection": boolean;
573
573
  post(newRecord: any): Promise<any>;
574
574
  get isCollection(): boolean;
575
575
  connect(incomingMessages: import("./IterableEventQueue.js").IterableEventQueue, query?: {}): AsyncIterable<any>;
@@ -613,7 +613,7 @@ export declare function makeTable(options: any): {
613
613
  /**
614
614
  * Evicting a record will remove it from a caching table. This is not considered a canonical data change, and it is assumed that retrieving this record from the source will still yield the same record, this is only removing the local copy of the record.
615
615
  */
616
- evict(id: any, existingRecord: any, existingVersion: any): Promise<void>;
616
+ evict(id: any, existingRecord: any, existingVersion: any): any;
617
617
  operation(operation: any, context: any): any;
618
618
  /**
619
619
  * This is responsible for ordering and select()ing the attributes/properties from returned entries
@@ -1,482 +1,9 @@
1
+ import type { Resource } from '../Resource.ts';
1
2
  export declare const nodeIds: Map<string, number>;
2
- export declare function getAnalyticsHostnameTable(): {
3
- new (identifier: import("../ResourceInterface.js").Id, source: any): {
4
- #record: any;
5
- #changes: any;
6
- #version?: number;
7
- #entry?: import("../RecordEncoder.js").Entry;
8
- #saveMode?: boolean;
9
- #loadedFromSource?: boolean;
10
- getProperty: (name: string) => any;
11
- ensureLoaded(): unknown;
12
- get(target?: import("../RequestTarget.js").RequestTarget): Promise<object | void>;
13
- allowRead(user: any, target: import("../RequestTarget.js").RequestTarget): boolean;
14
- allowUpdate(user: any, updatedData: any, target: import("../RequestTarget.js").RequestTarget): boolean;
15
- allowCreate(user: any, newData: any, target: import("../RequestTarget.js").RequestTarget): boolean;
16
- allowDelete(user: any, target: import("../RequestTarget.js").RequestTarget): boolean;
17
- update(target: import("../RequestTarget.js").RequestTarget, updates?: any): /*elided*/ any | {
18
- set: (property: string, value: any) => void;
19
- getProperty: (property: string) => any;
20
- getUpdatedTime(): number;
21
- getExpiresAt(): number;
22
- addTo(property: string, value: number | bigint): void;
23
- subtractFrom(property: string, value: number | bigint): void;
24
- #record: any;
25
- #changes: any;
26
- getRecord(): any;
27
- setRecord(record: any): void;
28
- getChanges(): any;
29
- _setChanges(changes: any): void;
30
- };
31
- addTo(property: any, value: any): void;
32
- subtractFrom(property: any, value: any): void;
33
- getMetadata(): import("../RecordEncoder.js").Entry;
34
- getRecord(): any;
35
- getChanges(): any;
36
- _setChanges(changes: any): void;
37
- setRecord(record: any): void;
38
- invalidate(target: import("../ResourceInterface.js").RequestTargetOrId): void;
39
- _writeInvalidate(id: import("../ResourceInterface.js").Id, partialRecord?: any, options?: any): void;
40
- _writeRelocate(id: import("../ResourceInterface.js").Id, options: any): void;
41
- lock(): void;
42
- put(target: import("../RequestTarget.js").RequestTarget, record: any): void | Promise<void>;
43
- create(target: import("../RequestTarget.js").RequestTarget, record: any): void | Promise<void>;
44
- patch(target: import("../RequestTarget.js").RequestTarget, recordUpdate: any): void | Promise<void>;
45
- _writeUpdate(id: import("../ResourceInterface.js").Id, recordUpdate: any, fullUpdate: boolean, options?: any): void;
46
- delete(target: import("../RequestTarget.js").RequestTarget): Promise<boolean> | boolean;
47
- _writeDelete(id: import("../ResourceInterface.js").Id, options?: any): boolean;
48
- search(target: import("../RequestTarget.js").RequestTarget): AsyncIterable<any>;
49
- subscribe(request: import("../ResourceInterface.js").SubscriptionRequest): Promise<{
50
- listener: (recordId: import("../ResourceInterface.js").Id, auditEntry: any, localTime: number, beginTxn: boolean) => void;
51
- subscriptions: [];
52
- startTime?: number;
53
- includeDescendants?: boolean;
54
- supportsTransactions?: boolean;
55
- onlyChildren?: boolean;
56
- end(): void;
57
- toJSON(): {
58
- name: string;
59
- };
60
- resolveNext: Function;
61
- queue: any[];
62
- hasDataListeners: boolean;
63
- drainCloseListener: boolean;
64
- currentDrainResolver: Function;
65
- push(message: any): void;
66
- send(message: any): void;
67
- getNextMessage(): any;
68
- waitForDrain(): Promise<boolean>;
69
- on(eventName: any, listener: any): /*elided*/ any;
70
- [Symbol.asyncIterator](): {
71
- queue: import("../IterableEventQueue.js").IterableEventQueue;
72
- push(message: any): void;
73
- next(): Promise<unknown> | {
74
- value: any;
75
- };
76
- return(value: any): {
77
- value: any;
78
- done: boolean;
79
- };
80
- throw(error: any): {
81
- done: boolean;
82
- };
83
- };
84
- [EventEmitter.captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: any[]): void;
85
- addListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
86
- once<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
87
- removeListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
88
- off<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
89
- removeAllListeners(eventName?: string | symbol): /*elided*/ any;
90
- setMaxListeners(n: number): /*elided*/ any;
91
- getMaxListeners(): number;
92
- listeners<K>(eventName: string | symbol): Function[];
93
- rawListeners<K>(eventName: string | symbol): Function[];
94
- emit<K>(eventName: string | symbol, ...args: any[]): boolean;
95
- listenerCount<K>(eventName: string | symbol, listener?: Function): number;
96
- prependListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
97
- prependOnceListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
98
- eventNames(): (string | symbol)[];
99
- }>;
100
- doesExist(): boolean;
101
- publish(target: import("../RequestTarget.js").RequestTarget, message: any, options?: any): void;
102
- _writePublish(id: import("../ResourceInterface.js").Id, message: any, options?: any): void;
103
- validate(record: any, patch?: boolean): void;
104
- getUpdatedTime(): number;
105
- wasLoadedFromSource(): boolean | void;
106
- readonly #id: import("../ResourceInterface.js").Id;
107
- readonly #context: import("../ResourceInterface.js").Context;
108
- #isCollection: boolean;
109
- post(newRecord: any): Promise<any>;
110
- get isCollection(): boolean;
111
- connect(incomingMessages: import("../IterableEventQueue.js").IterableEventQueue, query?: {}): AsyncIterable<any>;
112
- getId(): import("../ResourceInterface.js").Id;
113
- getContext(): import("../ResourceInterface.js").Context | import("../ResourceInterface.js").SourceContext;
114
- };
115
- name: any;
116
- primaryStore: any;
117
- auditStore: any;
118
- primaryKey: any;
119
- tableName: any;
120
- tableId: any;
121
- indices: any;
122
- audit: any;
123
- databasePath: any;
124
- databaseName: any;
125
- attributes: any;
126
- replicate: any;
127
- sealed: any;
128
- splitSegments: any;
129
- createdTimeProperty: import("../Table.js").Attribute;
130
- updatedTimeProperty: import("../Table.js").Attribute;
131
- propertyResolvers: any;
132
- userResolvers: {};
133
- sources: (/*elided*/ any)[];
134
- sourceOptions: any;
135
- intermediateSource: boolean;
136
- getResidencyById: (id: import("../ResourceInterface.js").Id) => number | void;
137
- get expirationMS(): any;
138
- dbisDB: any;
139
- schemaDefined: any;
140
- sourcedFrom(source: any, options: any): /*elided*/ any;
141
- get isCaching(): any;
142
- get shouldRevalidateEvents(): boolean;
143
- getResource(id: import("../ResourceInterface.js").Id, request: import("../ResourceInterface.js").Context, resourceOptions?: any): Promise<{
144
- #record: any;
145
- #changes: any;
146
- #version?: number;
147
- #entry?: import("../RecordEncoder.js").Entry;
148
- #saveMode?: boolean;
149
- #loadedFromSource?: boolean;
150
- getProperty: (name: string) => any;
151
- ensureLoaded(): unknown;
152
- get(target?: import("../RequestTarget.js").RequestTarget): Promise<object | void>;
153
- allowRead(user: any, target: import("../RequestTarget.js").RequestTarget): boolean;
154
- allowUpdate(user: any, updatedData: any, target: import("../RequestTarget.js").RequestTarget): boolean;
155
- allowCreate(user: any, newData: any, target: import("../RequestTarget.js").RequestTarget): boolean;
156
- allowDelete(user: any, target: import("../RequestTarget.js").RequestTarget): boolean;
157
- update(target: import("../RequestTarget.js").RequestTarget, updates?: any): /*elided*/ any | {
158
- set: (property: string, value: any) => void;
159
- getProperty: (property: string) => any;
160
- getUpdatedTime(): number;
161
- getExpiresAt(): number;
162
- addTo(property: string, value: number | bigint): void;
163
- subtractFrom(property: string, value: number | bigint): void;
164
- #record: any;
165
- #changes: any;
166
- getRecord(): any;
167
- setRecord(record: any): void;
168
- getChanges(): any;
169
- _setChanges(changes: any): void;
170
- };
171
- addTo(property: any, value: any): void;
172
- subtractFrom(property: any, value: any): void;
173
- getMetadata(): import("../RecordEncoder.js").Entry;
174
- getRecord(): any;
175
- getChanges(): any;
176
- _setChanges(changes: any): void;
177
- setRecord(record: any): void;
178
- invalidate(target: import("../ResourceInterface.js").RequestTargetOrId): void;
179
- _writeInvalidate(id: import("../ResourceInterface.js").Id, partialRecord?: any, options?: any): void;
180
- _writeRelocate(id: import("../ResourceInterface.js").Id, options: any): void;
181
- lock(): void;
182
- put(target: import("../RequestTarget.js").RequestTarget, record: any): void | Promise<void>;
183
- create(target: import("../RequestTarget.js").RequestTarget, record: any): void | Promise<void>;
184
- patch(target: import("../RequestTarget.js").RequestTarget, recordUpdate: any): void | Promise<void>;
185
- _writeUpdate(id: import("../ResourceInterface.js").Id, recordUpdate: any, fullUpdate: boolean, options?: any): void;
186
- delete(target: import("../RequestTarget.js").RequestTarget): Promise<boolean> | boolean;
187
- _writeDelete(id: import("../ResourceInterface.js").Id, options?: any): boolean;
188
- search(target: import("../RequestTarget.js").RequestTarget): AsyncIterable<any>;
189
- subscribe(request: import("../ResourceInterface.js").SubscriptionRequest): Promise<{
190
- listener: (recordId: import("../ResourceInterface.js").Id, auditEntry: any, localTime: number, beginTxn: boolean) => void;
191
- subscriptions: [];
192
- startTime?: number;
193
- includeDescendants?: boolean;
194
- supportsTransactions?: boolean;
195
- onlyChildren?: boolean;
196
- end(): void;
197
- toJSON(): {
198
- name: string;
199
- };
200
- resolveNext: Function;
201
- queue: any[];
202
- hasDataListeners: boolean;
203
- drainCloseListener: boolean;
204
- currentDrainResolver: Function;
205
- push(message: any): void;
206
- send(message: any): void;
207
- getNextMessage(): any;
208
- waitForDrain(): Promise<boolean>;
209
- on(eventName: any, listener: any): /*elided*/ any;
210
- [Symbol.asyncIterator](): {
211
- queue: import("../IterableEventQueue.js").IterableEventQueue;
212
- push(message: any): void;
213
- next(): Promise<unknown> | {
214
- value: any;
215
- };
216
- return(value: any): {
217
- value: any;
218
- done: boolean;
219
- };
220
- throw(error: any): {
221
- done: boolean;
222
- };
223
- };
224
- [EventEmitter.captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: any[]): void;
225
- addListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
226
- once<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
227
- removeListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
228
- off<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
229
- removeAllListeners(eventName?: string | symbol): /*elided*/ any;
230
- setMaxListeners(n: number): /*elided*/ any;
231
- getMaxListeners(): number;
232
- listeners<K>(eventName: string | symbol): Function[];
233
- rawListeners<K>(eventName: string | symbol): Function[];
234
- emit<K>(eventName: string | symbol, ...args: any[]): boolean;
235
- listenerCount<K>(eventName: string | symbol, listener?: Function): number;
236
- prependListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
237
- prependOnceListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
238
- eventNames(): (string | symbol)[];
239
- }>;
240
- doesExist(): boolean;
241
- publish(target: import("../RequestTarget.js").RequestTarget, message: any, options?: any): void;
242
- _writePublish(id: import("../ResourceInterface.js").Id, message: any, options?: any): void;
243
- validate(record: any, patch?: boolean): void;
244
- getUpdatedTime(): number;
245
- wasLoadedFromSource(): boolean | void;
246
- readonly #id: import("../ResourceInterface.js").Id;
247
- readonly #context: import("../ResourceInterface.js").Context;
248
- #isCollection: boolean;
249
- post(newRecord: any): Promise<any>;
250
- get isCollection(): boolean;
251
- connect(incomingMessages: import("../IterableEventQueue.js").IterableEventQueue, query?: {}): AsyncIterable<any>;
252
- getId(): import("../ResourceInterface.js").Id;
253
- getContext(): import("../ResourceInterface.js").Context | import("../ResourceInterface.js").SourceContext;
254
- }> | {
255
- #record: any;
256
- #changes: any;
257
- #version?: number;
258
- #entry?: import("../RecordEncoder.js").Entry;
259
- #saveMode?: boolean;
260
- #loadedFromSource?: boolean;
261
- getProperty: (name: string) => any;
262
- ensureLoaded(): unknown;
263
- get(target?: import("../RequestTarget.js").RequestTarget): Promise<object | void>;
264
- allowRead(user: any, target: import("../RequestTarget.js").RequestTarget): boolean;
265
- allowUpdate(user: any, updatedData: any, target: import("../RequestTarget.js").RequestTarget): boolean;
266
- allowCreate(user: any, newData: any, target: import("../RequestTarget.js").RequestTarget): boolean;
267
- allowDelete(user: any, target: import("../RequestTarget.js").RequestTarget): boolean;
268
- update(target: import("../RequestTarget.js").RequestTarget, updates?: any): /*elided*/ any | {
269
- set: (property: string, value: any) => void;
270
- getProperty: (property: string) => any;
271
- getUpdatedTime(): number;
272
- getExpiresAt(): number;
273
- addTo(property: string, value: number | bigint): void;
274
- subtractFrom(property: string, value: number | bigint): void;
275
- #record: any;
276
- #changes: any;
277
- getRecord(): any;
278
- setRecord(record: any): void;
279
- getChanges(): any;
280
- _setChanges(changes: any): void;
281
- };
282
- addTo(property: any, value: any): void;
283
- subtractFrom(property: any, value: any): void;
284
- getMetadata(): import("../RecordEncoder.js").Entry;
285
- getRecord(): any;
286
- getChanges(): any;
287
- _setChanges(changes: any): void;
288
- setRecord(record: any): void;
289
- invalidate(target: import("../ResourceInterface.js").RequestTargetOrId): void;
290
- _writeInvalidate(id: import("../ResourceInterface.js").Id, partialRecord?: any, options?: any): void;
291
- _writeRelocate(id: import("../ResourceInterface.js").Id, options: any): void;
292
- lock(): void;
293
- put(target: import("../RequestTarget.js").RequestTarget, record: any): void | Promise<void>;
294
- create(target: import("../RequestTarget.js").RequestTarget, record: any): void | Promise<void>;
295
- patch(target: import("../RequestTarget.js").RequestTarget, recordUpdate: any): void | Promise<void>;
296
- _writeUpdate(id: import("../ResourceInterface.js").Id, recordUpdate: any, fullUpdate: boolean, options?: any): void;
297
- delete(target: import("../RequestTarget.js").RequestTarget): Promise<boolean> | boolean;
298
- _writeDelete(id: import("../ResourceInterface.js").Id, options?: any): boolean;
299
- search(target: import("../RequestTarget.js").RequestTarget): AsyncIterable<any>;
300
- subscribe(request: import("../ResourceInterface.js").SubscriptionRequest): Promise<{
301
- listener: (recordId: import("../ResourceInterface.js").Id, auditEntry: any, localTime: number, beginTxn: boolean) => void;
302
- subscriptions: [];
303
- startTime?: number;
304
- includeDescendants?: boolean;
305
- supportsTransactions?: boolean;
306
- onlyChildren?: boolean;
307
- end(): void;
308
- toJSON(): {
309
- name: string;
310
- };
311
- resolveNext: Function;
312
- queue: any[];
313
- hasDataListeners: boolean;
314
- drainCloseListener: boolean;
315
- currentDrainResolver: Function;
316
- push(message: any): void;
317
- send(message: any): void;
318
- getNextMessage(): any;
319
- waitForDrain(): Promise<boolean>;
320
- on(eventName: any, listener: any): /*elided*/ any;
321
- [Symbol.asyncIterator](): {
322
- queue: import("../IterableEventQueue.js").IterableEventQueue;
323
- push(message: any): void;
324
- next(): Promise<unknown> | {
325
- value: any;
326
- };
327
- return(value: any): {
328
- value: any;
329
- done: boolean;
330
- };
331
- throw(error: any): {
332
- done: boolean;
333
- };
334
- };
335
- [EventEmitter.captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: any[]): void;
336
- addListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
337
- once<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
338
- removeListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
339
- off<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
340
- removeAllListeners(eventName?: string | symbol): /*elided*/ any;
341
- setMaxListeners(n: number): /*elided*/ any;
342
- getMaxListeners(): number;
343
- listeners<K>(eventName: string | symbol): Function[];
344
- rawListeners<K>(eventName: string | symbol): Function[];
345
- emit<K>(eventName: string | symbol, ...args: any[]): boolean;
346
- listenerCount<K>(eventName: string | symbol, listener?: Function): number;
347
- prependListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
348
- prependOnceListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
349
- eventNames(): (string | symbol)[];
350
- }>;
351
- doesExist(): boolean;
352
- publish(target: import("../RequestTarget.js").RequestTarget, message: any, options?: any): void;
353
- _writePublish(id: import("../ResourceInterface.js").Id, message: any, options?: any): void;
354
- validate(record: any, patch?: boolean): void;
355
- getUpdatedTime(): number;
356
- wasLoadedFromSource(): boolean | void;
357
- readonly #id: import("../ResourceInterface.js").Id;
358
- readonly #context: import("../ResourceInterface.js").Context;
359
- #isCollection: boolean;
360
- post(newRecord: any): Promise<any>;
361
- get isCollection(): boolean;
362
- connect(incomingMessages: import("../IterableEventQueue.js").IterableEventQueue, query?: {}): AsyncIterable<any>;
363
- getId(): import("../ResourceInterface.js").Id;
364
- getContext(): import("../ResourceInterface.js").Context | import("../ResourceInterface.js").SourceContext;
365
- };
366
- _updateResource(resource: any, entry: any): void;
367
- getNewId(): any;
368
- setTTLExpiration(expiration: number | {
369
- expiration: number;
370
- eviction?: number;
371
- scanInterval?: number;
372
- }): void;
373
- getResidencyRecord(id: import("../ResourceInterface.js").Id): any;
374
- setResidency(getResidency?: (record: object, context: import("../ResourceInterface.js").Context) => number | void | string[]): void;
375
- setResidencyById(getResidencyById?: (id: import("../ResourceInterface.js").Id) => number | void): void;
376
- getResidency(record: object, context: import("../ResourceInterface.js").Context): number | void | string[];
377
- enableAuditing(): void;
378
- coerceId(id: string): number | string;
379
- dropTable(): Promise<void>;
380
- _recordRelocate(existingEntry: any, entry: any): boolean;
381
- evict(id: any, existingRecord: any, existingVersion: any): Promise<void>;
382
- operation(operation: any, context: any): any;
383
- transformToOrderedSelect(entries: any[], select: (string | import("../ResourceInterface.js").SubSelect)[], sort: import("../ResourceInterface.js").Sort, context: import("../ResourceInterface.js").Context, readTxn: any, transformToRecord: Function): any;
384
- transformEntryForSelect(select: any, context: any, readTxn: any, filtered: any, ensure_loaded?: any, canSkip?: any): (entry: import("../RecordEncoder.js").Entry) => any;
385
- subscribeOnThisThread(workerIndex: any, options: any): boolean;
386
- addAttributes(attributesToAdd: any): Promise<any>;
387
- removeAttributes(names: string[]): Promise<any>;
388
- getSize(): number;
389
- getAuditSize(): number;
390
- getStorageStats(): {
391
- available: number;
392
- free: number;
393
- size: number;
394
- };
395
- getRecordCount(options?: any): Promise<{
396
- recordCount: number;
397
- estimatedRange: number[];
398
- } | {
399
- recordCount: number;
400
- estimatedRange?: undefined;
401
- }>;
402
- updatedAttributes(): void;
403
- setComputedAttribute(attribute_name: any, resolver: any): void;
404
- deleteHistory(endTime?: number, cleanupDeletedRecords?: boolean): Promise<void>;
405
- getHistory(startTime?: number, endTime?: number): AsyncGenerator<{
406
- id: import("ordered-binary").Key;
407
- localTime: any;
408
- version: any;
409
- type: any;
410
- value: any;
411
- user: import("ordered-binary").Key;
412
- operation: any;
413
- }, void, unknown>;
414
- getHistoryOfRecord(id: any): Promise<any[]>;
415
- cleanup(): void;
416
- transactions: import("../DatabaseTransaction.js").Transaction[] & {
417
- timestamp: number;
418
- };
419
- directURLMapping: boolean;
420
- loadAsInstance: boolean;
421
- get(identifier: import("../ResourceInterface.js").Id, context?: import("../ResourceInterface.js").Context): Promise<import("../Resource.js").Resource>;
422
- get(target: import("../RequestTarget.js").RequestTarget, context?: import("../ResourceInterface.js").Context): Promise<AsyncIterable<object>>;
423
- put: {
424
- (idOrQuery: string | import("../ResourceInterface.js").Id | import("../ResourceInterface.js").Query, dataOrContext?: any, context?: import("../ResourceInterface.js").Context): any;
425
- reliesOnPrototype: boolean;
426
- };
427
- patch: {
428
- (idOrQuery: string | import("../ResourceInterface.js").Id | import("../ResourceInterface.js").Query, dataOrContext?: any, context?: import("../ResourceInterface.js").Context): any;
429
- reliesOnPrototype: boolean;
430
- };
431
- delete(identifier: import("../ResourceInterface.js").Id, context?: import("../ResourceInterface.js").Context): Promise<boolean>;
432
- delete(request: import("../ResourceInterface.js").Context, context?: import("../ResourceInterface.js").Context): Promise<object>;
433
- create(idPrefix: import("../ResourceInterface.js").Id, record: any, context: import("../ResourceInterface.js").Context): Promise<import("../ResourceInterface.js").Id>;
434
- create(record: any, context: import("../ResourceInterface.js").Context): Promise<import("../ResourceInterface.js").Id>;
435
- invalidate: {
436
- (idOrQuery: string | import("../ResourceInterface.js").Id | import("../ResourceInterface.js").Query, dataOrContext?: any, context?: import("../ResourceInterface.js").Context): any;
437
- reliesOnPrototype: boolean;
438
- };
439
- post: {
440
- (idOrQuery: string | import("../ResourceInterface.js").Id | import("../ResourceInterface.js").Query, dataOrContext?: any, context?: import("../ResourceInterface.js").Context): any;
441
- reliesOnPrototype: boolean;
442
- };
443
- update: {
444
- (idOrQuery: string | import("../ResourceInterface.js").Id | import("../ResourceInterface.js").Query, dataOrContext?: any, context?: import("../ResourceInterface.js").Context): any;
445
- reliesOnPrototype: boolean;
446
- };
447
- connect: {
448
- (idOrQuery: string | import("../ResourceInterface.js").Id | import("../ResourceInterface.js").Query, dataOrContext?: any, context?: import("../ResourceInterface.js").Context): any;
449
- reliesOnPrototype: boolean;
450
- };
451
- subscribe(request: import("../ResourceInterface.js").SubscriptionRequest): Promise<AsyncIterable<{
452
- id: any;
453
- operation: string;
454
- value: object;
455
- }>>;
456
- publish: {
457
- (idOrQuery: string | import("../ResourceInterface.js").Id | import("../ResourceInterface.js").Query, dataOrContext?: any, context?: import("../ResourceInterface.js").Context): any;
458
- reliesOnPrototype: boolean;
459
- };
460
- search: {
461
- (idOrQuery: string | import("../ResourceInterface.js").Id | import("../ResourceInterface.js").Query, dataOrContext?: any, context?: import("../ResourceInterface.js").Context): any;
462
- reliesOnPrototype: boolean;
463
- };
464
- query: {
465
- (idOrQuery: string | import("../ResourceInterface.js").Id | import("../ResourceInterface.js").Query, dataOrContext?: any, context?: import("../ResourceInterface.js").Context): any;
466
- reliesOnPrototype: boolean;
467
- };
468
- copy: {
469
- (idOrQuery: string | import("../ResourceInterface.js").Id | import("../ResourceInterface.js").Query, dataOrContext?: any, context?: import("../ResourceInterface.js").Context): any;
470
- reliesOnPrototype: boolean;
471
- };
472
- move: {
473
- (idOrQuery: string | import("../ResourceInterface.js").Id | import("../ResourceInterface.js").Query, dataOrContext?: any, context?: import("../ResourceInterface.js").Context): any;
474
- reliesOnPrototype: boolean;
475
- };
476
- isCollection(resource: any): any;
477
- parseQuery(search: any, query: any): any;
478
- parsePath(path: any, context: any, query: any): any;
3
+ type AnalyticsHostnameResource = Resource & {
4
+ hostname: string;
479
5
  };
6
+ export declare function getAnalyticsHostnameTable(): AnalyticsHostnameResource;
480
7
  export declare function normalizeIPv6(ipv6: string): string;
481
8
  /** stableNodeId takes a hostname or IP address and returns a number containing
482
9
  * the 32-bit SHAKE128 hash of the hostname or IP address. The astute among you
@@ -486,3 +13,4 @@ export declare function normalizeIPv6(ipv6: string): string;
486
13
  * So it doesn't make much sense to optimize the IPv4 use case.
487
14
  */
488
15
  export declare function stableNodeId(nodeAddrOrName: string): number;
16
+ export {};