harperdb 4.3.19 → 4.3.21

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 (86) hide show
  1. package/README.md +3 -3
  2. package/bin/harperdb.js +58 -58
  3. package/bin/lite.js +20 -20
  4. package/index.d.ts +1 -0
  5. package/launchServiceScripts/launchInstallNATSServer.js +2 -2
  6. package/launchServiceScripts/launchNatsIngestService.js +20 -20
  7. package/launchServiceScripts/launchNatsReplyService.js +20 -20
  8. package/launchServiceScripts/launchUpdateNodes4-0-0.js +20 -20
  9. package/npm-shrinkwrap.json +1057 -1245
  10. package/package.json +16 -8
  11. package/resources/Resource.d.ts +5 -6
  12. package/resources/ResourceInterface.d.ts +56 -13
  13. package/resources/Table.d.ts +19 -19
  14. package/resources/databases.d.ts +17 -18
  15. package/server/jobs/jobProcess.js +20 -20
  16. package/server/threads/threadServer.js +20 -20
  17. package/studio/build-local/asset-manifest.json +36 -36
  18. package/studio/build-local/index.html +1 -1
  19. package/studio/build-local/static/css/main.6c0f1b63.css +13 -0
  20. package/studio/build-local/static/js/{424.7d57284b.chunk.js → 424.ad87c8fd.chunk.js} +1 -1
  21. package/studio/build-local/static/js/{662.02ce7b65.chunk.js → 662.92e32ffc.chunk.js} +1 -1
  22. package/studio/build-local/static/js/723.c58acced.chunk.js +2 -0
  23. package/studio/build-local/static/js/807.510f66df.chunk.js +2 -0
  24. package/studio/build-local/static/js/browse-csvupload.453237f3.chunk.js +1 -0
  25. package/studio/build-local/static/js/browse-datatable.b9ef2d28.chunk.js +1 -0
  26. package/studio/build-local/static/js/browse-entitymanager.50827a5a.chunk.js +1 -0
  27. package/studio/build-local/static/js/browse-jsonviewer.a2534004.chunk.js +1 -0
  28. package/studio/build-local/static/js/custom-functions.dd7e182c.chunk.js +1 -0
  29. package/studio/build-local/static/js/instance-charts.34d15f02.chunk.js +1 -0
  30. package/studio/build-local/static/js/instance-cluster.5bce430c.chunk.js +1 -0
  31. package/studio/build-local/static/js/instance-config.70c17b53.chunk.js +1 -0
  32. package/studio/build-local/static/js/instance-query.4f6eec62.chunk.js +1 -0
  33. package/studio/build-local/static/js/instance-roles.507a4ed0.chunk.js +1 -0
  34. package/studio/build-local/static/js/instance-status.ce9d7f64.chunk.js +1 -0
  35. package/studio/build-local/static/js/instance-users-datatable.190640fd.chunk.js +1 -0
  36. package/studio/build-local/static/js/{instance-users-edit.436e0908.chunk.js → instance-users-edit.d2444479.chunk.js} +1 -1
  37. package/studio/build-local/static/js/instance-users.eabfbbde.chunk.js +1 -0
  38. package/studio/build-local/static/js/instance.a163623f.chunk.js +1 -0
  39. package/studio/build-local/static/js/instances.6b88a87c.chunk.js +1 -0
  40. package/studio/build-local/static/js/{main.05c1913d.js → main.a22f6951.js} +2 -2
  41. package/studio/build-local/static/js/offline-app.7371216b.chunk.js +1 -0
  42. package/studio/build-local/static/js/online-app.db436eec.chunk.js +1 -0
  43. package/studio/build-local/static/js/organization-billing.b2f260f0.chunk.js +1 -0
  44. package/studio/build-local/static/js/organization-users.b6171b18.chunk.js +1 -0
  45. package/studio/build-local/static/js/organization.7800f16a.chunk.js +1 -0
  46. package/studio/build-local/static/js/organizations.8bb505f2.chunk.js +1 -0
  47. package/studio/build-local/static/js/profile.292bdd86.chunk.js +1 -0
  48. package/studio/build-local/static/js/roles-jsonviewer.c11f1816.chunk.js +1 -0
  49. package/studio/build-local/static/js/signIn.b11bdc50.chunk.js +1 -0
  50. package/studio/build-local/static/js/signUp.564d4e0b.chunk.js +1 -0
  51. package/studio/build-local/static/js/structure-reloader.b6de4091.chunk.js +1 -0
  52. package/studio/build-local/static/js/topnav.4fd41d60.chunk.js +1 -0
  53. package/utility/scripts/restartHdb.js +20 -20
  54. package/studio/build-local/static/css/main.038ec116.css +0 -13
  55. package/studio/build-local/static/js/723.36068040.chunk.js +0 -2
  56. package/studio/build-local/static/js/807.3473ab0a.chunk.js +0 -2
  57. package/studio/build-local/static/js/browse-csvupload.5e77eb8a.chunk.js +0 -1
  58. package/studio/build-local/static/js/browse-datatable.cd71d518.chunk.js +0 -1
  59. package/studio/build-local/static/js/browse-entitymanager.09237801.chunk.js +0 -1
  60. package/studio/build-local/static/js/browse-jsonviewer.fcccabdc.chunk.js +0 -1
  61. package/studio/build-local/static/js/custom-functions.98af4a5e.chunk.js +0 -1
  62. package/studio/build-local/static/js/instance-charts.f1a1969d.chunk.js +0 -1
  63. package/studio/build-local/static/js/instance-cluster.0dc3ac1b.chunk.js +0 -1
  64. package/studio/build-local/static/js/instance-config.19223fab.chunk.js +0 -1
  65. package/studio/build-local/static/js/instance-query.ed7e59f5.chunk.js +0 -1
  66. package/studio/build-local/static/js/instance-roles.9c3f140d.chunk.js +0 -1
  67. package/studio/build-local/static/js/instance-status.1687cd77.chunk.js +0 -1
  68. package/studio/build-local/static/js/instance-users-datatable.ced7813f.chunk.js +0 -1
  69. package/studio/build-local/static/js/instance-users.12c0c117.chunk.js +0 -1
  70. package/studio/build-local/static/js/instance.b8863754.chunk.js +0 -1
  71. package/studio/build-local/static/js/instances.5bd051eb.chunk.js +0 -1
  72. package/studio/build-local/static/js/offline-app.b3ad12ac.chunk.js +0 -1
  73. package/studio/build-local/static/js/online-app.2ac03c15.chunk.js +0 -1
  74. package/studio/build-local/static/js/organization-billing.a8014c6f.chunk.js +0 -1
  75. package/studio/build-local/static/js/organization-users.523136d9.chunk.js +0 -1
  76. package/studio/build-local/static/js/organization.0abc89ca.chunk.js +0 -1
  77. package/studio/build-local/static/js/organizations.e536b86f.chunk.js +0 -1
  78. package/studio/build-local/static/js/profile.92f9be59.chunk.js +0 -1
  79. package/studio/build-local/static/js/roles-jsonviewer.5fe72bc9.chunk.js +0 -1
  80. package/studio/build-local/static/js/signIn.97bded2f.chunk.js +0 -1
  81. package/studio/build-local/static/js/signUp.482f9fe4.chunk.js +0 -1
  82. package/studio/build-local/static/js/structure-reloader.9322abd3.chunk.js +0 -1
  83. package/studio/build-local/static/js/topnav.5e7913a5.chunk.js +0 -1
  84. /package/studio/build-local/static/js/{723.36068040.chunk.js.LICENSE.txt → 723.c58acced.chunk.js.LICENSE.txt} +0 -0
  85. /package/studio/build-local/static/js/{807.3473ab0a.chunk.js.LICENSE.txt → 807.510f66df.chunk.js.LICENSE.txt} +0 -0
  86. /package/studio/build-local/static/js/{main.05c1913d.js.LICENSE.txt → main.a22f6951.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harperdb",
3
- "version": "4.3.19",
3
+ "version": "4.3.21",
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",
@@ -10,10 +10,18 @@
10
10
  "broker",
11
11
  "mqtt",
12
12
  "real-time",
13
- "cloud",
14
13
  "enterprise",
15
14
  "Fastify",
16
- "NATS"
15
+ "NATS",
16
+ "HarperDB",
17
+ "Harper",
18
+ "clustering",
19
+ "replication",
20
+ "REST",
21
+ "WebSockets",
22
+ "decentralized",
23
+ "server-sent events",
24
+ "document store"
17
25
  ],
