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
@@ -11,6 +11,7 @@
11
11
  * - Note that for compressed data, the size is the uncompressed size, and the compressed size in the file
12
12
  */
13
13
  import type { LMDBStore } from 'lmdb';
14
+ import * as buffer from 'node:buffer';
14
15
  type StorageInfo = {
15
16
  storageIndex: number;
16
17
  fileId: string;
@@ -26,6 +27,7 @@ type StorageInfo = {
26
27
  end?: number;
27
28
  saving?: Promise<void>;
28
29
  asString?: string;
30
+ deleteOnFailure?: boolean;
29
31
  };
30
32
  export declare const Blob: {
31
33
  new (blobParts?: BlobPart[], options?: BlobPropertyBag): Blob;
@@ -38,7 +40,7 @@ export declare const Blob: {
38
40
  arrayBuffer(): Promise<ArrayBufferLike>;
39
41
  get size(): number;
40
42
  slice(): /*elided*/ any;
41
- bytes(): Promise<Buffer>;
43
+ bytes(): Promise<buffer.Buffer>;
42
44
  get type(): string;
43
45
  };
44
46
  };
@@ -52,7 +54,7 @@ declare namespace InstanceOfBlobWithNoConstructor {
52
54
  arrayBuffer(): Promise<ArrayBufferLike>;
53
55
  get size(): number;
54
56
  slice(): /*elided*/ any;
55
- bytes(): Promise<Buffer>;
57
+ bytes(): Promise<buffer.Buffer>;
56
58
  get type(): string;
57
59
  };
58
60
  }
@@ -81,6 +83,7 @@ declare class FileBackedBlob extends InstanceOfBlobWithNoConstructor {
81
83
  stream(): ReadableStream;
82
84
  slice(start: number, end: number, type?: string): Blob;
83
85
  save(): Promise<void>;
86
+ get written(): Promise<void>;
84
87
  }
85
88
  /**
86
89
  * Delete the file for the blob
@@ -95,7 +98,7 @@ export type BlobCreationOptions = {
95
98
  size?: number;
96
99
  saveBeforeCommit?: boolean;
97
100
  };
98
- export declare function saveBlob(blob: FileBackedBlob): StorageInfo;
101
+ export declare function saveBlob(blob: FileBackedBlob, deleteOnFailure?: boolean): StorageInfo;
99
102
  export declare function getFileId(blob: Blob): string;
100
103
  export declare function isSaving(blob: Blob): string;
101
104
  export declare function getFilePathForBlob(blob: FileBackedBlob): string;
@@ -77,484 +77,7 @@ export declare function dropDatabase(databaseName: any): Promise<void>;
77
77
  * @param splitSegments
78
78
  * @param replicate
79
79
  */
