@ai-matrx/records 0.58.8 → 0.58.11
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 +47 -0
- package/dist/core/index.cjs +77 -6
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +51 -4
- package/dist/core/index.d.ts +51 -4
- package/dist/core/index.js +77 -6
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +7 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +17 -5
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +38 -4
- package/dist/react/index.d.ts +38 -4
- package/dist/react/index.js +17 -5
- package/dist/react/index.js.map +1 -1
- package/dist/{types-FXtEsU7W.d.cts → types-BeDeDL6g.d.cts} +22 -3
- package/dist/{types-FXtEsU7W.d.ts → types-BeDeDL6g.d.ts} +22 -3
- package/dist/use-cases/index.cjs.map +1 -1
- package/dist/use-cases/index.d.cts +2 -2
- package/dist/use-cases/index.d.ts +2 -2
- package/dist/use-cases/index.js.map +1 -1
- package/package.json +1 -1
package/dist/core/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Timestamp, p as Uuid, R as RecordsErrorCode, q as RecordDocument, r as RecordsResult, s as RecordGraphWritten, t as RecordRead, u as ReadRow, v as Field, S as StoredRecord, w as NewFieldDeclaration, x as FieldPatch, y as RecordRevision, z as ReadValue, A as FieldProposal, C as TableProposal, D as RecordsError, W as WriteConflict, E as FieldTypeWord, G as PgError, H as StaleWriteDetail, I as PredictedRefusal } from '../types-
|
|
2
|
-
export { J as ABSENCE_REASONS, K as ACTOR_VOCABULARY, L as AbsenceReason, M as Actor, O as COMPUTE_ON, Q as CONTEXT_POLICIES, V as ComputeOn, X as ContextPolicy, Y as DECLARABLE_FIELD_KINDS, Z as DELIVERIES, _ as DeclarableFieldKind, $ as Delivery, a0 as ENTITY_TOKENS, a1 as EntityToken, a2 as FIELD_SENSITIVITIES, a3 as FIELD_SOURCES, a4 as FRESHNESS, a5 as FieldBehavior, a6 as FieldRule, a7 as FieldSensitivity, a8 as FieldSource, a9 as ForbiddenEnvelopeWord, aa as Freshness, ab as HiddenFieldNotice, ac as KERNEL_TABLES, ad as KernelTableName, ae as MERGE_FIELD_MODIFIERS, af as MERGE_FIELD_SEMANTIC_TYPES, ag as MERGE_FIELD_SOURCES, ah as MergeFieldModifier, ai as MergeFieldSemanticType, aj as MergeFieldSource, ak as ON_DELETE, al as OVERRIDE_POLICIES, am as OnDelete, an as OverridePolicy, ao as PARITY_FIELD_TYPES, ap as PER_VALUE_ACCESS_WORDS, aq as ParityFieldType, ar as ParityFieldTypeDescriptor, as as PerValueAccessWord, at as ProvenancePointer, au as RELATION_BINDINGS, av as RELATION_CARDINALITIES, aw as RELATION_FLAVORS, ax as RETIRED_ACTOR_WORDS, ay as RULE_NODE_KINDS, az as RULE_USES, aA as RelationBinding, aB as RelationCardinality, aC as RelationDisplay, aD as RelationFlavor, aE as RetiredActorWord, aF as RuleNodeKind, aG as RuleUse, aH as STORAGE_MODES, aI as STORE_DOORS, aJ as STORE_KNOBS, aK as STORE_REFUSAL_CODES, aL as StorageMode, aM as StoreDoorName, aN as StoreRefusalCode, aO as TABLE_DISPLAYS, aP as TABLE_ORIGINS, aQ as TABLE_TYPES, aR as TableDisplay, aS as TableOrigin, aT as TableType, aU as VALUE_ALTERNATE_KEYS, aV as VALUE_ENVELOPE_KEYS, aW as ValueAlternate, aX as ValueAlternateKey, aY as ValueEnvelope, aZ as ValueEnvelopeKey, a_ as ValueSource, a$ as allowsOtherValues, b0 as err, b1 as isRecordsErr, b2 as ok } from '../types-
|
|
1
|
+
import { T as Timestamp, p as Uuid, R as RecordsErrorCode, q as RecordDocument, r as RecordsResult, s as RecordGraphWritten, t as RecordRead, u as ReadRow, v as Field, S as StoredRecord, w as NewFieldDeclaration, x as FieldPatch, y as RecordRevision, z as ReadValue, A as FieldProposal, C as TableProposal, D as RecordsError, W as WriteConflict, E as FieldTypeWord, G as PgError, H as StaleWriteDetail, I as PredictedRefusal } from '../types-BeDeDL6g.cjs';
|
|
2
|
+
export { J as ABSENCE_REASONS, K as ACTOR_VOCABULARY, L as AbsenceReason, M as Actor, O as COMPUTE_ON, Q as CONTEXT_POLICIES, V as ComputeOn, X as ContextPolicy, Y as DECLARABLE_FIELD_KINDS, Z as DELIVERIES, _ as DeclarableFieldKind, $ as Delivery, a0 as ENTITY_TOKENS, a1 as EntityToken, a2 as FIELD_SENSITIVITIES, a3 as FIELD_SOURCES, a4 as FRESHNESS, a5 as FieldBehavior, a6 as FieldRule, a7 as FieldSensitivity, a8 as FieldSource, a9 as ForbiddenEnvelopeWord, aa as Freshness, ab as HiddenFieldNotice, ac as KERNEL_TABLES, ad as KernelTableName, ae as MERGE_FIELD_MODIFIERS, af as MERGE_FIELD_SEMANTIC_TYPES, ag as MERGE_FIELD_SOURCES, ah as MergeFieldModifier, ai as MergeFieldSemanticType, aj as MergeFieldSource, ak as ON_DELETE, al as OVERRIDE_POLICIES, am as OnDelete, an as OverridePolicy, ao as PARITY_FIELD_TYPES, ap as PER_VALUE_ACCESS_WORDS, aq as ParityFieldType, ar as ParityFieldTypeDescriptor, as as PerValueAccessWord, at as ProvenancePointer, au as RELATION_BINDINGS, av as RELATION_CARDINALITIES, aw as RELATION_FLAVORS, ax as RETIRED_ACTOR_WORDS, ay as RULE_NODE_KINDS, az as RULE_USES, aA as RelationBinding, aB as RelationCardinality, aC as RelationDisplay, aD as RelationFlavor, aE as RetiredActorWord, aF as RuleNodeKind, aG as RuleUse, aH as STORAGE_MODES, aI as STORE_DOORS, aJ as STORE_KNOBS, aK as STORE_REFUSAL_CODES, aL as StorageMode, aM as StoreDoorName, aN as StoreRefusalCode, aO as TABLE_DISPLAYS, aP as TABLE_ORIGINS, aQ as TABLE_TYPES, aR as TableDisplay, aS as TableOrigin, aT as TableType, aU as VALUE_ALTERNATE_KEYS, aV as VALUE_ENVELOPE_KEYS, aW as ValueAlternate, aX as ValueAlternateKey, aY as ValueEnvelope, aZ as ValueEnvelopeKey, a_ as ValueSource, a$ as allowsOtherValues, b0 as err, b1 as isRecordsErr, b2 as ok } from '../types-BeDeDL6g.cjs';
|
|
3
3
|
import { RelationCoordinate, RecordsConfig, TableArchiveProgress, StoreFilter, ArchiveLane, ArchivedRow, Table, TableHome, TableMoved, TableCapacity, RelationWordsManyArgs, EntityTableFacts, NewEntityFieldDeclaration, EntityFieldRights, EntityRecordRead, EntityRecordsFound, Pipeline, PipelineColumn, PipelineVerdict, PipelineMoveResult, PipelineMoveManyItem, PipelineMoveMany, PipelineSpec, PipelineDeclared, StageRuleOnFail, StageRuleEnforcement, StagePending, StagePendingOnBoard, PipelineGate, PipelineGatePreview, FormSummary, BookingSummary, BookingAvailability, BookingDeclared, ImportPlan, ImportPolicy, ImportOpened, ImportColumnsDeclared, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalArchiveFilter, PortalArchiveAnswer, PortalTableRef, PortalCard, PortalConfigInput, PortalFormSpec, PortalFormAnswer, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, RecordFilter, AggregateCompare, AggregateBucket, DashboardRunResult, StuckRow, CaptureSheetSummary, CaptureSheetFace, CaptureFileRef, CaptureOutcome, EnrichmentSummary, EnrichDeclared, EnrichDueRow, EnrichCell, EnrichRun, AggregateMeasure, AggregateRow, Subscription, MySubscription, SubscriptionSpec, DigestPreview, SavedViewRow, SavedViewSpecIn, DocToken, DocUnresolvedToken, DocTemplateRow, DocRenderRow, DocSignatureRow, RecordHistoryEntry, RecordScopeContext, ConversationScope, ConversationScopeContext, FieldHistoryEntry, RestorePreview, RestoreResult, CommentThreadRead, CommentWritten, AnonTokenBinding, ChecklistSpec, ChecklistDeclared, ChecklistTemplateSummary, ChecklistTemplateShape, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistStepCompleted, WorkState, WorkGraph, WorkInstantiation, WorkTurn, WorkAssignmentField, WorkSlotHold, WorkInboxView, WorkInboxItem, InboxStateChange, InboxCounts, WorkListFlavour, WorkListItem, WorkAssignment, WorkRecordState, WorkApprover, WorkChange, WorkApprovalFiled, WorkApprovalDecision, WorkDecideManyItem, WorkDecideMany, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, MyLevel, DecorationPath, TableDecorations, GridLayout, FormulaParse, RowAction, ActionRunResult, RecordEvent, TableWebhookDeclared, TableWebhook, ExampleBuilt, IoExportPage, TableListEntry, TableSyncSpec, TableSyncResult, TableRowCount, RecordHeader, OutsideShareAnswer, ViewOrderSet, RecordsDataSource } from '../index.cjs';
|
|
4
4
|
export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, ActionRefusal, AggregateCompareKind, AggregateCompareWindows, AggregateDelta, AggregateFilter, AggregateOperation, AggregateWindow, ArchivedDoorRow, BookingWindow, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, ChoiceOptions, CoerceOptions, Coerced, CoercedAnswers, CoercibleField, CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DashboardBlockKind, DashboardBlockResult, DashboardTarget, DashboardTargetBase, DashboardTargetOp, DashboardTargetResult, DashboardTotals, DecorationColor, DecorationRule, DecorationRuleOp, DecorationTarget, DocSignatureCheck, EnrichAlternate, EnrichSource, Enrichment, EntityFieldValue, EntityRecordMatch, EntityRef, EntityRefWithWords, EntityReferenceKind, ExampleSpec, FIELD_KINDS, FieldKind, GridLayoutMode, GridRowHeight, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, KernelTargets, MergeField, MergeFieldProvenance, MergeFieldResolution, MergeFieldTransform, MissingBehavior, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ACCENTS, PORTAL_ARCHIVE_FILTERS, PermissionLevel, PipelineMissingField, PipelineMoveManyResult, PipelineMoveVerdict, PipelineRule, PipelineRuleKind, PipelineStage, PortalAccent, PortalConfig, PortalFooterLink, PortalFormInput, PortalFormRef, PortalPrincipal, PortalStage, PortalStyle, PortalStyleInput, PortalTableExposure, QueuedCapture, QueuedCaptureFile, QueuedCaptureState, QuietHours, REFUSALS_WORTH_REPEATING, RecordChangeAction, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsChangeSink, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationCarries, RelationDisplaySpec, RelationProperties, RelationStore, RelationTarget, ResolutionTriple, RowActionStep, Rule, RuleAnswer, RuleExpression, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, StageRuleWarning, SubscriptionBlock, SubscriptionCadence, TableHomeDestination, TablePlacement, TablePlacementFact, TableSyncSource, ViewLayout, WorkApprovalState, WorkDecideManyResult, WorkDecideVerdict, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, actionRefusals, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, entityReferenceKinds, entityReferenceKindsOf, entityReferenceWords, entityRefsOf, entityRefsToWrite, exampleSpec, exportPageXlsx, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isEntityReferenceConfig, isOwnOp, isPortalAccent, isPortalArchiveFilter, isRuleFilter, isTheChosen, keptGroups, keptOutOfSight, keptTableHref, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, moveConsequence, moveInOrder, offeredAsContext, openCaptureQueue, optionKey, optionLabel, parseTableHome, parseTableMoved, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, recordChangeTrigger, recordSourceKey, recordSourceTable, rememberedOpCount, sameDocument, scopeChip, sheetSyncSpec, stableFilterKey, withRowCounts, withTablePlacement } from '../index.cjs';
|
|
5
5
|
|
|
@@ -1840,9 +1840,16 @@ interface RecordsClient {
|
|
|
1840
1840
|
view_id: Uuid;
|
|
1841
1841
|
record_ids: Uuid[];
|
|
1842
1842
|
}): Promise<RecordsResult<ViewOrderSet>>;
|
|
1843
|
-
/**
|
|
1843
|
+
/**
|
|
1844
|
+
* G13 + ORDER-FILTER. A page of a hand-ordered view: placed rows by position, then the rest by
|
|
1845
|
+
* created time. `filter` is the list door's question (`StoreFilter`: a flat map or a nested
|
|
1846
|
+
* Rule — the view's own `where`, or a number clicked on a dashboard); given, the store reads
|
|
1847
|
+
* exactly the rows that match, in their places, and `limit`/`offset` page THAT order. Each row
|
|
1848
|
+
* answers the position stored for it; rows the filter hides keep theirs.
|
|
1849
|
+
*/
|
|
1844
1850
|
readInViewOrder(args: {
|
|
1845
1851
|
view_id: Uuid;
|
|
1852
|
+
filter?: StoreFilter | null | undefined;
|
|
1846
1853
|
limit?: number;
|
|
1847
1854
|
offset?: number;
|
|
1848
1855
|
}): Promise<RecordsResult<Array<ReadRow & {
|
|
@@ -2350,4 +2357,44 @@ declare function parseCsv(text: string): string[][];
|
|
|
2350
2357
|
declare function importCsv(text: string): ParsedImport;
|
|
2351
2358
|
declare function importXlsx(bytes: ArrayBuffer | Uint8Array): Promise<ParsedImport>;
|
|
2352
2359
|
|
|
2353
|
-
|
|
2360
|
+
/** The provenance kind a pointer cell's source carries. The Python side's `SOURCE_KIND`. */
|
|
2361
|
+
declare const WHOLE_VALUE_SOURCE_KIND = "whole_value_in_file";
|
|
2362
|
+
/** What a pointer cell's provenance entry says about the file holding its whole text. */
|
|
2363
|
+
interface WholeValuePointer {
|
|
2364
|
+
kind: typeof WHOLE_VALUE_SOURCE_KIND;
|
|
2365
|
+
/** The `files.files` id — what a host opens. */
|
|
2366
|
+
file_id: Uuid;
|
|
2367
|
+
/** The kernel File record carrying that file. */
|
|
2368
|
+
file_record: Uuid;
|
|
2369
|
+
/** The whole text's size, in UTF-8 bytes. */
|
|
2370
|
+
bytes: number;
|
|
2371
|
+
/** The whole text's length, in characters. */
|
|
2372
|
+
chars: number;
|
|
2373
|
+
sha256: string;
|
|
2374
|
+
/** How many characters the cell itself holds (the display words). */
|
|
2375
|
+
shown_chars: number;
|
|
2376
|
+
mime?: string;
|
|
2377
|
+
moved_from?: Record<string, unknown>;
|
|
2378
|
+
}
|
|
2379
|
+
/** The pointer behind `document[key]`, or null when the cell holds its whole value. */
|
|
2380
|
+
declare function wholeValueOf(document: RecordDocument | null | undefined, key: string): WholeValuePointer | null;
|
|
2381
|
+
/** The same question of a value read through the door (its `source` is the resolved entry). */
|
|
2382
|
+
declare function wholeValueOfRead(value: ReadValue | null | undefined): WholeValuePointer | null;
|
|
2383
|
+
/** A size a person reads: "728 KB". */
|
|
2384
|
+
declare function wholeValueSize(pointer: WholeValuePointer): string;
|
|
2385
|
+
/**
|
|
2386
|
+
* The words an export writes for a pointer cell whose file could NOT be read: the display words,
|
|
2387
|
+
* then one sentence saying the whole text is elsewhere and where. Never the words alone — a
|
|
2388
|
+
* reader of the file would take the first thousand characters for the whole value.
|
|
2389
|
+
*/
|
|
2390
|
+
declare function wholeValueNotRead(words: string, pointer: WholeValuePointer, why?: string): string;
|
|
2391
|
+
/** How a host reads a file's whole text. The records package holds no bytes. */
|
|
2392
|
+
type ReadFileText = (fileId: Uuid) => Promise<string>;
|
|
2393
|
+
/**
|
|
2394
|
+
* THE EXPORT WRITES THE FILE'S CONTENT. Every pointer cell in `rows` (a ReadValue whose `source`
|
|
2395
|
+
* is a whole-value pointer) is replaced with the file's whole text, read once per file. A read that
|
|
2396
|
+
* fails, or no reader at all, writes the honest sentence of `wholeValueNotRead` instead.
|
|
2397
|
+
*/
|
|
2398
|
+
declare function withWholeValues(rows: ExportRow[], read?: ReadFileText | null): Promise<ExportRow[]>;
|
|
2399
|
+
|
|
2400
|
+
export { A_PERSONS_REFUSAL, ActionRunResult, AggregateBucket, AggregateCompare, AggregateMeasure, AggregateRow, AnonTokenBinding, ArchiveLane, ArchivedRow, type AsOf, BookingAvailability, BookingDeclared, BookingSummary, CaptureFileRef, CaptureOutcome, CaptureSheetFace, CaptureSheetSummary, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_FIELDS, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, type DeclareResult, DecorationPath, DigestPreview, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EnrichCell, EnrichDeclared, EnrichDueRow, EnrichRun, EnrichmentSummary, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, ExampleBuilt, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FieldTypeWord, FormSummary, FormulaParse, GridLayout, ImportBatchResult, ImportColumnsDeclared, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, InboxCounts, InboxStateChange, IoExportPage, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type NewFieldSpec, type NewTableSpec, OutsideShareAnswer, type ParsedImport, PgError, Pipeline, PipelineColumn, PipelineDeclared, PipelineGate, PipelineGatePreview, PipelineMoveMany, PipelineMoveManyItem, PipelineMoveResult, PipelineSpec, PipelineVerdict, PortalArchiveAnswer, PortalArchiveFilter, PortalCard, PortalConfigInput, PortalFormAnswer, PortalFormSpec, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PortalTableRef, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, type ReadFileText, ReadRow, ReadValue, RecordDocument, RecordEvent, RecordFilter, RecordGraphWritten, RecordHeader, RecordHistoryEntry, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsErrorCode, RecordsResult, RelationCoordinate, RelationWordsManyArgs, ResolvedPublishBinding, RestorePreview, RestoreResult, RowAction, SavedViewRow, SavedViewSpecIn, StagePending, StagePendingOnBoard, StageRuleEnforcement, StageRuleOnFail, StaleWriteDetail, StoreFilter, StoredRecord, StuckRow, Subscription, SubscriptionSpec, type SupabaseLike, Table, TableArchiveProgress, TableCapacity, TableDecorations, type TableFact, TableHome, TableListEntry, TableMoved, TableProposal, TableRowCount, TableSyncResult, TableSyncSpec, TableWebhook, TableWebhookDeclared, Timestamp, Uuid, ViewOrderSet, WHOLE_VALUE_SOURCE_KIND, type WholeValuePointer, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkDecideMany, WorkDecideManyItem, WorkGraph, WorkInboxItem, WorkInboxView, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, addFields, announceRecordChanged, asWriteConflict, cellText, createRecordsClient, declareTable, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, fieldDeclarationFor, importCsv, importXlsx, intersectIds, isAPersonsRefusal, mapPgError, onRecordChanged, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa, tokenFor, wholeValueNotRead, wholeValueOf, wholeValueOfRead, wholeValueSize, withTableFacts, withWholeValues };
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Timestamp, p as Uuid, R as RecordsErrorCode, q as RecordDocument, r as RecordsResult, s as RecordGraphWritten, t as RecordRead, u as ReadRow, v as Field, S as StoredRecord, w as NewFieldDeclaration, x as FieldPatch, y as RecordRevision, z as ReadValue, A as FieldProposal, C as TableProposal, D as RecordsError, W as WriteConflict, E as FieldTypeWord, G as PgError, H as StaleWriteDetail, I as PredictedRefusal } from '../types-
|
|
2
|
-
export { J as ABSENCE_REASONS, K as ACTOR_VOCABULARY, L as AbsenceReason, M as Actor, O as COMPUTE_ON, Q as CONTEXT_POLICIES, V as ComputeOn, X as ContextPolicy, Y as DECLARABLE_FIELD_KINDS, Z as DELIVERIES, _ as DeclarableFieldKind, $ as Delivery, a0 as ENTITY_TOKENS, a1 as EntityToken, a2 as FIELD_SENSITIVITIES, a3 as FIELD_SOURCES, a4 as FRESHNESS, a5 as FieldBehavior, a6 as FieldRule, a7 as FieldSensitivity, a8 as FieldSource, a9 as ForbiddenEnvelopeWord, aa as Freshness, ab as HiddenFieldNotice, ac as KERNEL_TABLES, ad as KernelTableName, ae as MERGE_FIELD_MODIFIERS, af as MERGE_FIELD_SEMANTIC_TYPES, ag as MERGE_FIELD_SOURCES, ah as MergeFieldModifier, ai as MergeFieldSemanticType, aj as MergeFieldSource, ak as ON_DELETE, al as OVERRIDE_POLICIES, am as OnDelete, an as OverridePolicy, ao as PARITY_FIELD_TYPES, ap as PER_VALUE_ACCESS_WORDS, aq as ParityFieldType, ar as ParityFieldTypeDescriptor, as as PerValueAccessWord, at as ProvenancePointer, au as RELATION_BINDINGS, av as RELATION_CARDINALITIES, aw as RELATION_FLAVORS, ax as RETIRED_ACTOR_WORDS, ay as RULE_NODE_KINDS, az as RULE_USES, aA as RelationBinding, aB as RelationCardinality, aC as RelationDisplay, aD as RelationFlavor, aE as RetiredActorWord, aF as RuleNodeKind, aG as RuleUse, aH as STORAGE_MODES, aI as STORE_DOORS, aJ as STORE_KNOBS, aK as STORE_REFUSAL_CODES, aL as StorageMode, aM as StoreDoorName, aN as StoreRefusalCode, aO as TABLE_DISPLAYS, aP as TABLE_ORIGINS, aQ as TABLE_TYPES, aR as TableDisplay, aS as TableOrigin, aT as TableType, aU as VALUE_ALTERNATE_KEYS, aV as VALUE_ENVELOPE_KEYS, aW as ValueAlternate, aX as ValueAlternateKey, aY as ValueEnvelope, aZ as ValueEnvelopeKey, a_ as ValueSource, a$ as allowsOtherValues, b0 as err, b1 as isRecordsErr, b2 as ok } from '../types-
|
|
1
|
+
import { T as Timestamp, p as Uuid, R as RecordsErrorCode, q as RecordDocument, r as RecordsResult, s as RecordGraphWritten, t as RecordRead, u as ReadRow, v as Field, S as StoredRecord, w as NewFieldDeclaration, x as FieldPatch, y as RecordRevision, z as ReadValue, A as FieldProposal, C as TableProposal, D as RecordsError, W as WriteConflict, E as FieldTypeWord, G as PgError, H as StaleWriteDetail, I as PredictedRefusal } from '../types-BeDeDL6g.js';
|
|
2
|
+
export { J as ABSENCE_REASONS, K as ACTOR_VOCABULARY, L as AbsenceReason, M as Actor, O as COMPUTE_ON, Q as CONTEXT_POLICIES, V as ComputeOn, X as ContextPolicy, Y as DECLARABLE_FIELD_KINDS, Z as DELIVERIES, _ as DeclarableFieldKind, $ as Delivery, a0 as ENTITY_TOKENS, a1 as EntityToken, a2 as FIELD_SENSITIVITIES, a3 as FIELD_SOURCES, a4 as FRESHNESS, a5 as FieldBehavior, a6 as FieldRule, a7 as FieldSensitivity, a8 as FieldSource, a9 as ForbiddenEnvelopeWord, aa as Freshness, ab as HiddenFieldNotice, ac as KERNEL_TABLES, ad as KernelTableName, ae as MERGE_FIELD_MODIFIERS, af as MERGE_FIELD_SEMANTIC_TYPES, ag as MERGE_FIELD_SOURCES, ah as MergeFieldModifier, ai as MergeFieldSemanticType, aj as MergeFieldSource, ak as ON_DELETE, al as OVERRIDE_POLICIES, am as OnDelete, an as OverridePolicy, ao as PARITY_FIELD_TYPES, ap as PER_VALUE_ACCESS_WORDS, aq as ParityFieldType, ar as ParityFieldTypeDescriptor, as as PerValueAccessWord, at as ProvenancePointer, au as RELATION_BINDINGS, av as RELATION_CARDINALITIES, aw as RELATION_FLAVORS, ax as RETIRED_ACTOR_WORDS, ay as RULE_NODE_KINDS, az as RULE_USES, aA as RelationBinding, aB as RelationCardinality, aC as RelationDisplay, aD as RelationFlavor, aE as RetiredActorWord, aF as RuleNodeKind, aG as RuleUse, aH as STORAGE_MODES, aI as STORE_DOORS, aJ as STORE_KNOBS, aK as STORE_REFUSAL_CODES, aL as StorageMode, aM as StoreDoorName, aN as StoreRefusalCode, aO as TABLE_DISPLAYS, aP as TABLE_ORIGINS, aQ as TABLE_TYPES, aR as TableDisplay, aS as TableOrigin, aT as TableType, aU as VALUE_ALTERNATE_KEYS, aV as VALUE_ENVELOPE_KEYS, aW as ValueAlternate, aX as ValueAlternateKey, aY as ValueEnvelope, aZ as ValueEnvelopeKey, a_ as ValueSource, a$ as allowsOtherValues, b0 as err, b1 as isRecordsErr, b2 as ok } from '../types-BeDeDL6g.js';
|
|
3
3
|
import { RelationCoordinate, RecordsConfig, TableArchiveProgress, StoreFilter, ArchiveLane, ArchivedRow, Table, TableHome, TableMoved, TableCapacity, RelationWordsManyArgs, EntityTableFacts, NewEntityFieldDeclaration, EntityFieldRights, EntityRecordRead, EntityRecordsFound, Pipeline, PipelineColumn, PipelineVerdict, PipelineMoveResult, PipelineMoveManyItem, PipelineMoveMany, PipelineSpec, PipelineDeclared, StageRuleOnFail, StageRuleEnforcement, StagePending, StagePendingOnBoard, PipelineGate, PipelineGatePreview, FormSummary, BookingSummary, BookingAvailability, BookingDeclared, ImportPlan, ImportPolicy, ImportOpened, ImportColumnsDeclared, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalArchiveFilter, PortalArchiveAnswer, PortalTableRef, PortalCard, PortalConfigInput, PortalFormSpec, PortalFormAnswer, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, RecordFilter, AggregateCompare, AggregateBucket, DashboardRunResult, StuckRow, CaptureSheetSummary, CaptureSheetFace, CaptureFileRef, CaptureOutcome, EnrichmentSummary, EnrichDeclared, EnrichDueRow, EnrichCell, EnrichRun, AggregateMeasure, AggregateRow, Subscription, MySubscription, SubscriptionSpec, DigestPreview, SavedViewRow, SavedViewSpecIn, DocToken, DocUnresolvedToken, DocTemplateRow, DocRenderRow, DocSignatureRow, RecordHistoryEntry, RecordScopeContext, ConversationScope, ConversationScopeContext, FieldHistoryEntry, RestorePreview, RestoreResult, CommentThreadRead, CommentWritten, AnonTokenBinding, ChecklistSpec, ChecklistDeclared, ChecklistTemplateSummary, ChecklistTemplateShape, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistStepCompleted, WorkState, WorkGraph, WorkInstantiation, WorkTurn, WorkAssignmentField, WorkSlotHold, WorkInboxView, WorkInboxItem, InboxStateChange, InboxCounts, WorkListFlavour, WorkListItem, WorkAssignment, WorkRecordState, WorkApprover, WorkChange, WorkApprovalFiled, WorkApprovalDecision, WorkDecideManyItem, WorkDecideMany, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, MyLevel, DecorationPath, TableDecorations, GridLayout, FormulaParse, RowAction, ActionRunResult, RecordEvent, TableWebhookDeclared, TableWebhook, ExampleBuilt, IoExportPage, TableListEntry, TableSyncSpec, TableSyncResult, TableRowCount, RecordHeader, OutsideShareAnswer, ViewOrderSet, RecordsDataSource } from '../index.js';
|
|
4
4
|
export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, ActionRefusal, AggregateCompareKind, AggregateCompareWindows, AggregateDelta, AggregateFilter, AggregateOperation, AggregateWindow, ArchivedDoorRow, BookingWindow, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, ChoiceOptions, CoerceOptions, Coerced, CoercedAnswers, CoercibleField, CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DashboardBlockKind, DashboardBlockResult, DashboardTarget, DashboardTargetBase, DashboardTargetOp, DashboardTargetResult, DashboardTotals, DecorationColor, DecorationRule, DecorationRuleOp, DecorationTarget, DocSignatureCheck, EnrichAlternate, EnrichSource, Enrichment, EntityFieldValue, EntityRecordMatch, EntityRef, EntityRefWithWords, EntityReferenceKind, ExampleSpec, FIELD_KINDS, FieldKind, GridLayoutMode, GridRowHeight, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, KernelTargets, MergeField, MergeFieldProvenance, MergeFieldResolution, MergeFieldTransform, MissingBehavior, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ACCENTS, PORTAL_ARCHIVE_FILTERS, PermissionLevel, PipelineMissingField, PipelineMoveManyResult, PipelineMoveVerdict, PipelineRule, PipelineRuleKind, PipelineStage, PortalAccent, PortalConfig, PortalFooterLink, PortalFormInput, PortalFormRef, PortalPrincipal, PortalStage, PortalStyle, PortalStyleInput, PortalTableExposure, QueuedCapture, QueuedCaptureFile, QueuedCaptureState, QuietHours, REFUSALS_WORTH_REPEATING, RecordChangeAction, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsChangeSink, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationCarries, RelationDisplaySpec, RelationProperties, RelationStore, RelationTarget, ResolutionTriple, RowActionStep, Rule, RuleAnswer, RuleExpression, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, StageRuleWarning, SubscriptionBlock, SubscriptionCadence, TableHomeDestination, TablePlacement, TablePlacementFact, TableSyncSource, ViewLayout, WorkApprovalState, WorkDecideManyResult, WorkDecideVerdict, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, actionRefusals, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, entityReferenceKinds, entityReferenceKindsOf, entityReferenceWords, entityRefsOf, entityRefsToWrite, exampleSpec, exportPageXlsx, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isEntityReferenceConfig, isOwnOp, isPortalAccent, isPortalArchiveFilter, isRuleFilter, isTheChosen, keptGroups, keptOutOfSight, keptTableHref, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, moveConsequence, moveInOrder, offeredAsContext, openCaptureQueue, optionKey, optionLabel, parseTableHome, parseTableMoved, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, recordChangeTrigger, recordSourceKey, recordSourceTable, rememberedOpCount, sameDocument, scopeChip, sheetSyncSpec, stableFilterKey, withRowCounts, withTablePlacement } from '../index.js';
|
|
5
5
|
|
|
@@ -1840,9 +1840,16 @@ interface RecordsClient {
|
|
|
1840
1840
|
view_id: Uuid;
|
|
1841
1841
|
record_ids: Uuid[];
|
|
1842
1842
|
}): Promise<RecordsResult<ViewOrderSet>>;
|
|
1843
|
-
/**
|
|
1843
|
+
/**
|
|
1844
|
+
* G13 + ORDER-FILTER. A page of a hand-ordered view: placed rows by position, then the rest by
|
|
1845
|
+
* created time. `filter` is the list door's question (`StoreFilter`: a flat map or a nested
|
|
1846
|
+
* Rule — the view's own `where`, or a number clicked on a dashboard); given, the store reads
|
|
1847
|
+
* exactly the rows that match, in their places, and `limit`/`offset` page THAT order. Each row
|
|
1848
|
+
* answers the position stored for it; rows the filter hides keep theirs.
|
|
1849
|
+
*/
|
|
1844
1850
|
readInViewOrder(args: {
|
|
1845
1851
|
view_id: Uuid;
|
|
1852
|
+
filter?: StoreFilter | null | undefined;
|
|
1846
1853
|
limit?: number;
|
|
1847
1854
|
offset?: number;
|
|
1848
1855
|
}): Promise<RecordsResult<Array<ReadRow & {
|
|
@@ -2350,4 +2357,44 @@ declare function parseCsv(text: string): string[][];
|
|
|
2350
2357
|
declare function importCsv(text: string): ParsedImport;
|
|
2351
2358
|
declare function importXlsx(bytes: ArrayBuffer | Uint8Array): Promise<ParsedImport>;
|
|
2352
2359
|
|
|
2353
|
-
|
|
2360
|
+
/** The provenance kind a pointer cell's source carries. The Python side's `SOURCE_KIND`. */
|
|
2361
|
+
declare const WHOLE_VALUE_SOURCE_KIND = "whole_value_in_file";
|
|
2362
|
+
/** What a pointer cell's provenance entry says about the file holding its whole text. */
|
|
2363
|
+
interface WholeValuePointer {
|
|
2364
|
+
kind: typeof WHOLE_VALUE_SOURCE_KIND;
|
|
2365
|
+
/** The `files.files` id — what a host opens. */
|
|
2366
|
+
file_id: Uuid;
|
|
2367
|
+
/** The kernel File record carrying that file. */
|
|
2368
|
+
file_record: Uuid;
|
|
2369
|
+
/** The whole text's size, in UTF-8 bytes. */
|
|
2370
|
+
bytes: number;
|
|
2371
|
+
/** The whole text's length, in characters. */
|
|
2372
|
+
chars: number;
|
|
2373
|
+
sha256: string;
|
|
2374
|
+
/** How many characters the cell itself holds (the display words). */
|
|
2375
|
+
shown_chars: number;
|
|
2376
|
+
mime?: string;
|
|
2377
|
+
moved_from?: Record<string, unknown>;
|
|
2378
|
+
}
|
|
2379
|
+
/** The pointer behind `document[key]`, or null when the cell holds its whole value. */
|
|
2380
|
+
declare function wholeValueOf(document: RecordDocument | null | undefined, key: string): WholeValuePointer | null;
|
|
2381
|
+
/** The same question of a value read through the door (its `source` is the resolved entry). */
|
|
2382
|
+
declare function wholeValueOfRead(value: ReadValue | null | undefined): WholeValuePointer | null;
|
|
2383
|
+
/** A size a person reads: "728 KB". */
|
|
2384
|
+
declare function wholeValueSize(pointer: WholeValuePointer): string;
|
|
2385
|
+
/**
|
|
2386
|
+
* The words an export writes for a pointer cell whose file could NOT be read: the display words,
|
|
2387
|
+
* then one sentence saying the whole text is elsewhere and where. Never the words alone — a
|
|
2388
|
+
* reader of the file would take the first thousand characters for the whole value.
|
|
2389
|
+
*/
|
|
2390
|
+
declare function wholeValueNotRead(words: string, pointer: WholeValuePointer, why?: string): string;
|
|
2391
|
+
/** How a host reads a file's whole text. The records package holds no bytes. */
|
|
2392
|
+
type ReadFileText = (fileId: Uuid) => Promise<string>;
|
|
2393
|
+
/**
|
|
2394
|
+
* THE EXPORT WRITES THE FILE'S CONTENT. Every pointer cell in `rows` (a ReadValue whose `source`
|
|
2395
|
+
* is a whole-value pointer) is replaced with the file's whole text, read once per file. A read that
|
|
2396
|
+
* fails, or no reader at all, writes the honest sentence of `wholeValueNotRead` instead.
|
|
2397
|
+
*/
|
|
2398
|
+
declare function withWholeValues(rows: ExportRow[], read?: ReadFileText | null): Promise<ExportRow[]>;
|
|
2399
|
+
|
|
2400
|
+
export { A_PERSONS_REFUSAL, ActionRunResult, AggregateBucket, AggregateCompare, AggregateMeasure, AggregateRow, AnonTokenBinding, ArchiveLane, ArchivedRow, type AsOf, BookingAvailability, BookingDeclared, BookingSummary, CaptureFileRef, CaptureOutcome, CaptureSheetFace, CaptureSheetSummary, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_FIELDS, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, type DeclareResult, DecorationPath, DigestPreview, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EnrichCell, EnrichDeclared, EnrichDueRow, EnrichRun, EnrichmentSummary, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, ExampleBuilt, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FieldTypeWord, FormSummary, FormulaParse, GridLayout, ImportBatchResult, ImportColumnsDeclared, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, InboxCounts, InboxStateChange, IoExportPage, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type NewFieldSpec, type NewTableSpec, OutsideShareAnswer, type ParsedImport, PgError, Pipeline, PipelineColumn, PipelineDeclared, PipelineGate, PipelineGatePreview, PipelineMoveMany, PipelineMoveManyItem, PipelineMoveResult, PipelineSpec, PipelineVerdict, PortalArchiveAnswer, PortalArchiveFilter, PortalCard, PortalConfigInput, PortalFormAnswer, PortalFormSpec, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PortalTableRef, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, type ReadFileText, ReadRow, ReadValue, RecordDocument, RecordEvent, RecordFilter, RecordGraphWritten, RecordHeader, RecordHistoryEntry, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsErrorCode, RecordsResult, RelationCoordinate, RelationWordsManyArgs, ResolvedPublishBinding, RestorePreview, RestoreResult, RowAction, SavedViewRow, SavedViewSpecIn, StagePending, StagePendingOnBoard, StageRuleEnforcement, StageRuleOnFail, StaleWriteDetail, StoreFilter, StoredRecord, StuckRow, Subscription, SubscriptionSpec, type SupabaseLike, Table, TableArchiveProgress, TableCapacity, TableDecorations, type TableFact, TableHome, TableListEntry, TableMoved, TableProposal, TableRowCount, TableSyncResult, TableSyncSpec, TableWebhook, TableWebhookDeclared, Timestamp, Uuid, ViewOrderSet, WHOLE_VALUE_SOURCE_KIND, type WholeValuePointer, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkDecideMany, WorkDecideManyItem, WorkGraph, WorkInboxItem, WorkInboxView, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, addFields, announceRecordChanged, asWriteConflict, cellText, createRecordsClient, declareTable, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, fieldDeclarationFor, importCsv, importXlsx, intersectIds, isAPersonsRefusal, mapPgError, onRecordChanged, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa, tokenFor, wholeValueNotRead, wholeValueOf, wholeValueOfRead, wholeValueSize, withTableFacts, withWholeValues };
|
package/dist/core/index.js
CHANGED
|
@@ -4014,7 +4014,7 @@ var STORE_DOORS = [
|
|
|
4014
4014
|
{ name: "read_records", args: "p_organization_id uuid, p_table_id uuid, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0", returns: "TABLE(id uuid, document jsonb, level permission_level)", security: "definer" },
|
|
4015
4015
|
{ name: "read_records_archived", args: "p_organization_id uuid, p_table_id uuid, p_lane text DEFAULT 'org'::text, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0", returns: "TABLE(id uuid, document jsonb, level permission_level, archived_at timestamp with time zone, archived_by uuid, archived_by_name text)", security: "definer" },
|
|
4016
4016
|
{ name: "read_records_by_ids", args: "p_organization_id uuid, p_table_id uuid, p_record_ids uuid[], p_by_id boolean DEFAULT false", returns: "TABLE(id uuid, document jsonb, level permission_level)", security: "definer" },
|
|
4017
|
-
{ name: "read_records_in_view_order", args: "p_organization_id uuid, p_view_id uuid, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0", returns: 'TABLE(id uuid, document jsonb, level permission_level, "position" numeric)', security: "definer" },
|
|
4017
|
+
{ name: "read_records_in_view_order", args: "p_organization_id uuid, p_view_id uuid, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0, p_filter jsonb DEFAULT NULL::jsonb", returns: 'TABLE(id uuid, document jsonb, level permission_level, "position" numeric)', security: "definer" },
|
|
4018
4018
|
{ name: "read_records_matching", args: "p_organization_id uuid, p_table_id uuid, p_filter jsonb DEFAULT '{}'::jsonb, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0", returns: "TABLE(id uuid, document jsonb, level permission_level)", security: "definer" },
|
|
4019
4019
|
{ name: "realtime_topic_admits", args: "p_topic text", returns: "boolean", security: "definer" },
|
|
4020
4020
|
{ name: "record_aggregate", args: "p_organization_id uuid, p_table_id uuid, p_group_by jsonb DEFAULT '[]'::jsonb, p_measures jsonb DEFAULT '[]'::jsonb, p_bucket jsonb DEFAULT NULL::jsonb, p_filter jsonb DEFAULT '{}'::jsonb, p_limit integer DEFAULT 200, p_required text DEFAULT 'viewer'::text, p_compare jsonb DEFAULT NULL::jsonb", returns: "TABLE(groups jsonb, measures jsonb, row_count bigint, prior_groups jsonb, prior_measures jsonb, prior_row_count bigint, delta jsonb, compare jsonb)", security: "definer" },
|
|
@@ -4039,6 +4039,9 @@ var STORE_DOORS = [
|
|
|
4039
4039
|
{ name: "record_restore_version", args: "p_organization_id uuid, p_record_id uuid, p_version integer", returns: "jsonb", security: "definer" },
|
|
4040
4040
|
{ name: "record_restore_version", args: "p_organization_id uuid, p_record_id uuid, p_version integer, p_author jsonb", returns: "jsonb", security: "definer" },
|
|
4041
4041
|
{ name: "record_scope_context", args: "p_organization_id uuid, p_record_id uuid, p_relations integer DEFAULT 12, p_history integer DEFAULT 15, p_siblings integer DEFAULT 8", returns: "jsonb", security: "definer" },
|
|
4042
|
+
{ name: "record_source_key", args: "p_table_id uuid", returns: "text", security: "invoker" },
|
|
4043
|
+
{ name: "record_source_keys", args: "p_table_id uuid", returns: "text[]", security: "invoker" },
|
|
4044
|
+
{ name: "record_source_table", args: "p_key text", returns: "uuid", security: "invoker" },
|
|
4042
4045
|
{ name: "record_stage_pending", args: "p_organization_id uuid, p_record_id uuid", returns: "jsonb", security: "definer" },
|
|
4043
4046
|
{ name: "record_state_as_of", args: "p_record_id uuid, p_at timestamp with time zone", returns: "TABLE(state jsonb, replayed boolean)", security: "definer" },
|
|
4044
4047
|
{ name: "record_table", args: "p_organization_id uuid, p_record_id uuid", returns: "uuid", security: "definer" },
|
|
@@ -4218,7 +4221,7 @@ var STORE_DOORS = [
|
|
|
4218
4221
|
{ name: "work_assignment_fields", args: "p_options_table_id uuid DEFAULT NULL::uuid", returns: "TABLE(key text, label text, spec jsonb)", security: "invoker" },
|
|
4219
4222
|
{ name: "work_decide_many", args: "p_organization_id uuid, p_decisions jsonb", returns: "jsonb", security: "definer" },
|
|
4220
4223
|
{ name: "work_has_assignment", args: "p_organization_id uuid, p_table_id uuid", returns: "boolean", security: "definer" },
|
|
4221
|
-
{ name: "work_inbox", args: "p_organization_id uuid, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_include_decided boolean DEFAULT false, p_view text DEFAULT 'inbox'::text", returns: "TABLE(item_id uuid, kind text, origin text, title text, subject_id uuid, subject_kind text, summary text, state text, due_on timestamp with time zone, due_state text, actionable boolean, requested_by uuid, requested_by_name text, at timestamp with time zone, table_id uuid, table_name text, decided_by uuid, decided_by_name text, decided_at timestamp with time zone, outcome text, snoozed_until timestamp with time zone, cleared_at timestamp with time zone, snoozed_count integer, cleared_count integer)", security: "definer" },
|
|
4224
|
+
{ name: "work_inbox", args: "p_organization_id uuid, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_include_decided boolean DEFAULT false, p_view text DEFAULT 'inbox'::text", returns: "TABLE(item_id uuid, kind text, origin text, title text, subject_id uuid, subject_kind text, summary text, state text, due_on timestamp with time zone, due_state text, actionable boolean, requested_by uuid, requested_by_name text, at timestamp with time zone, table_id uuid, table_name text, decided_by uuid, decided_by_name text, decided_at timestamp with time zone, outcome text, snoozed_until timestamp with time zone, cleared_at timestamp with time zone, snoozed_count integer, cleared_count integer, undo_seconds integer, undo_refusal text)", security: "definer" },
|
|
4222
4225
|
{ name: "work_instantiation_shape", args: "p_organization_id uuid, p_instantiation_id uuid", returns: "jsonb", security: "definer" },
|
|
4223
4226
|
{ name: "work_list", args: "p_organization_id uuid, p_flavour text DEFAULT 'mine'::text, p_include_finished boolean DEFAULT false, p_limit integer DEFAULT 100, p_offset integer DEFAULT 0", returns: "TABLE(record_id uuid, table_id uuid, table_name text, title text, assignee_id uuid, assignee_name text, assignee_user_id uuid, due_on timestamp with time zone, due_state text, status text, terminal boolean, assigned_by uuid, updated_at timestamp with time zone)", security: "definer" },
|
|
4224
4227
|
{ name: "work_person", args: "p_organization_id uuid, p_user_id uuid, p_create boolean DEFAULT true", returns: "uuid", security: "definer" },
|
|
@@ -4262,6 +4265,7 @@ var STORE_KNOBS = [
|
|
|
4262
4265
|
{ key: "containment_depth_ceiling", value: "16", type: "integer" },
|
|
4263
4266
|
{ key: "context_copy_following", value: "true", type: "boolean" },
|
|
4264
4267
|
{ key: "cross_organization_links", value: "false", type: "boolean" },
|
|
4268
|
+
{ key: "decision_undo_seconds", value: "5", type: "integer" },
|
|
4265
4269
|
{ key: "decoration_rules_max", value: "50", type: "integer" },
|
|
4266
4270
|
{ key: "decorations_max_bytes", value: "262144", type: "integer" },
|
|
4267
4271
|
{ key: "document_letterhead", value: "{}", type: "json" },
|
|
@@ -4323,7 +4327,7 @@ var STORE_REFUSAL_CODES = [
|
|
|
4323
4327
|
{ code: "22023", raised_by: "_action_check,_booking_availability,_decorations_check,_entity_custom_fields_guard,_fx_date,_fx_num,_fx_unit,_fxp_level,_fxp_resolve,_fxp_tokens,_portal_config_judge,_take_op_id,_value_envelope,_view_field_key,_view_key_value,_work_shape_guard,action_run,actor_word,agg_assert_key,agg_calendar,agg_compare_windows,agg_sql,anon_token_issue,booking_declare,containment_parent,dashboard_block_normalize,dashboard_run,dashboard_target_field_assert,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_reference_words,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,field_update,form_declare,form_draft_save,formula_eval,formula_parse,grid_layout_check,hub_changed_by,inbox_snooze,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,list_portals,migrate_merge,migrate_reclass,my_levels,organization_clear,page_size,pin_agent_cells,pipeline_move,pipeline_move_many,portal_declare,portal_form_submit,provenance_write,query_by_coordinates,query_rollup,read_records_archived,read_records_in_view_order,record_filter_sql,record_update,record_write_graph,record_write_many,relation_carry,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_sql_op,scope_table_provision,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_from_example,table_move,table_rules,table_share_outside_grant,table_sync,table_webhook_declare,view_declare,view_keys_check,view_record_order_set,visibility_as_of,work_approval_request,work_decide_many,work_inbox,work_list,work_slot_hold" },
|
|
4324
4328
|
{ code: "23503", raised_by: "_action_check,_booking_availability,_checklist_instantiate,_containment_guard,_decorations_check,_display_spec_for,_field_document_for,_field_type_parity_guard,_pipeline_stage_key,_record_rule_uses,action_declare,action_run,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,autonumber_backfill,booking_cancel,booking_confirm,booking_declare,booking_hold,booking_reschedule,capture_publish,checklist_declare,checklist_steps_table,comment_write,dashboard_declare,delete_rule,doc_sign,doc_template_save,enrich_declare,enrich_due,enrich_land,form_declare,form_draft_save,form_submit,grid_layout,home_add,inbound_declare,inbound_mail_land,inbound_set,io_comment_write,io_import_begin,io_import_finish,io_import_report,io_import_rows,io_proposal_accept,migrate_demote,migrate_promote,pipeline_board,pipeline_declare,pipeline_move,pipeline_read,pipeline_transition_refusal,promote_field,promote_table,read_records_in_view_order,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_declare,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_run,sign_request_create,subscription_mute,subscription_preview,table_decorate,table_from_example,table_webhook_archive,table_webhook_declare,view_declare,view_record_order_set,work_set_state,work_take_assignment,work_template_instantiate" },
|
|
4325
4329
|
{ code: "23505", raised_by: "_portal_config_judge,_share_write_person,_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,sign_request_cancel,sign_request_create,table_share_outside_resend,work_approval_decide,work_slot_hold" },
|
|
4326
|
-
{ code: "23514", raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_display_format_check,_display_spec_for,_entity_custom_fields_guard,_field_class_guard,_field_document_for,_field_shape_guard,_field_type_parity_guard,_merge_field_shape_guard,_merge_field_temporal_guard,_promoted_field_cap_guard,_record_rule_uses,_relation_halves_agree,_relation_kernel_targets,_resolve_choice_words,_rule_shape_guard,_rule_topology_guard,_store_relation_edge_names_its_field,_table_columns_word_guard,_table_shape_guard,_undeclared_key_guard,_value_envelope,_with_display,_work_shape_guard,_workdoors_approval_guard,action_run,assert_columns_are_defined,assert_entity_is_organization_scoped,booking_declare,capture_publish,capture_sheet_declare,checklist_declare,checklist_step_complete,doc_sign,doc_signature_write,doc_template_save,entity_field_declare,entity_field_retire,entity_field_update,entity_records_find,entity_table,field_declare,field_retire,field_update,home_add,io_comment_write,io_import_rows,migrate_merge,migrate_purge_hard,portal_archive,portal_restore,record_restore,record_write_graph,relation_carry,relation_halves_repair,relation_own,sign_request_create,sign_request_sign,table_declare,table_from_example,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate" },
|
|
4330
|
+
{ code: "23514", raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_display_format_check,_display_spec_for,_entity_custom_fields_guard,_field_class_guard,_field_document_for,_field_shape_guard,_field_type_parity_guard,_merge_field_shape_guard,_merge_field_temporal_guard,_promoted_field_cap_guard,_record_rule_uses,_record_source_key_is_record,_relation_halves_agree,_relation_kernel_targets,_resolve_choice_words,_rule_shape_guard,_rule_topology_guard,_store_relation_edge_names_its_field,_table_columns_word_guard,_table_shape_guard,_undeclared_key_guard,_value_envelope,_with_display,_work_shape_guard,_workdoors_approval_guard,action_run,assert_columns_are_defined,assert_entity_is_organization_scoped,booking_declare,capture_publish,capture_sheet_declare,checklist_declare,checklist_step_complete,doc_sign,doc_signature_write,doc_template_save,entity_field_declare,entity_field_retire,entity_field_update,entity_records_find,entity_table,field_declare,field_retire,field_update,home_add,io_comment_write,io_import_rows,migrate_merge,migrate_purge_hard,portal_archive,portal_restore,record_restore,record_write_graph,relation_carry,relation_halves_repair,relation_own,sign_request_create,sign_request_sign,table_declare,table_from_example,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate" },
|
|
4327
4331
|
{ code: "40001", raised_by: "has_visibility_at,table_move" },
|
|
4328
4332
|
{ code: "42501", raised_by: "_context_copy_fence,_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_portal_config_judge,_portal_principal_here,_rule_definition_write,_store_door,agent_table_claim,agg_fields_readable_assert,anon_capture,anon_inbound_land,anon_publish,anon_token_issue,anon_token_verify,anon_write,assert_client_may_change,assert_client_may_open,assert_client_may_reach,assert_may_know_table,assert_organization_admin,assert_store_door,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,context_resolve,conversation_scope_bind,conversation_scope_unbind,dashboard_target_field_assert,doc_sign,enrich_declare,enrich_due,enrich_land,enrich_normalize,entity_field_declare,entity_field_retire,entity_field_update,entity_value_write,external_write_through,form_declare,form_draft_save,form_public_asks,form_submit,inbound_mail_land,inbox_clear,inbox_snooze,inbox_unclear,inbox_unsnooze,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,migrate_purge,migrate_purge_hard,migrate_purge_hard_request,migrate_reclass,my_levels,organization_clear,organization_contents,portal_declare,portal_form,portal_form_submit,portal_invitation,portal_invite,portal_invite_accept,portal_principal_bind,promote_table,query_visibility_parity,read_record,read_records,read_records_archived,read_records_by_ids,read_records_matching,record_table,record_write_graph,relation_halves_disagreements,relation_halves_repair,resolve_context,scope_table_provision,share_grant,subscription_mute,subscription_preview,table_move,table_share_outside_accept,table_share_outside_grant,table_share_outside_invite,table_share_outside_resend,table_webhook_declare,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person" },
|
|
4329
4333
|
{ code: "42703", raised_by: "entity_table,portal_declare" },
|
|
@@ -8273,10 +8277,18 @@ function createRecordsClient(config) {
|
|
|
8273
8277
|
"viewRecordOrderSet"
|
|
8274
8278
|
);
|
|
8275
8279
|
},
|
|
8276
|
-
async readInViewOrder({ view_id, limit, offset }) {
|
|
8280
|
+
async readInViewOrder({ view_id, filter, limit, offset }) {
|
|
8281
|
+
const asked = filter && Object.keys(filter).length > 0 ? filter : null;
|
|
8277
8282
|
const door = await callDoor(
|
|
8278
8283
|
DOORS.readRecordsInViewOrder,
|
|
8279
|
-
{
|
|
8284
|
+
{
|
|
8285
|
+
p_organization_id: org,
|
|
8286
|
+
p_view_id: view_id,
|
|
8287
|
+
p_by_id: false,
|
|
8288
|
+
p_limit: limit ?? 200,
|
|
8289
|
+
p_offset: offset ?? 0,
|
|
8290
|
+
...asked ? { p_filter: asked } : {}
|
|
8291
|
+
},
|
|
8280
8292
|
"readInViewOrder"
|
|
8281
8293
|
);
|
|
8282
8294
|
if (!door.ok) return err(door.error);
|
|
@@ -8841,6 +8853,57 @@ function predictWriteRefusals(args) {
|
|
|
8841
8853
|
return found;
|
|
8842
8854
|
}
|
|
8843
8855
|
|
|
8856
|
+
// src/core/wholeValue.ts
|
|
8857
|
+
var WHOLE_VALUE_SOURCE_KIND = "whole_value_in_file";
|
|
8858
|
+
function asPointer(source) {
|
|
8859
|
+
if (!source || typeof source !== "object") return null;
|
|
8860
|
+
const s = source;
|
|
8861
|
+
if (s.kind !== WHOLE_VALUE_SOURCE_KIND || typeof s.file_id !== "string" || !s.file_id) return null;
|
|
8862
|
+
return s;
|
|
8863
|
+
}
|
|
8864
|
+
function wholeValueOf(document, key) {
|
|
8865
|
+
if (!document) return null;
|
|
8866
|
+
const envelope = (document._values ?? {})[key];
|
|
8867
|
+
const pointer = envelope?.src;
|
|
8868
|
+
if (typeof pointer !== "string") return null;
|
|
8869
|
+
return asPointer((document._sources ?? {})[pointer]);
|
|
8870
|
+
}
|
|
8871
|
+
function wholeValueOfRead(value) {
|
|
8872
|
+
return asPointer(value?.source ?? null);
|
|
8873
|
+
}
|
|
8874
|
+
function wholeValueSize(pointer) {
|
|
8875
|
+
const kb = pointer.bytes / 1024;
|
|
8876
|
+
return kb >= 1024 ? `${(kb / 1024).toFixed(1)} MB` : `${Math.round(kb)} KB`;
|
|
8877
|
+
}
|
|
8878
|
+
function wholeValueNotRead(words, pointer, why) {
|
|
8879
|
+
return `${words}\u2026 [This is the start of a ${wholeValueSize(pointer)} text kept as file ${pointer.file_id}` + (why ? `; it could not be read for this export: ${why}` : "") + "]";
|
|
8880
|
+
}
|
|
8881
|
+
async function withWholeValues(rows, read) {
|
|
8882
|
+
const texts = /* @__PURE__ */ new Map();
|
|
8883
|
+
const out = [];
|
|
8884
|
+
for (const row of rows) {
|
|
8885
|
+
const next = { ...row };
|
|
8886
|
+
for (const [key, value] of Object.entries(row)) {
|
|
8887
|
+
const pointer = wholeValueOfRead(value);
|
|
8888
|
+
if (!pointer || !value) continue;
|
|
8889
|
+
const words = typeof value.value === "string" ? value.value : "";
|
|
8890
|
+
if (!read) {
|
|
8891
|
+
next[key] = { ...value, value: wholeValueNotRead(words, pointer, "this screen has no way to read files"), source: null };
|
|
8892
|
+
continue;
|
|
8893
|
+
}
|
|
8894
|
+
if (!texts.has(pointer.file_id)) texts.set(pointer.file_id, read(pointer.file_id));
|
|
8895
|
+
try {
|
|
8896
|
+
next[key] = { ...value, value: await texts.get(pointer.file_id), source: null };
|
|
8897
|
+
} catch (thrown) {
|
|
8898
|
+
const why = thrown instanceof Error ? thrown.message : String(thrown);
|
|
8899
|
+
next[key] = { ...value, value: wholeValueNotRead(words, pointer, why), source: null };
|
|
8900
|
+
}
|
|
8901
|
+
}
|
|
8902
|
+
out.push(next);
|
|
8903
|
+
}
|
|
8904
|
+
return out;
|
|
8905
|
+
}
|
|
8906
|
+
|
|
8844
8907
|
// src/core/io.ts
|
|
8845
8908
|
var escape = (value) => /[",\n\r]/.test(value) ? `"${value.replace(/"/g, '""')}"` : value;
|
|
8846
8909
|
function cellText(value) {
|
|
@@ -8848,6 +8911,8 @@ function cellText(value) {
|
|
|
8848
8911
|
if (value.absent_reason) return `(${value.absent_reason})`;
|
|
8849
8912
|
const raw = value.value;
|
|
8850
8913
|
if (raw === null || raw === void 0) return "";
|
|
8914
|
+
const pointer = wholeValueOfRead(value);
|
|
8915
|
+
if (pointer && typeof raw === "string") return wholeValueNotRead(raw, pointer);
|
|
8851
8916
|
if (typeof raw === "string") return raw;
|
|
8852
8917
|
return JSON.stringify(raw);
|
|
8853
8918
|
}
|
|
@@ -8986,6 +9051,7 @@ export {
|
|
|
8986
9051
|
TABLE_TYPES,
|
|
8987
9052
|
VALUE_ALTERNATE_KEYS,
|
|
8988
9053
|
VALUE_ENVELOPE_KEYS,
|
|
9054
|
+
WHOLE_VALUE_SOURCE_KIND,
|
|
8989
9055
|
actionRefusals,
|
|
8990
9056
|
addFields,
|
|
8991
9057
|
allowsOtherValues,
|
|
@@ -9082,8 +9148,13 @@ export {
|
|
|
9082
9148
|
supabaseDataSource,
|
|
9083
9149
|
toAoa,
|
|
9084
9150
|
tokenFor,
|
|
9151
|
+
wholeValueNotRead,
|
|
9152
|
+
wholeValueOf,
|
|
9153
|
+
wholeValueOfRead,
|
|
9154
|
+
wholeValueSize,
|
|
9085
9155
|
withRowCounts,
|
|
9086
9156
|
withTableFacts,
|
|
9087
|
-
withTablePlacement
|
|
9157
|
+
withTablePlacement,
|
|
9158
|
+
withWholeValues
|
|
9088
9159
|
};
|
|
9089
9160
|
//# sourceMappingURL=index.js.map
|