@ai-matrx/records 0.21.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +159 -1
- package/dist/core/index.cjs +518 -25
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +151 -17
- package/dist/core/index.d.ts +151 -17
- package/dist/core/index.js +518 -25
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +342 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +711 -12
- package/dist/index.d.ts +711 -12
- package/dist/index.js +342 -8
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +506 -8
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +821 -12
- package/dist/react/index.d.ts +821 -12
- package/dist/react/index.js +506 -8
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
package/dist/core/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Timestamp, Uuid, RelationCoordinate, RecordsConfig, RecordDocument, RecordsResult, RecordRead, ReadRow, Table, Field, StoredRecord, TableCapacity, NewFieldDeclaration, FieldPatch, EntityTableFacts, NewEntityFieldDeclaration, EntityFieldRights, EntityRecordRead, EntityRecordsFound, FormSummary, ImportPlan, ImportPolicy, ImportOpened, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalCard, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, AggregateFilter, DashboardRunResult, StuckRow, AggregateMeasure, AggregateBucket, AggregateRow, Subscription, MySubscription, DocToken, DocUnresolvedToken, DocTemplateRow, DocRenderRow, DocSignatureRow, RecordRevision, RecordHistoryEntry, RecordScopeContext, ConversationScope, ConversationScopeContext, FieldHistoryEntry, RestorePreview, RestoreResult, CommentThreadRead, CommentWritten, ReadValue, AnonTokenBinding, ChecklistSpec, ChecklistDeclared, ChecklistTemplateSummary, ChecklistTemplateShape, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistStepCompleted, WorkState, WorkGraph, WorkInstantiation, WorkTurn, WorkAssignmentField, WorkSlotHold, WorkInboxItem, WorkListFlavour, WorkListItem, WorkAssignment, WorkRecordState, WorkApprover, WorkChange, WorkApprovalFiled, WorkApprovalDecision, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, FieldProposal, TableProposal, MyLevel, RecordsError, WriteConflict, PgError, RecordsDataSource, StaleWriteDetail, PredictedRefusal } from '../index.cjs';
|
|
2
|
-
export { ABSENCE_REASONS, ACTOR_VOCABULARY, AbsenceReason, Actor, AggregateOperation, AggregateWindow, COMPUTE_ON, CONTEXT_POLICIES, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, ComputeOn, ContextPolicy, CustomFieldTableType, DELIVERIES, DashboardBlockKind, DashboardBlockResult, Delivery, DocSignatureCheck, ENTITY_TOKENS, EntityFieldValue, EntityRecordMatch, EntityToken, FIELD_SENSITIVITIES, FIELD_SOURCES, FRESHNESS, FieldBehavior, FieldRule, FieldSensitivity, FieldSource, FieldTypeWord, ForbiddenEnvelopeWord, Freshness, HiddenFieldNotice, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, KERNEL_TABLES, KernelTableName, MERGE_FIELD_MODIFIERS, MERGE_FIELD_SEMANTIC_TYPES, MERGE_FIELD_SOURCES, MergeField, MergeFieldModifier, MergeFieldProvenance, MergeFieldResolution, MergeFieldSemanticType, MergeFieldSource, MergeFieldTransform, MissingBehavior, ON_DELETE, OVERRIDE_POLICIES, OnDelete, OverridePolicy, PARITY_FIELD_TYPES, PERMISSION_LEVELS, PER_VALUE_ACCESS_WORDS, ParityFieldType, ParityFieldTypeDescriptor, PerValueAccessWord, PermissionLevel, PortalPrincipal, PortalTableExposure, ProvenancePointer, RELATION_BINDINGS, RELATION_CARDINALITIES, RELATION_FLAVORS, RETIRED_ACTOR_WORDS, RULE_NODE_KINDS, RULE_USES, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsErrorCode, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationBinding, RelationCardinality, RelationCarries, RelationFlavor, RelationProperties, RelationTarget, ResolutionTriple, RetiredActorWord, Rule, RuleAnswer, RuleExpression, RuleNodeKind, RuleUse, STORAGE_MODES, STORE_DOORS, STORE_KNOBS, STORE_REFUSAL_CODES, StorageMode, StoreDoorName, StoreRefusalCode, SubscriptionBlock, SubscriptionCadence, TABLE_DISPLAYS, TABLE_ORIGINS, TABLE_TYPES, TableDisplay, TableOrigin, TableType, VALUE_ALTERNATE_KEYS, VALUE_ENVELOPE_KEYS, ValueAlternate, ValueAlternateKey, ValueEnvelope, ValueEnvelopeKey, ValueSource, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, asPermissionLevel, atLeast, choiceSlug, choiceValuesOf, choicesOf, err, highestLevel, holdsARetiredChoice, isRecordsErr, isTheChosen, looksLikeAnId, measureKey, ok, optionKey, optionLabel, portalPath, publicFormPath, scopeChip } from '../index.cjs';
|
|
1
|
+
import { Timestamp, Uuid, RelationCoordinate, RecordsConfig, RecordDocument, RecordsResult, RecordRead, ReadRow, Table, Field, StoredRecord, TableCapacity, NewFieldDeclaration, FieldPatch, EntityTableFacts, NewEntityFieldDeclaration, EntityFieldRights, EntityRecordRead, EntityRecordsFound, FormSummary, ImportPlan, ImportPolicy, ImportOpened, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalCard, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, AggregateFilter, DashboardRunResult, StuckRow, CaptureSheetSummary, CaptureSheetFace, CaptureFileRef, CaptureOutcome, EnrichmentSummary, EnrichDeclared, EnrichDueRow, EnrichCell, EnrichRun, AggregateMeasure, AggregateBucket, AggregateRow, Subscription, MySubscription, SubscriptionSpec, DigestPreview, DocToken, DocUnresolvedToken, DocTemplateRow, DocRenderRow, DocSignatureRow, RecordRevision, RecordHistoryEntry, RecordScopeContext, ConversationScope, ConversationScopeContext, FieldHistoryEntry, RestorePreview, RestoreResult, CommentThreadRead, CommentWritten, ReadValue, AnonTokenBinding, ChecklistSpec, ChecklistDeclared, ChecklistTemplateSummary, ChecklistTemplateShape, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistStepCompleted, WorkState, WorkGraph, WorkInstantiation, WorkTurn, WorkAssignmentField, WorkSlotHold, WorkInboxItem, WorkListFlavour, WorkListItem, WorkAssignment, WorkRecordState, WorkApprover, WorkChange, WorkApprovalFiled, WorkApprovalDecision, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, FieldProposal, TableProposal, MyLevel, RecordsError, WriteConflict, PgError, RecordsDataSource, StaleWriteDetail, PredictedRefusal } from '../index.cjs';
|
|
2
|
+
export { ABSENCE_REASONS, ACTOR_VOCABULARY, AbsenceReason, Actor, AggregateOperation, AggregateWindow, COMPUTE_ON, CONTEXT_POLICIES, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, ComputeOn, ContextPolicy, CustomFieldTableType, DELIVERIES, DashboardBlockKind, DashboardBlockResult, Delivery, DocSignatureCheck, ENTITY_TOKENS, EnrichAlternate, EnrichSource, Enrichment, EntityFieldValue, EntityRecordMatch, EntityToken, FIELD_SENSITIVITIES, FIELD_SOURCES, FRESHNESS, FieldBehavior, FieldRule, FieldSensitivity, FieldSource, FieldTypeWord, ForbiddenEnvelopeWord, Freshness, HiddenFieldNotice, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, KERNEL_TABLES, KernelTableName, MERGE_FIELD_MODIFIERS, MERGE_FIELD_SEMANTIC_TYPES, MERGE_FIELD_SOURCES, MergeField, MergeFieldModifier, MergeFieldProvenance, MergeFieldResolution, MergeFieldSemanticType, MergeFieldSource, MergeFieldTransform, MissingBehavior, ON_DELETE, OVERRIDE_POLICIES, OnDelete, OverridePolicy, PARITY_FIELD_TYPES, PERMISSION_LEVELS, PER_VALUE_ACCESS_WORDS, ParityFieldType, ParityFieldTypeDescriptor, PerValueAccessWord, PermissionLevel, PortalPrincipal, PortalTableExposure, ProvenancePointer, QueuedCapture, QueuedCaptureFile, QueuedCaptureState, QuietHours, REFUSALS_WORTH_REPEATING, RELATION_BINDINGS, RELATION_CARDINALITIES, RELATION_FLAVORS, RETIRED_ACTOR_WORDS, RULE_NODE_KINDS, RULE_USES, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsErrorCode, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationBinding, RelationCardinality, RelationCarries, RelationFlavor, RelationProperties, RelationTarget, ResolutionTriple, RetiredActorWord, Rule, RuleAnswer, RuleExpression, RuleNodeKind, RuleUse, STORAGE_MODES, STORE_DOORS, STORE_KNOBS, STORE_REFUSAL_CODES, StorageMode, StoreDoorName, StoreRefusalCode, SubscriptionBlock, SubscriptionCadence, TABLE_DISPLAYS, TABLE_ORIGINS, TABLE_TYPES, TableDisplay, TableOrigin, TableType, VALUE_ALTERNATE_KEYS, VALUE_ENVELOPE_KEYS, ValueAlternate, ValueAlternateKey, ValueEnvelope, ValueEnvelopeKey, ValueSource, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, asPermissionLevel, atLeast, choiceSlug, choiceValuesOf, choicesOf, err, highestLevel, holdsARetiredChoice, indexedDbStore, isDecided, isRecordsErr, isTheChosen, looksLikeAnId, measureKey, memoryStore, mintClientKey, ok, openCaptureQueue, optionKey, optionLabel, portalPath, publicFormPath, scopeChip } from '../index.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* DOOR-8. As-of on EITHER clock, and they are different questions:
|
|
@@ -450,6 +450,97 @@ interface RecordsClient {
|
|
|
450
450
|
filter?: Record<string, AggregateFilter>;
|
|
451
451
|
limit?: number;
|
|
452
452
|
}): Promise<RecordsResult<StuckRow[]>>;
|
|
453
|
+
/**
|
|
454
|
+
* Declare or re-state a crew capture sheet over a Table. Admin on the Table.
|
|
455
|
+
* Closed to the crew until `capturePublish`, like every publishing act here.
|
|
456
|
+
*/
|
|
457
|
+
captureSheetDeclare(args: {
|
|
458
|
+
table_id: Uuid;
|
|
459
|
+
title: string;
|
|
460
|
+
questions: Array<Record<string, unknown>>;
|
|
461
|
+
presentation?: Record<string, unknown> | null;
|
|
462
|
+
sheet_id?: Uuid | null;
|
|
463
|
+
notify_rule_id?: Uuid | null;
|
|
464
|
+
}): Promise<RecordsResult<Uuid>>;
|
|
465
|
+
/** Open the sheet to the crew, or close it. Admin on the Table. */
|
|
466
|
+
capturePublish(args: {
|
|
467
|
+
sheet_id: Uuid;
|
|
468
|
+
open?: boolean;
|
|
469
|
+
}): Promise<RecordsResult<string | null>>;
|
|
470
|
+
/** The crew sheets of this organization, with what has come in through each. */
|
|
471
|
+
captureSheets(args?: {
|
|
472
|
+
table_id?: Uuid | null;
|
|
473
|
+
}): Promise<RecordsResult<CaptureSheetSummary[]>>;
|
|
474
|
+
/**
|
|
475
|
+
* Everything a phone needs to run one sheet OFFLINE — the questions, the Fields
|
|
476
|
+
* with their ids and parity types, and an honest `may_capture` with a sentence.
|
|
477
|
+
* Load it once on a signal; it is the last network call before the walk.
|
|
478
|
+
*/
|
|
479
|
+
captureOpen(args: {
|
|
480
|
+
sheet_id: Uuid;
|
|
481
|
+
}): Promise<RecordsResult<CaptureSheetFace | null>>;
|
|
482
|
+
/**
|
|
483
|
+
* One capture: the answers, the file references, the device, the moment the phone
|
|
484
|
+
* took it and the place. Idempotent on `client_key`, which the PHONE mints when
|
|
485
|
+
* the capture is taken, offline, before its first attempt — send the same key on
|
|
486
|
+
* every retry and the answer comes back `replay: true` with the first record's id.
|
|
487
|
+
*/
|
|
488
|
+
captureSubmit(args: {
|
|
489
|
+
sheet_id: Uuid;
|
|
490
|
+
client_key: string;
|
|
491
|
+
answers: Record<string, unknown>;
|
|
492
|
+
files?: CaptureFileRef[];
|
|
493
|
+
device?: string | null;
|
|
494
|
+
captured_at?: string | null;
|
|
495
|
+
location?: Record<string, unknown> | null;
|
|
496
|
+
}): Promise<RecordsResult<CaptureOutcome | null>>;
|
|
497
|
+
/** Every agent-owned column, with how many cells are filled, stale or pinned, and what it has cost. */
|
|
498
|
+
enrichments(args?: {
|
|
499
|
+
table_id?: Uuid | null;
|
|
500
|
+
}): Promise<RecordsResult<EnrichmentSummary[]>>;
|
|
501
|
+
/**
|
|
502
|
+
* Define, change or TURN ON an Enrichment on one Field. Admin on the Table.
|
|
503
|
+
* `{enabled: true}` on its own turns an existing one on without resetting it —
|
|
504
|
+
* and turning it on is what authorises every value it writes afterwards.
|
|
505
|
+
*/
|
|
506
|
+
enrichDeclare(args: {
|
|
507
|
+
field_id: Uuid;
|
|
508
|
+
spec: Record<string, unknown>;
|
|
509
|
+
}): Promise<RecordsResult<EnrichDeclared>>;
|
|
510
|
+
/**
|
|
511
|
+
* The rows that need this column filled in, each with what the instruction may
|
|
512
|
+
* read. A cell somebody pinned is never returned. This is what a PREVIEW shows
|
|
513
|
+
* before anybody enables anything.
|
|
514
|
+
*/
|
|
515
|
+
enrichDue(args: {
|
|
516
|
+
field_id: Uuid;
|
|
517
|
+
limit?: number;
|
|
518
|
+
include_fresh?: boolean;
|
|
519
|
+
}): Promise<RecordsResult<EnrichDueRow[]>>;
|
|
520
|
+
/**
|
|
521
|
+
* THE BADGE DATA FOR A WHOLE PAGE, in one call. Who wrote each value, when, out
|
|
522
|
+
* of what source, its candidates, whether a person pinned it and whether it is
|
|
523
|
+
* past its freshness date. Asked per cell this would be one round trip per badge.
|
|
524
|
+
*/
|
|
525
|
+
enrichCells(args: {
|
|
526
|
+
table_id: Uuid;
|
|
527
|
+
field_keys?: string[] | null;
|
|
528
|
+
record_ids?: Uuid[] | null;
|
|
529
|
+
}): Promise<RecordsResult<EnrichCell[]>>;
|
|
530
|
+
/** Hold one cell against the model that fills its column, or hand it back. */
|
|
531
|
+
enrichPin(args: {
|
|
532
|
+
record_id: Uuid;
|
|
533
|
+
field_key: string;
|
|
534
|
+
pinned?: boolean;
|
|
535
|
+
}): Promise<RecordsResult<{
|
|
536
|
+
pinned: boolean;
|
|
537
|
+
says: string;
|
|
538
|
+
}>>;
|
|
539
|
+
/** What this column has cost, run by run. */
|
|
540
|
+
enrichRuns(args?: {
|
|
541
|
+
field_id?: Uuid | null;
|
|
542
|
+
limit?: number;
|
|
543
|
+
}): Promise<RecordsResult<EnrichRun[]>>;
|
|
453
544
|
/** Take a dashboard away. The records it counted are untouched — a canvas owns nothing. */
|
|
454
545
|
dashboardDelete(args: {
|
|
455
546
|
dashboard_id: Uuid;
|
|
@@ -521,6 +612,25 @@ interface RecordsClient {
|
|
|
521
612
|
rule_id: Uuid;
|
|
522
613
|
muted: boolean;
|
|
523
614
|
}): Promise<RecordsResult<boolean>>;
|
|
615
|
+
/**
|
|
616
|
+
* WRITE ONE. The store refuses a cadence no runner acts on, a channel this
|
|
617
|
+
* platform does not send on and quiet hours nobody can parse — by name — then
|
|
618
|
+
* declares the Rule through `rule_declare`, because a Rule written as a record
|
|
619
|
+
* carries `data_class = 'record'` and every reader that goes looking for a Rule
|
|
620
|
+
* steps straight past it (REC-72).
|
|
621
|
+
*/
|
|
622
|
+
subscriptionDeclare(args: {
|
|
623
|
+
table_id: Uuid;
|
|
624
|
+
spec: SubscriptionSpec;
|
|
625
|
+
}): Promise<RecordsResult<Uuid>>;
|
|
626
|
+
/**
|
|
627
|
+
* SHOW ME ONE NOW. The summary this subscription would send at this moment, with
|
|
628
|
+
* what entered, left and changed NAMED. It assembles only: nothing is delivered,
|
|
629
|
+
* nothing is recorded and the watermark does not move.
|
|
630
|
+
*/
|
|
631
|
+
subscriptionPreview(args: {
|
|
632
|
+
rule_id: Uuid;
|
|
633
|
+
}): Promise<RecordsResult<DigestPreview>>;
|
|
524
634
|
docTemplateSave(args: {
|
|
525
635
|
table_id: Uuid;
|
|
526
636
|
name: string;
|
|
@@ -1140,6 +1250,18 @@ declare const DOORS: {
|
|
|
1140
1250
|
readonly dashboardRun: "dashboard_run";
|
|
1141
1251
|
readonly dashboardStuck: "dashboard_stuck";
|
|
1142
1252
|
readonly dashboardDelete: "dashboard_delete";
|
|
1253
|
+
readonly captureSheetDeclare: "capture_sheet_declare";
|
|
1254
|
+
readonly capturePublish: "capture_publish";
|
|
1255
|
+
readonly captureSheets: "capture_sheets";
|
|
1256
|
+
readonly captureOpen: "capture_open";
|
|
1257
|
+
readonly captureSubmit: "capture_submit";
|
|
1258
|
+
readonly enrichments: "enrichments";
|
|
1259
|
+
readonly enrichDeclare: "enrich_declare";
|
|
1260
|
+
readonly enrichDue: "enrich_due";
|
|
1261
|
+
readonly enrichCells: "enrich_cells";
|
|
1262
|
+
readonly enrichLand: "enrich_land";
|
|
1263
|
+
readonly enrichPin: "enrich_pin";
|
|
1264
|
+
readonly enrichRuns: "enrich_runs";
|
|
1143
1265
|
readonly recordHistory: "record_history";
|
|
1144
1266
|
readonly fieldHistory: "field_history";
|
|
1145
1267
|
readonly restorePreview: "record_restore_preview";
|
|
@@ -1160,6 +1282,8 @@ declare const DOORS: {
|
|
|
1160
1282
|
readonly aggSubscriptionCadences: "agg_subscription_cadences";
|
|
1161
1283
|
readonly subscriptions: "subscriptions";
|
|
1162
1284
|
readonly subscriptionMute: "subscription_mute";
|
|
1285
|
+
readonly subscriptionDeclare: "subscription_declare";
|
|
1286
|
+
readonly subscriptionPreview: "subscription_preview";
|
|
1163
1287
|
readonly subscriptionCadences: "subscription_cadences";
|
|
1164
1288
|
readonly docTemplateSave: "doc_template_save";
|
|
1165
1289
|
readonly docRenderBody: "doc_render_body";
|
|
@@ -1319,24 +1443,34 @@ declare function toAoa(fields: Field[], rows: ExportRow[]): string[][];
|
|
|
1319
1443
|
* the same way, and for the same reason.
|
|
1320
1444
|
*/
|
|
1321
1445
|
declare function exportXlsx(fields: Field[], rows: ExportRow[], sheetLabel?: string): Promise<Uint8Array>;
|
|
1322
|
-
/**
|
|
1446
|
+
/**
|
|
1447
|
+
* A PARSED FILE, AND NOTHING ELSE: its headings, and every row keyed by them.
|
|
1448
|
+
*
|
|
1449
|
+
* 🚨 THERE IS NO `field`, NO `unmapped` AND NO WAY TO ASK FOR ONE, and that is
|
|
1450
|
+
* the point. Until 2026-09-20 this parse ALSO decided which Field each heading
|
|
1451
|
+
* meant — it took `fields`, matched each header by key or label, keyed the rows
|
|
1452
|
+
* by whatever it matched, and **dropped every column it did not**. That cannot
|
|
1453
|
+
* be the input to `custom.io_import_plan` / `custom.io_import_rows`, whose whole
|
|
1454
|
+
* job is to decide the mapping and to OFFER what they could not match as a new
|
|
1455
|
+
* column: the store can only offer a column whose values reached it.
|
|
1456
|
+
*
|
|
1457
|
+
* Measured by looking at the screen: every unmapped column's samples came back
|
|
1458
|
+
* empty and its proposal read "every row in this column is empty, so there is
|
|
1459
|
+
* nothing to go on" — for columns plainly full of values.
|
|
1460
|
+
*
|
|
1461
|
+
* The fix is the SHAPE, not a second field beside the first. These functions no
|
|
1462
|
+
* longer take `fields`, so a parse cannot decide a mapping even by accident, and
|
|
1463
|
+
* there is no safe path left beside the unsafe one.
|
|
1464
|
+
*/
|
|
1323
1465
|
interface ParsedImport {
|
|
1324
|
-
/**
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
field: Field | null;
|
|
1328
|
-
}>;
|
|
1466
|
+
/** The file's own headings, in the file's own order and spelling. */
|
|
1467
|
+
headers: string[];
|
|
1468
|
+
/** Every row, keyed by heading. Every column is here; nothing is dropped. */
|
|
1329
1469
|
rows: Array<Record<string, string>>;
|
|
1330
|
-
/**
|
|
1331
|
-
* DOOR-14 / AGT-N-7. Headers that matched no Field. They are NEVER dropped
|
|
1332
|
-
* quietly: an unmapped key becomes a field proposal a person approves, and the
|
|
1333
|
-
* import surface shows this list.
|
|
1334
|
-
*/
|
|
1335
|
-
unmapped: string[];
|
|
1336
1470
|
}
|
|
1337
1471
|
/** RFC-4180 enough for what the canonical table writes, quotes and embedded newlines included. */
|
|
1338
1472
|
declare function parseCsv(text: string): string[][];
|
|
1339
|
-
declare function importCsv(
|
|
1340
|
-
declare function importXlsx(
|
|
1473
|
+
declare function importCsv(text: string): ParsedImport;
|
|
1474
|
+
declare function importXlsx(bytes: ArrayBuffer | Uint8Array): Promise<ParsedImport>;
|
|
1341
1475
|
|
|
1342
|
-
export { AggregateBucket, AggregateFilter, AggregateMeasure, AggregateRow, AnonTokenBinding, type AsOf, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FormSummary, ImportBatchResult, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type ParsedImport, PgError, PortalCard, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, ReadRow, ReadValue, RecordDocument, RecordHistoryEntry, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsResult, RelationCoordinate, ResolvedPublishBinding, RestorePreview, RestoreResult, StaleWriteDetail, StoredRecord, StuckRow, Subscription, type SupabaseLike, Table, TableCapacity, TableProposal, Timestamp, Uuid, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkGraph, WorkInboxItem, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, asWriteConflict, cellText, createRecordsClient, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, importCsv, importXlsx, intersectIds, mapPgError, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa };
|
|
1476
|
+
export { AggregateBucket, AggregateFilter, AggregateMeasure, AggregateRow, AnonTokenBinding, type AsOf, CaptureFileRef, CaptureOutcome, CaptureSheetFace, CaptureSheetSummary, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, DigestPreview, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EnrichCell, EnrichDeclared, EnrichDueRow, EnrichRun, EnrichmentSummary, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FormSummary, ImportBatchResult, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type ParsedImport, PgError, PortalCard, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, ReadRow, ReadValue, RecordDocument, RecordHistoryEntry, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsResult, RelationCoordinate, ResolvedPublishBinding, RestorePreview, RestoreResult, StaleWriteDetail, StoredRecord, StuckRow, Subscription, SubscriptionSpec, type SupabaseLike, Table, TableCapacity, TableProposal, Timestamp, Uuid, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkGraph, WorkInboxItem, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, asWriteConflict, cellText, createRecordsClient, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, importCsv, importXlsx, intersectIds, mapPgError, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa };
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Timestamp, Uuid, RelationCoordinate, RecordsConfig, RecordDocument, RecordsResult, RecordRead, ReadRow, Table, Field, StoredRecord, TableCapacity, NewFieldDeclaration, FieldPatch, EntityTableFacts, NewEntityFieldDeclaration, EntityFieldRights, EntityRecordRead, EntityRecordsFound, FormSummary, ImportPlan, ImportPolicy, ImportOpened, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalCard, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, AggregateFilter, DashboardRunResult, StuckRow, AggregateMeasure, AggregateBucket, AggregateRow, Subscription, MySubscription, DocToken, DocUnresolvedToken, DocTemplateRow, DocRenderRow, DocSignatureRow, RecordRevision, RecordHistoryEntry, RecordScopeContext, ConversationScope, ConversationScopeContext, FieldHistoryEntry, RestorePreview, RestoreResult, CommentThreadRead, CommentWritten, ReadValue, AnonTokenBinding, ChecklistSpec, ChecklistDeclared, ChecklistTemplateSummary, ChecklistTemplateShape, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistStepCompleted, WorkState, WorkGraph, WorkInstantiation, WorkTurn, WorkAssignmentField, WorkSlotHold, WorkInboxItem, WorkListFlavour, WorkListItem, WorkAssignment, WorkRecordState, WorkApprover, WorkChange, WorkApprovalFiled, WorkApprovalDecision, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, FieldProposal, TableProposal, MyLevel, RecordsError, WriteConflict, PgError, RecordsDataSource, StaleWriteDetail, PredictedRefusal } from '../index.js';
|
|
2
|
-
export { ABSENCE_REASONS, ACTOR_VOCABULARY, AbsenceReason, Actor, AggregateOperation, AggregateWindow, COMPUTE_ON, CONTEXT_POLICIES, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, ComputeOn, ContextPolicy, CustomFieldTableType, DELIVERIES, DashboardBlockKind, DashboardBlockResult, Delivery, DocSignatureCheck, ENTITY_TOKENS, EntityFieldValue, EntityRecordMatch, EntityToken, FIELD_SENSITIVITIES, FIELD_SOURCES, FRESHNESS, FieldBehavior, FieldRule, FieldSensitivity, FieldSource, FieldTypeWord, ForbiddenEnvelopeWord, Freshness, HiddenFieldNotice, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, KERNEL_TABLES, KernelTableName, MERGE_FIELD_MODIFIERS, MERGE_FIELD_SEMANTIC_TYPES, MERGE_FIELD_SOURCES, MergeField, MergeFieldModifier, MergeFieldProvenance, MergeFieldResolution, MergeFieldSemanticType, MergeFieldSource, MergeFieldTransform, MissingBehavior, ON_DELETE, OVERRIDE_POLICIES, OnDelete, OverridePolicy, PARITY_FIELD_TYPES, PERMISSION_LEVELS, PER_VALUE_ACCESS_WORDS, ParityFieldType, ParityFieldTypeDescriptor, PerValueAccessWord, PermissionLevel, PortalPrincipal, PortalTableExposure, ProvenancePointer, RELATION_BINDINGS, RELATION_CARDINALITIES, RELATION_FLAVORS, RETIRED_ACTOR_WORDS, RULE_NODE_KINDS, RULE_USES, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsErrorCode, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationBinding, RelationCardinality, RelationCarries, RelationFlavor, RelationProperties, RelationTarget, ResolutionTriple, RetiredActorWord, Rule, RuleAnswer, RuleExpression, RuleNodeKind, RuleUse, STORAGE_MODES, STORE_DOORS, STORE_KNOBS, STORE_REFUSAL_CODES, StorageMode, StoreDoorName, StoreRefusalCode, SubscriptionBlock, SubscriptionCadence, TABLE_DISPLAYS, TABLE_ORIGINS, TABLE_TYPES, TableDisplay, TableOrigin, TableType, VALUE_ALTERNATE_KEYS, VALUE_ENVELOPE_KEYS, ValueAlternate, ValueAlternateKey, ValueEnvelope, ValueEnvelopeKey, ValueSource, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, asPermissionLevel, atLeast, choiceSlug, choiceValuesOf, choicesOf, err, highestLevel, holdsARetiredChoice, isRecordsErr, isTheChosen, looksLikeAnId, measureKey, ok, optionKey, optionLabel, portalPath, publicFormPath, scopeChip } from '../index.js';
|
|
1
|
+
import { Timestamp, Uuid, RelationCoordinate, RecordsConfig, RecordDocument, RecordsResult, RecordRead, ReadRow, Table, Field, StoredRecord, TableCapacity, NewFieldDeclaration, FieldPatch, EntityTableFacts, NewEntityFieldDeclaration, EntityFieldRights, EntityRecordRead, EntityRecordsFound, FormSummary, ImportPlan, ImportPolicy, ImportOpened, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalCard, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, AggregateFilter, DashboardRunResult, StuckRow, CaptureSheetSummary, CaptureSheetFace, CaptureFileRef, CaptureOutcome, EnrichmentSummary, EnrichDeclared, EnrichDueRow, EnrichCell, EnrichRun, AggregateMeasure, AggregateBucket, AggregateRow, Subscription, MySubscription, SubscriptionSpec, DigestPreview, DocToken, DocUnresolvedToken, DocTemplateRow, DocRenderRow, DocSignatureRow, RecordRevision, RecordHistoryEntry, RecordScopeContext, ConversationScope, ConversationScopeContext, FieldHistoryEntry, RestorePreview, RestoreResult, CommentThreadRead, CommentWritten, ReadValue, AnonTokenBinding, ChecklistSpec, ChecklistDeclared, ChecklistTemplateSummary, ChecklistTemplateShape, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistStepCompleted, WorkState, WorkGraph, WorkInstantiation, WorkTurn, WorkAssignmentField, WorkSlotHold, WorkInboxItem, WorkListFlavour, WorkListItem, WorkAssignment, WorkRecordState, WorkApprover, WorkChange, WorkApprovalFiled, WorkApprovalDecision, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, FieldProposal, TableProposal, MyLevel, RecordsError, WriteConflict, PgError, RecordsDataSource, StaleWriteDetail, PredictedRefusal } from '../index.js';
|
|
2
|
+
export { ABSENCE_REASONS, ACTOR_VOCABULARY, AbsenceReason, Actor, AggregateOperation, AggregateWindow, COMPUTE_ON, CONTEXT_POLICIES, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, ComputeOn, ContextPolicy, CustomFieldTableType, DELIVERIES, DashboardBlockKind, DashboardBlockResult, Delivery, DocSignatureCheck, ENTITY_TOKENS, EnrichAlternate, EnrichSource, Enrichment, EntityFieldValue, EntityRecordMatch, EntityToken, FIELD_SENSITIVITIES, FIELD_SOURCES, FRESHNESS, FieldBehavior, FieldRule, FieldSensitivity, FieldSource, FieldTypeWord, ForbiddenEnvelopeWord, Freshness, HiddenFieldNotice, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, KERNEL_TABLES, KernelTableName, MERGE_FIELD_MODIFIERS, MERGE_FIELD_SEMANTIC_TYPES, MERGE_FIELD_SOURCES, MergeField, MergeFieldModifier, MergeFieldProvenance, MergeFieldResolution, MergeFieldSemanticType, MergeFieldSource, MergeFieldTransform, MissingBehavior, ON_DELETE, OVERRIDE_POLICIES, OnDelete, OverridePolicy, PARITY_FIELD_TYPES, PERMISSION_LEVELS, PER_VALUE_ACCESS_WORDS, ParityFieldType, ParityFieldTypeDescriptor, PerValueAccessWord, PermissionLevel, PortalPrincipal, PortalTableExposure, ProvenancePointer, QueuedCapture, QueuedCaptureFile, QueuedCaptureState, QuietHours, REFUSALS_WORTH_REPEATING, RELATION_BINDINGS, RELATION_CARDINALITIES, RELATION_FLAVORS, RETIRED_ACTOR_WORDS, RULE_NODE_KINDS, RULE_USES, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsErrorCode, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationBinding, RelationCardinality, RelationCarries, RelationFlavor, RelationProperties, RelationTarget, ResolutionTriple, RetiredActorWord, Rule, RuleAnswer, RuleExpression, RuleNodeKind, RuleUse, STORAGE_MODES, STORE_DOORS, STORE_KNOBS, STORE_REFUSAL_CODES, StorageMode, StoreDoorName, StoreRefusalCode, SubscriptionBlock, SubscriptionCadence, TABLE_DISPLAYS, TABLE_ORIGINS, TABLE_TYPES, TableDisplay, TableOrigin, TableType, VALUE_ALTERNATE_KEYS, VALUE_ENVELOPE_KEYS, ValueAlternate, ValueAlternateKey, ValueEnvelope, ValueEnvelopeKey, ValueSource, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, asPermissionLevel, atLeast, choiceSlug, choiceValuesOf, choicesOf, err, highestLevel, holdsARetiredChoice, indexedDbStore, isDecided, isRecordsErr, isTheChosen, looksLikeAnId, measureKey, memoryStore, mintClientKey, ok, openCaptureQueue, optionKey, optionLabel, portalPath, publicFormPath, scopeChip } from '../index.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* DOOR-8. As-of on EITHER clock, and they are different questions:
|
|
@@ -450,6 +450,97 @@ interface RecordsClient {
|
|
|
450
450
|
filter?: Record<string, AggregateFilter>;
|
|
451
451
|
limit?: number;
|
|
452
452
|
}): Promise<RecordsResult<StuckRow[]>>;
|
|
453
|
+
/**
|
|
454
|
+
* Declare or re-state a crew capture sheet over a Table. Admin on the Table.
|
|
455
|
+
* Closed to the crew until `capturePublish`, like every publishing act here.
|
|
456
|
+
*/
|
|
457
|
+
captureSheetDeclare(args: {
|
|
458
|
+
table_id: Uuid;
|
|
459
|
+
title: string;
|
|
460
|
+
questions: Array<Record<string, unknown>>;
|
|
461
|
+
presentation?: Record<string, unknown> | null;
|
|
462
|
+
sheet_id?: Uuid | null;
|
|
463
|
+
notify_rule_id?: Uuid | null;
|
|
464
|
+
}): Promise<RecordsResult<Uuid>>;
|
|
465
|
+
/** Open the sheet to the crew, or close it. Admin on the Table. */
|
|
466
|
+
capturePublish(args: {
|
|
467
|
+
sheet_id: Uuid;
|
|
468
|
+
open?: boolean;
|
|
469
|
+
}): Promise<RecordsResult<string | null>>;
|
|
470
|
+
/** The crew sheets of this organization, with what has come in through each. */
|
|
471
|
+
captureSheets(args?: {
|
|
472
|
+
table_id?: Uuid | null;
|
|
473
|
+
}): Promise<RecordsResult<CaptureSheetSummary[]>>;
|
|
474
|
+
/**
|
|
475
|
+
* Everything a phone needs to run one sheet OFFLINE — the questions, the Fields
|
|
476
|
+
* with their ids and parity types, and an honest `may_capture` with a sentence.
|
|
477
|
+
* Load it once on a signal; it is the last network call before the walk.
|
|
478
|
+
*/
|
|
479
|
+
captureOpen(args: {
|
|
480
|
+
sheet_id: Uuid;
|
|
481
|
+
}): Promise<RecordsResult<CaptureSheetFace | null>>;
|
|
482
|
+
/**
|
|
483
|
+
* One capture: the answers, the file references, the device, the moment the phone
|
|
484
|
+
* took it and the place. Idempotent on `client_key`, which the PHONE mints when
|
|
485
|
+
* the capture is taken, offline, before its first attempt — send the same key on
|
|
486
|
+
* every retry and the answer comes back `replay: true` with the first record's id.
|
|
487
|
+
*/
|
|
488
|
+
captureSubmit(args: {
|
|
489
|
+
sheet_id: Uuid;
|
|
490
|
+
client_key: string;
|
|
491
|
+
answers: Record<string, unknown>;
|
|
492
|
+
files?: CaptureFileRef[];
|
|
493
|
+
device?: string | null;
|
|
494
|
+
captured_at?: string | null;
|
|
495
|
+
location?: Record<string, unknown> | null;
|
|
496
|
+
}): Promise<RecordsResult<CaptureOutcome | null>>;
|
|
497
|
+
/** Every agent-owned column, with how many cells are filled, stale or pinned, and what it has cost. */
|
|
498
|
+
enrichments(args?: {
|
|
499
|
+
table_id?: Uuid | null;
|
|
500
|
+
}): Promise<RecordsResult<EnrichmentSummary[]>>;
|
|
501
|
+
/**
|
|
502
|
+
* Define, change or TURN ON an Enrichment on one Field. Admin on the Table.
|
|
503
|
+
* `{enabled: true}` on its own turns an existing one on without resetting it —
|
|
504
|
+
* and turning it on is what authorises every value it writes afterwards.
|
|
505
|
+
*/
|
|
506
|
+
enrichDeclare(args: {
|
|
507
|
+
field_id: Uuid;
|
|
508
|
+
spec: Record<string, unknown>;
|
|
509
|
+
}): Promise<RecordsResult<EnrichDeclared>>;
|
|
510
|
+
/**
|
|
511
|
+
* The rows that need this column filled in, each with what the instruction may
|
|
512
|
+
* read. A cell somebody pinned is never returned. This is what a PREVIEW shows
|
|
513
|
+
* before anybody enables anything.
|
|
514
|
+
*/
|
|
515
|
+
enrichDue(args: {
|
|
516
|
+
field_id: Uuid;
|
|
517
|
+
limit?: number;
|
|
518
|
+
include_fresh?: boolean;
|
|
519
|
+
}): Promise<RecordsResult<EnrichDueRow[]>>;
|
|
520
|
+
/**
|
|
521
|
+
* THE BADGE DATA FOR A WHOLE PAGE, in one call. Who wrote each value, when, out
|
|
522
|
+
* of what source, its candidates, whether a person pinned it and whether it is
|
|
523
|
+
* past its freshness date. Asked per cell this would be one round trip per badge.
|
|
524
|
+
*/
|
|
525
|
+
enrichCells(args: {
|
|
526
|
+
table_id: Uuid;
|
|
527
|
+
field_keys?: string[] | null;
|
|
528
|
+
record_ids?: Uuid[] | null;
|
|
529
|
+
}): Promise<RecordsResult<EnrichCell[]>>;
|
|
530
|
+
/** Hold one cell against the model that fills its column, or hand it back. */
|
|
531
|
+
enrichPin(args: {
|
|
532
|
+
record_id: Uuid;
|
|
533
|
+
field_key: string;
|
|
534
|
+
pinned?: boolean;
|
|
535
|
+
}): Promise<RecordsResult<{
|
|
536
|
+
pinned: boolean;
|
|
537
|
+
says: string;
|
|
538
|
+
}>>;
|
|
539
|
+
/** What this column has cost, run by run. */
|
|
540
|
+
enrichRuns(args?: {
|
|
541
|
+
field_id?: Uuid | null;
|
|
542
|
+
limit?: number;
|
|
543
|
+
}): Promise<RecordsResult<EnrichRun[]>>;
|
|
453
544
|
/** Take a dashboard away. The records it counted are untouched — a canvas owns nothing. */
|
|
454
545
|
dashboardDelete(args: {
|
|
455
546
|
dashboard_id: Uuid;
|
|
@@ -521,6 +612,25 @@ interface RecordsClient {
|
|
|
521
612
|
rule_id: Uuid;
|
|
522
613
|
muted: boolean;
|
|
523
614
|
}): Promise<RecordsResult<boolean>>;
|
|
615
|
+
/**
|
|
616
|
+
* WRITE ONE. The store refuses a cadence no runner acts on, a channel this
|
|
617
|
+
* platform does not send on and quiet hours nobody can parse — by name — then
|
|
618
|
+
* declares the Rule through `rule_declare`, because a Rule written as a record
|
|
619
|
+
* carries `data_class = 'record'` and every reader that goes looking for a Rule
|
|
620
|
+
* steps straight past it (REC-72).
|
|
621
|
+
*/
|
|
622
|
+
subscriptionDeclare(args: {
|
|
623
|
+
table_id: Uuid;
|
|
624
|
+
spec: SubscriptionSpec;
|
|
625
|
+
}): Promise<RecordsResult<Uuid>>;
|
|
626
|
+
/**
|
|
627
|
+
* SHOW ME ONE NOW. The summary this subscription would send at this moment, with
|
|
628
|
+
* what entered, left and changed NAMED. It assembles only: nothing is delivered,
|
|
629
|
+
* nothing is recorded and the watermark does not move.
|
|
630
|
+
*/
|
|
631
|
+
subscriptionPreview(args: {
|
|
632
|
+
rule_id: Uuid;
|
|
633
|
+
}): Promise<RecordsResult<DigestPreview>>;
|
|
524
634
|
docTemplateSave(args: {
|
|
525
635
|
table_id: Uuid;
|
|
526
636
|
name: string;
|
|
@@ -1140,6 +1250,18 @@ declare const DOORS: {
|
|
|
1140
1250
|
readonly dashboardRun: "dashboard_run";
|
|
1141
1251
|
readonly dashboardStuck: "dashboard_stuck";
|
|
1142
1252
|
readonly dashboardDelete: "dashboard_delete";
|
|
1253
|
+
readonly captureSheetDeclare: "capture_sheet_declare";
|
|
1254
|
+
readonly capturePublish: "capture_publish";
|
|
1255
|
+
readonly captureSheets: "capture_sheets";
|
|
1256
|
+
readonly captureOpen: "capture_open";
|
|
1257
|
+
readonly captureSubmit: "capture_submit";
|
|
1258
|
+
readonly enrichments: "enrichments";
|
|
1259
|
+
readonly enrichDeclare: "enrich_declare";
|
|
1260
|
+
readonly enrichDue: "enrich_due";
|
|
1261
|
+
readonly enrichCells: "enrich_cells";
|
|
1262
|
+
readonly enrichLand: "enrich_land";
|
|
1263
|
+
readonly enrichPin: "enrich_pin";
|
|
1264
|
+
readonly enrichRuns: "enrich_runs";
|
|
1143
1265
|
readonly recordHistory: "record_history";
|
|
1144
1266
|
readonly fieldHistory: "field_history";
|
|
1145
1267
|
readonly restorePreview: "record_restore_preview";
|
|
@@ -1160,6 +1282,8 @@ declare const DOORS: {
|
|
|
1160
1282
|
readonly aggSubscriptionCadences: "agg_subscription_cadences";
|
|
1161
1283
|
readonly subscriptions: "subscriptions";
|
|
1162
1284
|
readonly subscriptionMute: "subscription_mute";
|
|
1285
|
+
readonly subscriptionDeclare: "subscription_declare";
|
|
1286
|
+
readonly subscriptionPreview: "subscription_preview";
|
|
1163
1287
|
readonly subscriptionCadences: "subscription_cadences";
|
|
1164
1288
|
readonly docTemplateSave: "doc_template_save";
|
|
1165
1289
|
readonly docRenderBody: "doc_render_body";
|
|
@@ -1319,24 +1443,34 @@ declare function toAoa(fields: Field[], rows: ExportRow[]): string[][];
|
|
|
1319
1443
|
* the same way, and for the same reason.
|
|
1320
1444
|
*/
|
|
1321
1445
|
declare function exportXlsx(fields: Field[], rows: ExportRow[], sheetLabel?: string): Promise<Uint8Array>;
|
|
1322
|
-
/**
|
|
1446
|
+
/**
|
|
1447
|
+
* A PARSED FILE, AND NOTHING ELSE: its headings, and every row keyed by them.
|
|
1448
|
+
*
|
|
1449
|
+
* 🚨 THERE IS NO `field`, NO `unmapped` AND NO WAY TO ASK FOR ONE, and that is
|
|
1450
|
+
* the point. Until 2026-09-20 this parse ALSO decided which Field each heading
|
|
1451
|
+
* meant — it took `fields`, matched each header by key or label, keyed the rows
|
|
1452
|
+
* by whatever it matched, and **dropped every column it did not**. That cannot
|
|
1453
|
+
* be the input to `custom.io_import_plan` / `custom.io_import_rows`, whose whole
|
|
1454
|
+
* job is to decide the mapping and to OFFER what they could not match as a new
|
|
1455
|
+
* column: the store can only offer a column whose values reached it.
|
|
1456
|
+
*
|
|
1457
|
+
* Measured by looking at the screen: every unmapped column's samples came back
|
|
1458
|
+
* empty and its proposal read "every row in this column is empty, so there is
|
|
1459
|
+
* nothing to go on" — for columns plainly full of values.
|
|
1460
|
+
*
|
|
1461
|
+
* The fix is the SHAPE, not a second field beside the first. These functions no
|
|
1462
|
+
* longer take `fields`, so a parse cannot decide a mapping even by accident, and
|
|
1463
|
+
* there is no safe path left beside the unsafe one.
|
|
1464
|
+
*/
|
|
1323
1465
|
interface ParsedImport {
|
|
1324
|
-
/**
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
field: Field | null;
|
|
1328
|
-
}>;
|
|
1466
|
+
/** The file's own headings, in the file's own order and spelling. */
|
|
1467
|
+
headers: string[];
|
|
1468
|
+
/** Every row, keyed by heading. Every column is here; nothing is dropped. */
|
|
1329
1469
|
rows: Array<Record<string, string>>;
|
|
1330
|
-
/**
|
|
1331
|
-
* DOOR-14 / AGT-N-7. Headers that matched no Field. They are NEVER dropped
|
|
1332
|
-
* quietly: an unmapped key becomes a field proposal a person approves, and the
|
|
1333
|
-
* import surface shows this list.
|
|
1334
|
-
*/
|
|
1335
|
-
unmapped: string[];
|
|
1336
1470
|
}
|
|
1337
1471
|
/** RFC-4180 enough for what the canonical table writes, quotes and embedded newlines included. */
|
|
1338
1472
|
declare function parseCsv(text: string): string[][];
|
|
1339
|
-
declare function importCsv(
|
|
1340
|
-
declare function importXlsx(
|
|
1473
|
+
declare function importCsv(text: string): ParsedImport;
|
|
1474
|
+
declare function importXlsx(bytes: ArrayBuffer | Uint8Array): Promise<ParsedImport>;
|
|
1341
1475
|
|
|
1342
|
-
export { AggregateBucket, AggregateFilter, AggregateMeasure, AggregateRow, AnonTokenBinding, type AsOf, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FormSummary, ImportBatchResult, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type ParsedImport, PgError, PortalCard, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, ReadRow, ReadValue, RecordDocument, RecordHistoryEntry, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsResult, RelationCoordinate, ResolvedPublishBinding, RestorePreview, RestoreResult, StaleWriteDetail, StoredRecord, StuckRow, Subscription, type SupabaseLike, Table, TableCapacity, TableProposal, Timestamp, Uuid, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkGraph, WorkInboxItem, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, asWriteConflict, cellText, createRecordsClient, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, importCsv, importXlsx, intersectIds, mapPgError, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa };
|
|
1476
|
+
export { AggregateBucket, AggregateFilter, AggregateMeasure, AggregateRow, AnonTokenBinding, type AsOf, CaptureFileRef, CaptureOutcome, CaptureSheetFace, CaptureSheetSummary, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, DigestPreview, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EnrichCell, EnrichDeclared, EnrichDueRow, EnrichRun, EnrichmentSummary, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FormSummary, ImportBatchResult, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type ParsedImport, PgError, PortalCard, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, ReadRow, ReadValue, RecordDocument, RecordHistoryEntry, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsResult, RelationCoordinate, ResolvedPublishBinding, RestorePreview, RestoreResult, StaleWriteDetail, StoredRecord, StuckRow, Subscription, SubscriptionSpec, type SupabaseLike, Table, TableCapacity, TableProposal, Timestamp, Uuid, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkGraph, WorkInboxItem, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, asWriteConflict, cellText, createRecordsClient, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, importCsv, importXlsx, intersectIds, mapPgError, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa };
|