@nivaro/react 0.2.11 → 0.2.13
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.
- package/dist/full.css +1 -1
- package/dist/index.d.ts +140 -1
- package/dist/index.js +38160 -36544
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -300,6 +300,19 @@ export declare interface ApiVersionInfo {
|
|
|
300
300
|
|
|
301
301
|
export declare function applyValidationRule(rule: FormValidationRule_2, value: unknown, label: string, record?: Record<string, unknown>): string | null;
|
|
302
302
|
|
|
303
|
+
/**
|
|
304
|
+
* "As it was" (#1385): the record as it stood when the notification was sent
|
|
305
|
+
* beside the record now — two columns, the fields that moved since marked
|
|
306
|
+
* with an amber dot and listed first. Scalar + link fields only; the server
|
|
307
|
+
* narrows both sides to what the viewer may read NOW. Needs `<NivaroProvider>`.
|
|
308
|
+
*/
|
|
309
|
+
export declare function AsItWasSheet({ notificationId, title, onClose }: {
|
|
310
|
+
notificationId: number | null;
|
|
311
|
+
/** The notification's subject — the sheet's eyebrow. */
|
|
312
|
+
title?: string | null;
|
|
313
|
+
onClose: () => void;
|
|
314
|
+
}): JSX.Element;
|
|
315
|
+
|
|
303
316
|
/**
|
|
304
317
|
* "Fill from a document" — a person drops a statement of work, a quote, a
|
|
305
318
|
* spreadsheet on a NEW record and reviews what the model read out of it
|
|
@@ -1433,6 +1446,10 @@ export declare interface DataTableProps<T = Record<string, unknown>> {
|
|
|
1433
1446
|
|
|
1434
1447
|
export declare function DateField({ field, value, onChange, error, disabled, readOnly, inputId, errorId }: FieldComponentProps): JSX.Element;
|
|
1435
1448
|
|
|
1449
|
+
export declare function DbTuningView({ onNotice }: {
|
|
1450
|
+
onNotice?: Notice;
|
|
1451
|
+
}): JSX.Element;
|
|
1452
|
+
|
|
1436
1453
|
/** Decoder for `?prefill=` (base64 → JSON), tolerant of '+' arriving as ' '. */
|
|
1437
1454
|
export declare function decodePrefill(raw: string | null | undefined): Record<string, unknown> | null;
|
|
1438
1455
|
|
|
@@ -3950,6 +3967,8 @@ export declare function NivaroProvider({ client, children }: {
|
|
|
3950
3967
|
*/
|
|
3951
3968
|
export declare function normalizeFieldType(rawType: string, iface: string | null, relation: FormFieldDescriptor['relation']): FormFieldType;
|
|
3952
3969
|
|
|
3970
|
+
declare type Notice = (message: string, tone?: 'error' | 'success') => void;
|
|
3971
|
+
|
|
3953
3972
|
export declare function NotificationActions({ actions, notificationId, onDone, onError, size, className }: NotificationActionsProps): JSX.Element | null;
|
|
3954
3973
|
|
|
3955
3974
|
/** An inline action the server says is safe to fire from a click. */
|
|
@@ -4048,6 +4067,28 @@ export declare interface NotificationBellProps {
|
|
|
4048
4067
|
tabBadge?: boolean;
|
|
4049
4068
|
}
|
|
4050
4069
|
|
|
4070
|
+
/**
|
|
4071
|
+
* Record bundles (#1256): the server's `bundle=record` grouping of a page —
|
|
4072
|
+
* every row that names the same record folded into one entry. The rows ride
|
|
4073
|
+
* along so the expand list needs no second request.
|
|
4074
|
+
*/
|
|
4075
|
+
export declare interface NotificationBundle<R = unknown> {
|
|
4076
|
+
collection: string;
|
|
4077
|
+
item: string;
|
|
4078
|
+
/** The record's friendly id (a raw id when nothing resolves it). */
|
|
4079
|
+
label: string;
|
|
4080
|
+
count: number;
|
|
4081
|
+
unread: number;
|
|
4082
|
+
lane: NotificationLane;
|
|
4083
|
+
categories: string[];
|
|
4084
|
+
newest: string | null;
|
|
4085
|
+
/** The server's URL for the recipient's app — the fallback when the host
|
|
4086
|
+
* has no record route. */
|
|
4087
|
+
url: string | null;
|
|
4088
|
+
ids: number[];
|
|
4089
|
+
rows: R[];
|
|
4090
|
+
}
|
|
4091
|
+
|
|
4051
4092
|
export declare function NotificationCenterView({ routes, onNavigate, app, mailLogUrl, subscriptionsPath, onNotice, onError, className }: NotificationCenterViewProps): JSX.Element;
|
|
4052
4093
|
|
|
4053
4094
|
export declare interface NotificationCenterViewProps {
|
|
@@ -5336,7 +5377,7 @@ export declare interface QueueRealtimeAdapter {
|
|
|
5336
5377
|
subscribe: (collections: string[], onUpdate: () => void) => () => void;
|
|
5337
5378
|
}
|
|
5338
5379
|
|
|
5339
|
-
export declare function QueueWorklist({ queueId, realtime, renderError, hideCreateActions }: QueueWorklistProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | ReactPortal | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | JSX.Element | null;
|
|
5380
|
+
export declare function QueueWorklist({ queueId, realtime, renderError, hideCreateActions, onAsk }: QueueWorklistProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | ReactPortal | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | JSX.Element | null;
|
|
5340
5381
|
|
|
5341
5382
|
export declare interface QueueWorklistProps {
|
|
5342
5383
|
queueId: string;
|
|
@@ -5347,6 +5388,13 @@ export declare interface QueueWorklistProps {
|
|
|
5347
5388
|
* everywhere; a list hides them only when every collection the queue can
|
|
5348
5389
|
* create in is on it (the header covers those, not the rest). */
|
|
5349
5390
|
hideCreateActions?: boolean | string[];
|
|
5391
|
+
/** Hosts with an Ask AI page pass this: the toolbar gains "Ask about this
|
|
5392
|
+
* queue" (#1276), which hands the queue over so the host can open Ask AI
|
|
5393
|
+
* with the question seeded. Absent = no button. */
|
|
5394
|
+
onAsk?: (queue: {
|
|
5395
|
+
id: string;
|
|
5396
|
+
name: string;
|
|
5397
|
+
}) => void;
|
|
5350
5398
|
}
|
|
5351
5399
|
|
|
5352
5400
|
export declare function QueueWorkloadView({ queueId }: {
|
|
@@ -6710,6 +6758,97 @@ export declare function translateScopeValues(client: {
|
|
|
6710
6758
|
target_collection: string;
|
|
6711
6759
|
}, ids: Array<string | number>, valueField?: string): Promise<Array<string | number>>;
|
|
6712
6760
|
|
|
6761
|
+
/**
|
|
6762
|
+
* Database tuning (#996): what the nightly observer proposed, the proof behind each proposal,
|
|
6763
|
+
* and the one-click Apply / Roll back / Dismiss / Re-prove. Propose-only — nothing changes until
|
|
6764
|
+
* an administrator clicks; the request carries the proposal id, never a statement.
|
|
6765
|
+
*/
|
|
6766
|
+
declare type TuningKind = 'index_create' | 'index_drop' | 'proc_rewrite' | 'rollup_store' | 'query_cache';
|
|
6767
|
+
|
|
6768
|
+
declare interface TuningProof {
|
|
6769
|
+
passed: boolean;
|
|
6770
|
+
method: string;
|
|
6771
|
+
before: Record<string, number | string | null>;
|
|
6772
|
+
after: Record<string, number | string | null>;
|
|
6773
|
+
detail: string;
|
|
6774
|
+
rows_diff?: Array<{
|
|
6775
|
+
set: number;
|
|
6776
|
+
added: string[];
|
|
6777
|
+
removed: string[];
|
|
6778
|
+
}>;
|
|
6779
|
+
watch?: Array<{
|
|
6780
|
+
at: string;
|
|
6781
|
+
value: number | null;
|
|
6782
|
+
}>;
|
|
6783
|
+
}
|
|
6784
|
+
|
|
6785
|
+
/** Mirror of the API's ProposalRow. */
|
|
6786
|
+
export declare interface TuningProposal {
|
|
6787
|
+
id: string;
|
|
6788
|
+
kind: TuningKind;
|
|
6789
|
+
target: string;
|
|
6790
|
+
fingerprint: string;
|
|
6791
|
+
status: TuningStatus;
|
|
6792
|
+
title: string;
|
|
6793
|
+
evidence: Record<string, unknown>;
|
|
6794
|
+
proof: TuningProof | null;
|
|
6795
|
+
estimate_ms_per_day: number;
|
|
6796
|
+
risk: 'reversible' | 'review';
|
|
6797
|
+
replicated: boolean;
|
|
6798
|
+
dialect_note: string | null;
|
|
6799
|
+
apply: Record<string, unknown>;
|
|
6800
|
+
undo: Record<string, unknown>;
|
|
6801
|
+
applied_at: string | null;
|
|
6802
|
+
applied_by: string | null;
|
|
6803
|
+
watch_until: string | null;
|
|
6804
|
+
watch_baseline: {
|
|
6805
|
+
before: Record<string, number | null>;
|
|
6806
|
+
after: Record<string, number | null>;
|
|
6807
|
+
} | null;
|
|
6808
|
+
rolled_back_at: string | null;
|
|
6809
|
+
rollback_reason: string | null;
|
|
6810
|
+
dismissed_at: string | null;
|
|
6811
|
+
dismissed_by: string | null;
|
|
6812
|
+
dismiss_note: string | null;
|
|
6813
|
+
first_seen: string;
|
|
6814
|
+
last_seen: string;
|
|
6815
|
+
run_id: number | null;
|
|
6816
|
+
}
|
|
6817
|
+
|
|
6818
|
+
declare interface TuningSettings {
|
|
6819
|
+
enabled: boolean;
|
|
6820
|
+
ai_rewrites: boolean;
|
|
6821
|
+
min_estimate_ms_per_day: number;
|
|
6822
|
+
watch_days: number;
|
|
6823
|
+
regression_pct: number;
|
|
6824
|
+
proc_timeout_minutes: number;
|
|
6825
|
+
ai_daily_budget_usd: number;
|
|
6826
|
+
}
|
|
6827
|
+
|
|
6828
|
+
declare type TuningStatus = 'proposed' | 'rejected_by_proof' | 'stale' | 'applying' | 'watching' | 'applied' | 'rolled_back' | 'dismissed' | 'failed';
|
|
6829
|
+
|
|
6830
|
+
/** GET /db-tuning. */
|
|
6831
|
+
export declare interface TuningSummary {
|
|
6832
|
+
settings: TuningSettings;
|
|
6833
|
+
by_status: Record<string, number>;
|
|
6834
|
+
by_kind: Record<string, number>;
|
|
6835
|
+
open_estimate_ms_per_day: number;
|
|
6836
|
+
applied_30d: number;
|
|
6837
|
+
last_run: {
|
|
6838
|
+
id: number;
|
|
6839
|
+
started_at: string;
|
|
6840
|
+
status: string;
|
|
6841
|
+
outcome: string | null;
|
|
6842
|
+
error: string | null;
|
|
6843
|
+
} | null;
|
|
6844
|
+
is_running: boolean;
|
|
6845
|
+
observers: Array<{
|
|
6846
|
+
id: string;
|
|
6847
|
+
owner: string;
|
|
6848
|
+
kind: string;
|
|
6849
|
+
}>;
|
|
6850
|
+
}
|
|
6851
|
+
|
|
6713
6852
|
/** What is unsaved right now — the leave-page prompt, the changes tray and
|
|
6714
6853
|
* the host's own dirty indicator all read this one breakdown. */
|
|
6715
6854
|
declare interface UnsavedSummary {
|