@nivaro/sdk 0.2.7 → 0.3.1

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 (4) hide show
  1. package/README.md +286 -195
  2. package/dist/index.d.ts +1509 -93
  3. package/dist/index.js +791 -120
  4. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -5,6 +5,8 @@ interface Command<TResult> {
5
5
  readonly _body?: unknown;
6
6
  /** Cancels the request when it aborts (never serialized; see withSignal). */
7
7
  readonly _signal?: AbortSignal;
8
+ /** Headers for this call only (see withHeaders); the client's own auth and content type win. */
9
+ readonly _headers?: Record<string, string>;
8
10
  readonly _phantom?: TResult;
9
11
  }
10
12
  /**
@@ -13,6 +15,12 @@ interface Command<TResult> {
13
15
  * server then drops it from its read queue). Without a signal the command is returned as is.
14
16
  */
15
17
  declare function withSignal<T>(command: Command<T>, signal: AbortSignal | null | undefined): Command<T>;
18
+ /**
19
+ * The same command, sent with `headers` on this one call — e.g. the requirements dialog naming
20
+ * the move it saves values for — without changing the headers of every other call. The client's
21
+ * own `Authorization` / `Content-Type` win. Without headers the command is returned as is.
22
+ */
23
+ declare function withHeaders<T>(command: Command<T>, headers: Record<string, string> | null | undefined): Command<T>;
16
24
 
17
25
  /**
18
26
  * Administration commands: roles & policies (RBAC/RLS), user management +
@@ -2572,6 +2580,21 @@ interface NotificationItem {
2572
2580
  category?: string | null;
2573
2581
  /** Per-channel delivery outcome (in-app / push / email / sms). */
2574
2582
  delivery?: Record<string, unknown> | null;
2583
+ archived?: boolean;
2584
+ /** Set when the sender asked for an explicit acknowledgement. */
2585
+ ack?: {
2586
+ required: true;
2587
+ at: ISODate | null;
2588
+ by: string | null;
2589
+ } | null;
2590
+ sender?: UUID | null;
2591
+ sender_name?: string | null;
2592
+ snoozed_until?: ISODate | null;
2593
+ snooze_until_change?: boolean;
2594
+ /** The record's revision current when the notification was written. */
2595
+ revision_id?: number | null;
2596
+ /** Where opening it leads, for the app named by `app` (else the recipient's). */
2597
+ url?: string | null;
2575
2598
  }
