@nacre.work/api 0.0.0 → 0.2.0

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 (69) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +9 -0
  3. package/dist/adapters.d.ts +421 -17
  4. package/dist/adapters.d.ts.map +1 -1
  5. package/dist/adapters.js +1092 -72
  6. package/dist/adapters.js.map +1 -1
  7. package/dist/audit-export.d.ts +45 -0
  8. package/dist/audit-export.d.ts.map +1 -0
  9. package/dist/audit-export.js +155 -0
  10. package/dist/audit-export.js.map +1 -0
  11. package/dist/auth.d.ts +17 -0
  12. package/dist/auth.d.ts.map +1 -1
  13. package/dist/auth.js +17 -7
  14. package/dist/auth.js.map +1 -1
  15. package/dist/idempotency.d.ts +62 -0
  16. package/dist/idempotency.d.ts.map +1 -0
  17. package/dist/idempotency.js +147 -0
  18. package/dist/idempotency.js.map +1 -0
  19. package/dist/index.d.ts +12 -3
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +10 -1
  22. package/dist/index.js.map +1 -1
  23. package/dist/init.d.ts +9 -0
  24. package/dist/init.d.ts.map +1 -1
  25. package/dist/init.js +50 -5
  26. package/dist/init.js.map +1 -1
  27. package/dist/limits.d.ts +80 -0
  28. package/dist/limits.d.ts.map +1 -0
  29. package/dist/limits.js +63 -0
  30. package/dist/limits.js.map +1 -0
  31. package/dist/login.d.ts +94 -0
  32. package/dist/login.d.ts.map +1 -0
  33. package/dist/login.js +283 -0
  34. package/dist/login.js.map +1 -0
  35. package/dist/main.js +171 -60
  36. package/dist/main.js.map +1 -1
  37. package/dist/pagination.d.ts +72 -0
  38. package/dist/pagination.d.ts.map +1 -0
  39. package/dist/pagination.js +110 -0
  40. package/dist/pagination.js.map +1 -0
  41. package/dist/rerank.d.ts +99 -0
  42. package/dist/rerank.d.ts.map +1 -0
  43. package/dist/rerank.js +138 -0
  44. package/dist/rerank.js.map +1 -0
  45. package/dist/server.d.ts +361 -6
  46. package/dist/server.d.ts.map +1 -1
  47. package/dist/server.js +1050 -31
  48. package/dist/server.js.map +1 -1
  49. package/dist/service-keys.d.ts +13 -5
  50. package/dist/service-keys.d.ts.map +1 -1
  51. package/dist/service-keys.js +54 -31
  52. package/dist/service-keys.js.map +1 -1
  53. package/dist/source.d.ts +53 -0
  54. package/dist/source.d.ts.map +1 -0
  55. package/dist/source.js +109 -0
  56. package/dist/source.js.map +1 -0
  57. package/package.json +28 -10
  58. package/dist/__tests__/admin-surface.test.d.ts +0 -2
  59. package/dist/__tests__/admin-surface.test.d.ts.map +0 -1
  60. package/dist/__tests__/admin-surface.test.js +0 -431
  61. package/dist/__tests__/admin-surface.test.js.map +0 -1
  62. package/dist/__tests__/init.test.d.ts +0 -2
  63. package/dist/__tests__/init.test.d.ts.map +0 -1
  64. package/dist/__tests__/init.test.js +0 -125
  65. package/dist/__tests__/init.test.js.map +0 -1
  66. package/dist/__tests__/service-keys.test.d.ts +0 -2
  67. package/dist/__tests__/service-keys.test.d.ts.map +0 -1
  68. package/dist/__tests__/service-keys.test.js +0 -204
  69. package/dist/__tests__/service-keys.test.js.map +0 -1
package/dist/server.d.ts CHANGED
@@ -1,5 +1,11 @@
1
1
  import { type Server } from 'node:http';
2
+ import { type Metadata, type ProtectedResourceMetadata } from '@nacre.work/core';
2
3
  import { type AuthContext, type VerifyOptions } from './auth.js';
4
+ import { type IdempotencyStore } from './idempotency.js';
5
+ import { type LimitPolicy, type RateLimiter, type Resource } from './limits.js';
6
+ import type { Login } from './login.js';
7
+ import { type Page, type PageResult } from './pagination.js';
8
+ export type { Page, PageResult };
3
9
  /**
4
10
  * What the API needs from the rest of the system, as ports.
5
11
  *
@@ -27,6 +33,18 @@ export interface Documents {
27
33
  * grant had been revoked, and a service account with `write` and no `read`.
28
34
  */