18
26
  "main": "harperdb.js",
19
27
  "bin": {
@@ -35,8 +43,8 @@
35
43
  },
36
44
  "license": "SEE LICENSE IN LICENSE",
37
45
  "dependencies": {
38
- "@aws-sdk/client-s3": "3.535.0",
39
- "@aws-sdk/lib-storage": "3.535.0",
46
+ "@aws-sdk/client-s3": "3.635.0",
47
+ "@aws-sdk/lib-storage": "3.635.0",
40
48
  "@endo/static-module-record": "^1.0.4",
41
49
  "@fastify/autoload": "5.7.1",
42
50
  "@fastify/compress": "~6.5.0",
@@ -69,7 +77,7 @@
69
77
  "json2csv": "5.0.7",
70
78
  "jsonata": "1.8.7",
71
79
  "jsonwebtoken": "9.0.2",
72
- "lmdb": "3.0.12",
80
+ "lmdb": "3.0.14",
73
81
  "lodash": "4.17.21",
74
82
  "mathjs": "11.12.0",
75
83
  "minimist": "1.2.8",
@@ -89,7 +97,7 @@
89
97
  "passport-http": "0.3.0",
90
98
  "passport-local": "1.0.0",
91
99
  "pino": "8.16.0",
92
- "pm2": "5.3.1",
100
+ "pm2": "5.4.1",
93
101
  "prompt": "1.3.0",
94
102
  "properties-reader": "2.3.0",
95
103
  "recursive-iterator": "3.3.0",
@@ -104,7 +112,7 @@
104
112
  "ulidx": "0.5.0",
105
113
  "uuid": "9.0.1",
106
114
  "validate.js": "0.13.1",
107
- "ws": "8.16.0",
115
+ "ws": "8.17.1",
108
116
  "yaml": "2.4.1"
109
117
  },