2576
2599
  interface NotificationPage {
2577
2600
  data: NotificationItem[];
@@ -2589,6 +2612,8 @@ interface NotificationPage {
2589
2612
  ids: number[];
2590
2613
  rows: NotificationItem[];
2591
2614
  }>;
2615
+ /** Page 1: acknowledgement-required rows, pinned whatever the filter. */
2616
+ pinned?: NotificationItem[];
2592
2617
  total: number;
2593
2618
  page: number;
2594
2619
  limit: number;
@@ -2598,7 +2623,17 @@ interface NotificationPage {
2598
2623
  declare function listNotifications(query?: {
2599
2624
  page?: number;
2600
2625
  limit?: number;
2601
- status?: 'all' | 'inbox' | 'read';
2626
+ /** 'archived' lists only archived rows (they are left out of every other view). */
2627
+ status?: 'all' | 'inbox' | 'read' | 'archived';
2628
+ /** Unread only (same as `status: 'inbox'`). */
2629
+ unread?: boolean;
2630
+ /** Contains-match on subject or message. */
2631
+ search?: string;
2632
+ collection?: string;
2633
+ /** A sender's user id. */
2634
+ sender?: string;
2635
+ /** true = only the snoozed (sleeping) rows. */
2636
+ snoozed?: boolean;
2602
2637
  app?: string;
2603
2638
  /** 'critical' | 'needs_you' | 'fyi' | 'attention' (= critical + needs_you). */
2604
2639
  lane?: string;
@@ -3028,9 +3063,24 @@ declare function updateChatChannel(id: number, body: Partial<{
3028
3063
  }>): Command<{
3029
3064
  data: ChatChannel;
3030
3065
  }>;
3031
- /** Members of a channel (visible to anyone who can see the room). */
3032
- declare function listChatChannelMembers(id: number): Command<{
3033
- data: ChatChannelMember[];
3066
+ /**
3067
+ * Members of a channel (visible to anyone who can see the room). With no
3068
+ * options the full list comes back (old shape). Pass `limit` (default 50, max
3069
+ * 200), `offset` and/or `q` (name, @handle, email local part) to get one page,
3070
+ * online people first, plus `total` and `has_more`.
3071
+ */
3072
+ declare function listChatChannelMembers(id: number, opts?: {
3073
+ limit?: number;
3074
+ offset?: number;
3075
+ q?: string;
3076
+ }): Command<{
3077
+ data: Array<ChatChannelMember & {
3078
+ name?: string;
3079
+ title?: string | null;
3080
+ online?: boolean;
3081
+ }>;
3082
+ total?: number;
3083
+ has_more?: boolean;
3034
3084
  }>;
3035
3085
  /** Add someone to a channel (owner or admin). */
3036
3086
  declare function addChatChannelMember(id: number, userId: string): Command<{
@@ -4003,6 +4053,58 @@ declare function readDashboard(id: UUID): Command<{
4003
4053
  declare function readDashboardWidgetData(widgetId: UUID, filters?: DashboardFilter[] | null): Command<{
4004
4054
  data: DashboardWidgetData | null;
4005
4055
  }>;
4056
+ /**
4057
+ * Create a dashboard owned by the caller. A `role_id` shares it with that role (and forces
4058
+ * `is_shared`).
4059
+ */
4060
+ declare function createDashboard(body: {
4061
+ name: string;
4062
+ is_shared?: boolean;
4063
+ role_id?: UUID | null;
4064
+ }): Command<{
4065
+ data: Dashboard;
4066
+ }>;
4067
+ /** Rename, share or set the saved filter bar of a dashboard (its owner or an admin). */
4068
+ declare function updateDashboard(id: UUID, body: {
4069
+ name?: string;
4070
+ is_shared?: boolean;
4071
+ role_id?: UUID | null;
4072
+ /** Up to 20 filters; an empty list clears the bar. */
4073
+ global_filters?: DashboardFilter[] | null;
4074
+ }): Command<{
4075
+ data: Dashboard;
4076
+ }>;
4077
+ /** Delete a dashboard and its widgets (its owner or an admin). */
4078
+ declare function deleteDashboard(id: UUID): Command<void>;
4079
+ /** A widget's settings on create / update. Grid units: `col`/`row` position, `width`/`height`. */
4080
+ interface DashboardWidgetInput {
4081
+ /**
4082
+ * count | sum | avg | latest | bar_chart | line_chart | report_preset | saved_view |
4083
+ * cumulative_flow | ai_query.
4084
+ */
4085
+ type: DashboardWidgetType;
4086
+ title: string;
4087
+ collection?: string | null;
4088
+ /** The summed/averaged field, the `latest` column list, a saved view or preset id. */
4089
+ field?: string | null;
4090
+ filters?: unknown;
4091
+ col?: number;
4092
+ row?: number;
4093
+ width?: number;
4094
+ height?: number;
4095
+ /** Refetch interval in seconds (10–86400); null = the page default. */
4096
+ refresh_seconds?: number | null;
4097
+ }
4098
+ /** Add a widget to a dashboard (its owner or an admin). */
4099
+ declare function createDashboardWidget(dashboardId: UUID, body: DashboardWidgetInput): Command<{
4100
+ data: DashboardWidget;
4101
+ }>;
4102
+ /** Change a widget (its dashboard's owner or an admin). */
4103
+ declare function updateDashboardWidget(widgetId: UUID, body: Partial<DashboardWidgetInput>): Command<{
4104
+ data: DashboardWidget;
4105
+ }>;
4106
+ /** Remove a widget (its dashboard's owner or an admin). */
4107
+ declare function deleteDashboardWidget(widgetId: UUID): Command<void>;
4006
4108
 
4007
4109
  /**
4008
4110
  * Layout editor commands: the bundle + atomic ops save model, the overview and
@@ -4381,7 +4483,7 @@ declare function readPickerExclusion(collection: string, itemId: string | number
4381
4483
  excluded: boolean;
4382
4484
  };
4383
4485
  }>;
4384
- /** Which of these ids are excluded from pickers? */
4486
+ /** Which of these ids are hidden from pickers? */
4385
4487
  declare function readPickerExclusions(collection: string, ids: Array<string | number>): Command<{
4386
4488
  data: {
4387
4489
  excluded: string[];
@@ -4524,6 +4626,27 @@ interface GlobalSearchRecord {
4524
4626
  id: string | number;
4525
4627
  label: string;
4526
4628
  snippet: string;
4629
+ display_name?: string | null;
4630
+ /** The field the match was found in — always one the caller may read. */
4631
+ matched_field?: string;
4632
+ matched_label?: string;
4633
+ /** Its value as the caller read it (≤80 characters). */
4634
+ matched_value?: string;
4635
+ exact?: boolean;
4636
+ score?: number;
4637
+ /** The caller created it, owns it, or opened it from search lately. */
4638
+ mine?: boolean;
4639
+ updated_at?: string;
4640
+ }
4641
+ interface GlobalSearchPerson {
4642
+ id: string;
4643
+ first_name: string | null;
4644
+ last_name: string | null;
4645
+ email: string | null;
4646
+ title: string | null;
4647
+ department: string | null;
4648
+ status?: string | null;
4649
+ account_kind?: string | null;
4527
4650
  }
4528
4651
  interface GlobalSearchResults {
4529
4652
  records: GlobalSearchRecord[];
@@ -4535,9 +4658,38 @@ interface GlobalSearchResults {
4535
4658
  label: string;
4536
4659
  path: string;
4537
4660
  }>;
4661
+ /** People matches (`@name` scopes to people only). */
4662
+ people?: GlobalSearchPerson[];
4663
+ /** Meaning-based matches when semantic search is on. */
4664
+ semantic?: Array<{
4665
+ collection: string;
4666
+ id: unknown;
4667
+ label: string;
4668
+ snippet: string;
4669
+ }>;
4670
+ /** An exact id / friendly-id hit. */
4671
+ exact?: GlobalSearchRecord | null;
4672
+ /** "Did you mean" rewordings. */
4673
+ suggestions?: string[];
4674
+ /** How the query was read: plain text, scope prefix and field filters. */
4675
+ query?: {
4676
+ text: string;
4677
+ scope: string | null;
4678
+ filters: unknown[];
4679
+ };
4680
+ /** Other kinds (comments, files, videos, docs, chat, config) — shape per kind. */
4681
+ extra?: unknown;
4682
+ /** Commands the client may offer (run only through their own routes, after a confirm). */
4683
+ commands?: unknown;
4538
4684
  }
4539
- /** Search records (permission-scoped), admin pages, and quick actions. */
4540
- declare function globalSearch(q: string): Command<{
4685
+ /**
4686
+ * Search records (permission-scoped), people, admin pages and quick actions. Understands
4687
+ * the query language (scope prefixes, field filters, exact ids). `labels: true` matches
4688
+ * only what each record's label shows.
4689
+ */
4690
+ declare function globalSearch(q: string, opts?: {
4691
+ labels?: boolean;
4692
+ }): Command<{
4541
4693
  data: GlobalSearchResults;
4542
4694
  }>;
4543
4695
  interface ApiKeyScope {
@@ -6035,6 +6187,8 @@ interface ImportTemplateSummary {
6035
6187
  match_by: string[];
6036
6188
  attachments: 'add' | 'replace';
6037
6189
  button_label?: string | null;
6190
+ /** State keys where non-admins see Re-import; empty/absent = any state. */
6191
+ states?: string[] | null;
6038
6192
  } | null;
6039
6193
  }
6040
6194
  interface ImportParseResponse {
@@ -6084,6 +6238,190 @@ declare const executeImportTemplate: (id: string, payload: {
6084
6238
  };
6085
6239
  }>;
6086
6240
 
6241
+ /**
6242
+ * The caller's inbox beyond the list: snooze, acknowledge, bulk actions, archive, per-record
6243
+ * mutes, what they sent; their reminders; and search helpers (saved searches, per-collection
6244
+ * match counts and pages). Everything here acts on the caller's own rows only.
6245
+ */
6246
+
6247
+ /**
6248
+ * Snooze a notification until a time (`until`, ISO, in the future), wake it (`until: null`),
6249
+ * or sleep it until the record it names next changes (`untilChange: true`).
6250
+ */
6251
+ declare function snoozeNotification(id: number, opts: {
6252
+ until?: string | null;
6253
+ untilChange?: boolean;
6254
+ }): Command<{
6255
+ data: {
6256
+ snoozed_until: ISODate | string | null;
6257
+ snooze_until_change?: boolean;
6258
+ };
6259
+ }>;
6260
+ /** Acknowledge a notification whose sender asked for an explicit acknowledgement. */
6261
+ declare function acknowledgeNotification(id: number): Command<{
6262
+ data: {
6263
+ id: number;
6264
+ ack: {
6265
+ required: true;
6266
+ at: ISODate;
6267
+ by: string;
6268
+ };
6269
+ };
6270
+ }>;
6271
+ /** The notification-center filter (the list's own) for "everything matching" actions. */
6272
+ interface NotificationFilter {
6273
+ status?: 'inbox' | 'read' | 'archived';
6274
+ unread?: boolean;
6275
+ search?: string;
6276
+ collection?: string;
6277
+ sender?: string;
6278
+ snoozed?: boolean;
6279
+ lane?: 'critical' | 'needs_you' | 'fyi' | 'attention';
6280
+ category?: string;
6281
+ }
6282
+ /**
6283
+ * One action over several of the caller's notifications: explicit `ids` (up to 1000) or
6284
+ * everything matching `filter` (up to 2000). `snooze` needs a future `until`.
6285
+ */
6286
+ declare function bulkNotificationAction(body: {
6287
+ action: 'read' | 'archive' | 'snooze';
6288
+ ids?: number[];
6289
+ filter?: NotificationFilter;
6290
+ until?: string;
6291
+ }): Command<{
6292
+ data: {
6293
+ updated: number;
6294
+ ids?: number[];
6295
+ };
6296
+ }>;
6297
+ /** Archive every read notification older than `days` (1–3650). */
6298
+ declare function archiveReadNotifications(days: number): Command<{
6299
+ data: {
6300
+ updated: number;
6301
+ };
6302
+ }>;
6303
+ interface SentNotificationGroup {
6304
+ key: string;
6305
+ subject: string;
6306
+ message: string | null;
6307
+ created_at: ISODate;
6308
+ lane: string | null;
6309
+ category: string | null;
6310
+ collection: string | null;
6311
+ item: string | null;
6312
+ recipients: Array<{
6313
+ id: string;
6314
+ name: string;
6315
+ read: boolean;
6316
+ read_at: ISODate | null;
6317
+ ack: 'pending' | 'acked' | null;
6318
+ ack_at: string | null;
6319
+ }>;
6320
+ read_count: number;
6321
+ ack_required: boolean;
6322
+ ack_count: number;
6323
+ total: number;
6324
+ }
6325
+ /**
6326
+ * What the caller sent, grouped per message with each recipient's read / acknowledgement
6327
+ * state. Critical-lane sends only unless `lane: 'all'`.
6328
+ */
6329
+ declare function listSentNotifications(query?: {
6330
+ lane?: 'all';
6331
+ /** Groups (default 50, max 100). */
6332
+ limit?: number;
6333
+ }): Command<{
6334
+ data: SentNotificationGroup[];
6335
+ }>;
6336
+ /** Whether the caller muted notifications about one record. */
6337
+ declare function readRecordMute(collection: string, item: string | number): Command<{
6338
+ data: {
6339
+ muted: boolean;
6340
+ };
6341
+ }>;
6342
+ /** Mute or unmute notifications about one record for the caller; answers the new state. */
6343
+ declare function toggleRecordMute(collection: string, item: string | number): Command<{
6344
+ data: {
6345
+ muted: boolean;
6346
+ };
6347
+ }>;
6348
+ interface Reminder {
6349
+ id: number;
6350
+ user: string;
6351
+ note: string;
6352
+ room: string | null;
6353
+ remind_at: ISODate;
6354
+ sent: boolean | number;
6355
+ }
6356
+ /** The caller's reminders, soonest first; `includeSent` adds delivered ones (max 200). */
6357
+ declare function listReminders(includeSent?: boolean): Command<{
6358
+ data: Reminder[];
6359
+ }>;
6360
+ /** Remind the caller at `remind_at` (ISO, not in the past); delivered in-app. */
6361
+ declare function createReminder(body: {
6362
+ note: string;
6363
+ remind_at: string;
6364
+ }): Command<{
6365
+ data: Reminder;
6366
+ }>;
6367
+ /** Change the note or time of an undelivered reminder. */
6368
+ declare function updateReminder(id: number, body: {
6369
+ note?: string;
6370
+ remind_at?: string;
6371
+ }): Command<{
6372
+ data: Reminder;
6373
+ }>;
6374
+ /** Cancel (or clear a delivered) reminder. */
6375
+ declare function deleteReminder(id: number): Command<void>;
6376
+ interface SavedSearch {
6377
+ id: string;
6378
+ name: string;
6379
+ q: string;
6380
+ scope: string | null;
6381
+ created_at: ISODate;
6382
+ }
6383
+ /** The caller's saved searches. */
6384
+ declare function listSavedSearches(): Command<{
6385
+ data: SavedSearch[];
6386
+ }>;
6387
+ /** Save a search for the caller. */
6388
+ declare function createSavedSearch(body: {
6389
+ name: string;
6390
+ q: string;
6391
+ scope?: string | null;
6392
+ }): Command<{
6393
+ data: SavedSearch;
6394
+ }>;
6395
+ /** Remove one of the caller's saved searches. */
6396
+ declare function deleteSavedSearch(id: string): Command<{
6397
+ data: {
6398
+ ok: true;
6399
+ };
6400
+ }>;
6401
+ /**
6402
+ * How many records match `q` in each listed collection (up to 40), as the caller — the
6403
+ * search page's tabs. Empty when `q` is under 2 characters.
6404
+ */
6405
+ declare function readSearchCounts(q: string, collections: string[], opts?: {
6406
+ labels?: boolean;
6407
+ }): Command<{
6408
+ data: Array<{
6409
+ collection: string;
6410
+ display_name: string | null;
6411
+ count: number;
6412
+ }>;
6413
+ }>;
6414
+ /** One collection's search matches, a page at a time (default 25). */
6415
+ declare function readSearchRecords(q: string, collection: string, opts?: {
6416
+ offset?: number;
6417
+ limit?: number;
6418
+ labels?: boolean;
6419
+ }): Command<{
6420
+ data: GlobalSearchRecord[];
6421
+ total: number | null;
6422
+ query?: unknown;
6423
+ }>;
6424
+
6087
6425
  /**
6088
6426
  * Infrastructure commands: workspaces (usage/quotas/templates), sync jobs,
6089
6427
  * ERP submissions, PDF templates, custom pages, two-factor auth, settings.
@@ -6701,85 +7039,523 @@ declare function readMcpCapabilities(): Command<{
6701
7039
  }>;
6702
7040
 
6703
7041
  /**
6704
- * Operations reads (admin): readiness, detailed health, this process's runtime
6705
- * stats, the instance roster, the DB connection pool, expensive SQL, the
6706
- * Traffic Map snapshot, the background-job registry + run history, and a
6707
- * summarized CPU profile of the replica that answers.
7042
+ * Observability commands: the audit log beyond the list (one entry, the action list, export
7043
+ * reporting), the change feed, background job runs (live log, cancel, what is busy), the
7044
+ * caller's own jobs and background reads, the API request log, per-key usage, the outbound
7045
+ * mail log and the caller's own notification delivery history.
7046
+ *
7047
+ * Admin-only reads say so; everything else is scoped to the caller by the API.
6708
7048
  */
6709
7049
 
6710
- interface ReadyReport {
6711
- ready: boolean;
6712
- checks: Array<{
6713
- id: string;
6714
- ok: boolean;
6715
- summary: string;
6716
- }>;
6717
- }
6718
- /** May traffic be routed here? Public; answers 503 (with the same body) when not ready. */
6719
- declare function readReadiness(): Command<ReadyReport>;
6720
- interface HealthDetailed {
6721
- db: {
6722
- ok: boolean;
6723
- latency_ms: number;
6724
- };
6725
- redis: {
6726
- ok: boolean;
6727
- latency_ms: number;
6728
- };
6729
- migrations: {
6730
- latest: string | null;
6731
- count: number;
6732
- };
6733
- sockets: {
6734
- connections: number | null;
6735
- };
6736
- read_gate?: Record<string, unknown>;
6737
- redis_degradation?: {
6738
- redis_ok: boolean;
6739
- consumers: Array<Record<string, unknown>>;
7050
+ /** One audit-log entry with its user agent and agent badge (admin). */
7051
+ declare function readActivityEntry(id: number): Command<{
7052
+ data: ActivityEntry;
7053
+ }>;
7054
+ /** Every action name the audit log holds, sorted (admin) — for an action filter. */
7055
+ declare function listActivityActions(): Command<{
7056
+ data: string[];
7057
+ }>;
7058
+ /**
7059
+ * Record a client-side export (CSV / xlsx / PDF made in the browser) in the audit log as an
7060
+ * `export` entry for the caller. Any signed-in person may report their own export.
7061
+ */
7062
+ declare function logExport(body: {
7063
+ collection: string;
7064
+ row_count?: number;
7065
+ /** csv | xlsx | pdf … (first 10 characters kept). */
7066
+ format?: string;
7067
+ /** The filters the export ran with (first 300 characters of their JSON kept). */
7068
+ filters?: unknown;
7069
+ }): Command<{
7070
+ data: {
7071
+ logged: true;
6740
7072
  };
6741
- db_posture?: unknown;
6742
- uptime_s: number;
6743
- version: string;
6744
- node_version: string;
6745
- memory_mb: number;
7073
+ }>;
7074
+ /**
7075
+ * Write an audit entry by hand. Administrators only in practice: a non-admin may write only
7076
+ * the actions the server lists as client-writable (none today). `action` is 1–50 of
7077
+ * letters, digits and `- _ : .`.
7078
+ */
7079
+ declare function createActivityEntry(body: {
7080
+ action: string;
7081
+ collection?: string;
7082
+ item?: string | number;
7083
+ comment?: string;
7084
+ }): Command<{
7085
+ ok: true;
7086
+ }>;
7087
+ /** One record change in the feed — ids, actions and field NAMES only, never values. */
7088
+ interface FeedChange {
7089
+ collection: string;
7090
+ id: string;
7091
+ /** A record created and changed within one page reads `create`. */
7092
+ action: 'create' | 'update' | 'delete';
7093
+ /** Updates: the readable fields that changed; absent when unknown. */
7094
+ fields?: string[];
7095
+ at: ISODate;
6746
7096
  }
6747
- /** Subsystem diagnostics for the replica that answers (admin). */
6748
- declare function readHealthDetailed(): Command<{
6749
- data: HealthDetailed;
7097
+ interface FeedPage {
7098
+ changes: FeedChange[];
7099
+ /** Pass back as `cursor` for the next page. */
7100
+ cursor: string;
7101
+ /** More changes are already waiting: call again at once. */
7102
+ has_more: boolean;
7103
+ /** Named collections the caller cannot read (or that do not exist). */
7104
+ not_readable?: string[];
7105
+ notes?: string[];
7106
+ }
7107
+ /**
7108
+ * The change feed for clients without a live socket (`GET /changes`): records the caller
7109
+ * can see now that were created, changed or deleted since a cursor or a time. Without
7110
+ * `cursor` or `since` the feed starts from now (an empty page with a cursor). Refusals
7111
+ * carry a `code` (e.g. a cursor this feed did not issue).
7112
+ *
7113
+ * let page = (await nivaro.request(readChanges({ since: '2026-10-29T12:00:00Z' }))).data
7114
+ * while (page.has_more) page = (await nivaro.request(readChanges({ cursor: page.cursor }))).data
7115
+ */
7116
+ declare function readChanges(query?: {
7117
+ cursor?: string;
7118
+ /** ISO time to start from (ignored with a cursor). */
7119
+ since?: string;
7120
+ /** Up to 50 collection names; default every collection the caller may read. */
7121
+ collections?: string[];
7122
+ /** Changes per page (default 100, max 500). */
7123
+ limit?: number;
7124
+ }): Command<{
7125
+ data: FeedPage;
6750
7126
  }>;
6751
- interface PoolStats {
6752
- used: number;
6753
- free: number;
6754
- pending_acquires: number;
6755
- pending_creates: number;
6756
- max: number;
7127
+ interface JobLogLine {
7128
+ seq: number;
7129
+ at: ISODate;
7130
+ level: 'info' | 'warn' | 'error' | (string & {});
7131
+ line: string;
6757
7132
  }
6758
- interface RuntimeStats {
6759
- uptime_seconds: number;
6760
- rss_mb: number;
6761
- heap_used_mb: number;
6762
- heap_total_mb: number;
6763
- event_loop_lag_ms: {
6764
- current: number;
6765
- max_1m: number;
7133
+ /**
7134
+ * A run's live log: the lines written so far (`after` = the last `seq` you already have),
7135
+ * plus its status, progress and first error line (admin).
7136
+ */
7137
+ declare function readJobRunLog(id: number, after?: number): Command<{
7138
+ data: {
7139
+ run: {
7140
+ id: number;
7141
+ status: string;
7142
+ progress: string | null;
7143
+ outcome: string | null;
7144
+ error: string | null;
7145
+ };
7146
+ lines: JobLogLine[];
6766
7147
  };
6767
- pool: PoolStats;
6768
- }
6769
- /** Memory, event-loop lag and pool of the replica that answers (admin). */
6770
- declare function readRuntimeStats(): Command<{
6771
- data: RuntimeStats;
6772
7148
  }>;
6773
- /** Every registered API process, plus which one holds the scheduler lease (admin). */
6774
- declare function readInstanceRoster(): Command<{
6775
- data: Array<Record<string, unknown>>;
6776
- scheduler: Record<string, unknown> | null;
7149
+ /**
7150
+ * Ask a running job to stop (admin). Cooperative: cancel-aware loops stop at their next
7151
+ * chunk; the flag is per process, so a run on another replica may finish anyway.
7152
+ */
7153
+ declare function cancelJobRun(id: number): Command<{
7154
+ data: {
7155
+ cancel_requested: true;
7156
+ };
6777
7157
  }>;
6778
- interface CpuProfileSummary {
6779
- /** The saved .cpuprofile, downloadable from /ops-runtime/cpu-profile/:name. */
6780
- name: string;
6781
- seconds: number;
6782
- busy_ms: number;
7158
+ interface BusyJob {
7159
+ /** The job run id; -1 for an import in flight. */
7160
+ id: number;
7161
+ kind: string;
7162
+ label: string;
7163
+ started_at: ISODate;
7164
+ elapsed_ms: number;
7165
+ /** Median of the same job's recent runs; null without history. */
7166
+ expected_ms: number | null;
7167
+ remaining_ms: number | null;
7168
+ overrun: boolean;
7169
+ }
7170
+ /** What heavy work is running right now — heavy crons, backfills, exports, imports (admin). */
7171
+ declare function readBusyJobs(): Command<{
7172
+ data: {
7173
+ busy: boolean;
7174
+ items: BusyJob[];
7175
+ heavy_slot: unknown;
7176
+ };
7177
+ }>;
7178
+ /** One entry of the caller's jobs tray (a job run or a staged import they queued). */
7179
+ interface MyJob {
7180
+ key: string;
7181
+ kind: string;
7182
+ label?: string | null;
7183
+ status: 'queued' | 'running' | 'completed' | 'error' | 'canceled';
7184
+ progress?: Record<string, unknown> | null;
7185
+ outcome?: string | null;
7186
+ error?: string | null;
7187
+ /** App path to the details page or the finished file. */
7188
+ href?: string | null;
7189
+ /** A file the job produced. */
7190
+ file_id?: string | null;
7191
+ /** API path (under /api) to POST to cancel the running job. */
7192
+ cancel_path?: string | null;
7193
+ /** Import queue: 1 = next up. */
7194
+ position?: number | null;
7195
+ eta_seconds?: number | null;
7196
+ at: ISODate;
7197
+ }
7198
+ /** What the caller started that is running or finished in the last 30 minutes. */
7199
+ declare function listMyJobs(): Command<{
7200
+ data: MyJob[];
7201
+ }>;
7202
+ interface BackgroundRun {
7203
+ id: string;
7204
+ kind: 'custom-query' | 'widget' | 'report-widget' | 'dashboard-widget' | (string & {});
7205
+ subject: string;
7206
+ label: string;
7207
+ href: string | null;
7208
+ method: 'GET' | 'POST';
7209
+ url: string;
7210
+ status: 'running' | 'completed' | 'error';
7211
+ started_at: ISODate;
7212
+ finished_at: ISODate | null;
7213
+ /** Typical duration when the run started (progress = elapsed / expected). */
7214
+ expected_ms: number | null;
7215
+ http_status: number | null;
7216
+ error: string | null;
7217
+ /** False when the answer was too big to keep: ask the route again. */
7218
+ result_kept: boolean;
7219
+ }
7220
+ /** How long a replayable read usually takes and whether it counts as slow. */
7221
+ declare function estimateBackgroundRun(method: 'GET' | 'POST', url: string): Command<{
7222
+ data: {
7223
+ typical_ms: number | null;
7224
+ runs: number;
7225
+ slow: boolean;
7226
+ threshold_ms: number;
7227
+ };
7228
+ }>;
7229
+ /**
7230
+ * Hand a slow read to the server (a custom query execute or a widget read). It is replayed
7231
+ * AS the caller; the same question asked twice joins the first run (`joined: true`).
7232
+ */
7233
+ declare function startBackgroundRun(body: {
7234
+ method: 'GET' | 'POST';
7235
+ /** The API path of the read, e.g. `/api/custom-queries/q/execute`. */
7236
+ url: string;
7237
+ body?: unknown;
7238
+ label?: string;
7239
+ /** App-relative link back to the page. */
7240
+ href?: string;
7241
+ }): Command<{
7242
+ data: BackgroundRun & {
7243
+ joined: boolean;
7244
+ };
7245
+ }>;
7246
+ /** The caller's background reads, newest first. */
7247
+ declare function listBackgroundRuns(): Command<{
7248
+ data: BackgroundRun[];
7249
+ }>;
7250
+ /** One of the caller's background reads (404 for anyone else's). */
7251
+ declare function readBackgroundRun(id: string): Command<{
7252
+ data: BackgroundRun;
7253
+ }>;
7254
+ /**
7255
+ * The finished answer, exactly as the route gave it. 409 BACKGROUND_RUN_RUNNING while it
7256
+ * runs, 422 when it failed, 410 RESULT_GONE once no longer kept.
7257
+ */
7258
+ declare function readBackgroundRunResult<T = unknown>(id: string): Command<T>;
7259
+ interface ApiRequestLogEntry {
7260
+ id: number;
7261
+ method: string;
7262
+ path: string;
7263
+ status: number;
7264
+ latency_ms: number;
7265
+ user: UUID | null;
7266
+ user_name: string | null;
7267
+ user_email: string | null;
7268
+ collection: string | null;
7269
+ api_key_id: number | null;
7270
+ api_key_name: string | null;
7271
+ /** session | token | api_key | masquerade | none */
7272
+ auth: string | null;
7273
+ ip: string | null;
7274
+ user_agent: string | null;
7275
+ error: string | null;
7276
+ request_body: string | null;
7277
+ query: string | null;
7278
+ created_at: ISODate;
7279
+ }
7280
+ interface ApiRequestLogQuery {
7281
+ /** Look-back window (default 24). */
7282
+ hours?: number;
7283
+ /** ISO bounds; `from` beats `hours`. */
7284
+ from?: string;
7285
+ to?: string;
7286
+ /** Contains-match on the path. */
7287
+ path?: string;
7288
+ method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
7289
+ /** Exact (`404`) or a class (`4xx`, `5xx`). */
7290
+ status?: string;
7291
+ /** Errors only (status ≥ 400). */
7292
+ errors?: boolean;
7293
+ /** A user id. */
7294
+ user?: UUID;
7295
+ /** A named API key id. */
7296
+ api_key?: number;
7297
+ /** Comma list of session | token | api_key | masquerade | none. */
7298
+ auth?: string;
7299
+ /** Every caller that is not a person's browser session (token + API key). */
7300
+ inbound?: boolean;
7301
+ /** Rank instead of list: the top 20 callers or paths. */
7302
+ group?: 'caller' | 'path';
7303
+ page?: number;
7304
+ /** Rows per page (default 50, max 200). */
7305
+ limit?: number;
7306
+ /** Include development instances' rows. */
7307
+ all_instances?: boolean;
7308
+ }
7309
+ /**
7310
+ * The per-request API log behind the analytics (admin). With `group` the answer ranks
7311
+ * callers or paths in `groups` and `data` is empty.
7312
+ */
7313
+ declare function listApiRequests(query?: ApiRequestLogQuery): Command<{
7314
+ data: ApiRequestLogEntry[];
7315
+ total: number;
7316
+ page?: number;
7317
+ limit?: number;
7318
+ groups?: Array<Record<string, unknown>>;
7319
+ }>;
7320
+ interface ApiKeyTraffic {
7321
+ api_key_id: number;
7322
+ name: string;
7323
+ count: number;
7324
+ avg_latency: number;
7325
+ errors: number;
7326
+ last_seen: ISODate | null;
7327
+ }
7328
+ /** Traffic per named API key over the window (admin; session traffic excluded). */
7329
+ declare function readApiAnalyticsByKey(hours?: number): Command<{
7330
+ data: ApiKeyTraffic[];
7331
+ }>;
7332
+ interface ApiKeyUsage {
7333
+ key: {
7334
+ id: number;
7335
+ name: string;
7336
+ is_active: boolean;
7337
+ };
7338
+ window_days: number;
7339
+ total: number;
7340
+ errors: number;
7341
+ last_seen: ISODate | null;
7342
+ /** One entry per day of the window, gaps as zero. */
7343
+ days: Array<{
7344
+ day: string;
7345
+ count: number;
7346
+ errors: number;
7347
+ }>;
7348
+ top_routes: Array<{
7349
+ method: string;
7350
+ path: string;
7351
+ count: number;
7352
+ avg_latency: number;
7353
+ errors: number;
7354
+ }>;
7355
+ }
7356
+ /** A key's last 30 days: daily calls and errors, top routes (admin). */
7357
+ declare function readApiKeyUsage(id: number): Command<{
7358
+ data: ApiKeyUsage;
7359
+ }>;
7360
+ interface ApiKeyUsageBucket {
7361
+ calls: number;
7362
+ errors: number;
7363
+ rate_limited: number;
7364
+ avg_ms: number | null;
7365
+ }
7366
+ interface ApiKeyMonthlyUsage {
7367
+ key: {
7368
+ id: number;
7369
+ name: string;
7370
+ prefix: string | null;
7371
+ };
7372
+ month: string;
7373
+ window: {
7374
+ start: ISODate;
7375
+ end: ISODate;
7376
+ };
7377
+ retention: {
7378
+ days: number;
7379
+ oldest_log: ISODate | null;
7380
+ partial: boolean;
7381
+ note: string | null;
7382
+ };
7383
+ totals: ApiKeyUsageBucket & {
7384
+ error_rate: number;
7385
+ refused: number;
7386
+ reads_ok: number;
7387
+ writes_ok: number;
7388
+ };
7389
+ by_day: Array<ApiKeyUsageBucket & {
7390
+ day: string;
7391
+ }>;
7392
+ by_family: Array<ApiKeyUsageBucket & {
7393
+ family: string;
7394
+ }>;
7395
+ graphql: Array<{
7396
+ operation: string;
7397
+ kind: string | null;
7398
+ calls: number;
7399
+ errors: number;
7400
+ }>;
7401
+ egress: {
7402
+ reads_ok: number;
7403
+ note: string;
7404
+ };
7405
+ }
7406
+ /**
7407
+ * A key's usage statement for one calendar month (`YYYY-MM`, admin). `format: 'csv'`
7408
+ * answers the statement as CSV text.
7409
+ */
7410
+ declare function readApiKeyMonthlyUsage(id: number, month: string, format?: 'json'): Command<{
7411
+ data: ApiKeyMonthlyUsage;
7412
+ }>;
7413
+ declare function readApiKeyMonthlyUsage(id: number, month: string, format: 'csv'): Command<string>;
7414
+ interface MailLogEntry {
7415
+ id: number;
7416
+ /** Comma list of recipients. */
7417
+ to: string;
7418
+ subject: string | null;
7419
+ template: string | null;
7420
+ status: 'sent' | 'failed' | 'dropped' | 'deferred' | (string & {});
7421
+ error: string | null;
7422
+ created_at: ISODate;
7423
+ }
7424
+ /** Every send attempt with its outcome, newest first, 50 a page (admin). */
7425
+ declare function listMailLog(query?: {
7426
+ status?: 'sent' | 'failed' | 'dropped' | 'deferred';
7427
+ /** A template key; `(untemplated)` = sends without one. */
7428
+ template?: string;
7429
+ /** Contains-match on recipient or subject. */
7430
+ search?: string;
7431
+ page?: number;
7432
+ }): Command<{
7433
+ data: MailLogEntry[];
7434
+ total: number;
7435
+ page: number;
7436
+ }>;
7437
+ /** One send with its stored body (admin). */
7438
+ declare function readMailLogEntry(id: number): Command<{
7439
+ data: MailLogEntry & {
7440
+ body?: string | null;
7441
+ } & Record<string, unknown>;
7442
+ }>;
7443
+ /** Send a logged mail again from its stored body (admin; test mode applies). 502 on failure. */
7444
+ declare function resendMail(id: number): Command<{
7445
+ data: {
7446
+ resent: true;
7447
+ };
7448
+ }>;
7449
+ /** The delivery board: the window rolled up per day, template and recipient (admin). */
7450
+ declare function readMailStats(days?: 7 | 14 | 30): Command<{
7451
+ data: Record<string, unknown>;
7452
+ }>;
7453
+ /**
7454
+ * The mail sent about one record (headers only, never bodies, newest 50) — for anyone who
7455
+ * can read the record.
7456
+ */
7457
+ declare function listRecordMail(collection: string, item: string | number): Command<{
7458
+ data: MailLogEntry[];
7459
+ }>;
7460
+ interface NotificationHistoryEntry {
7461
+ kind: 'notification' | 'metric_alert' | 'record_alert' | 'report_alert' | 'digest_email';
7462
+ at: ISODate;
7463
+ title: string;
7464
+ detail: string | null;
7465
+ collection?: string | null;
7466
+ item?: string | null;
7467
+ status?: string | null;
7468
+ /** How it reached the caller: 'in-app' | 'push' | 'email' | 'digest email'. */
7469
+ channels?: string[];
7470
+ }
7471
+ /**
7472
+ * What actually reached the caller, newest first: in-app notifications, alert firings for
7473
+ * rules they subscribe to, report alerts they created and digest-queued emails.
7474
+ */
7475
+ declare function readNotificationHistory(limit?: number): Command<{
7476
+ data: NotificationHistoryEntry[];
7477
+ }>;
7478
+
7479
+ /**
7480
+ * Operations reads (admin): readiness, detailed health, this process's runtime
7481
+ * stats, the instance roster, the DB connection pool, expensive SQL, the
7482
+ * Traffic Map snapshot, the background-job registry + run history, and a
7483
+ * summarized CPU profile of the replica that answers.
7484
+ */
7485
+
7486
+ interface ReadyReport {
7487
+ ready: boolean;
7488
+ checks: Array<{
7489
+ id: string;
7490
+ ok: boolean;
7491
+ summary: string;
7492
+ }>;
7493
+ }
7494
+ /** May traffic be routed here? Public; answers 503 (with the same body) when not ready. */
7495
+ declare function readReadiness(): Command<ReadyReport>;
7496
+ interface HealthDetailed {
7497
+ db: {
7498
+ ok: boolean;
7499
+ latency_ms: number;
7500
+ };
7501
+ redis: {
7502
+ ok: boolean;
7503
+ latency_ms: number;
7504
+ };
7505
+ migrations: {
7506
+ latest: string | null;
7507
+ count: number;
7508
+ };
7509
+ sockets: {
7510
+ connections: number | null;
7511
+ };
7512
+ read_gate?: Record<string, unknown>;
7513
+ redis_degradation?: {
7514
+ redis_ok: boolean;
7515
+ consumers: Array<Record<string, unknown>>;
7516
+ };
7517
+ db_posture?: unknown;
7518
+ uptime_s: number;
7519
+ version: string;
7520
+ node_version: string;
7521
+ memory_mb: number;
7522
+ }
7523
+ /** Subsystem diagnostics for the replica that answers (admin). */
7524
+ declare function readHealthDetailed(): Command<{
7525
+ data: HealthDetailed;
7526
+ }>;
7527
+ interface PoolStats {
7528
+ used: number;
7529
+ free: number;
7530
+ pending_acquires: number;
7531
+ pending_creates: number;
7532
+ max: number;
7533
+ }
7534
+ interface RuntimeStats {
7535
+ uptime_seconds: number;
7536
+ rss_mb: number;
7537
+ heap_used_mb: number;
7538
+ heap_total_mb: number;
7539
+ event_loop_lag_ms: {
7540
+ current: number;
7541
+ max_1m: number;
7542
+ };
7543
+ pool: PoolStats;
7544
+ }
7545
+ /** Memory, event-loop lag and pool of the replica that answers (admin). */
7546
+ declare function readRuntimeStats(): Command<{
7547
+ data: RuntimeStats;
7548
+ }>;
7549
+ /** Every registered API process, plus which one holds the scheduler lease (admin). */
7550
+ declare function readInstanceRoster(): Command<{
7551
+ data: Array<Record<string, unknown>>;
7552
+ scheduler: Record<string, unknown> | null;
7553
+ }>;
7554
+ interface CpuProfileSummary {
7555
+ /** The saved .cpuprofile, downloadable from /ops-runtime/cpu-profile/:name. */
7556
+ name: string;
7557
+ seconds: number;
7558
+ busy_ms: number;
6783
7559
  idle_ms: number;
6784
7560
  gc_ms: number;
6785
7561
  self: Array<{
@@ -7247,6 +8023,401 @@ declare function setQueueDefaultView(id: UUID, viewId: number | null): Command<{
7247
8023
  };
7248
8024
  }>;
7249
8025
 
8026
+ /**
8027
+ * Record commands beyond plain CRUD: rehearsed updates, filter checks, slug and distinct
8028
+ * reads, bulk and batch writes, the trash bin, owner history, comment counts and reactions,
8029
+ * the pipeline outline a caller may act on, and the sign-in session (logout, socket token).
8030
+ *
8031
+ * Every write goes through the items service AS THE CALLER — permissions, row filters,
8032
+ * User Scopes, validation, hooks, revisions and edit locks all apply, row by row.
8033
+ */
8034
+
8035
+ /** What an update would do. Nothing is stored. */
8036
+ interface UpdateDryRunReport {
8037
+ dry_run: true;
8038
+ ok: boolean;
8039
+ /** The status the real request would answer. */
8040
+ status: number;
8041
+ would: 'update' | null;
8042
+ id: string | number;
8043
+ /** Stored fields the write would change, as the caller reads them before and after. */
8044
+ changes: Array<{
8045
+ field: string;
8046
+ from: unknown;
8047
+ to: unknown;
8048
+ }>;
8049
+ /** Fields the write names whose value would stay as it is. */
8050
+ unchanged: string[];
8051
+ /** Fields the write would change that the caller may not read: names only. */
8052
+ hidden: string[];
8053
+ /** Changed fields the caller did not send (rules, derived values, audit stamps). */
8054
+ filled: string[];
8055
+ /** Keys of the payload that are stored nowhere. */
8056
+ ignored: string[];
8057
+ links: Record<string, Array<string | number>>;
8058
+ nested: Record<string, Array<Record<string, unknown>>>;
8059
+ notes: string[];
8060
+ change_reason?: string;
8061
+ error?: string;
8062
+ code?: string;
8063
+ /** Someone else holds the record's edit lock. */
8064
+ locked_by_name?: string | null;
8065
+ violations?: unknown;
8066
+ fields?: unknown;
8067
+ conflicts?: unknown;
8068
+ }
8069
+ /**
8070
+ * Rehearse an update (`PATCH ?dry_run=1`): rules, validation, the edit lock and the
8071
+ * database's own checks run, the write is rolled back. The report lists `changes` (field,
8072
+ * from, to) or why it would be refused.
8073
+ */
8074
+ declare function rehearseUpdateItem<T = Record<string, unknown>>(collection: string, id: string | number, data: Partial<T>): Command<UpdateDryRunReport>;
8075
+ interface FilterProblem {
8076
+ path: string;
8077
+ code: string;
8078
+ message: string;
8079
+ fix?: string;
8080
+ }
8081
+ interface FilterCheck {
8082
+ ok: boolean;
8083
+ collection: string;
8084
+ errors: FilterProblem[];
8085
+ warnings: FilterProblem[];
8086
+ /** A corrected filter when the server could suggest one. */
8087
+ suggestion: Record<string, unknown> | null;
8088
+ clauses: number;
8089
+ truncated?: boolean;
8090
+ }
8091
+ /**
8092
+ * Check a filter against the server's own gates (unknown fields, operators, types, fields
8093
+ * the caller may not filter on) without reading a row.
8094
+ */
8095
+ declare function checkItemFilter(collection: string, filter: Record<string, unknown>): Command<{
8096
+ data: FilterCheck;
8097
+ }>;
8098
+ /**
8099
+ * One record by its alias / friendly id or the collection's slug field (404 when none
8100
+ * matches or the caller cannot read it).
8101
+ */
8102
+ declare function readItemBySlug<T = Record<string, unknown>>(collection: string, slug: string, query?: {
8103
+ fields?: string[];
8104
+ }): Command<{
8105
+ data: T;
8106
+ }>;
8107
+ /**
8108
+ * Distinct non-null values of one stored column over the rows the caller may read — for a
8109
+ * filter dropdown. Default 200 values, max 500.
8110
+ */
8111
+ declare function readItemDistinct(collection: string, field: string, limit?: number): Command<{
8112
+ data: unknown[];
8113
+ }>;
8114
+ /**
8115
+ * Set the same values on several records. A record that already holds every value is
8116
+ * `skipped`; one whose form locks a field for the caller is `refused` (`by_form: true` also
8117
+ * refuses fields that are not on the record's form). Per-record failures never fail the call.
8118
+ */
8119
+ declare function bulkUpdateItems(collection: string, ids: Array<string | number>, data: Record<string, unknown>, opts?: {
8120
+ by_form?: boolean;
8121
+ }): Command<{
8122
+ updated: number;
8123
+ skipped: number;
8124
+ refused: number;
8125
+ refused_reason?: string;
8126
+ }>;
8127
+ /** Delete several records; ones the caller may not delete are skipped (not counted). */
8128
+ declare function bulkDeleteItems(collection: string, ids: Array<string | number>): Command<{
8129
+ deleted: number;
8130
+ }>;
8131
+ /**
8132
+ * Run one pipeline transition on several records. `comment` is the note a transition that
8133
+ * requires one asks for, given once for all.
8134
+ */
8135
+ declare function bulkTransitionItems(collection: string, ids: Array<string | number>, transitionId: string, comment?: string): Command<{
8136
+ succeeded: number;
8137
+ failed: number;
8138
+ errors: Array<{
8139
+ item: string;
8140
+ error: string;
8141
+ }>;
8142
+ }>;
8143
+ interface BatchWriteResult {
8144
+ op: 'create' | 'update';
8145
+ index: number;
8146
+ ok: boolean;
8147
+ id?: string | number;
8148
+ data?: Record<string, unknown>;
8149
+ error?: string;
8150
+ /** Written, but hidden from the writer's own read-back (User Scope / row filter). */
8151
+ readable?: false;
8152
+ link_failures?: string[];
8153
+ }
8154
+ /**
8155
+ * Create and update up to 100 records in one call, one result per row. The API answers
8156
+ * 422 (a NivaroError whose `response.data` holds the results) when every row failed.
8157
+ */
8158
+ declare function batchItems(collection: string, body: {
8159
+ create?: Array<Record<string, unknown>>;
8160
+ /** Each row names its `id`. */
8161
+ update?: Array<Record<string, unknown> & {
8162
+ id: string | number;
8163
+ }>;
8164
+ }): Command<{
8165
+ data: {
8166
+ results: BatchWriteResult[];
8167
+ ok: number;
8168
+ failed: number;
8169
+ };
8170
+ }>;
8171
+ interface BulkRowResult {
8172
+ index: number;
8173
+ op: 'create' | 'update';
8174
+ status: number;
8175
+ id?: string | number;
8176
+ data?: Record<string, unknown>;
8177
+ error?: string;
8178
+ code?: string;
8179
+ /** A create the collection's natural key routed to an existing record. */
8180
+ upserted?: boolean;
8181
+ readable?: false;
8182
+ }
8183
+ interface BulkWriteOutcome {
8184
+ results: BulkRowResult[];
8185
+ ok: number;
8186
+ failed: number;
8187
+ rolled_back: boolean;
8188
+ stopped_at: number | null;
8189
+ leftover: Array<string | number>;
8190
+ }
8191
+ /**
8192
+ * Up to 500 rows in one call: a row with an `id` is an update, without one a create
8193
+ * (answers 207 with per-row status). `atomic: true` = creates only, all or nothing (a
8194
+ * refused row → 422 BULK_ATOMIC_REFUSED, nothing kept). `returnIds` answers ids only.
8195
+ */
8196
+ declare function bulkWriteItems(collection: string, rows: Array<Record<string, unknown>>, opts?: {
8197
+ atomic?: boolean;
8198
+ returnIds?: boolean;
8199
+ }): Command<{
8200
+ data: BulkWriteOutcome;
8201
+ }>;
8202
+ /**
8203
+ * Queue a bulk write as a background job (`?async=1`, 202). Read its results with
8204
+ * {@link readBulkRun} — they are kept 24 hours.
8205
+ */
8206
+ declare function queueBulkWriteItems(collection: string, rows: Array<Record<string, unknown>>, opts?: {
8207
+ atomic?: boolean;
8208
+ returnIds?: boolean;
8209
+ }): Command<{
8210
+ data: {
8211
+ run_id: number;
8212
+ total: number;
8213
+ status: 'running';
8214
+ results_url: string;
8215
+ };
8216
+ }>;
8217
+ /** The results of a queued bulk write (its owner or an admin). */
8218
+ declare function readBulkRun(collection: string, runId: number): Command<{
8219
+ data: Partial<BulkWriteOutcome> & {
8220
+ run_id: number;
8221
+ collection: string;
8222
+ job: Record<string, unknown> | null;
8223
+ } & Record<string, unknown>;
8224
+ }>;
8225
+ interface TrashEntry {
8226
+ id: number;
8227
+ collection: string;
8228
+ item_id: string;
8229
+ label: string;
8230
+ deleted_by: UUID | null;
8231
+ deleted_by_name: string | null;
8232
+ deleted_at: ISODate;
8233
+ }
8234
+ /**
8235
+ * Deleted records: administrators see every deletion, everyone else their own. `collections`
8236
+ * lists every collection with entries in the caller's view (for a filter).
8237
+ */
8238
+ declare function listTrash(query?: {
8239
+ collection?: string;
8240
+ /** Contains-match over the snapshot and the item id. */
8241
+ search?: string;
8242
+ /** Only deletions in the last N days. */
8243
+ days?: number;
8244
+ page?: number;
8245
+ /** Default 50, max 100. */
8246
+ limit?: number;
8247
+ }): Command<{
8248
+ data: TrashEntry[];
8249
+ collections: string[];
8250
+ total: number;
8251
+ page: number;
8252
+ limit: number;
8253
+ }>;
8254
+ /**
8255
+ * The latest deletion of one record — described only to an unrestricted admin or the person
8256
+ * who deleted it (`data: null` otherwise, the same as "not deleted").
8257
+ */
8258
+ declare function readRecordDeletion(collection: string, item: string | number): Command<{
8259
+ data: {
8260
+ deleted_at: ISODate;
8261
+ deleted_by_name: string | null;
8262
+ can_restore: boolean;
8263
+ trash_id: number | null;
8264
+ } | null;
8265
+ }>;
8266
+ /** Put a deleted record back with its original id (create permission required; 409 if taken). */
8267
+ declare function restoreTrashItem(trashId: number): Command<{
8268
+ data: {
8269
+ restored: true;
8270
+ collection: string;
8271
+ item_id: string;
8272
+ };
8273
+ }>;
8274
+ /** Restore up to 100 entries, one result each (never all-or-nothing). */
8275
+ declare function bulkRestoreTrash(ids: number[]): Command<{
8276
+ data: {
8277
+ results: Array<{
8278
+ id: number;
8279
+ ok: boolean;
8280
+ collection?: string;
8281
+ item_id?: string;
8282
+ error?: string;
8283
+ }>;
8284
+ restored: number;
8285
+ failed: number;
8286
+ };
8287
+ }>;
8288
+ /** Purge an entry for good (admin or the deleter; 423 while the record is under legal hold). */
8289
+ declare function purgeTrashItem(trashId: number): Command<{
8290
+ data: {
8291
+ purged: true;
8292
+ };
8293
+ }>;
8294
+ interface OwnerHistoryEntry {
8295
+ state_label: string | null;
8296
+ entered_at: ISODate;
8297
+ left_at: ISODate | null;
8298
+ moved_by: string | null;
8299
+ /** The state's resolved owners. */
8300
+ owners: Array<{
8301
+ id: UUID;
8302
+ name: string;
8303
+ }>;
8304
+ }
8305
+ /** Who owned a record in each pipeline state it passed through, oldest first. */
8306
+ declare function readOwnerHistory(collection: string, item: string | number): Command<{
8307
+ data: OwnerHistoryEntry[];
8308
+ }>;
8309
+ /** Comment counts per record id (up to 500 ids; only rows the caller can open are counted). */
8310
+ declare function readCommentCounts(collection: string, ids: Array<string | number>): Command<{
8311
+ data: Record<string, number>;
8312
+ }>;
8313
+ /** The reactions a comment or recorded note takes. */
8314
+ type CommentReaction = '👍' | '✅' | '👀' | '🎉' | '❤️' | '😂';
8315
+ /** Toggle the caller's reaction on a comment. */
8316
+ declare function toggleCommentReaction(commentId: string, emoji: CommentReaction): Command<{
8317
+ data: {
8318
+ reacted: boolean;
8319
+ };
8320
+ }>;
8321
+ /** Toggle a reaction on a recorded note (transition comment, change reason) by its entry key. */
8322
+ declare function toggleEntryReaction(body: {
8323
+ collection: string;
8324
+ item: string | number;
8325
+ entry_key: string;
8326
+ emoji: CommentReaction;
8327
+ }): Command<{
8328
+ data: {
8329
+ reacted: boolean;
8330
+ };
8331
+ }>;
8332
+ interface PipelineOutline {
8333
+ id: UUID;
8334
+ name: string | null;
8335
+ states: Array<{
8336
+ id: UUID;
8337
+ key: string;
8338
+ label: string;
8339
+ color: string | null;
8340
+ sort: number | null;
8341
+ is_initial: boolean;
8342
+ is_terminal: boolean;
8343
+ }>;
8344
+ /** Manual transitions the caller's role may run (automatic ones are left out). */
8345
+ transitions: Array<{
8346
+ id: UUID;
8347
+ label: string;
8348
+ from_state: UUID | null;
8349
+ to_state: UUID;
8350
+ color: string | null;
8351
+ sort: number | null;
8352
+ group_label: string | null;
8353
+ require_owner: boolean;
8354
+ allow_creator: boolean;
8355
+ }>;
8356
+ }
8357
+ /** A pipeline's states and the manual transitions the caller's role may run (any sign-in). */
8358
+ declare function readPipelineOutline(templateId: string): Command<{
8359
+ data: PipelineOutline;
8360
+ }>;
8361
+ interface OwnerSeat {
8362
+ group_id: UUID;
8363
+ group_name: string | null;
8364
+ /** The group's filters, named by dimension label. */
8365
+ filters: unknown;
8366
+ is_default: boolean | number | null;
8367
+ state_label: string;
8368
+ state_key: string;
8369
+ template_id: UUID;
8370
+ template_name: string;
8371
+ }
8372
+ /** The owner-matrix seats the caller holds across every pipeline. */
8373
+ declare function readMyOwnerSeats(): Command<{
8374
+ data: OwnerSeat[];
8375
+ }>;
8376
+ /** End the current session (cookie sign-in; also ends any View-as the person started). */
8377
+ declare function logout(): Command<{
8378
+ ok: true;
8379
+ }>;
8380
+ /** End every session of the caller across apps and tabs. */
8381
+ declare function logoutAll(): Command<{
8382
+ ok: true;
8383
+ destroyed: number;
8384
+ }>;
8385
+ /**
8386
+ * A one-time socket token (2 minutes) for `createRealtime().connect(url, getter)` — the way
8387
+ * a session-cookie, API-key or static-token caller signs a socket in. 403 WS_UNBINDABLE for
8388
+ * a sign-in with nothing to bind the socket to.
8389
+ */
8390
+ declare function readWsToken(): Command<{
8391
+ token: string;
8392
+ }>;
8393
+ interface AuthProviders {
8394
+ oidc: {
8395
+ enabled: boolean;
8396
+ label: string;
8397
+ };
8398
+ static_token: {
8399
+ enabled: boolean;
8400
+ };
8401
+ saml: {
8402
+ enabled: boolean;
8403
+ label: string;
8404
+ };
8405
+ password: {
8406
+ enabled: boolean;
8407
+ };
8408
+ sso: Array<{
8409
+ id: number;
8410
+ key: string;
8411
+ label: string;
8412
+ logo_url?: string | null;
8413
+ button_color?: string | null;
8414
+ }>;
8415
+ }
8416
+ /** The sign-in methods this instance offers (public; display data only). */
8417
+ declare function readAuthProviders(): Command<{
8418
+ data: AuthProviders;
8419
+ }>;
8420
+
7250
8421
  /**
7251
8422
  * Schema change proposals (#3209): draft a field or collection change for an administrator to
7252
8423
  * review. Nothing changes until an administrator applies it on the Data Model page.
@@ -7461,8 +8632,25 @@ interface PresenceClient {
7461
8632
  declare function createPresence(options: PresenceOptions): PresenceClient;
7462
8633
 
7463
8634
  type RealtimeEvent = 'create' | 'update' | 'delete' | '*';
8635
+ /** One record change as the server announced it. Values never ride the socket. */
8636
+ interface RealtimeChange {
8637
+ collection: string;
8638
+ /** The record id; null when a coalesced burst was too large to list (`many`). */
8639
+ item: string | number | null;
8640
+ action: 'create' | 'update' | 'delete';
8641
+ /** Changed field names (updates), when the server knew them. */
8642
+ changed_fields?: string[];
8643
+ /** `import` when a staged import run made the write. */
8644
+ source?: string;
8645
+ /** Part of a coalesced burst (several writes folded into one message). */
8646
+ coalesced?: boolean;
8647
+ /** A burst too large to list ids: refetch the list instead. */
8648
+ many?: boolean;
8649
+ }
8650
+ /** A token, or a function asked on every (re)connect — ws-tokens are single-use. */
8651
+ type RealtimeToken = string | (() => string | null | undefined | Promise<string | null | undefined>);
7464
8652
  interface NivaroRealtime {
7465
- connect(url: string, token?: string): void;
8653
+ connect(url: string, token?: RealtimeToken): void;
7466
8654
  disconnect(): void;
7467
8655
  subscribe(collection: string, opts: {
7468
8656
  event?: RealtimeEvent;
@@ -7470,10 +8658,73 @@ interface NivaroRealtime {
7470
8658
  }, callback: (data: unknown[]) => void): () => void;
7471
8659
  onConnect(fn: () => void): void;
7472
8660
  onDisconnect(fn: (reason: string) => void): void;
8661
+ /** Called when the server accepted the sign-in (`auth:ok`); rooms are joined then. */
8662
+ onAuthenticated(fn: (userId: string) => void): void;
7473
8663
  connected: boolean;
8664
+ /** True between `auth:ok` and the next disconnect. */
8665
+ authenticated: boolean;
7474
8666
  }
8667
+ /** Pseudo-collection: subscribe to it to hear `notification:new` for the signed-in person. */
8668
+ declare const NOTIFICATIONS_CHANNEL = "cms_notifications";
8669
+ type UpdatePayload = {
8670
+ collection?: string;
8671
+ item?: string | number | null;
8672
+ items?: Array<string | number> | null;
8673
+ many?: boolean;
8674
+ action?: string;
8675
+ changed_fields?: string[];
8676
+ source?: string;
8677
+ coalesced?: boolean;
8678
+ };
8679
+ /** The changes one `collection:update` message names. Exported for tests. */
8680
+ declare function parseRealtimeChanges(payload: UpdatePayload): RealtimeChange[];
7475
8681
  declare function createRealtime(): NivaroRealtime;
7476
8682
 
8683
+ /** Response header the API stamps on every traced /api answer (plugins/request-trace.ts). */
8684
+ declare const REQUEST_ID_HEADER = "x-nivaro-request-id";
8685
+ /** A non-2xx answer from the Nivaro API. */
8686
+ declare class NivaroError extends Error {
8687
+ /** HTTP status of the answer. */
8688
+ readonly status: number;
8689
+ /** The API's machine code (`body.code`, e.g. `QUOTA_EXCEEDED`, `SERVER_BUSY`), else null. */
8690
+ readonly code: string | null;
8691
+ /**
8692
+ * The `x-nivaro-request-id` the server stamped — the id its slow-trace buffer, access
8693
+ * log and API request log carry. Null when the header was absent or unreadable (a
8694
+ * cross-origin browser call only sees it if the API exposes the header through CORS).
8695
+ */
8696
+ readonly requestId: string | null;
8697
+ /** The parsed JSON body (or `{ error: statusText }` when the body was not JSON). */
8698
+ readonly response: unknown;
8699
+ readonly method: string;
8700
+ /** Path under `/api` (no query string). */
8701
+ readonly path: string;
8702
+ /** Milliseconds from a `Retry-After` header (429 / 503), else null. */
8703
+ readonly retryAfterMs: number | null;
8704
+ /** Import parse refusals: the per-row problems the API listed. */
8705
+ readonly issues?: unknown;
8706
+ constructor(init: {
8707
+ message: string;
8708
+ status: number;
8709
+ code?: string | null;
8710
+ requestId?: string | null;
8711
+ response?: unknown;
8712
+ method: string;
8713
+ path: string;
8714
+ retryAfterMs?: number | null;
8715
+ issues?: unknown;
8716
+ });
8717
+ }
8718
+ /** True for a NivaroError (also across bundled copies of the SDK). */
8719
+ declare function isNivaroError(err: unknown): err is NivaroError;
8720
+ /**
8721
+ * The human message of an error body. Route handlers answer `{ error: 'Not found' }`;
8722
+ * Fastify's own errors (validation, the SERVER_BUSY 503) answer
8723
+ * `{ statusCode, error: 'Bad Request', message: '…' }`, where `error` is only the status
8724
+ * phrase and `message` is the reason.
8725
+ */
8726
+ declare function errorBodyMessage(body: unknown): string | null;
8727
+
7477
8728
  /**
7478
8729
  * Nivaro SDK — typed client for the Nivaro CMS API.
7479
8730
  *
@@ -7510,9 +8761,17 @@ declare function createRealtime(): NivaroRealtime;
7510
8761
  * }
7511
8762
  * `)
7512
8763
  *
7513
- * // Realtime (Socket.io)
7514
- * nivaro.realtime.connect('https://nivaro.example.com')
7515
- * const unsub = nivaro.realtime.subscribe('projects', { event: 'update' }, (data) => console.log(data))
8764
+ * // Realtime (Socket.io) — a separate client; sign in with a token or a ws-token getter
8765
+ * const rt = createRealtime()
8766
+ * rt.connect('https://nivaro.example.com', () => nivaro.request(readWsToken()).then((r) => r.token))
8767
+ * const unsub = rt.subscribe('projects', { event: 'update' }, (changes) => console.log(changes))
8768
+ *
8769
+ * // Observability (opt-in): hooks, request ids, retries
8770
+ * const traced = createNivaro(url, {
8771
+ * token,
8772
+ * onResponse: (r) => console.log(r.method, r.path, r.status, r.requestId),
8773
+ * retry: 2
8774
+ * })
7516
8775
  */
7517
8776
 
7518
8777
  type UUID = string;
@@ -7594,14 +8853,23 @@ interface Query<T = Record<string, unknown>> {
7594
8853
  offset?: number;
7595
8854
  page?: number;
7596
8855
  search?: string;
8856
+ /** Limit `search` to these fields (each one the caller may read). */
8857
+ search_fields?: string[];
8858
+ /** Order `search` matches by relevance (exact, then prefix, then contains). */
8859
+ search_rank?: boolean;
7597
8860
  /**
7598
8861
  * Keyset paging for walking a large collection: 'start' for the first page,
7599
8862
  * then the `next_cursor` of the page before. Sort by the record's own fields
7600
8863
  * only; `id` is added as the tie-break. Replaces offset/page.
7601
8864
  */
7602
8865
  after?: string;
7603
- /** false = skip the count query; `total` answers null. */
7604
- count?: boolean;
8866
+ /**
8867
+ * false = skip the count query; `total` answers null. 'approx' = a total up to a few
8868
+ * seconds old may stand in for COUNT(*) (the answer then carries `total_approx: true`).
8869
+ */
8870
+ count?: boolean | 'approx';
8871
+ /** Flatten each to-one relation's display label into the row (one batched read). */
8872
+ labels?: boolean;
7605
8873
  }
7606
8874
  interface ListResponse<T> {
7607
8875
  data: T[];
@@ -7613,6 +8881,13 @@ interface ListResponse<T> {
7613
8881
  next_cursor?: string | null;
7614
8882
  /** To-many aliases whose lists were cut at the per-record limit. */
7615
8883
  truncated_relations?: string[];
8884
+ /** The total came from the list-total cache or the partition row count (`count: 'approx'`). */
8885
+ total_approx?: boolean;
8886
+ /** The count ran out of time: `total` is null, the page itself is complete. */
8887
+ total_timed_out?: boolean;
8888
+ /** The asked `limit` was above the server cap; `applied_limit` is what was used. */
8889
+ limit_capped?: boolean;
8890
+ applied_limit?: number;
7616
8891
  }
7617
8892
  interface WorkflowState {
7618
8893
  id: UUID;
@@ -7736,27 +9011,71 @@ interface InstanceOwner {
7736
9011
  last_name: string | null;
7737
9012
  email: string;
7738
9013
  }
9014
+ /** Common audit actions; the log also carries feature actions (`export`, `trash-purge`, …). */
9015
+ type ActivityAction = 'create' | 'update' | 'delete' | 'login' | 'logout' | 'export' | 'transition' | (string & {});
9016
+ /** One audit-log row (`GET /activity`, admin). */
7739
9017
  interface ActivityEntry {
7740
9018
  id: number;
7741
- action: 'create' | 'update' | 'delete' | 'login';
9019
+ action: ActivityAction;
7742
9020
  collection: string | null;
7743
9021
  item: string | null;
7744
9022
  user: UUID | null;
7745
9023
  timestamp: ISODate;
9024
+ ip?: string | null;
9025
+ comment?: string | null;
9026
+ /** Where the write came from (`ui`, `api`, `import`, `flow`, …) when recorded. */
9027
+ origin?: string | null;
9028
+ first_name?: string | null;
9029
+ last_name?: string | null;
9030
+ user_email?: string | null;
9031
+ /** The badge of a write an agent made through MCP ("via Claude"), else null. */
9032
+ via_agent?: string | null;
9033
+ /** Single-entry reads only (`readActivityEntry`). */
9034
+ user_agent?: string | null;
7746
9035
  }
9036
+ /**
9037
+ * One entry of a record's history. Snapshot rows carry `data`/`delta`; pipeline moves and
9038
+ * O2M child events are folded in without a snapshot (`id` null, `event` set or an `o2m-*`
9039
+ * action).
9040
+ */
7747
9041
  interface Revision {
7748
- id: number;
9042
+ /** Null for a folded entry with no revision row (a transition, an O2M child event). */
9043
+ id: number | null;
7749
9044
  activity: number | null;
7750
9045
  collection: string;
7751
9046
  item: string;
7752
- data: Record<string, unknown>;
9047
+ data: Record<string, unknown> | null;
7753
9048
  delta: Record<string, unknown> | null;
7754
- action: 'create' | 'update' | 'delete';
9049
+ parent?: number | null;
9050
+ action: 'create' | 'update' | 'delete' | (string & {});
7755
9051
  timestamp: ISODate;
7756
- user: UUID | null;
9052
+ /** The person behind the entry (the API names it `user_id`). */
9053
+ user_id?: UUID | null;
9054
+ /** @deprecated never sent by the API — read `user_id`. */
9055
+ user?: UUID | null;
7757
9056
  first_name: string | null;
7758
9057
  last_name: string | null;
7759
9058
  user_email: string | null;
9059
+ comment?: string | null;
9060
+ /** The badge of a write an agent made through MCP ("via Claude"), else absent. */
9061
+ via_agent?: string | null;
9062
+ /** A pipeline event folded into the history (no snapshot). */
9063
+ event?: {
9064
+ kind: 'transition' | 'start';
9065
+ history_id?: number;
9066
+ from_label: string | null;
9067
+ to_label: string | null;
9068
+ transition_label: string | null;
9069
+ source: string | null;
9070
+ addendum?: {
9071
+ id: string;
9072
+ title: string | null;
9073
+ } | null;
9074
+ on_behalf_of?: {
9075
+ id: string;
9076
+ name: string | null;
9077
+ } | null;
9078
+ } | null;
7760
9079
  }
7761
9080
  interface ExternalApi {
7762
9081
  id: number;
@@ -8044,7 +9363,13 @@ declare function aggregateItems(collection: string, query: AggregateQuery): Comm
8044
9363
  limit: number;
8045
9364
  offset: number;
8046
9365
  }>;
8047
- declare function readItem<T = Record<string, unknown>>(collection: string, id: string | number): Command<{
9366
+ /**
9367
+ * One record as the caller may read it (404 when it does not exist or is hidden from them).
9368
+ * `query.fields` projects the answer, dotted paths included (`owner.email`).
9369
+ */
9370
+ declare function readItem<T = Record<string, unknown>>(collection: string, id: string | number, query?: {
9371
+ fields?: string[];
9372
+ }): Command<{
8048
9373
  data: T;
8049
9374
  }>;
8050
9375
  /** One read inside {@link readMany}. Without `id` it is a list read. */
@@ -8187,19 +9512,34 @@ declare function readCollections(): Command<{
8187
9512
  declare function readCollection(collection: string): Command<{
8188
9513
  data: CMSCollection;
8189
9514
  }>;
8190
- /** All revisions for a specific item (newest first). */
8191
- declare function readRevisions(collection: string, item: string | number): Command<ListResponse<Revision>>;
9515
+ /**
9516
+ * A record's history, newest first (up to 100 revisions plus folded pipeline / O2M events).
9517
+ * Same gate as opening the record; snapshots are cut to the fields the caller may read.
9518
+ * The answer is `{ data }` only — there is no total or paging.
9519
+ */
9520
+ declare function readRevisions(collection: string, item: string | number): Command<{
9521
+ data: Revision[];
9522
+ }>;
9523
+ /** The newest revision id of a record (collision baseline), without the history. */
9524
+ declare function readLatestRevisionId(collection: string, item: string | number): Command<{
9525
+ data: {
9526
+ latest: number | null;
9527
+ };
9528
+ }>;
8192
9529
  /** Single revision by ID. */
8193
9530
  declare function readRevision(id: number): Command<{
8194
9531
  data: Revision;
8195
9532
  }>;
8196
9533
  interface ActivityQuery {
8197
9534
  collection?: string;
8198
- action?: 'create' | 'update' | 'delete' | 'login';
9535
+ /** Any recorded action — `listActivityActions()` lists the ones in the log. */
9536
+ action?: ActivityAction;
8199
9537
  user?: string;
9538
+ /** Rows per page (default 25, max 200). */
8200
9539
  limit?: number;
8201
9540
  offset?: number;
8202
9541
  }
9542
+ /** The audit log, newest first (admin). */
8203
9543
  declare function readActivity(query?: ActivityQuery): Command<ListResponse<ActivityEntry>>;
8204
9544
  /**
8205
9545
  * Get workflow instance for an item: current state, available transitions
@@ -8870,7 +10210,55 @@ declare function listActivePresence(): Command<{
8870
10210
  data: PresenceSessionInfo[];
8871
10211
  total: number;
8872
10212
  }>;
10213
+ /** What a request hook sees before the fetch. `headers` may be changed in place. */
10214
+ interface NivaroRequestInfo {
10215
+ method: string;
10216
+ /** Path under `/api` (no query string), e.g. `/items/orders`. */
10217
+ path: string;
10218
+ /** The full URL about to be fetched. */
10219
+ url: string;
10220
+ /** The request's headers — add tracing or app headers here. */
10221
+ headers: Record<string, string>;
10222
+ /** 0 on the first try, 1.. on a retry (see `retry`). */
10223
+ attempt: number;
10224
+ /** `request` (commands), `graphql`, `upload` or `import-parse`. */
10225
+ kind: 'request' | 'graphql' | 'upload' | 'import-parse';
10226
+ }
10227
+ /** What a response hook sees once the status line arrived (the body is not read yet). */
10228
+ interface NivaroResponseInfo {
10229
+ method: string;
10230
+ path: string;
10231
+ url: string;
10232
+ attempt: number;
10233
+ kind: NivaroRequestInfo['kind'];
10234
+ status: number;
10235
+ ok: boolean;
10236
+ /** The `x-nivaro-request-id` the server stamped, else null (see NivaroError.requestId). */
10237
+ requestId: string | null;
10238
+ /** From the fetch call to the status line. */
10239
+ durationMs: number;
10240
+ /** True when the client is about to retry this answer. */
10241
+ willRetry: boolean;
10242
+ }
10243
+ /** Opt-in retries for idempotent reads (off unless `retry` is set). */
10244
+ interface NivaroRetryOptions {
10245
+ /** Further tries after the first (default 2 when `retry` is an object). */
10246
+ retries?: number;
10247
+ /** Methods that may be retried (default `['GET']` — writes are never retried by default). */
10248
+ methods?: Array<Command<unknown>['_method']>;
10249
+ /** Statuses that are retried (default 408, 429, 502, 503, 504). Network errors always are. */
10250
+ statuses?: number[];
10251
+ /** First backoff (default 300 ms), doubled per try with jitter; a Retry-After wins. */
10252
+ baseDelayMs?: number;
10253
+ /** Longest single wait (default 10 000 ms). */
10254
+ maxDelayMs?: number;
10255
+ }
8873
10256
  interface NivaroClientOptions {
10257
+ /**
10258
+ * Bearer credential: a static user token, a named API key (`nvk_…`), a View-as token, or
10259
+ * an MCP OAuth access token (`nvo_…`, accepted on `/api/mcp` and its tool calls only).
10260
+ * Omit it to ride the browser's session cookie (same-origin admin / portal).
10261
+ */
8874
10262
  token?: string;
8875
10263
  fetch?: typeof fetch;
8876
10264
  /**
@@ -8887,6 +10275,34 @@ interface NivaroClientOptions {
8887
10275
  * short.
8888
10276
  */
8889
10277
  timeoutMs?: number;
10278
+ /**
10279
+ * Extra headers on every request (e.g. `x-nivaro-app`, `x-workspace`), or a function read
10280
+ * per request. The client's own `Authorization` / `Content-Type` win over these.
10281
+ */
10282
+ headers?: Record<string, string> | (() => Record<string, string>);
10283
+ /** Called before every fetch (each retry too); may change `info.headers`. A throw fails the request. */
10284
+ onRequest?: (info: NivaroRequestInfo) => void | Promise<void>;
10285
+ /** Called when each answer's status line arrives (each retry too). Never fails the request. */
10286
+ onResponse?: (info: NivaroResponseInfo) => void;
10287
+ /**
10288
+ * Called once when a request finally fails — a NivaroError (non-2xx), a TimeoutError or a
10289
+ * network error. A caller's own abort is not reported. Never fails the request further.
10290
+ */
10291
+ onError?: (error: Error, info: {
10292
+ method: string;
10293
+ path: string;
10294
+ kind: NivaroRequestInfo['kind'];
10295
+ }) => void;
10296
+ /**
10297
+ * Log one line per request: `true` = `console.debug`, or a function of your own.
10298
+ * Lines carry method, path, status, duration and request id — never headers or bodies.
10299
+ */
10300
+ debug?: boolean | ((line: string, details: Record<string, unknown>) => void);
10301
+ /**
10302
+ * Retry idempotent reads on 408 / 429 / 502 / 503 / 504 and network errors, honouring
10303
+ * Retry-After. A number = that many retries with the defaults. Off by default.
10304
+ */
10305
+ retry?: number | NivaroRetryOptions;
8890
10306
  }
8891
10307
  interface FileUploadResult {
8892
10308
  id: string;
@@ -9385,4 +10801,4 @@ declare function submitFormItem(collection: string, values: Record<string, unkno
9385
10801
  data: Record<string, unknown>;
9386
10802
  }>;
9387
10803
 
9388
- export { type AccessAudit, type AccessAuditFinding, type AccessAuditRun, type AccessAuditSubject, type AccessReason, type ActivityEntry, type ActivityQuery, type ActivityReportQuery, type ActivityReportRow, type ActivityReportSummary, type Addendum, type AddendumStatus, type AgentQuestion, type AgentQuestionStatus, type AgentTrigger, type AgentTriggerDelivery, type AgentTriggerEvent, type AggregateQuery, type AggregateRow, type AiChatTraceEntry, type AiCollectionSettings, type AiColumnMapping, type AiDuplicateMatch, type AiQueryFilter, type AiQueryResult, type AiReviewFinding, type AiViolation, type AlertDefinition, type AlertLogEntry, type AlertSubscription, type AnomalyDefinition, type AnomalyRule, type ApiAnalyticsBucket, type ApiAnalyticsCollection, type ApiAnalyticsPath, type ApiAnalyticsSummary, type ApiErrorLog, type ApiKey, type ApiKeyScope, type ApprovalBrief, type ApprovalChain, type ApprovalChainStep, type ApprovalDecision, type ApprovalInstance, type ApprovalInstanceDetail, type ApprovalStatus, type ApprovalStepInput, type AtRiskCondition, type AtRiskOp, type AtRiskResult, type AtRiskRule, type AtRiskSummaryEntry, type AttachedFile, type AttributeDefinition, type AttributeValue, type BatchRead, type BatchReadResult, type BlackoutDate, type BoolFilterOps, type CMSCollection, type CascadeFilterRule, type ChangeOrder, type ChaosWhatIfAnswer, type ChatChannel, type ChatChannelMember, type ChatDirectoryChannel, type ChatMessage, type ChatPin, type ChatReaction, type ChatRoomKind, type ChatRoomSummary, type ChatRoomType, type ChatSearchHit, type CollectionLayout, type CollectionLayoutType, type CollectionPresetSummary, type Command, type Comment, type CommentVersion, type ConfigSnapshot, type ConfigTableClassification, type ContentBundle, type ContentExportFormat, type ContentExportOptions, type CoverageGapItem, type CoverageGapOwner, type CoverageGapReport, type CpuProfileSummary, type CronJob, type CustomQuery, type CustomQueryCatalogEntry, type Dashboard, type DashboardFilter, type DashboardWidget, type DashboardWidgetData, type DashboardWidgetType, type DataQualityRule, type DataQualityRuleResult, type DataQualityRuleType, type DataQualityRun, type DataQualitySeverity, type DeadLetter, type DmvResult, type DraftPublishConfig, type DraftStatus, type DryRunReport, EDITOR_NOTE_MAX, type ErpSubmission, type ErpSubmissionStatus, type ExpensiveStatement, type ExtensionManifest, type ExternalApi, type ExternalApiEndpoint, type ExternalApiSchema, type ExternalApiSlotContext, type ExternalApiSpecImportResult, type ExternalApiTestResult, type FieldChangeEntry, type FieldCondition, type FieldConfig, type FieldDependencyConfig, type FieldFilter, type FieldGroup, type FieldTranslations, type FieldVisibilityRules, type FieldWatch, type FileRecord, type FileUploadResult, type FileUsageEntry, type Filter, type FlowReplayResult, type FlowRun, type FlowTestStep, type FormFieldDescriptor, type FormFieldRelation, type FormFieldStateRow, type FormGroupDescriptor, type FormImageAnswer, type FormLockCondition, type FormSchema, type FormStateAnswer, type FormStateQuery, type FormValidationRule, type FormVisibilityRule, GROUP_PATCH_KEYS, type GlobalSearchRecord, type GlobalSearchResults, type GraphQLResponse, type GroupPatch, type GroupRow, type HealthDetailed, type HelpVideo, type HelpVideoClick, type HelpVideoContext, type HelpVideoDownloadUrls, type HelpVideoFinalizedUpload, type HelpVideoProgress, type HelpVideoUploadSession, type HelpVideoVersion, type HelpVideoVisibility, type HelpVideoWalkStep, type HelpVideoWhatsNew, type HierarchyConfigDef, type HierarchyFlatNode, type HierarchyLevelDef, type HierarchyNestedNode, type IDFilterOps, type ISODate, type ImportDefinition, type ImportJob, type ImportParseResponse, type ImportPreview, type ImportPreviewDiff, type ImportTemplateSummary, type InfrastructureSummaryTool, type InstanceOwner, type InstanceToolEntry, type IntegrationApiHealth, type InternalWidget, type Issue, type IssueSeverity, type IssueStatus, type IssueSummary, type ItemLock, type ItemWriteMeta, type JobRegistryCron, type JobRun, LAYOUT_PATCH_KEYS, type LastTouch, type LayoutAssignment, type LayoutBundle, type LayoutDescription, type LayoutFieldExplanation, type LayoutGroup, type LayoutLintAnswer, type LayoutOp, type LayoutOverviewRow, type LayoutPatch, type LayoutPickReason, type LayoutProposal, type LayoutRow, type LayoutVersion, type ListResponse, type ManagedUser, type McpCapabilities, type McpToolsConfig, type MetricAlertRule, type MetricAlertSubscription, type MetricDefinition, type MyTask, type MyWorkOwnedEntry, type MyWorkSla, type MyWorkSummary, type NamedMcpToolConfig, type NivaroClient, type NivaroClientOptions, type NivaroExtensionPlugin, type NivaroRealtime, type NivaroRuntime, type NotificationItem, type NotificationPage, type NotificationSubscription, type NumberFilterOps, type OmniSearchHit, type OnlinePresenceConfig, type OnlinePresenceUser, PLACEMENT_PATCH_KEYS, type Page, type PageLayout, type PageSlotKey, type PageWidget, type PdfTemplate, type PermissionSimulation, type PersistedQuery, type PickerExclusionStatus, type PipelineFlowEdge, type PipelineFlowState, type PipelineImpactResult, type PipelineOwnerGroup, type PipelineOwnerGroupUser, type PipelineSimulation, type PipelineState, type PipelineVersionEntry, type PlacementKey, type PlacementPatch, type PlacementRow, type PluginSlots, type Policy, type PoolStats, type PreflightCheck, type PreflightReport, type PreflightSeverity, type PresenceClient, type PresenceOptions, type PresenceSession, type PresenceSessionInfo, type PresenceViewer, type ProjectedPlacement, type PromotionApplyResult, type PromotionPreview, type ProposedField, type ProposedSchemaChange, type Query, type Queue, type QueueColumnPrefs, type QueueCondition, type QueueDetail, type QueueDisplayConfig, type QueueItem, type QueueItemsResult, type QueueOwner, type QueueRowClickMode, type QueueScope, type QueueSource, type QueueSourceType, type QueueStats, type QueueTrendPoint, type QueueView, type QueueViewKind, type QueueWorkloadRow, READ_MANY_MAX, type ReadyReport, type RealtimeEvent, type RecordGraphEdge, type RecordGraphNode, type RecordLink, type RecordLinkType, type RecordTemplate, type RecordViewRecap, type RegisteredAction, type RelatedCommentEntry, type RelationFilter, type RelationOption, type ReportAlert, type ReportAlertCondition, type ReportAlertLogEntry, type ReportAnnotation, type ReportColumnFormat, type ReportDateRange, type ReportDef, type ReportEntityFilter, type ReportFilterPreset, type ReportQueryColumn, type ReportQueryWidgetConfig, type ReportSnapshotEntry, type ReportSubscription, type ReportTemplateEntry, type ReportVersionEntry, type ReportWidget, type ReportWidgetConfig, type ReportWidgetData, type ReportWidgetPreset, type ReportWidgetType, type RequestTrace, type ResolvedOwner, type RetentionPolicy, type RetentionRun, type RetentionRunResult, type Revision, type Role, type Rule, type RuntimeStats, type SavedView, type ScheduledChange, type ScheduledReport, type SchemaChoice, type SchemaFieldType, type SchemaProposal, type ScopeDimension, type ScopeDimensionInfo, type SemanticSearchMatch, type SessionRecording, type SessionReplayMasking, type ShareLink, type SlaBatchStatus, type SlaRule, type SlaStatus, type StagedImportRun, type StagedImportStats, type StringFilterOps, type SubRow, type SubRowTemplate, type SupportTicket, type SupportTicketDetail, type SupportTicketStatus, type SyncJob, type Task, type TaskAgent, type TaskDoneWhenRule, type TaskPriority, type TaskStatus, type TimelineEvent, type TraceSpan, type TrafficSnapshot, type TrafficSnapshotEntity, type TreeFlatNode, type TreeNestedNode, type TreeNodeConfig, type TreePermission, type TreePermissionAction, type UUID, type UserActivityEntry, type UserActivitySummary, type UserScopesInfo, type ViewSubscription, type VirtualCollection, type Webhook, type WebhookDelivery, type WhichLayoutForm, type WidgetDrillBody, type WidgetDrillRows, type WidgetFeed, type WorkflowBinding, type WorkflowHistoryEntry, type WorkflowInstance, type WorkflowInstanceData, type WorkflowState, type WorkflowTransition, type Workspace, type WorkspaceQuotas, type WorkspaceTemplate, type WorkspaceUsage, _and, _contains, _ends_with, _eq, _gt, _gte, _in, _lt, _lte, _ncontains, _neq, _nin, _nnull, _none, _null, _or, _some, _starts_with, abandonHelpVideoUpload, acquireItemLock, activateLayout, addChatChannelMember, addInstanceOwner, addSubRow, aggregateItems, aiBrief, aiBuildReport, aiChat, aiCheckDuplicates, aiGenerate, aiMapColumns, aiQuery, aiReportFilters, aiReview, aiSummarize, aiValidate, answerAgentQuestion, appendSessionRecordingEvents, applyContentBundle, applyHelpVideoPackageImport, applyRecordTemplate, applySubRowTemplate, approveAddendum, approveAiProposal, archiveHelpVideo, asc, askHuman, attachFileToRecord, backupExportPath, batchPickerExclusionStatus, bulkPickerExclusion, callExternalApi, callExternalApiEndpoint, callInstanceTool, cancelAgentQuestion, cancelScheduledChange, cancelStagedImport, captureCpuProfile, cascadeFieldDependencies, chaosWhatIf, checkBlackoutDate, claimQueueItem, claimSupportTicket, claimTask, clearTraces, cloneItem, cloneLayout, cloneReport, compareConfigSnapshot, completeTask, copyReportWidget, createAccessAudit, createAddendum, createAlertDefinition, createAlertSubscription, createAnomalyRule, createApiKey, createApprovalChain, createAtRiskRule, createAttributeDefinition, createBlackoutDate, createChatChannel, createChatRoomType, createCollectionLayout, createComment, createDataQualityRule, createExternalApi, createExternalApiEndpoint, createFieldGroup, createFieldWatch, createGroupDm, createHelpVideo, createHierarchyConfig, createImportDefinition, createImportJob, createImportJobFromUrl, createInternalWidget, createIssue, createItem, createMetricAlertRule, createNivaro, createNotification, createNotificationSubscription, createPage, createPdfTemplate, createPersistedQuery, createPresence, createQueue, createQueueView, createRealtime, createRecordLink, createRecordTemplate, createReport, createReportAlert, createReportAnnotation, createReportFromTemplate, createReportSnapshot, createReportWidgetPreset, createRetentionPolicy, createRole, createRolePolicy, createRule, createSavedView, createScheduledChange, createScheduledReport, createShareLink, createSlaRule, createSubRowTemplate, createSyncJob, createTask, createTreePermission, createUser, createViewSubscription, createVirtualCollection, createWebhook, createWidgetFeed, createWorkspace, createWorkspaceTemplate, decideApproval, deleteAccessAudit, deleteAddendum, deleteAlertDefinition, deleteAlertSubscription, deleteAnomalyRule, deleteApiKey, deleteApprovalChain, deleteAtRiskRule, deleteAttributeDefinition, deleteBlackoutDate, deleteChatMessage, deleteCollectionLayout, deleteComment, deleteDataQualityRule, deleteExternalApi, deleteExternalApiEndpoint, deleteExternalApiSchema, deleteFieldGroup, deleteFieldTranslations, deleteFieldWatch, deleteFile, deleteHierarchyConfig, deleteImportJob, deleteInternalWidget, deleteIssue, deleteItem, deleteMetricAlertRule, deleteNotification, deleteNotificationSubscription, deletePage, deletePdfTemplate, deletePersistedQuery, deleteQueue, deleteQueueView, deleteRecordLink, deleteRecordTemplate, deleteReport, deleteReportAlert, deleteReportAnnotation, deleteReportFilterPreset, deleteReportSnapshot, deleteReportTemplate, deleteReportWidgetPreset, deleteRetentionPolicy, deleteRole, deleteRolePolicy, deleteRule, deleteSavedView, deleteScheduledReport, deleteSessionRecording, deleteSlaRule, deleteSubRow, deleteSubRowTemplate, deleteSyncJob, deleteTask, deleteTreePermission, deleteUser, deleteViewSubscription, deleteVirtualCollection, deleteWebhook, deleteWidgetFeed, deleteWorkspace, deleteWorkspaceTemplate, deployImportProcedure, desc, describeLayoutForm, diffLayoutVersion, disableTwoFactor, discardHelpVideoPackageImport, drillDashboardWidgetRows, drillReportRow, drillReportWidgetRows, editChatMessage, endSessionRecording, evaluateAlerts, evaluateAtRisk, evaluateFieldDefaults, evaluateFieldLock, evaluateFieldRules, evaluateFieldVisibility, excludeFromPicker, excludeFromPickers, executeBulkAction, executeCustomQuery, executeImportTemplate, executeItemAction, executeScheduledChange, explainLayout, explainLayoutField, explainRecordAccess, explainReportTrend, exportBlueprint, exportConfigSnapshot, exportContent, exportContentBundle, exportHelpVideoPackage, exportSchemaSnapshot, fetchFormSchema, fileDownloadPath, fileTransformPath, finalizeHelpVideoUpload, generateToken, generateUserToken, getAlertDefinition, getAttributeValues, getBrunoCollection, getCommentHistory, getExternalApi, getExternalApiEndpoint, getFieldTranslations, getFlowRun, getLocales, getOpenApi, getPickerExclusionStatus, getPostmanCollection, getPresence, getRetentionPolicy, getSlaRule, getSlaStatus, getTranslations, getTypes, getWebhook, globalSearch, heartbeatItemLock, helpVideosFor, importExternalApiSpec, importSchemaSnapshot, includeInPicker, includeInPickers, installBlueprint, installCollectionPreset, invokeInternalWidgetAction, isPageSlot, joinChatRoom, leaveChatRoom, listAccessAuditRuns, listAccessAudits, listActiveAtRiskRules, listActivePresence, listAddendums, listAgentTasks, listAgentTriggerDeliveries, listAgentTriggers, listAlertDefinitions, listAlertSubscriptions, listAllNotificationSubscriptions, listAnomalyDefinitions, listAnomalyRules, listApiKeys, listApprovalChains, listApprovalInstances, listAskedQuestions, listAtRiskRules, listAttributeDefinitions, listBlackoutDates, listBulkActions, listChangeOrders, listChatChannelMembers, listChatMessages, listChatPins, listChatRoles, listChatRoomTypes, listChatRooms, listCollectionPresets, listCollectionRecordTemplates, listComments, listCronJobs, listCustomQueries, listCustomQueryCatalog, listDashboards, listDataQualityRules, listDataQualityRuns, listDeadLetters, listExternalApiEndpoints, listExternalApiSchemas, listExternalApis, listFieldGroups, listFieldWatches, listFiles, listFlowRuns, listHelpVideoPages, listHelpVideoVersions, listHelpVideos, listHierarchyConfigs, listImportDefinitionVersions, listImportDefinitions, listImportJobs, listImportTemplates, listInstanceTools, listInternalWidgetPlacements, listInternalWidgets, listIssues, listItemActions, listItemScheduledChanges, listJobRuns, listLayoutVersions, listMetricAlertRules, listMetricAlertSubscriptions, listMetricDefinitions, listMyAgentQuestions, listMyHelpVideoUploads, listMyTasks, listNotificationSubscriptions, listNotifications, listOrphanFiles, listPages, listPdfTemplates, listPersistedQueries, listPinnedItems, listPipelineVersions, listQueueViews, listQueues, listRecordLinks, listRecordTemplates, listRegisteredExtensions, listRegisteredFlowOperations, listRegisteredFlowTriggers, listRelatedComments, listReportAlerts, listReportAnnotations, listReportFilterPresets, listReportSnapshots, listReportTemplates, listReportVersions, listReportWidgetPresets, listReports, listRequestedTasks, listRetentionPolicies, listRetentionRuns, listRolePolicies, listRoleUsers, listRoles, listRules, listSavedViews, listScheduledChanges, listScheduledReports, listScopeDimensions, listSessionRecordings, listShareLinks, listSlaRules, listStagedImports, listSubRowTemplates, listSubRows, listSupportTickets, listSyncJobs, listTaskAgents, listTasks, listTeamTasks, listThroughputCollections, listTraces, listTreePermissions, listViewSubscriptions, listVirtualCollections, listWebhookDeliveries, listWebhooks, listWidgetFeeds, listWorkspaceTemplates, listWorkspaces, markAllNotificationsRead, markChatRoomRead, markNotificationRead, markNotificationsRead, moveTreeNode, nudgeTask, omniSearch, openHelpVideoPackageImport, openHelpVideoUpload, presignFileUpload, previewContentBundle, previewHelpVideoPackageImport, previewImportJob, previewReportWidget, projectFieldConfig, proposeLayoutOps, proposeSchemaChange, publishHelpVideo, publishItem, queryVirtualCollection, readAccessAuditFindings, readActiveLayout, readActivity, readActivityReportSummary, readAddendum, readAgentQuestion, readAiSettings, readAlertLog, readAllStateOwners, readAnomalyLog, readApiAnalyticsErrors, readApiAnalyticsSummary, readApiAnalyticsTimeseries, readApiAnalyticsTopCollections, readApiAnalyticsTopPaths, readApiKey, readApprovalBrief, readApprovalChain, readAtRiskSummary, readBackupManifest, readChatConfig, readChatDirectory, readChatPeerRead, readCollection, readCollectionLayout, readCollectionLayouts, readCollections, readConfigInventory, readCoverageGaps, readDashboard, readDashboardWidgetData, readDataQualityRun, readDbPool, readDetailLayout, readDistinctValues, readDraftPublishConfig, readErpSubmissionHistory, readExpensiveSql, readFieldChangeHistory, readFieldConfig, readFieldImpact, readFieldWatch, readFileMeta, readFileUsage, readFilesByIds, readFormState, readHealthDetailed, readHelpVideo, readHelpVideoAnalytics, readHelpVideoDownloadLink, readHelpVideoDraft, readHelpVideoWalk, readHierarchyConfig, readHierarchyNodeAncestors, readHierarchyNodeChildren, readHierarchyNodes, readHierarchyTree, readImportJob, readImportProcedure, readInfrastructureSummary, readInstanceOwners, readInstanceRoster, readIntegrationHealth, readInternalWidget, readIssue, readIssueSummary, readItem, readItemLock, readItemLockConfig, readItems, readJobRegistry, readLastTouch, readLayoutAssignments, readLayoutBundle, readLayoutDrift, readLayoutGroups, readLayoutLint, readLayoutOverview, readLayoutProposals, readLayoutVersion, readMany, readMcpCapabilities, readMcpToolsConfig, readMe, readMetricAlertLog, readMyScopes, readMyWork, readNotificationCount, readNotificationSubscriptionStats, readOnlinePresence, readOwnerGroups, readPage, readPageWidgetData, readPdfTemplate, readPersistedQuery, readPickerExclusion, readPickerExclusions, readPipelineFlowMap, readPipelineReplay, readPipelineTemplate, readPipelineTemplates, readPipelineVersion, readPreflight, readQueue, readQueueCollectionStates, readQueueColumnPrefs, readQueueItems, readQueueTrends, readQueueWorkload, readReadiness, readRecordGraph, readRelationOptions, readReport, readReportAlertLog, readReportAlertsLog, readReportFilterOptions, readReportFiring, readReportSnapshot, readReportSubscription, readReportUsage, readReportWidgetData, readRequiredHelpVideos, readRevision, readRevisions, readRole, readRuntimeStats, readSchemaProposal, readScopeDimensionCoverage, readSessionRecordingEvents, readSettings, readSingleton, readSlaStatusBatch, readStagedImport, readStagedImportStats, readStateOwnerGroups, readStateOwners, readStateOwnersBatch, readSupportTicket, readSyncJob, readTask, readTaskCounts, readTaskHistory, readThroughputReport, readTimeline, readTrace, readTrafficSnapshot, readTreeAncestors, readTreeChildren, readTreeConfig, readTreeDescendants, readTreeNested, readTreeNodes, readTwoFactorStatus, readUnreadNotificationCount, readUser, readUserActivity, readUserActivitySummary, readUserCard, readUserScopes, readUsers, readWorkflowBindings, readWorkflowInstance, readWorkflowInstances, readWorkspace, readWorkspaceUsage, rebuildTreePaths, recordHelpVideoProgress, registerHelpVideoPage, rehearseCreateItem, reindexSemanticSearch, rejectAddendum, rejectAiProposal, releaseItemLock, releaseQueueItem, rematerializeQueue, removeChatChannelMember, removeInstanceOwner, renderFormImage, renderInternalWidget, renderPdfTemplate, reorderFieldGroups, reorderSubRows, reorderTreeSiblings, replaceSubRows, replayActivityEvent, replayFlow, replySupportTicket, reportClientError, requestRecordAccess, requeueStagedImport, rerecordHelpVideo, rerenderHelpVideo, resetReportCache, resolveLayoutProposal, resolveReportAlert, restoreHelpVideoVersion, restoreImportDefinitionVersion, restoreLayoutVersion, restorePipelineVersion, restoreReportVersion, retryDeadLetter, retryErpSubmission, retryWebhookDelivery, revokeApiKey, revokeShareLink, revokeToken, revokeUserToken, rollbackRevision, rotateWidgetFeedToken, runAccessAudit, runActivityReport, runActivityReportCsv, runCronJob, runDataQuality, runRetentionPolicy, runScheduledReport, runSyncJob, saveHelpVideoDraft, saveMcpToolsConfig, saveMyScopeDefaults, saveReportFilterPreset, saveReportTemplate, saveReportWidgets, saveUserScope, searchChatMessages, semanticSearch, sendBulkNotification, sendChatMessage, sendTestMail, sessionRecordingEnabled, setHelpVideoContexts, setHelpVideoRequirements, setMyDelegate, setQueueDefaultView, setReportSubscription, setSupportTicketStatus, setTranslations, setupTwoFactor, simulatePermissions, simulatePipeline, simulatePipelineImpact, startApproval, startMasquerade, startSessionRecording, startWorkflow, stopMasquerade, submitAddendum, submitFormItem, submitItemForReview, submitLayoutOps, submitToErp, subscribeFieldWatch, subscribeMetricAlert, suggestImportValidation, suggestQueueLabels, switchWorkspace, testExternalApi, testFlow, testWebhook, toggleChatPin, toggleChatReaction, togglePinnedItem, toggleReportAlert, touchRecordView, transitionWorkflow, unpublishHelpVideo, unpublishItem, unsubscribeFieldWatch, unsubscribeMetricAlert, updateAccessAudit, updateAddendum, updateAiSettings, updateAlertDefinition, updateAnomalyLogEntry, updateAnomalyRule, updateApiKey, updateApprovalChain, updateAtRiskRule, updateAttributeDefinition, updateAttributeValues, updateChatChannel, updateChatRoom, updateChatRoomType, updateCollectionLayout, updateComment, updateDataQualityRule, updateDraftPublishConfig, updateErpSubmissionStatus, updateExternalApi, updateExternalApiEndpoint, updateFieldConfig, updateFieldGroup, updateFieldWatch, updateFileMeta, updateHelpVideo, updateHierarchyConfig, updateImportDefinition, updateInternalWidget, updateIssue, updateItem, updateItemLockConfig, updateLayoutAssignments, updateLayoutUngroupedSort, updateMe, updateMetricAlertRule, updateMetricAlertSubscription, updateNotificationSubscription, updatePage, updatePdfTemplate, updatePersistedQuery, updateQueue, updateQueueSources, updateQueueView, updateRecordTemplate, updateReport, updateReportAlert, updateReportWidgetPreset, updateRetentionPolicy, updateRole, updateRolePolicy, updateRoleUiPermissions, updateRule, updateSavedView, updateScheduledReport, updateSettings, updateSingleton, updateSlaRule, updateSyncJob, updateTask, updateTreePermission, updateUser, updateVirtualCollection, updateWebhook, updateWidgetFeed, updateWorkflowBinding, updateWorkspace, validateVirtualCollectionSql, verifyTwoFactor, whichLayoutForm, withSignal };
10804
+ export { type AccessAudit, type AccessAuditFinding, type AccessAuditRun, type AccessAuditSubject, type AccessReason, type ActivityAction, type ActivityEntry, type ActivityQuery, type ActivityReportQuery, type ActivityReportRow, type ActivityReportSummary, type Addendum, type AddendumStatus, type AgentQuestion, type AgentQuestionStatus, type AgentTrigger, type AgentTriggerDelivery, type AgentTriggerEvent, type AggregateQuery, type AggregateRow, type AiChatTraceEntry, type AiCollectionSettings, type AiColumnMapping, type AiDuplicateMatch, type AiQueryFilter, type AiQueryResult, type AiReviewFinding, type AiViolation, type AlertDefinition, type AlertLogEntry, type AlertSubscription, type AnomalyDefinition, type AnomalyRule, type ApiAnalyticsBucket, type ApiAnalyticsCollection, type ApiAnalyticsPath, type ApiAnalyticsSummary, type ApiErrorLog, type ApiKey, type ApiKeyMonthlyUsage, type ApiKeyScope, type ApiKeyTraffic, type ApiKeyUsage, type ApiKeyUsageBucket, type ApiRequestLogEntry, type ApiRequestLogQuery, type ApprovalBrief, type ApprovalChain, type ApprovalChainStep, type ApprovalDecision, type ApprovalInstance, type ApprovalInstanceDetail, type ApprovalStatus, type ApprovalStepInput, type AtRiskCondition, type AtRiskOp, type AtRiskResult, type AtRiskRule, type AtRiskSummaryEntry, type AttachedFile, type AttributeDefinition, type AttributeValue, type AuthProviders, type BackgroundRun, type BatchRead, type BatchReadResult, type BatchWriteResult, type BlackoutDate, type BoolFilterOps, type BulkRowResult, type BulkWriteOutcome, type BusyJob, type CMSCollection, type CascadeFilterRule, type ChangeOrder, type ChaosWhatIfAnswer, type ChatChannel, type ChatChannelMember, type ChatDirectoryChannel, type ChatMessage, type ChatPin, type ChatReaction, type ChatRoomKind, type ChatRoomSummary, type ChatRoomType, type ChatSearchHit, type CollectionLayout, type CollectionLayoutType, type CollectionPresetSummary, type Command, type Comment, type CommentReaction, type CommentVersion, type ConfigSnapshot, type ConfigTableClassification, type ContentBundle, type ContentExportFormat, type ContentExportOptions, type CoverageGapItem, type CoverageGapOwner, type CoverageGapReport, type CpuProfileSummary, type CronJob, type CustomQuery, type CustomQueryCatalogEntry, type Dashboard, type DashboardFilter, type DashboardWidget, type DashboardWidgetData, type DashboardWidgetInput, type DashboardWidgetType, type DataQualityRule, type DataQualityRuleResult, type DataQualityRuleType, type DataQualityRun, type DataQualitySeverity, type DeadLetter, type DmvResult, type DraftPublishConfig, type DraftStatus, type DryRunReport, EDITOR_NOTE_MAX, type ErpSubmission, type ErpSubmissionStatus, type ExpensiveStatement, type ExtensionManifest, type ExternalApi, type ExternalApiEndpoint, type ExternalApiSchema, type ExternalApiSlotContext, type ExternalApiSpecImportResult, type ExternalApiTestResult, type FeedChange, type FeedPage, type FieldChangeEntry, type FieldCondition, type FieldConfig, type FieldDependencyConfig, type FieldFilter, type FieldGroup, type FieldTranslations, type FieldVisibilityRules, type FieldWatch, type FileRecord, type FileUploadResult, type FileUsageEntry, type Filter, type FilterCheck, type FilterProblem, type FlowReplayResult, type FlowRun, type FlowTestStep, type FormFieldDescriptor, type FormFieldRelation, type FormFieldStateRow, type FormGroupDescriptor, type FormImageAnswer, type FormLockCondition, type FormSchema, type FormStateAnswer, type FormStateQuery, type FormValidationRule, type FormVisibilityRule, GROUP_PATCH_KEYS, type GlobalSearchPerson, type GlobalSearchRecord, type GlobalSearchResults, type GraphQLResponse, type GroupPatch, type GroupRow, type HealthDetailed, type HelpVideo, type HelpVideoClick, type HelpVideoContext, type HelpVideoDownloadUrls, type HelpVideoFinalizedUpload, type HelpVideoProgress, type HelpVideoUploadSession, type HelpVideoVersion, type HelpVideoVisibility, type HelpVideoWalkStep, type HelpVideoWhatsNew, type HierarchyConfigDef, type HierarchyFlatNode, type HierarchyLevelDef, type HierarchyNestedNode, type IDFilterOps, type ISODate, type ImportDefinition, type ImportJob, type ImportParseResponse, type ImportPreview, type ImportPreviewDiff, type ImportTemplateSummary, type InfrastructureSummaryTool, type InstanceOwner, type InstanceToolEntry, type IntegrationApiHealth, type InternalWidget, type Issue, type IssueSeverity, type IssueStatus, type IssueSummary, type ItemLock, type ItemWriteMeta, type JobLogLine, type JobRegistryCron, type JobRun, LAYOUT_PATCH_KEYS, type LastTouch, type LayoutAssignment, type LayoutBundle, type LayoutDescription, type LayoutFieldExplanation, type LayoutGroup, type LayoutLintAnswer, type LayoutOp, type LayoutOverviewRow, type LayoutPatch, type LayoutPickReason, type LayoutProposal, type LayoutRow, type LayoutVersion, type ListResponse, type MailLogEntry, type ManagedUser, type McpCapabilities, type McpToolsConfig, type MetricAlertRule, type MetricAlertSubscription, type MetricDefinition, type MyJob, type MyTask, type MyWorkOwnedEntry, type MyWorkSla, type MyWorkSummary, NOTIFICATIONS_CHANNEL, type NamedMcpToolConfig, type NivaroClient, type NivaroClientOptions, NivaroError, type NivaroExtensionPlugin, type NivaroRealtime, type NivaroRequestInfo, type NivaroResponseInfo, type NivaroRetryOptions, type NivaroRuntime, type NotificationFilter, type NotificationHistoryEntry, type NotificationItem, type NotificationPage, type NotificationSubscription, type NumberFilterOps, type OmniSearchHit, type OnlinePresenceConfig, type OnlinePresenceUser, type OwnerHistoryEntry, type OwnerSeat, PLACEMENT_PATCH_KEYS, type Page, type PageLayout, type PageSlotKey, type PageWidget, type PdfTemplate, type PermissionSimulation, type PersistedQuery, type PickerExclusionStatus, type PipelineFlowEdge, type PipelineFlowState, type PipelineImpactResult, type PipelineOutline, type PipelineOwnerGroup, type PipelineOwnerGroupUser, type PipelineSimulation, type PipelineState, type PipelineVersionEntry, type PlacementKey, type PlacementPatch, type PlacementRow, type PluginSlots, type Policy, type PoolStats, type PreflightCheck, type PreflightReport, type PreflightSeverity, type PresenceClient, type PresenceOptions, type PresenceSession, type PresenceSessionInfo, type PresenceViewer, type ProjectedPlacement, type PromotionApplyResult, type PromotionPreview, type ProposedField, type ProposedSchemaChange, type Query, type Queue, type QueueColumnPrefs, type QueueCondition, type QueueDetail, type QueueDisplayConfig, type QueueItem, type QueueItemsResult, type QueueOwner, type QueueRowClickMode, type QueueScope, type QueueSource, type QueueSourceType, type QueueStats, type QueueTrendPoint, type QueueView, type QueueViewKind, type QueueWorkloadRow, READ_MANY_MAX, REQUEST_ID_HEADER, type ReadyReport, type RealtimeChange, type RealtimeEvent, type RealtimeToken, type RecordGraphEdge, type RecordGraphNode, type RecordLink, type RecordLinkType, type RecordTemplate, type RecordViewRecap, type RegisteredAction, type RelatedCommentEntry, type RelationFilter, type RelationOption, type Reminder, type ReportAlert, type ReportAlertCondition, type ReportAlertLogEntry, type ReportAnnotation, type ReportColumnFormat, type ReportDateRange, type ReportDef, type ReportEntityFilter, type ReportFilterPreset, type ReportQueryColumn, type ReportQueryWidgetConfig, type ReportSnapshotEntry, type ReportSubscription, type ReportTemplateEntry, type ReportVersionEntry, type ReportWidget, type ReportWidgetConfig, type ReportWidgetData, type ReportWidgetPreset, type ReportWidgetType, type RequestTrace, type ResolvedOwner, type RetentionPolicy, type RetentionRun, type RetentionRunResult, type Revision, type Role, type Rule, type RuntimeStats, type SavedSearch, type SavedView, type ScheduledChange, type ScheduledReport, type SchemaChoice, type SchemaFieldType, type SchemaProposal, type ScopeDimension, type ScopeDimensionInfo, type SemanticSearchMatch, type SentNotificationGroup, type SessionRecording, type SessionReplayMasking, type ShareLink, type SlaBatchStatus, type SlaRule, type SlaStatus, type StagedImportRun, type StagedImportStats, type StringFilterOps, type SubRow, type SubRowTemplate, type SupportTicket, type SupportTicketDetail, type SupportTicketStatus, type SyncJob, type Task, type TaskAgent, type TaskDoneWhenRule, type TaskPriority, type TaskStatus, type TimelineEvent, type TraceSpan, type TrafficSnapshot, type TrafficSnapshotEntity, type TrashEntry, type TreeFlatNode, type TreeNestedNode, type TreeNodeConfig, type TreePermission, type TreePermissionAction, type UUID, type UpdateDryRunReport, type UserActivityEntry, type UserActivitySummary, type UserScopesInfo, type ViewSubscription, type VirtualCollection, type Webhook, type WebhookDelivery, type WhichLayoutForm, type WidgetDrillBody, type WidgetDrillRows, type WidgetFeed, type WorkflowBinding, type WorkflowHistoryEntry, type WorkflowInstance, type WorkflowInstanceData, type WorkflowState, type WorkflowTransition, type Workspace, type WorkspaceQuotas, type WorkspaceTemplate, type WorkspaceUsage, _and, _contains, _ends_with, _eq, _gt, _gte, _in, _lt, _lte, _ncontains, _neq, _nin, _nnull, _none, _null, _or, _some, _starts_with, abandonHelpVideoUpload, acknowledgeNotification, acquireItemLock, activateLayout, addChatChannelMember, addInstanceOwner, addSubRow, aggregateItems, aiBrief, aiBuildReport, aiChat, aiCheckDuplicates, aiGenerate, aiMapColumns, aiQuery, aiReportFilters, aiReview, aiSummarize, aiValidate, answerAgentQuestion, appendSessionRecordingEvents, applyContentBundle, applyHelpVideoPackageImport, applyRecordTemplate, applySubRowTemplate, approveAddendum, approveAiProposal, archiveHelpVideo, archiveReadNotifications, asc, askHuman, attachFileToRecord, backupExportPath, batchItems, batchPickerExclusionStatus, bulkDeleteItems, bulkNotificationAction, bulkPickerExclusion, bulkRestoreTrash, bulkTransitionItems, bulkUpdateItems, bulkWriteItems, callExternalApi, callExternalApiEndpoint, callInstanceTool, cancelAgentQuestion, cancelJobRun, cancelScheduledChange, cancelStagedImport, captureCpuProfile, cascadeFieldDependencies, chaosWhatIf, checkBlackoutDate, checkItemFilter, claimQueueItem, claimSupportTicket, claimTask, clearTraces, cloneItem, cloneLayout, cloneReport, compareConfigSnapshot, completeTask, copyReportWidget, createAccessAudit, createActivityEntry, createAddendum, createAlertDefinition, createAlertSubscription, createAnomalyRule, createApiKey, createApprovalChain, createAtRiskRule, createAttributeDefinition, createBlackoutDate, createChatChannel, createChatRoomType, createCollectionLayout, createComment, createDashboard, createDashboardWidget, createDataQualityRule, createExternalApi, createExternalApiEndpoint, createFieldGroup, createFieldWatch, createGroupDm, createHelpVideo, createHierarchyConfig, createImportDefinition, createImportJob, createImportJobFromUrl, createInternalWidget, createIssue, createItem, createMetricAlertRule, createNivaro, createNotification, createNotificationSubscription, createPage, createPdfTemplate, createPersistedQuery, createPresence, createQueue, createQueueView, createRealtime, createRecordLink, createRecordTemplate, createReminder, createReport, createReportAlert, createReportAnnotation, createReportFromTemplate, createReportSnapshot, createReportWidgetPreset, createRetentionPolicy, createRole, createRolePolicy, createRule, createSavedSearch, createSavedView, createScheduledChange, createScheduledReport, createShareLink, createSlaRule, createSubRowTemplate, createSyncJob, createTask, createTreePermission, createUser, createViewSubscription, createVirtualCollection, createWebhook, createWidgetFeed, createWorkspace, createWorkspaceTemplate, decideApproval, deleteAccessAudit, deleteAddendum, deleteAlertDefinition, deleteAlertSubscription, deleteAnomalyRule, deleteApiKey, deleteApprovalChain, deleteAtRiskRule, deleteAttributeDefinition, deleteBlackoutDate, deleteChatMessage, deleteCollectionLayout, deleteComment, deleteDashboard, deleteDashboardWidget, deleteDataQualityRule, deleteExternalApi, deleteExternalApiEndpoint, deleteExternalApiSchema, deleteFieldGroup, deleteFieldTranslations, deleteFieldWatch, deleteFile, deleteHierarchyConfig, deleteImportJob, deleteInternalWidget, deleteIssue, deleteItem, deleteMetricAlertRule, deleteNotification, deleteNotificationSubscription, deletePage, deletePdfTemplate, deletePersistedQuery, deleteQueue, deleteQueueView, deleteRecordLink, deleteRecordTemplate, deleteReminder, deleteReport, deleteReportAlert, deleteReportAnnotation, deleteReportFilterPreset, deleteReportSnapshot, deleteReportTemplate, deleteReportWidgetPreset, deleteRetentionPolicy, deleteRole, deleteRolePolicy, deleteRule, deleteSavedSearch, deleteSavedView, deleteScheduledReport, deleteSessionRecording, deleteSlaRule, deleteSubRow, deleteSubRowTemplate, deleteSyncJob, deleteTask, deleteTreePermission, deleteUser, deleteViewSubscription, deleteVirtualCollection, deleteWebhook, deleteWidgetFeed, deleteWorkspace, deleteWorkspaceTemplate, deployImportProcedure, desc, describeLayoutForm, diffLayoutVersion, disableTwoFactor, discardHelpVideoPackageImport, drillDashboardWidgetRows, drillReportRow, drillReportWidgetRows, editChatMessage, endSessionRecording, errorBodyMessage, estimateBackgroundRun, evaluateAlerts, evaluateAtRisk, evaluateFieldDefaults, evaluateFieldLock, evaluateFieldRules, evaluateFieldVisibility, excludeFromPicker, excludeFromPickers, executeBulkAction, executeCustomQuery, executeImportTemplate, executeItemAction, executeScheduledChange, explainLayout, explainLayoutField, explainRecordAccess, explainReportTrend, exportBlueprint, exportConfigSnapshot, exportContent, exportContentBundle, exportHelpVideoPackage, exportSchemaSnapshot, fetchFormSchema, fileDownloadPath, fileTransformPath, finalizeHelpVideoUpload, generateToken, generateUserToken, getAlertDefinition, getAttributeValues, getBrunoCollection, getCommentHistory, getExternalApi, getExternalApiEndpoint, getFieldTranslations, getFlowRun, getLocales, getOpenApi, getPickerExclusionStatus, getPostmanCollection, getPresence, getRetentionPolicy, getSlaRule, getSlaStatus, getTranslations, getTypes, getWebhook, globalSearch, heartbeatItemLock, helpVideosFor, importExternalApiSpec, importSchemaSnapshot, includeInPicker, includeInPickers, installBlueprint, installCollectionPreset, invokeInternalWidgetAction, isNivaroError, isPageSlot, joinChatRoom, leaveChatRoom, listAccessAuditRuns, listAccessAudits, listActiveAtRiskRules, listActivePresence, listActivityActions, listAddendums, listAgentTasks, listAgentTriggerDeliveries, listAgentTriggers, listAlertDefinitions, listAlertSubscriptions, listAllNotificationSubscriptions, listAnomalyDefinitions, listAnomalyRules, listApiKeys, listApiRequests, listApprovalChains, listApprovalInstances, listAskedQuestions, listAtRiskRules, listAttributeDefinitions, listBackgroundRuns, listBlackoutDates, listBulkActions, listChangeOrders, listChatChannelMembers, listChatMessages, listChatPins, listChatRoles, listChatRoomTypes, listChatRooms, listCollectionPresets, listCollectionRecordTemplates, listComments, listCronJobs, listCustomQueries, listCustomQueryCatalog, listDashboards, listDataQualityRules, listDataQualityRuns, listDeadLetters, listExternalApiEndpoints, listExternalApiSchemas, listExternalApis, listFieldGroups, listFieldWatches, listFiles, listFlowRuns, listHelpVideoPages, listHelpVideoVersions, listHelpVideos, listHierarchyConfigs, listImportDefinitionVersions, listImportDefinitions, listImportJobs, listImportTemplates, listInstanceTools, listInternalWidgetPlacements, listInternalWidgets, listIssues, listItemActions, listItemScheduledChanges, listJobRuns, listLayoutVersions, listMailLog, listMetricAlertRules, listMetricAlertSubscriptions, listMetricDefinitions, listMyAgentQuestions, listMyHelpVideoUploads, listMyJobs, listMyTasks, listNotificationSubscriptions, listNotifications, listOrphanFiles, listPages, listPdfTemplates, listPersistedQueries, listPinnedItems, listPipelineVersions, listQueueViews, listQueues, listRecordLinks, listRecordMail, listRecordTemplates, listRegisteredExtensions, listRegisteredFlowOperations, listRegisteredFlowTriggers, listRelatedComments, listReminders, listReportAlerts, listReportAnnotations, listReportFilterPresets, listReportSnapshots, listReportTemplates, listReportVersions, listReportWidgetPresets, listReports, listRequestedTasks, listRetentionPolicies, listRetentionRuns, listRolePolicies, listRoleUsers, listRoles, listRules, listSavedSearches, listSavedViews, listScheduledChanges, listScheduledReports, listScopeDimensions, listSentNotifications, listSessionRecordings, listShareLinks, listSlaRules, listStagedImports, listSubRowTemplates, listSubRows, listSupportTickets, listSyncJobs, listTaskAgents, listTasks, listTeamTasks, listThroughputCollections, listTraces, listTrash, listTreePermissions, listViewSubscriptions, listVirtualCollections, listWebhookDeliveries, listWebhooks, listWidgetFeeds, listWorkspaceTemplates, listWorkspaces, logExport, logout, logoutAll, markAllNotificationsRead, markChatRoomRead, markNotificationRead, markNotificationsRead, moveTreeNode, nudgeTask, omniSearch, openHelpVideoPackageImport, openHelpVideoUpload, parseRealtimeChanges, presignFileUpload, previewContentBundle, previewHelpVideoPackageImport, previewImportJob, previewReportWidget, projectFieldConfig, proposeLayoutOps, proposeSchemaChange, publishHelpVideo, publishItem, purgeTrashItem, queryVirtualCollection, queueBulkWriteItems, readAccessAuditFindings, readActiveLayout, readActivity, readActivityEntry, readActivityReportSummary, readAddendum, readAgentQuestion, readAiSettings, readAlertLog, readAllStateOwners, readAnomalyLog, readApiAnalyticsByKey, readApiAnalyticsErrors, readApiAnalyticsSummary, readApiAnalyticsTimeseries, readApiAnalyticsTopCollections, readApiAnalyticsTopPaths, readApiKey, readApiKeyMonthlyUsage, readApiKeyUsage, readApprovalBrief, readApprovalChain, readAtRiskSummary, readAuthProviders, readBackgroundRun, readBackgroundRunResult, readBackupManifest, readBulkRun, readBusyJobs, readChanges, readChatConfig, readChatDirectory, readChatPeerRead, readCollection, readCollectionLayout, readCollectionLayouts, readCollections, readCommentCounts, readConfigInventory, readCoverageGaps, readDashboard, readDashboardWidgetData, readDataQualityRun, readDbPool, readDetailLayout, readDistinctValues, readDraftPublishConfig, readErpSubmissionHistory, readExpensiveSql, readFieldChangeHistory, readFieldConfig, readFieldImpact, readFieldWatch, readFileMeta, readFileUsage, readFilesByIds, readFormState, readHealthDetailed, readHelpVideo, readHelpVideoAnalytics, readHelpVideoDownloadLink, readHelpVideoDraft, readHelpVideoWalk, readHierarchyConfig, readHierarchyNodeAncestors, readHierarchyNodeChildren, readHierarchyNodes, readHierarchyTree, readImportJob, readImportProcedure, readInfrastructureSummary, readInstanceOwners, readInstanceRoster, readIntegrationHealth, readInternalWidget, readIssue, readIssueSummary, readItem, readItemBySlug, readItemDistinct, readItemLock, readItemLockConfig, readItems, readJobRegistry, readJobRunLog, readLastTouch, readLatestRevisionId, readLayoutAssignments, readLayoutBundle, readLayoutDrift, readLayoutGroups, readLayoutLint, readLayoutOverview, readLayoutProposals, readLayoutVersion, readMailLogEntry, readMailStats, readMany, readMcpCapabilities, readMcpToolsConfig, readMe, readMetricAlertLog, readMyOwnerSeats, readMyScopes, readMyWork, readNotificationCount, readNotificationHistory, readNotificationSubscriptionStats, readOnlinePresence, readOwnerGroups, readOwnerHistory, readPage, readPageWidgetData, readPdfTemplate, readPersistedQuery, readPickerExclusion, readPickerExclusions, readPipelineFlowMap, readPipelineOutline, readPipelineReplay, readPipelineTemplate, readPipelineTemplates, readPipelineVersion, readPreflight, readQueue, readQueueCollectionStates, readQueueColumnPrefs, readQueueItems, readQueueTrends, readQueueWorkload, readReadiness, readRecordDeletion, readRecordGraph, readRecordMute, readRelationOptions, readReport, readReportAlertLog, readReportAlertsLog, readReportFilterOptions, readReportFiring, readReportSnapshot, readReportSubscription, readReportUsage, readReportWidgetData, readRequiredHelpVideos, readRevision, readRevisions, readRole, readRuntimeStats, readSchemaProposal, readScopeDimensionCoverage, readSearchCounts, readSearchRecords, readSessionRecordingEvents, readSettings, readSingleton, readSlaStatusBatch, readStagedImport, readStagedImportStats, readStateOwnerGroups, readStateOwners, readStateOwnersBatch, readSupportTicket, readSyncJob, readTask, readTaskCounts, readTaskHistory, readThroughputReport, readTimeline, readTrace, readTrafficSnapshot, readTreeAncestors, readTreeChildren, readTreeConfig, readTreeDescendants, readTreeNested, readTreeNodes, readTwoFactorStatus, readUnreadNotificationCount, readUser, readUserActivity, readUserActivitySummary, readUserCard, readUserScopes, readUsers, readWorkflowBindings, readWorkflowInstance, readWorkflowInstances, readWorkspace, readWorkspaceUsage, readWsToken, rebuildTreePaths, recordHelpVideoProgress, registerHelpVideoPage, rehearseCreateItem, rehearseUpdateItem, reindexSemanticSearch, rejectAddendum, rejectAiProposal, releaseItemLock, releaseQueueItem, rematerializeQueue, removeChatChannelMember, removeInstanceOwner, renderFormImage, renderInternalWidget, renderPdfTemplate, reorderFieldGroups, reorderSubRows, reorderTreeSiblings, replaceSubRows, replayActivityEvent, replayFlow, replySupportTicket, reportClientError, requestRecordAccess, requeueStagedImport, rerecordHelpVideo, rerenderHelpVideo, resendMail, resetReportCache, resolveLayoutProposal, resolveReportAlert, restoreHelpVideoVersion, restoreImportDefinitionVersion, restoreLayoutVersion, restorePipelineVersion, restoreReportVersion, restoreTrashItem, retryDeadLetter, retryErpSubmission, retryWebhookDelivery, revokeApiKey, revokeShareLink, revokeToken, revokeUserToken, rollbackRevision, rotateWidgetFeedToken, runAccessAudit, runActivityReport, runActivityReportCsv, runCronJob, runDataQuality, runRetentionPolicy, runScheduledReport, runSyncJob, saveHelpVideoDraft, saveMcpToolsConfig, saveMyScopeDefaults, saveReportFilterPreset, saveReportTemplate, saveReportWidgets, saveUserScope, searchChatMessages, semanticSearch, sendBulkNotification, sendChatMessage, sendTestMail, sessionRecordingEnabled, setHelpVideoContexts, setHelpVideoRequirements, setMyDelegate, setQueueDefaultView, setReportSubscription, setSupportTicketStatus, setTranslations, setupTwoFactor, simulatePermissions, simulatePipeline, simulatePipelineImpact, snoozeNotification, startApproval, startBackgroundRun, startMasquerade, startSessionRecording, startWorkflow, stopMasquerade, submitAddendum, submitFormItem, submitItemForReview, submitLayoutOps, submitToErp, subscribeFieldWatch, subscribeMetricAlert, suggestImportValidation, suggestQueueLabels, switchWorkspace, testExternalApi, testFlow, testWebhook, toggleChatPin, toggleChatReaction, toggleCommentReaction, toggleEntryReaction, togglePinnedItem, toggleRecordMute, toggleReportAlert, touchRecordView, transitionWorkflow, unpublishHelpVideo, unpublishItem, unsubscribeFieldWatch, unsubscribeMetricAlert, updateAccessAudit, updateAddendum, updateAiSettings, updateAlertDefinition, updateAnomalyLogEntry, updateAnomalyRule, updateApiKey, updateApprovalChain, updateAtRiskRule, updateAttributeDefinition, updateAttributeValues, updateChatChannel, updateChatRoom, updateChatRoomType, updateCollectionLayout, updateComment, updateDashboard, updateDashboardWidget, updateDataQualityRule, updateDraftPublishConfig, updateErpSubmissionStatus, updateExternalApi, updateExternalApiEndpoint, updateFieldConfig, updateFieldGroup, updateFieldWatch, updateFileMeta, updateHelpVideo, updateHierarchyConfig, updateImportDefinition, updateInternalWidget, updateIssue, updateItem, updateItemLockConfig, updateLayoutAssignments, updateLayoutUngroupedSort, updateMe, updateMetricAlertRule, updateMetricAlertSubscription, updateNotificationSubscription, updatePage, updatePdfTemplate, updatePersistedQuery, updateQueue, updateQueueSources, updateQueueView, updateRecordTemplate, updateReminder, updateReport, updateReportAlert, updateReportWidgetPreset, updateRetentionPolicy, updateRole, updateRolePolicy, updateRoleUiPermissions, updateRule, updateSavedView, updateScheduledReport, updateSettings, updateSingleton, updateSlaRule, updateSyncJob, updateTask, updateTreePermission, updateUser, updateVirtualCollection, updateWebhook, updateWidgetFeed, updateWorkflowBinding, updateWorkspace, validateVirtualCollectionSql, verifyTwoFactor, whichLayoutForm, withHeaders, withSignal };