29
35
  read(auth: AuthContext, documentId: string): Promise<DocumentView | undefined>;
36
+ /**
37
+ * Replace a document's metadata, leaving its vectors alone.
38
+ *
39
+ * `false` for every reason the write cannot happen — absent, another
40
+ * organization's, denied, or a caller with no `write` reaching it. Same rule
41
+ * as `read`: one answer for all of them, or the 403/404 distinction leaks
42
+ * through whatever the caller does with it.
43
+ *
44
+ * Absent from an implementation means the path answers `404`, like any other
45
+ * capability a surface does not have.
46
+ */
47
+ updateMetadata?(auth: AuthContext, documentId: string, metadata: Metadata): Promise<boolean>;
30
48
  }
31
49
  /**
32
50
  * A document, as a caller sees it.
@@ -48,6 +66,19 @@ export interface DocumentView {
48
66
  readonly status: string;
49
67
  readonly chunk_count: number;
50
68
  readonly updated_at: string;
69
+ /** What the caller tagged it with, and what `filters` reads back. */
70
+ readonly metadata: Metadata;
71
+ /**
72
+ * A presigned link to the original bytes, where a deployment stores them in
73
+ * object storage. Absent otherwise, and absent for a document whose source is
74
+ * inline or a URL.
75
+ *
76
+ * It is a bearer capability with a life of `NACRE_PRESIGN_TTL`: whoever holds
77
+ * it can fetch that object without a Nacre credential, and a revocation
78
+ * inside the window does not reach it. That is what presigning is; the
79
+ * lifetime is how long a deployment is willing for it to be true.
80
+ */
81
+ readonly source_url?: string;
51
82
  }
52
83
  /**
53
84
  * One result, as the contract describes it.
@@ -71,8 +102,43 @@ export interface SearchHit {
71
102
  readonly score: number;
72
103
  readonly text: string;
73
104
  }
105
+ /**
106
+ * What a caller may ask of a search beyond the query itself.
107
+ *
108
+ * `rerank` can only ever turn reranking **off**. A deployment without a
109
+ * reranker configured does not grow one because a client asked for it, so this
110
+ * is a preference and not a switch — which is the right way round: the client
111
+ * knows whether it wants latency or quality, the operator knows whether the
112
+ * model server exists.
113
+ */
114
+ export interface SearchOptions {
115
+ readonly rerank?: boolean;
116
+ /**
117
+ * Layer slugs to restrict the search to. Narrowing only — a layer the caller
118
+ * cannot read contributes nothing whether or not they name it, and naming one
119
+ * that does not exist is the same answer as naming one they cannot see.
120
+ */
121
+ readonly layers?: readonly string[];
122
+ /**
123
+ * Document metadata to restrict to, key to value. Narrowing only.
124
+ *
125
+ * Equality, and a list means "any of these". Never a negation, a range or a
126
+ * disjunction across keys — each of those is a way to widen if it is ever
127
+ * composed wrongly, and none is needed to answer "only documents from this
128
+ * source". Validated before it gets here.
129
+ */
130
+ readonly filters?: Metadata;
131
+ /**
132
+ * `false` omits the chunk text from every hit.
133
+ *
134
+ * For a client that wants ids and scores — a reranking front end, a citation
135
+ * index — and does not want to pay for the bodies. Applied after reranking,
136
+ * because a reranker scores the query against the text.
137
+ */
138
+ readonly includeContent?: boolean;
139
+ }
74
140
  export interface SearchService {
75
- search(auth: AuthContext, query: string, topK: number): Promise<readonly SearchHit[]>;
141
+ search(auth: AuthContext, query: string, topK: number, options?: SearchOptions): Promise<readonly SearchHit[]>;
76
142
  }