110
118
  "overrides": {
@@ -1,4 +1,4 @@
1
- import { ResourceInterface, Request, SubscriptionRequest, Id, Context, Query } from './ResourceInterface';
1
+ import { ResourceInterface, SubscriptionRequest, Id, Context, Query } from './ResourceInterface';
2
2
  import { Transaction } from './DatabaseTransaction';
3
3
  export declare const CONTEXT: unique symbol;
4
4
  export declare const ID_PROPERTY: unique symbol;
@@ -24,8 +24,7 @@ export declare class Resource implements ResourceInterface {
24
24
  /**
25
25
  * The get methods are for directly getting a resource, and called for HTTP GET requests.
26
26
  */
27
- static get(identifier: Id, context?: Context): Promise<object>;
28
- static get(request: Request, context?: Context): Promise<object>;
27
+ static get(identifier: Id, context?: Context): Promise<Resource>;
29
28
  static get(query: Query, context?: Context): Promise<AsyncIterable<object>>;
30
29
  static get: typeof Resource.get;
31
30
  get?(query?: any): Promise<any>;
@@ -41,7 +40,7 @@ export declare class Resource implements ResourceInterface {
41
40
  reliesOnPrototype: boolean;
42
41
  };
43
42
  static delete(identifier: Id, context?: Context): Promise<boolean>;
44
- static delete(request: Request, context?: Context): Promise<object>;
43
+ static delete(request: Context, context?: Context): Promise<object>;
45
44
  static delete: typeof Resource.delete;
46
45
  /**
47
46
  * Generate a new primary key for a resource; by default we use UUIDs (for now).
@@ -99,7 +98,7 @@ export declare class Resource implements ResourceInterface {
99
98
  * @param options
100
99
  * @returns
101
100
  */
102
- static getResource(id: Id, request: Request, options?: any): Resource | Promise<Resource>;
101
+ static getResource(id: Id, request: Context, options?: any): Resource | Promise<Resource>;
103
102
  /**
104
103
  * This is called by protocols that wish to make a subscription for real-time notification/updates.
105
104
  * This default implementation simply provides a streaming iterator that does not deliver any notifications
@@ -126,7 +125,7 @@ export declare class Resource implements ResourceInterface {
126
125
  * Get the context for this resource
127
126
  * @returns context object with information about the current transaction, user, and more
128
127
  */
129
- getContext(): any;
128
+ getContext(): Context;
130
129
  }
131
130
  export declare function snake_case(camelCase: string): string;
132
131
  export declare function transformForSelect(select: any, resource: any): (object: any) => any;
@@ -14,28 +14,71 @@ export interface ResourceInterface<Key = any, Record = any> {
14
14
  allowDelete(user: any, query: Query, context: Context): boolean | Promise<boolean>;
15
15
  }
16
16
  export interface Context {
17
+ /** The user making the request */
17
18
  user?: any;
19
+ /** The database transaction object */
18
20
  transaction: DatabaseTransaction;
19
- responseData: {
20
- lastModified: number;
21
- };
21
+ /** If the operation that will be performed with this context should check user authorization */
22
+ authorize?: number;
23
+ /** The last modification time of any data that has been accessed with this context */
24
+ lastModified?: number;
25
+ /** The time at which a saved record should expire */
26
+ expiresAt?: number;
27
+ /** Indicates that caching should not be applied */
28
+ noCache?: boolean;
29
+ /** Indicates that values from the source data should be stored as a cached value */
30
+ noCacheStore?: boolean;
31
+ /** Only return values from the table, and don't use data from the source */
32
+ onlyIfCached?: boolean;
33
+ /** Allows data from a caching table to be used if there is an error retrieving data from the source */
34
+ staleIfError?: boolean;
35
+ /** Indicates any cached data must be revalidated */
36
+ mustRevalidate?: boolean;
22
37
  }
23
- export interface Request {
24
- id?: Id;
25
- path?: string;
26
- user?: any;
27
- data?: any;
28
- select?: string[];
29
- context?: Context;
38
+ interface DirectCondition {
39
+ attribute: string;
40
+ comparator?: string;
41
+ value: any;
42
+ }
43
+ interface ConditionGroup {
44
+ conditions: Condition[];
45
+ operator?: string;
46
+ }
47
+ type Condition = DirectCondition | ConditionGroup;
48
+ interface Sort {
49
+ attribute: string;
50
+ descending?: boolean;
51
+ next?: Sort;
52
+ }
53
+ interface SubSelect {
54
+ name: string;
55
+ select: (string | SubSelect)[];
30
56
  }
31
- export interface Query extends Request {
32
- conditions?: any[];
57
+ export interface Query {
58
+ /** The conditions to use in the query, that the returned records must satisfy */
59
+ conditions?: Condition[];
60
+ /** The number of records to return */
33
61
  limit?: number;
62
+ /** The number of records to skip */
34
63
  offset?: number;
64
+ /** The number of operator to use*/
65
+ operator?: 'AND' | 'OR';
66
+ /** The sort attribute and direction to use */
67
+ sort?: Sort;
68
+ /** The selected attributes to return */
69
+ select?: (string | SubSelect)[];
70
+ /** Return an explanation of the query order */
71
+ explain?: boolean;
72
+ /** Force the query to be executed in the order of conditions */
73
+ enforceExecutionOrder?: boolean;
35
74
  }
36
- export interface SubscriptionRequest extends Request {
75
+ export interface SubscriptionRequest {
76
+ /** The starting time of events to return (defaults to now) */
37
77
  startTime?: number;
78
+ /** The count of previously recorded events to return */
38
79
  previousCount?: number;
80
+ /** If the current record state should be omitted as the first event */
81
+ omitCurrent?: boolean;
39
82
  }
40
83
  export type Id = number | string | (number | string | null)[] | null;
41
84
  type UpdatableRecord<T> = T;
@@ -4,7 +4,8 @@
4
4
  * table-level interactions, loading records, updating records, querying, and more.
5
5
  */
6
6
  import { Database } from 'lmdb';
7
- import { Query, ResourceInterface, Request, SubscriptionRequest, Id, Context } from './ResourceInterface';
7
+ import { Query, ResourceInterface, SubscriptionRequest, Id, Context } from './ResourceInterface';
8
+ import { Resource } from './Resource';
8
9
  export interface Table {
9
10
  primaryStore: Database;
10
11
  auditStore: Database;
@@ -90,7 +91,7 @@ export declare function makeTable(options: any): {
90
91
  put(record: any): void;
91
92
  patch(record_update: any): void;
92
93
  _writeUpdate(record_update: any, full_update: boolean, options?: any): void;
93
- delete(request: Request): Promise<boolean>;
94
+ delete(request?: Query | string): Promise<boolean>;
94
95
  _writeDelete(options?: any): boolean;
95
96
  search(request: Query): AsyncIterable<any>;
96
97
  subscribe(request: SubscriptionRequest): Promise<{
@@ -130,13 +131,13 @@ export declare function makeTable(options: any): {
130
131
  removeAllListeners(eventName?: string | symbol): any;
131
132
  setMaxListeners(n: number): any;
132
133
  getMaxListeners(): number;
133
- listeners<K>(eventName: string | symbol): Array<Function>;
134
- rawListeners<K>(eventName: string | symbol): Array<Function>;
134
+ listeners<K>(eventName: string | symbol): Function[];
135
+ rawListeners<K>(eventName: string | symbol): Function[];
135
136
  emit<K>(eventName: string | symbol, ...args: any[]): boolean;
136
137
  listenerCount<K>(eventName: string | symbol, listener?: Function): number;
137
138
  prependListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
138
139
  prependOnceListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
139
- eventNames(): Array<(string | symbol) & (string | symbol)>;
140
+ eventNames(): (string | symbol)[];
140
141
  }>;
141
142
  doesExist(): boolean;
142
143
  /**
@@ -154,7 +155,7 @@ export declare function makeTable(options: any): {
154
155
  post(new_record: any): any;
155
156
  connect(query?: {}): AsyncIterable<any>;
156
157
  getId(): any;
157
- getContext(): any;
158
+ getContext(): Context;
158
159
  };
159
160
  name: any;
160
161
  primaryStore: any;
@@ -253,7 +254,7 @@ export declare function makeTable(options: any): {
253
254
  put(record: any): void;
254
255
  patch(record_update: any): void;
255
256
  _writeUpdate(record_update: any, full_update: boolean, options?: any): void;
256
- delete(request: Request): Promise<boolean>;
257
+ delete(request?: Query | string): Promise<boolean>;
257
258
  _writeDelete(options?: any): boolean;
258
259
  search(request: Query): AsyncIterable<any>;
259
260
  subscribe(request: SubscriptionRequest): Promise<{
@@ -293,13 +294,13 @@ export declare function makeTable(options: any): {
293
294
  removeAllListeners(eventName?: string | symbol): any;
294
295
  setMaxListeners(n: number): any;
295
296
  getMaxListeners(): number;
296
- listeners<K>(eventName: string | symbol): Array<Function>;
297
- rawListeners<K>(eventName: string | symbol): Array<Function>;
297
+ listeners<K>(eventName: string | symbol): Function[];
298
+ rawListeners<K>(eventName: string | symbol): Function[];
298
299
  emit<K>(eventName: string | symbol, ...args: any[]): boolean;
299
300
  listenerCount<K>(eventName: string | symbol, listener?: Function): number;
300
301
  prependListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
301
302
  prependOnceListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
302
- eventNames(): Array<(string | symbol) & (string | symbol)>;
303
+ eventNames(): (string | symbol)[];
303
304
  }>;
304
305
  doesExist(): boolean;
305
306
  /**
@@ -317,7 +318,7 @@ export declare function makeTable(options: any): {
317
318
  post(new_record: any): any;
318
319
  connect(query?: {}): AsyncIterable<any>;
319
320
  getId(): any;
320
- getContext(): any;
321
+ getContext(): Context;
321
322
  }> | {
322
323
  /**
323
324
  * This is a request to explicitly ensure that the record is loaded from source, rather than only using the local record.
@@ -380,7 +381,7 @@ export declare function makeTable(options: any): {
380
381
  put(record: any): void;
381
382
  patch(record_update: any): void;
382
383
  _writeUpdate(record_update: any, full_update: boolean, options?: any): void;
383
- delete(request: Request): Promise<boolean>;
384
+ delete(request?: Query | string): Promise<boolean>;
384
385
  _writeDelete(options?: any): boolean;
385
386
  search(request: Query): AsyncIterable<any>;
386
387
  subscribe(request: SubscriptionRequest): Promise<{
@@ -420,13 +421,13 @@ export declare function makeTable(options: any): {
420
421
  removeAllListeners(eventName?: string | symbol): any;
421
422
  setMaxListeners(n: number): any;
422
423
  getMaxListeners(): number;
423
- listeners<K>(eventName: string | symbol): Array<Function>;
424
- rawListeners<K>(eventName: string | symbol): Array<Function>;
424
+ listeners<K>(eventName: string | symbol): Function[];
425
+ rawListeners<K>(eventName: string | symbol): Function[];
425
426
  emit<K>(eventName: string | symbol, ...args: any[]): boolean;
426
427
  listenerCount<K>(eventName: string | symbol, listener?: Function): number;
427
428
  prependListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
428
429
  prependOnceListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
429
- eventNames(): Array<(string | symbol) & (string | symbol)>;
430
+ eventNames(): (string | symbol)[];
430
431
  }>;
431
432
  doesExist(): boolean;
432
433
  /**
@@ -444,7 +445,7 @@ export declare function makeTable(options: any): {
444
445
  post(new_record: any): any;
445
446
  connect(query?: {}): AsyncIterable<any>;
446
447
  getId(): any;
447
- getContext(): any;
448
+ getContext(): Context;
448
449
  };
449
450
  /**
450
451
  * Set TTL expiration for records in this table. On retrieval, record timestamps are checked for expiration.
@@ -520,8 +521,7 @@ export declare function makeTable(options: any): {
520
521
  transactions: import("./DatabaseTransaction").Transaction[] & {
521
522
  timestamp: number;
522
523
  };
523
- get(identifier: Id, context?: Context): Promise<object>;
524
- get(request: Request, context?: Context): Promise<object>;
524
+ get(identifier: Id, context?: Context): Promise<Resource>;
525
525
  get(query: Query, context?: Context): Promise<AsyncIterable<object>>;
526
526
  put: {
527
527
  (id_or_query: string | Id, data_or_context?: any, context?: Context): any;
@@ -532,7 +532,7 @@ export declare function makeTable(options: any): {
532
532
  reliesOnPrototype: boolean;
533
533
  };
534
534
  delete(identifier: Id, context?: Context): Promise<boolean>;
535
- delete(request: Request, context?: Context): Promise<object>;
535
+ delete(request: Context, context?: Context): Promise<object>;
536
536
  getNewId(): `${string}-${string}-${string}-${string}-${string}`;
537
537
  create(id_prefix: Id, record: any, context: Context): Promise<Id>;
538
538
  create(record: any, context: Context): Promise<Id>;
@@ -87,7 +87,7 @@ export declare function table({ table: table_name, database: database_name, expi
87
87
  put(record: any): void;
88
88
  patch(record_update: any): void;
89
89
  _writeUpdate(record_update: any, full_update: boolean, options?: any): void;
90
- delete(request: import("./ResourceInterface").Request): Promise<boolean>;
90
+ delete(request?: import("./ResourceInterface").Query | string): Promise<boolean>;
91
91
  _writeDelete(options?: any): boolean;
92
92
  search(request: import("./ResourceInterface").Query): AsyncIterable<any>;
93
93
  subscribe(request: import("./ResourceInterface").SubscriptionRequest): Promise<{
@@ -127,13 +127,13 @@ export declare function table({ table: table_name, database: database_name, expi
127
127
  removeAllListeners(eventName?: string | symbol): any;
128
128
  setMaxListeners(n: number): any;
129
129
  getMaxListeners(): number;
130
- listeners<K>(eventName: string | symbol): Array<Function>;
131
- rawListeners<K>(eventName: string | symbol): Array<Function>;
130
+ listeners<K>(eventName: string | symbol): Function[];
131
+ rawListeners<K>(eventName: string | symbol): Function[];
132
132
  emit<K>(eventName: string | symbol, ...args: any[]): boolean;
133
133
  listenerCount<K>(eventName: string | symbol, listener?: Function): number;
134
134
  prependListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
135
135
  prependOnceListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
136
- eventNames(): Array<(string | symbol) & (string | symbol)>;
136
+ eventNames(): (string | symbol)[];
137
137
  }>;
138
138
  doesExist(): boolean;
139
139
  publish(message: any, options?: any): void;
@@ -144,7 +144,7 @@ export declare function table({ table: table_name, database: database_name, expi
144
144
  post(new_record: any): any;
145
145
  connect(query?: {}): AsyncIterable<any>;
146
146
  getId(): any;
147
- getContext(): any;
147
+ getContext(): import("./ResourceInterface").Context;
148
148
  };
149
149
  name: any;
150
150
  primaryStore: any;
@@ -181,7 +181,7 @@ export declare function table({ table: table_name, database: database_name, expi
181
181
  put(record: any): void;
182
182
  patch(record_update: any): void;
183
183
  _writeUpdate(record_update: any, full_update: boolean, options?: any): void;
184
- delete(request: import("./ResourceInterface").Request): Promise<boolean>;
184
+ delete(request?: import("./ResourceInterface").Query | string): Promise<boolean>;
185
185
  _writeDelete(options?: any): boolean;
186
186
  search(request: import("./ResourceInterface").Query): AsyncIterable<any>;
187
187
  subscribe(request: import("./ResourceInterface").SubscriptionRequest): Promise<{
@@ -221,13 +221,13 @@ export declare function table({ table: table_name, database: database_name, expi
221
221
  removeAllListeners(eventName?: string | symbol): any;
222
222
  setMaxListeners(n: number): any;
223
223
  getMaxListeners(): number;
224
- listeners<K>(eventName: string | symbol): Array<Function>;
225
- rawListeners<K>(eventName: string | symbol): Array<Function>;
224
+ listeners<K>(eventName: string | symbol): Function[];
225
+ rawListeners<K>(eventName: string | symbol): Function[];
226
226
  emit<K>(eventName: string | symbol, ...args: any[]): boolean;
227
227
  listenerCount<K>(eventName: string | symbol, listener?: Function): number;
228
228
  prependListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
229
229
  prependOnceListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
230
- eventNames(): Array<(string | symbol) & (string | symbol)>;
230
+ eventNames(): (string | symbol)[];
231
231
  }>;
232
232
  doesExist(): boolean;
233
233
  publish(message: any, options?: any): void;
@@ -238,7 +238,7 @@ export declare function table({ table: table_name, database: database_name, expi
238
238
  post(new_record: any): any;
239
239
  connect(query?: {}): AsyncIterable<any>;
240
240
  getId(): any;
241
- getContext(): any;
241
+ getContext(): import("./ResourceInterface").Context;
242
242
  }> | {
243
243
  ensureLoaded(): any;
244
244
  get(query?: import("./ResourceInterface").Query | string): Promise<object | void> | object | void;
@@ -255,7 +255,7 @@ export declare function table({ table: table_name, database: database_name, expi
255
255
  put(record: any): void;
256
256
  patch(record_update: any): void;
257
257
  _writeUpdate(record_update: any, full_update: boolean, options?: any): void;
258
- delete(request: import("./ResourceInterface").Request): Promise<boolean>;
258
+ delete(request?: import("./ResourceInterface").Query | string): Promise<boolean>;
259
259
  _writeDelete(options?: any): boolean;
260
260
  search(request: import("./ResourceInterface").Query): AsyncIterable<any>;
261
261
  subscribe(request: import("./ResourceInterface").SubscriptionRequest): Promise<{
@@ -295,13 +295,13 @@ export declare function table({ table: table_name, database: database_name, expi
295
295
  removeAllListeners(eventName?: string | symbol): any;
296
296
  setMaxListeners(n: number): any;
297
297
  getMaxListeners(): number;
298
- listeners<K>(eventName: string | symbol): Array<Function>;
299
- rawListeners<K>(eventName: string | symbol): Array<Function>;
298
+ listeners<K>(eventName: string | symbol): Function[];
299
+ rawListeners<K>(eventName: string | symbol): Function[];
300
300
  emit<K>(eventName: string | symbol, ...args: any[]): boolean;
301
301
  listenerCount<K>(eventName: string | symbol, listener?: Function): number;
302
302
  prependListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
303
303
  prependOnceListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
304
- eventNames(): Array<(string | symbol) & (string | symbol)>;
304
+ eventNames(): (string | symbol)[];
305
305
  }>;
306
306
  doesExist(): boolean;
307
307
  publish(message: any, options?: any): void;
@@ -312,7 +312,7 @@ export declare function table({ table: table_name, database: database_name, expi
312
312
  post(new_record: any): any;
313
313
  connect(query?: {}): AsyncIterable<any>;
314
314
  getId(): any;
315
- getContext(): any;
315
+ getContext(): import("./ResourceInterface").Context;
316
316
  };
317
317
  setTTLExpiration(expiration: number | {
318
318
  expiration: number;
@@ -350,8 +350,7 @@ export declare function table({ table: table_name, database: database_name, expi
350
350
  transactions: import("./DatabaseTransaction").Transaction[] & {
351
351
  timestamp: number;
352
352
  };
353
- get(identifier: import("./ResourceInterface").Id, context?: import("./ResourceInterface").Context): Promise<object>;
354
- get(request: import("./ResourceInterface").Request, context?: import("./ResourceInterface").Context): Promise<object>;
353
+ get(identifier: import("./ResourceInterface").Id, context?: import("./ResourceInterface").Context): Promise<import("./Resource").Resource>;
355
354
  get(query: import("./ResourceInterface").Query, context?: import("./ResourceInterface").Context): Promise<AsyncIterable<object>>;
356
355
  put: {
357
356
  (id_or_query: string | import("./ResourceInterface").Id, data_or_context?: any, context?: import("./ResourceInterface").Context): any;
@@ -362,7 +361,7 @@ export declare function table({ table: table_name, database: database_name, expi
362
361
  reliesOnPrototype: boolean;
363
362
  };
364
363
  delete(identifier: import("./ResourceInterface").Id, context?: import("./ResourceInterface").Context): Promise<boolean>;
365
- delete(request: import("./ResourceInterface").Request, context?: import("./ResourceInterface").Context): Promise<object>;
364
+ delete(request: import("./ResourceInterface").Context, context?: import("./ResourceInterface").Context): Promise<object>;
366
365
  getNewId(): `${string}-${string}-${string}-${string}-${string}`;
367
366
  create(id_prefix: import("./ResourceInterface").Id, record: any, context: import("./ResourceInterface").Context): Promise<import("./ResourceInterface").Id>;
368
367
  create(record: any, context: import("./ResourceInterface").Context): Promise<import("./ResourceInterface").Id>;