80
- export declare function table(tableDefinition: TableDefinition): {
81
- new (identifier: import("./ResourceInterface.js").Id, source: any): {
82
- #record: any;
83
- #changes: any;
84
- #version?: number;
85
- #entry?: import("./RecordEncoder.ts").Entry;
86
- #saveMode?: boolean;
87
- #loadedFromSource?: boolean;
88
- getProperty: (name: string) => any;
89
- ensureLoaded(): unknown;
90
- get(target?: import("./RequestTarget.js").RequestTarget): Promise<object | void>;
91
- allowRead(user: any, target: import("./RequestTarget.js").RequestTarget): boolean;
92
- allowUpdate(user: any, updatedData: any, target: import("./RequestTarget.js").RequestTarget): boolean;
93
- allowCreate(user: any, newData: any, target: import("./RequestTarget.js").RequestTarget): boolean;
94
- allowDelete(user: any, target: import("./RequestTarget.js").RequestTarget): boolean;
95
- update(target: import("./RequestTarget.js").RequestTarget, updates?: any): /*elided*/ any | {
96
- set: (property: string, value: any) => void;
97
- getProperty: (property: string) => any;
98
- getUpdatedTime(): number;
99
- getExpiresAt(): number;
100
- addTo(property: string, value: number | bigint): void;
101
- subtractFrom(property: string, value: number | bigint): void;
102
- #record: any;
103
- #changes: any;
104
- getRecord(): any;
105
- setRecord(record: any): void;
106
- getChanges(): any;
107
- _setChanges(changes: any): void;
108
- };
109
- addTo(property: any, value: any): void;
110
- subtractFrom(property: any, value: any): void;
111
- getMetadata(): import("./RecordEncoder.ts").Entry;
112
- getRecord(): any;
113
- getChanges(): any;
114
- _setChanges(changes: any): void;
115
- setRecord(record: any): void;
116
- invalidate(target: import("./ResourceInterface.js").RequestTargetOrId): void;
117
- _writeInvalidate(id: import("./ResourceInterface.js").Id, partialRecord?: any, options?: any): void;
118
- _writeRelocate(id: import("./ResourceInterface.js").Id, options: any): void;
119
- lock(): void;
120
- put(target: import("./RequestTarget.js").RequestTarget, record: any): void | Promise<void>;
121
- create(target: import("./RequestTarget.js").RequestTarget, record: any): void | Promise<void>;
122
- patch(target: import("./RequestTarget.js").RequestTarget, recordUpdate: any): void | Promise<void>;
123
- _writeUpdate(id: import("./ResourceInterface.js").Id, recordUpdate: any, fullUpdate: boolean, options?: any): void;
124
- delete(target: import("./RequestTarget.js").RequestTarget): Promise<boolean> | boolean;
125
- _writeDelete(id: import("./ResourceInterface.js").Id, options?: any): boolean;
126
- search(target: import("./RequestTarget.js").RequestTarget): AsyncIterable<any>;
127
- subscribe(request: import("./ResourceInterface.js").SubscriptionRequest): Promise<{
128
- listener: (recordId: import("./ResourceInterface.js").Id, auditEntry: any, localTime: number, beginTxn: boolean) => void;
129
- subscriptions: [];
130
- startTime?: number;
131
- includeDescendants?: boolean;
132
- supportsTransactions?: boolean;
133
- onlyChildren?: boolean;
134
- end(): void;
135
- toJSON(): {
136
- name: string;
137
- };
138
- resolveNext: Function;
139
- queue: any[];
140
- hasDataListeners: boolean;
141
- drainCloseListener: boolean;
142
- currentDrainResolver: Function;
143
- push(message: any): void;
144
- send(message: any): void;
145
- getNextMessage(): any;
146
- waitForDrain(): Promise<boolean>;
147
- on(eventName: any, listener: any): /*elided*/ any;
148
- [Symbol.asyncIterator](): {
149
- queue: import("./IterableEventQueue.js").IterableEventQueue;
150
- push(message: any): void;
151
- next(): Promise<unknown> | {
152
- value: any;
153
- };
154
- return(value: any): {
155
- value: any;
156
- done: boolean;
157
- };
158
- throw(error: any): {
159
- done: boolean;
160
- };
161
- };
162
- [EventEmitter.captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: any[]): void;
163
- addListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
164
- once<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
165
- removeListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
166
- off<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
167
- removeAllListeners(eventName?: string | symbol): /*elided*/ any;
168
- setMaxListeners(n: number): /*elided*/ any;
169
- getMaxListeners(): number;
170
- listeners<K>(eventName: string | symbol): Function[];
171
- rawListeners<K>(eventName: string | symbol): Function[];
172
- emit<K>(eventName: string | symbol, ...args: any[]): boolean;
173
- listenerCount<K>(eventName: string | symbol, listener?: Function): number;
174
- prependListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
175
- prependOnceListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
176
- eventNames(): (string | symbol)[];
177
- }>;
178
- doesExist(): boolean;
179
- publish(target: import("./RequestTarget.js").RequestTarget, message: any, options?: any): void;
180
- _writePublish(id: import("./ResourceInterface.js").Id, message: any, options?: any): void;
181
- validate(record: any, patch?: boolean): void;
182
- getUpdatedTime(): number;
183
- wasLoadedFromSource(): boolean | void;
184
- readonly #id: import("./ResourceInterface.js").Id;
185
- readonly #context: import("./ResourceInterface.js").Context;
186
- #isCollection: boolean;
187
- post(newRecord: any): Promise<any>;
188
- get isCollection(): boolean;
189
- connect(incomingMessages: import("./IterableEventQueue.js").IterableEventQueue, query?: {}): AsyncIterable<any>;
190
- getId(): import("./ResourceInterface.js").Id;
191
- getContext(): import("./ResourceInterface.js").Context | import("./ResourceInterface.js").SourceContext;
192
- };
193
- name: any;
194
- primaryStore: any;
195
- auditStore: any;
196
- primaryKey: any;
197
- tableName: any;
198
- tableId: any;
199
- indices: any;
200
- audit: any;
201
- databasePath: any;
202
- databaseName: any;
203
- attributes: any;
204
- replicate: any;
205
- sealed: any;
206
- splitSegments: any;
207
- createdTimeProperty: import("./Table.ts").Attribute;
208
- updatedTimeProperty: import("./Table.ts").Attribute;
209
- propertyResolvers: any;
210
- userResolvers: {};
211
- sources: (/*elided*/ any)[];
212
- sourceOptions: any;
213
- intermediateSource: boolean;
214
- getResidencyById: (id: import("./ResourceInterface.js").Id) => number | void;
215
- get expirationMS(): any;
216
- dbisDB: any;
217
- schemaDefined: any;
218
- sourcedFrom(source: any, options: any): /*elided*/ any;
219
- get isCaching(): any;
220
- get shouldRevalidateEvents(): boolean;
221
- getResource(id: import("./ResourceInterface.js").Id, request: import("./ResourceInterface.js").Context, resourceOptions?: any): Promise<{
222
- #record: any;
223
- #changes: any;
224
- #version?: number;
225
- #entry?: import("./RecordEncoder.ts").Entry;
226
- #saveMode?: boolean;
227
- #loadedFromSource?: boolean;
228
- getProperty: (name: string) => any;
229
- ensureLoaded(): unknown;
230
- get(target?: import("./RequestTarget.js").RequestTarget): Promise<object | void>;
231
- allowRead(user: any, target: import("./RequestTarget.js").RequestTarget): boolean;
232
- allowUpdate(user: any, updatedData: any, target: import("./RequestTarget.js").RequestTarget): boolean;
233
- allowCreate(user: any, newData: any, target: import("./RequestTarget.js").RequestTarget): boolean;
234
- allowDelete(user: any, target: import("./RequestTarget.js").RequestTarget): boolean;
235
- update(target: import("./RequestTarget.js").RequestTarget, updates?: any): /*elided*/ any | {
236
- set: (property: string, value: any) => void;
237
- getProperty: (property: string) => any;
238
- getUpdatedTime(): number;
239
- getExpiresAt(): number;
240
- addTo(property: string, value: number | bigint): void;
241
- subtractFrom(property: string, value: number | bigint): void;
242
- #record: any;
243
- #changes: any;
244
- getRecord(): any;
245
- setRecord(record: any): void;
246
- getChanges(): any;
247
- _setChanges(changes: any): void;
248
- };
249
- addTo(property: any, value: any): void;
250
- subtractFrom(property: any, value: any): void;
251
- getMetadata(): import("./RecordEncoder.ts").Entry;
252
- getRecord(): any;
253
- getChanges(): any;
254
- _setChanges(changes: any): void;
255
- setRecord(record: any): void;
256
- invalidate(target: import("./ResourceInterface.js").RequestTargetOrId): void;
257
- _writeInvalidate(id: import("./ResourceInterface.js").Id, partialRecord?: any, options?: any): void;
258
- _writeRelocate(id: import("./ResourceInterface.js").Id, options: any): void;
259
- lock(): void;
260
- put(target: import("./RequestTarget.js").RequestTarget, record: any): void | Promise<void>;
261
- create(target: import("./RequestTarget.js").RequestTarget, record: any): void | Promise<void>;
262
- patch(target: import("./RequestTarget.js").RequestTarget, recordUpdate: any): void | Promise<void>;
263
- _writeUpdate(id: import("./ResourceInterface.js").Id, recordUpdate: any, fullUpdate: boolean, options?: any): void;
264
- delete(target: import("./RequestTarget.js").RequestTarget): Promise<boolean> | boolean;
265
- _writeDelete(id: import("./ResourceInterface.js").Id, options?: any): boolean;
266
- search(target: import("./RequestTarget.js").RequestTarget): AsyncIterable<any>;
267
- subscribe(request: import("./ResourceInterface.js").SubscriptionRequest): Promise<{
268
- listener: (recordId: import("./ResourceInterface.js").Id, auditEntry: any, localTime: number, beginTxn: boolean) => void;
269
- subscriptions: [];
270
- startTime?: number;
271
- includeDescendants?: boolean;
272
- supportsTransactions?: boolean;
273
- onlyChildren?: boolean;
274
- end(): void;
275
- toJSON(): {
276
- name: string;
277
- };
278
- resolveNext: Function;
279
- queue: any[];
280
- hasDataListeners: boolean;
281
- drainCloseListener: boolean;
282
- currentDrainResolver: Function;
283
- push(message: any): void;
284
- send(message: any): void;
285
- getNextMessage(): any;
286
- waitForDrain(): Promise<boolean>;
287
- on(eventName: any, listener: any): /*elided*/ any;
288
- [Symbol.asyncIterator](): {
289
- queue: import("./IterableEventQueue.js").IterableEventQueue;
290
- push(message: any): void;
291
- next(): Promise<unknown> | {
292
- value: any;
293
- };
294
- return(value: any): {
295
- value: any;
296
- done: boolean;
297
- };
298
- throw(error: any): {
299
- done: boolean;
300
- };
301
- };
302
- [EventEmitter.captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: any[]): void;
303
- addListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
304
- once<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
305
- removeListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
306
- off<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
307
- removeAllListeners(eventName?: string | symbol): /*elided*/ any;
308
- setMaxListeners(n: number): /*elided*/ any;
309
- getMaxListeners(): number;
310
- listeners<K>(eventName: string | symbol): Function[];
311
- rawListeners<K>(eventName: string | symbol): Function[];
312
- emit<K>(eventName: string | symbol, ...args: any[]): boolean;
313
- listenerCount<K>(eventName: string | symbol, listener?: Function): number;
314
- prependListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
315
- prependOnceListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
316
- eventNames(): (string | symbol)[];
317
- }>;
318
- doesExist(): boolean;
319
- publish(target: import("./RequestTarget.js").RequestTarget, message: any, options?: any): void;
320
- _writePublish(id: import("./ResourceInterface.js").Id, message: any, options?: any): void;
321
- validate(record: any, patch?: boolean): void;
322
- getUpdatedTime(): number;
323
- wasLoadedFromSource(): boolean | void;
324
- readonly #id: import("./ResourceInterface.js").Id;
325
- readonly #context: import("./ResourceInterface.js").Context;
326
- #isCollection: boolean;
327
- post(newRecord: any): Promise<any>;
328
- get isCollection(): boolean;
329
- connect(incomingMessages: import("./IterableEventQueue.js").IterableEventQueue, query?: {}): AsyncIterable<any>;
330
- getId(): import("./ResourceInterface.js").Id;
331
- getContext(): import("./ResourceInterface.js").Context | import("./ResourceInterface.js").SourceContext;
332
- }> | {
333
- #record: any;
334
- #changes: any;
335
- #version?: number;
336
- #entry?: import("./RecordEncoder.ts").Entry;
337
- #saveMode?: boolean;
338
- #loadedFromSource?: boolean;
339
- getProperty: (name: string) => any;
340
- ensureLoaded(): unknown;
341
- get(target?: import("./RequestTarget.js").RequestTarget): Promise<object | void>;
342
- allowRead(user: any, target: import("./RequestTarget.js").RequestTarget): boolean;
343
- allowUpdate(user: any, updatedData: any, target: import("./RequestTarget.js").RequestTarget): boolean;
344
- allowCreate(user: any, newData: any, target: import("./RequestTarget.js").RequestTarget): boolean;
345
- allowDelete(user: any, target: import("./RequestTarget.js").RequestTarget): boolean;
346
- update(target: import("./RequestTarget.js").RequestTarget, updates?: any): /*elided*/ any | {
347
- set: (property: string, value: any) => void;
348
- getProperty: (property: string) => any;
349
- getUpdatedTime(): number;
350
- getExpiresAt(): number;
351
- addTo(property: string, value: number | bigint): void;
352
- subtractFrom(property: string, value: number | bigint): void;
353
- #record: any;
354
- #changes: any;
355
- getRecord(): any;
356
- setRecord(record: any): void;
357
- getChanges(): any;
358
- _setChanges(changes: any): void;
359
- };
360
- addTo(property: any, value: any): void;
361
- subtractFrom(property: any, value: any): void;
362
- getMetadata(): import("./RecordEncoder.ts").Entry;
363
- getRecord(): any;
364
- getChanges(): any;
365
- _setChanges(changes: any): void;
366
- setRecord(record: any): void;
367
- invalidate(target: import("./ResourceInterface.js").RequestTargetOrId): void;
368
- _writeInvalidate(id: import("./ResourceInterface.js").Id, partialRecord?: any, options?: any): void;
369
- _writeRelocate(id: import("./ResourceInterface.js").Id, options: any): void;
370
- lock(): void;
371
- put(target: import("./RequestTarget.js").RequestTarget, record: any): void | Promise<void>;
372
- create(target: import("./RequestTarget.js").RequestTarget, record: any): void | Promise<void>;
373
- patch(target: import("./RequestTarget.js").RequestTarget, recordUpdate: any): void | Promise<void>;
374
- _writeUpdate(id: import("./ResourceInterface.js").Id, recordUpdate: any, fullUpdate: boolean, options?: any): void;
375
- delete(target: import("./RequestTarget.js").RequestTarget): Promise<boolean> | boolean;
376
- _writeDelete(id: import("./ResourceInterface.js").Id, options?: any): boolean;
377
- search(target: import("./RequestTarget.js").RequestTarget): AsyncIterable<any>;
378
- subscribe(request: import("./ResourceInterface.js").SubscriptionRequest): Promise<{
379
- listener: (recordId: import("./ResourceInterface.js").Id, auditEntry: any, localTime: number, beginTxn: boolean) => void;
380
- subscriptions: [];
381
- startTime?: number;
382
- includeDescendants?: boolean;
383
- supportsTransactions?: boolean;
384
- onlyChildren?: boolean;
385
- end(): void;
386
- toJSON(): {
387
- name: string;
388
- };
389
- resolveNext: Function;
390
- queue: any[];
391
- hasDataListeners: boolean;
392
- drainCloseListener: boolean;
393
- currentDrainResolver: Function;
394
- push(message: any): void;
395
- send(message: any): void;
396
- getNextMessage(): any;
397
- waitForDrain(): Promise<boolean>;
398
- on(eventName: any, listener: any): /*elided*/ any;
399
- [Symbol.asyncIterator](): {
400
- queue: import("./IterableEventQueue.js").IterableEventQueue;
401
- push(message: any): void;
402
- next(): Promise<unknown> | {
403
- value: any;
404
- };
405
- return(value: any): {
406
- value: any;
407
- done: boolean;
408
- };
409
- throw(error: any): {
410
- done: boolean;
411
- };
412
- };
413
- [EventEmitter.captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: any[]): void;
414
- addListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
415
- once<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
416
- removeListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
417
- off<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
418
- removeAllListeners(eventName?: string | symbol): /*elided*/ any;
419
- setMaxListeners(n: number): /*elided*/ any;
420
- getMaxListeners(): number;
421
- listeners<K>(eventName: string | symbol): Function[];
422
- rawListeners<K>(eventName: string | symbol): Function[];
423
- emit<K>(eventName: string | symbol, ...args: any[]): boolean;
424
- listenerCount<K>(eventName: string | symbol, listener?: Function): number;
425
- prependListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
426
- prependOnceListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
427
- eventNames(): (string | symbol)[];
428
- }>;
429
- doesExist(): boolean;
430
- publish(target: import("./RequestTarget.js").RequestTarget, message: any, options?: any): void;
431
- _writePublish(id: import("./ResourceInterface.js").Id, message: any, options?: any): void;
432
- validate(record: any, patch?: boolean): void;
433
- getUpdatedTime(): number;
434
- wasLoadedFromSource(): boolean | void;
435
- readonly #id: import("./ResourceInterface.js").Id;
436
- readonly #context: import("./ResourceInterface.js").Context;
437
- #isCollection: boolean;
438
- post(newRecord: any): Promise<any>;
439
- get isCollection(): boolean;
440
- connect(incomingMessages: import("./IterableEventQueue.js").IterableEventQueue, query?: {}): AsyncIterable<any>;
441
- getId(): import("./ResourceInterface.js").Id;
442
- getContext(): import("./ResourceInterface.js").Context | import("./ResourceInterface.js").SourceContext;
443
- };
444
- _updateResource(resource: any, entry: any): void;
445
- getNewId(): any;
446
- setTTLExpiration(expiration: number | {
447
- expiration: number;
448
- eviction?: number;
449
- scanInterval?: number;
450
- }): void;
451
- getResidencyRecord(id: import("./ResourceInterface.js").Id): any;
452
- setResidency(getResidency?: (record: object, context: import("./ResourceInterface.js").Context) => number | void | string[]): void;
453
- setResidencyById(getResidencyById?: (id: import("./ResourceInterface.js").Id) => number | void): void;
454
- getResidency(record: object, context: import("./ResourceInterface.js").Context): number | void | string[];
455
- enableAuditing(): void;
456
- coerceId(id: string): number | string;
457
- dropTable(): Promise<void>;
458
- _recordRelocate(existingEntry: any, entry: any): boolean;
459
- evict(id: any, existingRecord: any, existingVersion: any): Promise<void>;
460
- operation(operation: any, context: any): any;
461
- transformToOrderedSelect(entries: any[], select: (string | import("./ResourceInterface.js").SubSelect)[], sort: import("./ResourceInterface.js").Sort, context: import("./ResourceInterface.js").Context, readTxn: any, transformToRecord: Function): any;
462
- transformEntryForSelect(select: any, context: any, readTxn: any, filtered: any, ensure_loaded?: any, canSkip?: any): (entry: import("./RecordEncoder.ts").Entry) => any;
463
- subscribeOnThisThread(workerIndex: any, options: any): boolean;
464
- addAttributes(attributesToAdd: any): Promise<any>;
465
- removeAttributes(names: string[]): Promise<any>;
466
- getSize(): number;
467
- getAuditSize(): number;
468
- getStorageStats(): {
469
- available: number;
470
- free: number;
471
- size: number;
472
- };
473
- getRecordCount(options?: any): Promise<{
474
- recordCount: number;
475
- estimatedRange: number[];
476
- } | {
477
- recordCount: number;
478
- estimatedRange?: undefined;
479
- }>;
480
- updatedAttributes(): void;
481
- setComputedAttribute(attribute_name: any, resolver: any): void;
482
- deleteHistory(endTime?: number, cleanupDeletedRecords?: boolean): Promise<void>;
483
- getHistory(startTime?: number, endTime?: number): AsyncGenerator<{
484
- id: import("ordered-binary").Key;
485
- localTime: any;
486
- version: any;
487
- type: any;
488
- value: any;
489
- user: import("ordered-binary").Key;
490
- operation: any;
491
- }, void, unknown>;
492
- getHistoryOfRecord(id: any): Promise<any[]>;
493
- cleanup(): void;
494
- transactions: import("./DatabaseTransaction.js").Transaction[] & {
495
- timestamp: number;
496
- };
497
- directURLMapping: boolean;
498
- loadAsInstance: boolean;
499
- get(identifier: import("./ResourceInterface.js").Id, context?: import("./ResourceInterface.js").Context): Promise<import("./Resource.js").Resource>;
500
- get(target: import("./RequestTarget.js").RequestTarget, context?: import("./ResourceInterface.js").Context): Promise<AsyncIterable<object>>;
501
- put: {
502
- (idOrQuery: string | import("./ResourceInterface.js").Id | import("./ResourceInterface.js").Query, dataOrContext?: any, context?: import("./ResourceInterface.js").Context): any;
503
- reliesOnPrototype: boolean;
504
- };
505
- patch: {
506
- (idOrQuery: string | import("./ResourceInterface.js").Id | import("./ResourceInterface.js").Query, dataOrContext?: any, context?: import("./ResourceInterface.js").Context): any;
507
- reliesOnPrototype: boolean;
508
- };
509
- delete(identifier: import("./ResourceInterface.js").Id, context?: import("./ResourceInterface.js").Context): Promise<boolean>;
510
- delete(request: import("./ResourceInterface.js").Context, context?: import("./ResourceInterface.js").Context): Promise<object>;
511
- create(idPrefix: import("./ResourceInterface.js").Id, record: any, context: import("./ResourceInterface.js").Context): Promise<import("./ResourceInterface.js").Id>;
512
- create(record: any, context: import("./ResourceInterface.js").Context): Promise<import("./ResourceInterface.js").Id>;
513
- invalidate: {
514
- (idOrQuery: string | import("./ResourceInterface.js").Id | import("./ResourceInterface.js").Query, dataOrContext?: any, context?: import("./ResourceInterface.js").Context): any;
515
- reliesOnPrototype: boolean;
516
- };
517
- post: {
518
- (idOrQuery: string | import("./ResourceInterface.js").Id | import("./ResourceInterface.js").Query, dataOrContext?: any, context?: import("./ResourceInterface.js").Context): any;
519
- reliesOnPrototype: boolean;
520
- };
521
- update: {
522
- (idOrQuery: string | import("./ResourceInterface.js").Id | import("./ResourceInterface.js").Query, dataOrContext?: any, context?: import("./ResourceInterface.js").Context): any;
523
- reliesOnPrototype: boolean;
524
- };
525
- connect: {
526
- (idOrQuery: string | import("./ResourceInterface.js").Id | import("./ResourceInterface.js").Query, dataOrContext?: any, context?: import("./ResourceInterface.js").Context): any;
527
- reliesOnPrototype: boolean;
528
- };
529
- subscribe(request: import("./ResourceInterface.js").SubscriptionRequest): Promise<AsyncIterable<{
530
- id: any;
531
- operation: string;
532
- value: object;
533
- }>>;
534
- publish: {
535
- (idOrQuery: string | import("./ResourceInterface.js").Id | import("./ResourceInterface.js").Query, dataOrContext?: any, context?: import("./ResourceInterface.js").Context): any;
536
- reliesOnPrototype: boolean;
537
- };
538
- search: {
539
- (idOrQuery: string | import("./ResourceInterface.js").Id | import("./ResourceInterface.js").Query, dataOrContext?: any, context?: import("./ResourceInterface.js").Context): any;
540
- reliesOnPrototype: boolean;
541
- };
542
- query: {
543
- (idOrQuery: string | import("./ResourceInterface.js").Id | import("./ResourceInterface.js").Query, dataOrContext?: any, context?: import("./ResourceInterface.js").Context): any;
544
- reliesOnPrototype: boolean;
545
- };
546
- copy: {
547
- (idOrQuery: string | import("./ResourceInterface.js").Id | import("./ResourceInterface.js").Query, dataOrContext?: any, context?: import("./ResourceInterface.js").Context): any;
548
- reliesOnPrototype: boolean;
549
- };
550
- move: {
551
- (idOrQuery: string | import("./ResourceInterface.js").Id | import("./ResourceInterface.js").Query, dataOrContext?: any, context?: import("./ResourceInterface.js").Context): any;
552
- reliesOnPrototype: boolean;
553
- };
554
- isCollection(resource: any): any;
555
- parseQuery(search: any, query: any): any;
556
- parsePath(path: any, context: any, query: any): any;
557
- };
80
+ export declare function table<TableResourceType>(tableDefinition: TableDefinition): TableResourceType;
558
81
  export declare function dropTableMeta({ table: tableName, database: databaseName }: {
559
82
  table: any;
560
83
  database: any;
@@ -0,0 +1,27 @@
1
+ import { Resources } from './Resources.ts';
2
+ export declare function generateJsonApi(resources: Resources, serverHttpURL: string): {
3
+ openapi: string;
4
+ info: {
5
+ title: string;
6
+ version: any;
7
+ };
8
+ servers: {
9
+ description: string;
10
+ url: string;
11
+ }[];
12
+ paths: {};
13
+ components: {
14
+ schemas: {};
15
+ securitySchemes: {
16
+ basicAuth: {
17
+ type: string;
18
+ scheme: string;
19
+ };
20
+ bearerAuth: {
21
+ type: string;
22
+ scheme: string;
23
+ bearerFormat: string;
24
+ };
25
+ };
26
+ };
27
+ };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Certificate verification source that handles both CRL and OCSP methods
3
+ */
4
+ import { Resource } from '../../resources/Resource.ts';
5
+ import type { Query } from '../../resources/ResourceInterface.ts';
6
+ /**
7
+ * Certificate Verification Source that can handle both CRL and OCSP
8
+ */
9
+ export declare class CertificateVerificationSource extends Resource {
10
+ get(query: Query): Promise<{
11
+ certificate_id: string;
12
+ status: any;
13
+ reason: any;
14
+ checked_at: number;
15
+ expiresAt: any;
16
+ method: string;
17
+ }>;
18
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Configuration validation for certificate verification
3
+ */
4
+ import type { CertificateVerificationConfig, OCSPDefaults, CRLDefaults } from './types.ts';
5
+ export declare const DEFAULT_FAILURE_MODE = "fail-closed";
6
+ export declare const OCSP_DEFAULTS: OCSPDefaults;
7
+ export declare const CRL_DEFAULTS: CRLDefaults;
8
+ /**
9
+ * Validate and parse certificate verification configuration
10
+ * @param config - Certificate verification configuration to validate
11
+ * @returns Validated and parsed configuration object
12
+ * @throws {Error} If configuration is invalid
13
+ */
14
+ export declare function validateAndParseCertificateVerificationConfig(config: unknown): CertificateVerificationConfig;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * CRL (Certificate Revocation List) verification
3
+ */
4
+ import type { CertificateVerificationResult, CRLCheckResult, CRLConfig } from './types.ts';
5
+ /**
6
+ * Custom error for CRL signature verification failures
7
+ * This distinguishes security failures (invalid signatures) from operational failures (network, timeout)
8
+ */
9
+ export declare class CRLSignatureVerificationError extends Error {
10
+ constructor(message: string);
11
+ }
12
+ /**
13
+ * Verify CRL status of a client certificate
14
+ * @param certPem - Client certificate as Buffer (DER format)
15
+ * @param issuerPem - Issuer (CA) certificate as Buffer (DER format)
16
+ * @param config - CRL configuration
17
+ * @param crlUrls - Optional pre-extracted CRL distribution point URLs (avoids re-parsing)
18
+ * @returns Promise resolving to verification result
19
+ */
20
+ export declare function verifyCRL(certPem: Buffer, issuerPem: Buffer, config?: CRLConfig, crlUrls?: string[]): Promise<CertificateVerificationResult>;
21
+ /**
22
+ * Perform the actual CRL check by looking up the certificate in the revoked certificates table
23
+ * @param certPem - Certificate in PEM format
24
+ * @param issuerPem - Issuer certificate in PEM format
25
+ * @param config - CRL configuration
26
+ * @param crlUrls - Optional pre-extracted CRL distribution point URLs (avoids re-parsing)
27
+ * @returns CRL check result
28
+ */
29
+ export declare function performCRLCheck(certPem: string, issuerPem: string, config: CRLConfig, crlUrls?: string[]): Promise<CRLCheckResult>;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Certificate verification for mTLS authentication
3
+ *
4
+ * This module provides certificate revocation checking for client certificates
5
+ * in mutual TLS (mTLS) connections. Supports both OCSP (Online Certificate
6
+ * Status Protocol) and CRL (Certificate Revocation List) verification methods
7
+ * with automatic method selection.
8
+ *
9
+ * Features:
10
+ * - OCSP verification with caching
11
+ * - CRL verification with caching
12
+ * - CRL-first with OCSP fallback for optimal performance
13
+ * - Background CRL refresh with exponential backoff
14
+ * - Graceful degradation during network outages
15
+ * - Ed25519/Ed448 certificate support
16
+ *
17
+ * Default behavior:
18
+ * - Certificate verification: disabled (must be explicitly enabled)
19
+ * - Verification approach: CRL-first (with OCSP fallback)
20
+ * - CRL timeout: 10 seconds, cache TTL: 24 hours
21
+ * - OCSP timeout: 5 seconds, cache TTL: 1 hour
22
+ * - Failure mode: fail-closed (rejects connections if verification fails)
23
+ */
24
+ import type { PeerCertificate, CertificateVerificationResult } from './types.ts';
25
+ /**
26
+ * Verify certificate revocation status using OCSP and/or CRL
27
+ * @param peerCertificate - Peer certificate object from TLS connection
28
+ * @param mtlsConfig - The mTLS configuration from the request
29
+ * @returns Promise resolving to verification result
30
+ */
31
+ export declare function verifyCertificate(peerCertificate: PeerCertificate, mtlsConfig?: boolean | Record<string, any> | null): Promise<CertificateVerificationResult>;