77
143
  export interface IngestRequest {
78
144
  readonly layer: string;
@@ -80,6 +146,8 @@ export interface IngestRequest {
80
146
  readonly title?: string;
81
147
  readonly content?: string;
82
148
  readonly url?: string;
149
+ /** Validated before it gets here. `{}` when the caller sent none. */
150
+ readonly metadata: Metadata;
83
151
  }
84
152
  export interface IngestOutcome {
85
153
  readonly documentId: string;
@@ -120,6 +188,8 @@ export interface Layer {
120
188
  readonly slug: string;
121
189
  readonly name: string;
122
190
  readonly workspaceId: string;
191
+ /** The cursor's sort key. Not serialized; it exists so paging is stable. */
192
+ readonly createdAt: string;
123
193
  readonly description: string;
124
194
  /**
125
195
  * Live documents in the layer.
@@ -147,6 +217,37 @@ export interface Layer {
147
217
  * discloses exactly one bit, that the slug is taken somewhere in their own
148
218
  * organization, and slugs are organization-unique by design (migration 0006).
149
219
  */
220
+ /** A workspace, as a caller sees it. */
221
+ export interface Workspace {
222
+ readonly id: string;
223
+ readonly slug: string;
224
+ readonly name: string;
225
+ /**
226
+ * Live layers in it — not "layers this caller may read".
227
+ *
228
+ * The same choice the layer listing makes for its document count: a count
229
+ * that varied by who asked would leak the shape of somebody else's grants,
230
+ * and a caller comparing two of them could infer what they cannot see.
231
+ */
232
+ readonly layerCount: number;
233
+ readonly createdAt: string;
234
+ }
235
+ export type WorkspaceOutcome = {
236
+ readonly kind: 'created';
237
+ readonly workspace: Workspace;
238
+ } | {
239
+ readonly kind: 'denied';
240
+ } | {
241
+ readonly kind: 'conflict';
242
+ };
243
+ export interface Workspaces {
244
+ /** Only the workspaces this caller can reach. The plan decides, not the caller. */
245
+ list(auth: AuthContext, page?: Page): Promise<PageResult<Workspace>>;
246
+ create(auth: AuthContext, input: {
247
+ slug: string;
248
+ name: string;
249
+ }): Promise<WorkspaceOutcome>;
250
+ }
150
251
  export type LayerOutcome = {
151
252
  readonly kind: 'created';
152
253
  readonly layer: Layer;
@@ -154,15 +255,56 @@ export type LayerOutcome = {
154
255
  readonly kind: 'denied';
155
256
  } | {
156
257
  readonly kind: 'conflict';
258
+ }
259
+ /**
260
+ * The named provider is not one this organization may use, or the
261
+ * organization runs more than one and the caller named none.
262
+ *
263
+ * 400 rather than 404: the caller has already proved admin on the workspace,
264
+ * so this is a statement about their request. Same reasoning as the reindex
265
+ * path's `unknown_provider`, and a provider is installation configuration
266
+ * rather than a tenant object with visibility rules of its own.
267
+ */
268
+ | {
269
+ readonly kind: 'provider';
270
+ readonly detail: string;
157
271
  };
158
272
  export interface Layers {
159
- /** Only the layers this caller may read. The plan decides, not the caller. */
160
- list(auth: AuthContext): Promise<readonly Layer[]>;
273
+ /**
274
+ * Only the layers this caller may read. The plan decides, not the caller.
275
+ *
276
+ * Takes the page rather than returning everything for the handler to slice:
277
+ * slicing after the fact is the same mistake as a post-filter, one layer up —
278
+ * the database reads rows nobody will see, and the cost grows with the
279
+ * collection rather than with the page.
280
+ */
281
+ list(auth: AuthContext, page?: Page): Promise<PageResult<Layer>>;
161
282
  create(auth: AuthContext, input: {
162
283
  workspaceId: string;
163
284
  slug: string;
164
285
  name: string;
286
+ providerId?: string;
165
287
  }): Promise<LayerOutcome>;
288
+ /**
289
+ * Rename a layer, or change its description.
290
+ *
291
+ * Deliberately not the slug: clients address a layer by slug — `layers` on
292
+ * search, `layer` on ingest — so renaming one silently breaks every caller
293
+ * that stored it, and there is no redirect to soften it.
294
+ *
295
+ * Deliberately not the provider or the chunk configuration either. Both
296
+ * decide how the layer's vectors were built, so changing one without
297
+ * rebuilding them leaves the column disagreeing with the index — which is
298
+ * what `POST /v1/layers/{id}/reindex` is, and it is not something to get by
299
+ * accident from a PATCH.
300
+ *
301
+ * `false` for absent, for another organization's, and for one this caller may
302
+ * not administer. One answer for all three.
303
+ */
304
+ update?(auth: AuthContext, layerId: string, input: {
305
+ name?: string;
306
+ description?: string;
307
+ }): Promise<boolean>;
166
308
  }
167
309
  export interface GrantInput {
168
310
  readonly principalType: 'user' | 'group' | 'service_account';
@@ -178,7 +320,7 @@ export interface GrantRecord extends GrantInput {
178
320
  }
179
321
  export interface Grants {
180
322
  /** Grants in the caller's organization. Admin only; the caller is checked above. */
181
- list(auth: AuthContext): Promise<readonly GrantRecord[]>;
323
+ list(auth: AuthContext, page?: Page): Promise<PageResult<GrantRecord>>;
182
324
  /** `undefined` when the caller may not administer the scope, or it does not exist. */
183
325
  issue(auth: AuthContext, input: GrantInput): Promise<GrantRecord | undefined>;
184
326
  /**
@@ -201,11 +343,12 @@ export interface ServiceAccountView {
201
343
  readonly revokedAt: string | null;
202
344
  }
203
345
  export interface ServiceAccountPort {
204
- list(auth: AuthContext): Promise<readonly ServiceAccountView[]>;
346
+ list(auth: AuthContext, page?: Page): Promise<PageResult<ServiceAccountView>>;
347
+ /** `undefined` when the name is already taken in this organization. */
205
348
  create(auth: AuthContext, name: string): Promise<{
206
349
  account: ServiceAccountView;
207
350
  key: string;
208
- }>;
351
+ } | undefined>;
209
352
  revoke(auth: AuthContext, id: string): Promise<boolean>;
210
353
  }
211
354
  export interface AuditEvent {
@@ -215,17 +358,222 @@ export interface AuditEvent {
215
358
  readonly result: 'allow' | 'deny' | 'error';
216
359
  readonly detail: Record<string, unknown>;
217
360
  readonly requestId: string;
361
+ /**
362
+ * Which surface the call came in on.
363
+ *
364
+ * Was hardcoded `'api'` in the adapter, and the MCP server shares that sink —
365
+ * so every agent's read was logged as though a human had made it over REST.
366
+ * The column existed, the schema declared the enum, and nothing could tell
367
+ * the two apart. Defaults to `api` so an omission is the common case rather
368
+ * than a lie.
369
+ */
370
+ readonly surface?: 'api' | 'mcp' | 'admin' | 'system';
371
+ /**
372
+ * What the call was about, as `docs/audit.md` specifies it.
373
+ *
374
+ * Was hardcoded `'{}'::jsonb`, so the `gin (target)` index built for it
375
+ * indexed nothing and the document's opening promise — "show me which
376
+ * documents your agent read last quarter" — could not be answered at all.
377
+ * Search fills in the layers and the ids it returned; the rest name what they
378
+ * touched.
379
+ */
380
+ readonly target?: Record<string, unknown>;
381
+ }
382
+ /**
383
+ * The counters and histograms the request path fills in.
384
+ *
385
+ * Deliberately a narrow port rather than the whole `Metrics` object: the server
386
+ * should not be able to reach the gauges that a background collector owns, and
387
+ * a test should not need a registry to check that a denial was counted.
388
+ */
389
+ export interface RequestMetrics {
390
+ searchDuration: {
391
+ observe(seconds: number, labels?: Record<string, string>): void;
392
+ };
393
+ searchResults: {
394
+ inc(labels?: Record<string, string>, by?: number): void;
395
+ };
396
+ aclDenials: {
397
+ inc(labels?: Record<string, string>, by?: number): void;
398
+ };
399
+ ingestDuration: {
400
+ observe(seconds: number, labels?: Record<string, string>): void;
401
+ };
402
+ authFailures: {
403
+ inc(labels?: Record<string, string>, by?: number): void;
404
+ };
218
405
  }
219
406
  export interface AuditSink {
220
407
  /** Awaited before the response goes out. A lost event is worse than a slow response. */
221
408
  write(event: AuditEvent): Promise<void>;
222
409
  }
410
+ /**
411
+ * One event as it is read back, which is not the shape it was written in.
412
+ *
413
+ * `AuditEvent` is what a handler hands to the sink; this is what the table
414
+ * holds — an id, a timestamp, and the actor split into the three columns
415
+ * `docs/audit.md` specifies rather than the single label the writer supplies.
416
+ */
417
+ export interface AuditRecord {
418
+ readonly id: string;
419
+ readonly occurredAt: string;
420
+ readonly actorType: string;
421
+ readonly actorId: string | null;
422
+ readonly actorLabel: string;
423
+ readonly action: string;
424
+ readonly surface: string;
425
+ readonly client: string | null;
426
+ readonly target: Record<string, unknown>;
427
+ readonly result: string;
428
+ readonly detail: Record<string, unknown>;
429
+ readonly requestId: string | null;
430
+ }
431
+ /**
432
+ * What a caller may narrow the log to.
433
+ *
434
+ * Every one of these is applied. That is worth stating because the last three
435
+ * search parameters in this contract were declared and ignored, and an audit
436
+ * filter that silently does nothing is worse than a search filter that does:
437
+ * the person running it is answering a compliance question and will believe the
438
+ * answer.
439
+ */
440
+ export interface AuditQuery {
441
+ /** Inclusive lower bound on `occurred_at`, as an ISO timestamp. */
442
+ readonly from?: string;
443
+ /** Exclusive upper bound on `occurred_at`. */
444
+ readonly to?: string;
445
+ readonly actorId?: string;
446
+ readonly action?: string;
447
+ readonly result?: 'allow' | 'deny' | 'error';
448
+ /**
449
+ * Restrict to administrative actions — everything that is not a substantive
450
+ * access to a document's contents.
451
+ *
452
+ * Not a caller-supplied filter. It is set by the handler for a
453
+ * `platform_admin`, because `docs/audit.md` gives that role administrative
454
+ * visibility and explicitly withholds records of document access. Keeping it
455
+ * in this type rather than in the SQL means the rule is stated once, at the
456
+ * boundary, where it can be read next to the role check that sets it.
457
+ */
458
+ readonly administrativeOnly?: boolean;
459
+ }
460
+ /**
461
+ * Moving a layer onto a different embedding model.
462
+ *
463
+ * Two operations and no more: start one, and ask how it is going. There is no
464
+ * cancel, and that is a decision rather than an omission — a half-written
465
+ * shadow vector is harmless (nothing reads it until the switch) and a cancel
466
+ * that has to decide whether to unwind it is a second, more dangerous path.
467
+ * Starting a reindex back onto the current model is how you undo one.
468
+ */
469
+ export interface Reindex {
470
+ /**
471
+ * `undefined` for a layer the caller may not administer **and** for one that
472
+ * does not exist — the usual rule. `conflict` when a reindex is already
473
+ * running: that is not a permission answer, and the caller has already proved
474
+ * they can administer the layer by the time it can happen.
475
+ */
476
+ start(auth: AuthContext, layerId: string, providerId: string): Promise<ReindexOutcome | undefined>;
477
+ status(auth: AuthContext, layerId: string): Promise<ReindexStatus | undefined>;
478
+ }
479
+ export type ReindexOutcome = {
480
+ readonly kind: 'started';
481
+ readonly status: ReindexStatus;
482
+ } | {
483
+ readonly kind: 'conflict';
484
+ readonly status: ReindexStatus;
485
+ } | {
486
+ readonly kind: 'unknown_provider';
487
+ }
488
+ /** The provider names the vector the layer already uses. */
489
+ | {
490
+ readonly kind: 'already_current';
491
+ readonly vectorName: string;
492
+ };
493
+ export interface ReindexStatus {
494
+ readonly layerId: string;
495
+ readonly status: 'running' | 'complete' | 'failed';
496
+ /**
497
+ * `copying` while the organization's collection is being rebuilt with room
498
+ * for the new model — org-wide, no embeddings computed. `embedding` while
499
+ * this layer's chunks are being embedded into that room.
500
+ */
501
+ readonly phase: 'copying' | 'embedding';
502
+ readonly shadowVector: string;
503
+ readonly currentVector: string;
504
+ readonly providerId: string;
505
+ readonly startedAt: string;
506
+ readonly finishedAt: string | null;
507
+ readonly total: number;
508
+ readonly done: number;
509
+ readonly failed: number;
510
+ readonly progress: number;
511
+ readonly error: string | null;
512
+ }
513
+ export interface AuditReader {
514
+ read(auth: AuthContext, query: AuditQuery, page: Page): Promise<PageResult<AuditRecord>>;
515
+ }
223
516
  export interface ApiOptions {
224
517
  readonly verify: VerifyOptions;
225
518
  /** Rendered at /metrics. Absent means the endpoint answers 404. */
226
519
  readonly metrics?: {
227
520
  render(): Promise<string>;
228
521
  };
522
+ /**
523
+ * Where the request path writes what it measured.
524
+ *
525
+ * Four of these were registered and never written: `/metrics` served
526
+ * `nacre_search_results_total 0` and `nacre_acl_denials_total 0` forever, and
527
+ * the two histograms rendered nothing at all. A series pinned at zero reads
528
+ * as health, so the p95 target `docs/config.md` sets was not merely unmet —
529
+ * it was unmeasurable, and looked fine.
530
+ */
531
+ readonly observe?: RequestMetrics;
532
+ /**
533
+ * Answered at `/v1/ready`. Absent means the endpoint answers 404.
534
+ *
535
+ * One boolean per dependency, and never an error string: this endpoint is
536
+ * unauthenticated, so what it says about the inside of the deployment is what
537
+ * anyone who can reach the port learns.
538
+ */
539
+ readonly ready?: () => Promise<Record<string, boolean>>;
540
+ /**
541
+ * Per-organization rate limiting. Absent means unlimited, which is the right
542
+ * default for a surface being tested and the wrong one for a deployment —
543
+ * `main.ts` always provides it.
544
+ */
545
+ readonly limits?: RateLimiter;
546
+ readonly limitPolicies?: Readonly<Record<Resource, LimitPolicy>>;
547
+ /**
548
+ * How many proxies sit in front of this process, for the per-client login
549
+ * limit. Absent or 0 means `X-Forwarded-For` is ignored and the socket
550
+ * address is the client — see `source.ts` for why neither default is safe.
551
+ */
552
+ readonly trustProxy?: number;
553
+ /**
554
+ * A bearer token required on `/metrics`. Absent leaves the endpoint open,
555
+ * which is the default and is right for an internal port — see the handler.
556
+ */
557
+ readonly metricsToken?: string;
558
+ /**
559
+ * The RFC 9728 document served at `/.well-known/oauth-protected-resource`.
560
+ *
561
+ * Passed in rather than built here so the API and the MCP transport serve
562
+ * byte-identical bytes: two builders would drift, and a client that read one
563
+ * and authenticated against the other would be audience-bound to a string
564
+ * neither agreed on.
565
+ */
566
+ readonly resourceMetadata?: ProtectedResourceMetadata;
567
+ /** Absent means the workspace paths answer 404, like any capability a surface lacks. */
568
+ readonly workspaces?: Workspaces;
569
+ /** Layer reindex. Absent means the reindex paths answer 404. */
570
+ readonly reindex?: Reindex;
571
+ /** Reads the access log back. Absent means `/v1/audit` answers 404. */
572
+ readonly auditReader?: AuditReader;
573
+ /** `Idempotency-Key` on unsafe methods. Absent means the header is ignored. */
574
+ readonly idempotency?: IdempotencyStore;
575
+ /** Email and password sign-in. Absent means `/v1/auth/*` is 404. */
576
+ readonly login?: Login;
229
577
  readonly documents: Documents;
230
578
  readonly search: SearchService;
231
579
  readonly ingest: Ingest;
@@ -234,6 +582,13 @@ export interface ApiOptions {
234
582
  readonly layers?: Layers;
235
583
  readonly grants?: Grants;
236
584
  readonly serviceAccounts?: ServiceAccountPort;
585
+ /** `NACRE_MAX_DOCUMENT_BYTES`. Over it is `413`, not `400`. */
586
+ readonly maxBodyBytes?: number;
587
+ /**
588
+ * `NACRE_AUDIT_QUERY_TEXT`. Absent is the default and means the journal keeps
589
+ * the hash of a query and not the query.
590
+ */
591
+ readonly auditQueryText?: boolean;
237
592
  }
238
593
  export declare function createApi(options: ApiOptions): Server;
239
594
  //# sourceMappingURL=server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,MAAM,EAAuB,MAAM,WAAW,CAAA;AAMhG,OAAO,EAAsC,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,WAAW,CAAA;AAGpG;;;;;;;;GAQG;AACH,MAAM,WAAW,SAAS;IACxB;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAA;CAC/E;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAA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