@ai-matrx/records 0.58.9 → 0.58.12
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 +48 -1
- package/dist/core/index.cjs +67 -19
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +54 -7
- package/dist/core/index.d.ts +54 -7
- package/dist/core/index.js +67 -19
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +2 -1
- 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 +2 -1
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +2 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +13 -1
- package/dist/react/index.d.ts +13 -1
- package/dist/react/index.js +2 -1
- package/dist/react/index.js.map +1 -1
- package/dist/{types-CCwTeJvm.d.cts → types-BeDeDL6g.d.cts} +5 -1
- package/dist/{types-CCwTeJvm.d.ts → types-BeDeDL6g.d.ts} +5 -1
- 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
|
|
|
@@ -2150,10 +2150,11 @@ interface NewFieldSpec {
|
|
|
2150
2150
|
key: string;
|
|
2151
2151
|
label: string;
|
|
2152
2152
|
/**
|
|
2153
|
-
* The word for what this column holds
|
|
2154
|
-
*
|
|
2155
|
-
*
|
|
2156
|
-
*
|
|
2153
|
+
* The word for what this column holds — any word `custom._field_document_for`
|
|
2154
|
+
* resolves for `type` (a parity type, a behaviour, a plain synonym, or a kind
|
|
2155
|
+
* such as `signature`, `relation`, `entity_reference`, `autonumber`). It is
|
|
2156
|
+
* sent to the door as `type`, unmapped; a word that means nothing is refused
|
|
2157
|
+
* by name, with the list.
|
|
2157
2158
|
*/
|
|
2158
2159
|
type: FieldTypeWord;
|
|
2159
2160
|
sort?: number;
|
|
@@ -2167,6 +2168,12 @@ interface NewFieldSpec {
|
|
|
2167
2168
|
/** A currency column's symbol; a date column's day-or-day-and-time. */
|
|
2168
2169
|
unit?: string;
|
|
2169
2170
|
kind?: "date" | "datetime";
|
|
2171
|
+
/**
|
|
2172
|
+
* An `entity_reference` column's kinds: the platform entity tokens it may point
|
|
2173
|
+
* at (`ai_model`, `note`, `web_site` …; `custom.entity_reference_kinds()` lists
|
|
2174
|
+
* them). The store refuses an entity reference that names none.
|
|
2175
|
+
*/
|
|
2176
|
+
allowedTypes?: string[];
|
|
2170
2177
|
}
|
|
2171
2178
|
interface NewTableSpec {
|
|
2172
2179
|
name: string;
|
|
@@ -2357,4 +2364,44 @@ declare function parseCsv(text: string): string[][];
|
|
|
2357
2364
|
declare function importCsv(text: string): ParsedImport;
|
|
2358
2365
|
declare function importXlsx(bytes: ArrayBuffer | Uint8Array): Promise<ParsedImport>;
|
|
2359
2366
|
|
|
2360
|
-
|
|
2367
|
+
/** The provenance kind a pointer cell's source carries. The Python side's `SOURCE_KIND`. */
|
|
2368
|
+
declare const WHOLE_VALUE_SOURCE_KIND = "whole_value_in_file";
|
|
2369
|
+
/** What a pointer cell's provenance entry says about the file holding its whole text. */
|
|
2370
|
+
interface WholeValuePointer {
|
|
2371
|
+
kind: typeof WHOLE_VALUE_SOURCE_KIND;
|
|
2372
|
+
/** The `files.files` id — what a host opens. */
|
|
2373
|
+
file_id: Uuid;
|
|
2374
|
+
/** The kernel File record carrying that file. */
|
|
2375
|
+
file_record: Uuid;
|
|
2376
|
+
/** The whole text's size, in UTF-8 bytes. */
|
|
2377
|
+
bytes: number;
|
|
2378
|
+
/** The whole text's length, in characters. */
|
|
2379
|
+
chars: number;
|
|
2380
|
+
sha256: string;
|
|
2381
|
+
/** How many characters the cell itself holds (the display words). */
|
|
2382
|
+
shown_chars: number;
|
|
2383
|
+
mime?: string;
|
|
2384
|
+
moved_from?: Record<string, unknown>;
|
|
2385
|
+
}
|
|
2386
|
+
/** The pointer behind `document[key]`, or null when the cell holds its whole value. */
|
|
2387
|
+
declare function wholeValueOf(document: RecordDocument | null | undefined, key: string): WholeValuePointer | null;
|
|
2388
|
+
/** The same question of a value read through the door (its `source` is the resolved entry). */
|
|
2389
|
+
declare function wholeValueOfRead(value: ReadValue | null | undefined): WholeValuePointer | null;
|
|
2390
|
+
/** A size a person reads: "728 KB". */
|
|
2391
|
+
declare function wholeValueSize(pointer: WholeValuePointer): string;
|
|
2392
|
+
/**
|
|
2393
|
+
* The words an export writes for a pointer cell whose file could NOT be read: the display words,
|
|
2394
|
+
* then one sentence saying the whole text is elsewhere and where. Never the words alone — a
|
|
2395
|
+
* reader of the file would take the first thousand characters for the whole value.
|
|
2396
|
+
*/
|
|
2397
|
+
declare function wholeValueNotRead(words: string, pointer: WholeValuePointer, why?: string): string;
|
|
2398
|
+
/** How a host reads a file's whole text. The records package holds no bytes. */
|
|
2399
|
+
type ReadFileText = (fileId: Uuid) => Promise<string>;
|
|
2400
|
+
/**
|
|
2401
|
+
* THE EXPORT WRITES THE FILE'S CONTENT. Every pointer cell in `rows` (a ReadValue whose `source`
|
|
2402
|
+
* is a whole-value pointer) is replaced with the file's whole text, read once per file. A read that
|
|
2403
|
+
* fails, or no reader at all, writes the honest sentence of `wholeValueNotRead` instead.
|
|
2404
|
+
*/
|
|
2405
|
+
declare function withWholeValues(rows: ExportRow[], read?: ReadFileText | null): Promise<ExportRow[]>;
|
|
2406
|
+
|
|
2407
|
+
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
|
|
|
@@ -2150,10 +2150,11 @@ interface NewFieldSpec {
|
|
|
2150
2150
|
key: string;
|
|
2151
2151
|
label: string;
|
|
2152
2152
|
/**
|
|
2153
|
-
* The word for what this column holds
|
|
2154
|
-
*
|
|
2155
|
-
*
|
|
2156
|
-
*
|
|
2153
|
+
* The word for what this column holds — any word `custom._field_document_for`
|
|
2154
|
+
* resolves for `type` (a parity type, a behaviour, a plain synonym, or a kind
|
|
2155
|
+
* such as `signature`, `relation`, `entity_reference`, `autonumber`). It is
|
|
2156
|
+
* sent to the door as `type`, unmapped; a word that means nothing is refused
|
|
2157
|
+
* by name, with the list.
|
|
2157
2158
|
*/
|
|
2158
2159
|
type: FieldTypeWord;
|
|
2159
2160
|
sort?: number;
|
|
@@ -2167,6 +2168,12 @@ interface NewFieldSpec {
|
|
|
2167
2168
|
/** A currency column's symbol; a date column's day-or-day-and-time. */
|
|
2168
2169
|
unit?: string;
|
|
2169
2170
|
kind?: "date" | "datetime";
|
|
2171
|
+
/**
|
|
2172
|
+
* An `entity_reference` column's kinds: the platform entity tokens it may point
|
|
2173
|
+
* at (`ai_model`, `note`, `web_site` …; `custom.entity_reference_kinds()` lists
|
|
2174
|
+
* them). The store refuses an entity reference that names none.
|
|
2175
|
+
*/
|
|
2176
|
+
allowedTypes?: string[];
|
|
2170
2177
|
}
|
|
2171
2178
|
interface NewTableSpec {
|
|
2172
2179
|
name: string;
|
|
@@ -2357,4 +2364,44 @@ declare function parseCsv(text: string): string[][];
|
|
|
2357
2364
|
declare function importCsv(text: string): ParsedImport;
|
|
2358
2365
|
declare function importXlsx(bytes: ArrayBuffer | Uint8Array): Promise<ParsedImport>;
|
|
2359
2366
|
|
|
2360
|
-
|
|
2367
|
+
/** The provenance kind a pointer cell's source carries. The Python side's `SOURCE_KIND`. */
|
|
2368
|
+
declare const WHOLE_VALUE_SOURCE_KIND = "whole_value_in_file";
|
|
2369
|
+
/** What a pointer cell's provenance entry says about the file holding its whole text. */
|
|
2370
|
+
interface WholeValuePointer {
|
|
2371
|
+
kind: typeof WHOLE_VALUE_SOURCE_KIND;
|
|
2372
|
+
/** The `files.files` id — what a host opens. */
|
|
2373
|
+
file_id: Uuid;
|
|
2374
|
+
/** The kernel File record carrying that file. */
|
|
2375
|
+
file_record: Uuid;
|
|
2376
|
+
/** The whole text's size, in UTF-8 bytes. */
|
|
2377
|
+
bytes: number;
|
|
2378
|
+
/** The whole text's length, in characters. */
|
|
2379
|
+
chars: number;
|
|
2380
|
+
sha256: string;
|
|
2381
|
+
/** How many characters the cell itself holds (the display words). */
|
|
2382
|
+
shown_chars: number;
|
|
2383
|
+
mime?: string;
|
|
2384
|
+
moved_from?: Record<string, unknown>;
|
|
2385
|
+
}
|
|
2386
|
+
/** The pointer behind `document[key]`, or null when the cell holds its whole value. */
|
|
2387
|
+
declare function wholeValueOf(document: RecordDocument | null | undefined, key: string): WholeValuePointer | null;
|
|
2388
|
+
/** The same question of a value read through the door (its `source` is the resolved entry). */
|
|
2389
|
+
declare function wholeValueOfRead(value: ReadValue | null | undefined): WholeValuePointer | null;
|
|
2390
|
+
/** A size a person reads: "728 KB". */
|
|
2391
|
+
declare function wholeValueSize(pointer: WholeValuePointer): string;
|
|
2392
|
+
/**
|
|
2393
|
+
* The words an export writes for a pointer cell whose file could NOT be read: the display words,
|
|
2394
|
+
* then one sentence saying the whole text is elsewhere and where. Never the words alone — a
|
|
2395
|
+
* reader of the file would take the first thousand characters for the whole value.
|
|
2396
|
+
*/
|
|
2397
|
+
declare function wholeValueNotRead(words: string, pointer: WholeValuePointer, why?: string): string;
|
|
2398
|
+
/** How a host reads a file's whole text. The records package holds no bytes. */
|
|
2399
|
+
type ReadFileText = (fileId: Uuid) => Promise<string>;
|
|
2400
|
+
/**
|
|
2401
|
+
* THE EXPORT WRITES THE FILE'S CONTENT. Every pointer cell in `rows` (a ReadValue whose `source`
|
|
2402
|
+
* is a whole-value pointer) is replaced with the file's whole text, read once per file. A read that
|
|
2403
|
+
* fails, or no reader at all, writes the honest sentence of `wholeValueNotRead` instead.
|
|
2404
|
+
*/
|
|
2405
|
+
declare function withWholeValues(rows: ExportRow[], read?: ReadFileText | null): Promise<ExportRow[]>;
|
|
2406
|
+
|
|
2407
|
+
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
|
@@ -4221,7 +4221,7 @@ var STORE_DOORS = [
|
|
|
4221
4221
|
{ name: "work_assignment_fields", args: "p_options_table_id uuid DEFAULT NULL::uuid", returns: "TABLE(key text, label text, spec jsonb)", security: "invoker" },
|
|
4222
4222
|
{ name: "work_decide_many", args: "p_organization_id uuid, p_decisions jsonb", returns: "jsonb", security: "definer" },
|
|
4223
4223
|
{ name: "work_has_assignment", args: "p_organization_id uuid, p_table_id uuid", returns: "boolean", 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)", 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" },
|
|
4225
4225
|
{ name: "work_instantiation_shape", args: "p_organization_id uuid, p_instantiation_id uuid", returns: "jsonb", security: "definer" },
|
|
4226
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" },
|
|
4227
4227
|
{ name: "work_person", args: "p_organization_id uuid, p_user_id uuid, p_create boolean DEFAULT true", returns: "uuid", security: "definer" },
|
|
@@ -4265,6 +4265,7 @@ var STORE_KNOBS = [
|
|
|
4265
4265
|
{ key: "containment_depth_ceiling", value: "16", type: "integer" },
|
|
4266
4266
|
{ key: "context_copy_following", value: "true", type: "boolean" },
|
|
4267
4267
|
{ key: "cross_organization_links", value: "false", type: "boolean" },
|
|
4268
|
+
{ key: "decision_undo_seconds", value: "5", type: "integer" },
|
|
4268
4269
|
{ key: "decoration_rules_max", value: "50", type: "integer" },
|
|
4269
4270
|
{ key: "decorations_max_bytes", value: "262144", type: "integer" },
|
|
4270
4271
|
{ key: "document_letterhead", value: "{}", type: "json" },
|
|
@@ -8372,7 +8373,8 @@ function fieldDeclarationFor(field) {
|
|
|
8372
8373
|
...field.options ? { options: field.options } : {},
|
|
8373
8374
|
...field.relationTarget ? { relation_target: field.relationTarget } : {},
|
|
8374
8375
|
...field.unit ? { unit: field.unit } : {},
|
|
8375
|
-
...field.kind ? { kind: field.kind } : {}
|
|
8376
|
+
...field.kind ? { kind: field.kind } : {},
|
|
8377
|
+
...field.allowedTypes ? { allowed_types: field.allowedTypes } : {}
|
|
8376
8378
|
};
|
|
8377
8379
|
}
|
|
8378
8380
|
async function declareTable(client, spec) {
|
|
@@ -8439,25 +8441,12 @@ async function addFields(client, tableId, fields) {
|
|
|
8439
8441
|
}
|
|
8440
8442
|
return { ok: true, data: tableId };
|
|
8441
8443
|
}
|
|
8442
|
-
var PLAIN_WORDS = {
|
|
8443
|
-
text: "text",
|
|
8444
|
-
string: "text",
|
|
8445
|
-
long_text: "long_text",
|
|
8446
|
-
longtext: "long_text",
|
|
8447
|
-
paragraph: "long_text",
|
|
8448
|
-
number: "number",
|
|
8449
|
-
range: "number",
|
|
8450
|
-
integer: "number",
|
|
8451
|
-
decimal: "number",
|
|
8452
|
-
float: "number"
|
|
8453
|
-
};
|
|
8454
8444
|
function declaredType(field) {
|
|
8455
8445
|
const word = (field.type ?? "text").toLowerCase();
|
|
8456
|
-
|
|
8457
|
-
|
|
8458
|
-
return { plain: plain === "text" && field.config?.["multiline"] === true ? "long_text" : plain };
|
|
8446
|
+
if ((word === "text" || word === "string") && field.config?.["multiline"] === true) {
|
|
8447
|
+
return { type: "long_text" };
|
|
8459
8448
|
}
|
|
8460
|
-
return {
|
|
8449
|
+
return { type: word };
|
|
8461
8450
|
}
|
|
8462
8451
|
|
|
8463
8452
|
// src/core/supabase.ts
|
|
@@ -8852,6 +8841,57 @@ function predictWriteRefusals(args) {
|
|
|
8852
8841
|
return found;
|
|
8853
8842
|
}
|
|
8854
8843
|
|
|
8844
|
+
// src/core/wholeValue.ts
|
|
8845
|
+
var WHOLE_VALUE_SOURCE_KIND = "whole_value_in_file";
|
|
8846
|
+
function asPointer(source) {
|
|
8847
|
+
if (!source || typeof source !== "object") return null;
|
|
8848
|
+
const s = source;
|
|
8849
|
+
if (s.kind !== WHOLE_VALUE_SOURCE_KIND || typeof s.file_id !== "string" || !s.file_id) return null;
|
|
8850
|
+
return s;
|
|
8851
|
+
}
|
|
8852
|
+
function wholeValueOf(document, key) {
|
|
8853
|
+
if (!document) return null;
|
|
8854
|
+
const envelope = (document._values ?? {})[key];
|
|
8855
|
+
const pointer = envelope?.src;
|
|
8856
|
+
if (typeof pointer !== "string") return null;
|
|
8857
|
+
return asPointer((document._sources ?? {})[pointer]);
|
|
8858
|
+
}
|
|
8859
|
+
function wholeValueOfRead(value) {
|
|
8860
|
+
return asPointer(value?.source ?? null);
|
|
8861
|
+
}
|
|
8862
|
+
function wholeValueSize(pointer) {
|
|
8863
|
+
const kb = pointer.bytes / 1024;
|
|
8864
|
+
return kb >= 1024 ? `${(kb / 1024).toFixed(1)} MB` : `${Math.round(kb)} KB`;
|
|
8865
|
+
}
|
|
8866
|
+
function wholeValueNotRead(words, pointer, why) {
|
|
8867
|
+
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}` : "") + "]";
|
|
8868
|
+
}
|
|
8869
|
+
async function withWholeValues(rows, read) {
|
|
8870
|
+
const texts = /* @__PURE__ */ new Map();
|
|
8871
|
+
const out = [];
|
|
8872
|
+
for (const row of rows) {
|
|
8873
|
+
const next = { ...row };
|
|
8874
|
+
for (const [key, value] of Object.entries(row)) {
|
|
8875
|
+
const pointer = wholeValueOfRead(value);
|
|
8876
|
+
if (!pointer || !value) continue;
|
|
8877
|
+
const words = typeof value.value === "string" ? value.value : "";
|
|
8878
|
+
if (!read) {
|
|
8879
|
+
next[key] = { ...value, value: wholeValueNotRead(words, pointer, "this screen has no way to read files"), source: null };
|
|
8880
|
+
continue;
|
|
8881
|
+
}
|
|
8882
|
+
if (!texts.has(pointer.file_id)) texts.set(pointer.file_id, read(pointer.file_id));
|
|
8883
|
+
try {
|
|
8884
|
+
next[key] = { ...value, value: await texts.get(pointer.file_id), source: null };
|
|
8885
|
+
} catch (thrown) {
|
|
8886
|
+
const why = thrown instanceof Error ? thrown.message : String(thrown);
|
|
8887
|
+
next[key] = { ...value, value: wholeValueNotRead(words, pointer, why), source: null };
|
|
8888
|
+
}
|
|
8889
|
+
}
|
|
8890
|
+
out.push(next);
|
|
8891
|
+
}
|
|
8892
|
+
return out;
|
|
8893
|
+
}
|
|
8894
|
+
|
|
8855
8895
|
// src/core/io.ts
|
|
8856
8896
|
var escape = (value) => /[",\n\r]/.test(value) ? `"${value.replace(/"/g, '""')}"` : value;
|
|
8857
8897
|
function cellText(value) {
|
|
@@ -8859,6 +8899,8 @@ function cellText(value) {
|
|
|
8859
8899
|
if (value.absent_reason) return `(${value.absent_reason})`;
|
|
8860
8900
|
const raw = value.value;
|
|
8861
8901
|
if (raw === null || raw === void 0) return "";
|
|
8902
|
+
const pointer = wholeValueOfRead(value);
|
|
8903
|
+
if (pointer && typeof raw === "string") return wholeValueNotRead(raw, pointer);
|
|
8862
8904
|
if (typeof raw === "string") return raw;
|
|
8863
8905
|
return JSON.stringify(raw);
|
|
8864
8906
|
}
|
|
@@ -8997,6 +9039,7 @@ export {
|
|
|
8997
9039
|
TABLE_TYPES,
|
|
8998
9040
|
VALUE_ALTERNATE_KEYS,
|
|
8999
9041
|
VALUE_ENVELOPE_KEYS,
|
|
9042
|
+
WHOLE_VALUE_SOURCE_KIND,
|
|
9000
9043
|
actionRefusals,
|
|
9001
9044
|
addFields,
|
|
9002
9045
|
allowsOtherValues,
|
|
@@ -9093,8 +9136,13 @@ export {
|
|
|
9093
9136
|
supabaseDataSource,
|
|
9094
9137
|
toAoa,
|
|
9095
9138
|
tokenFor,
|
|
9139
|
+
wholeValueNotRead,
|
|
9140
|
+
wholeValueOf,
|
|
9141
|
+
wholeValueOfRead,
|
|
9142
|
+
wholeValueSize,
|
|
9096
9143
|
withRowCounts,
|
|
9097
9144
|
withTableFacts,
|
|
9098
|
-
withTablePlacement
|
|
9145
|
+
withTablePlacement,
|
|
9146
|
+
withWholeValues
|
|
9099
9147
|
};
|
|
9100
9148
|
//# sourceMappingURL=index.js.map
|