@ai-matrx/records 0.98.7 → 0.98.9
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 +12 -0
- package/dist/{table-kind-CboiMJuE.d.cts → client-9fzhCPD5.d.cts} +2771 -4
- package/dist/{table-kind-B4sdlvHf.d.ts → client-DcWZjmg2.d.ts} +2771 -4
- package/dist/core/index.cjs +154 -3
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +109 -18
- package/dist/core/index.d.ts +109 -18
- package/dist/core/index.js +154 -3
- package/dist/core/index.js.map +1 -1
- package/dist/data/index.cjs +52 -0
- package/dist/data/index.cjs.map +1 -1
- package/dist/data/index.d.cts +11 -12
- package/dist/data/index.d.ts +11 -12
- package/dist/data/index.js +52 -0
- package/dist/data/index.js.map +1 -1
- package/dist/{declareTable-BIuPJ3Vj.d.ts → declareTable-B6ic3leL.d.ts} +3 -4
- package/dist/{declareTable-d-HxRmF0.d.cts → declareTable-_GwN-ERY.d.cts} +3 -4
- package/dist/{doors-Bx3Shs3z.d.cts → doors-Dm5q9H8Y.d.cts} +1 -1
- package/dist/{doors-BTifsjNv.d.ts → doors-t-Oc2l9E.d.ts} +1 -1
- package/dist/entity/index.d.cts +7 -7
- package/dist/entity/index.d.ts +7 -7
- package/dist/{field-CJtssH3q.d.ts → field-BIRNApm1.d.ts} +2 -2
- package/dist/{field-DoVl2I9K.d.cts → field-BLy8drjM.d.cts} +2 -2
- package/dist/forms/index.d.cts +3 -3
- package/dist/forms/index.d.ts +3 -3
- package/dist/index.cjs +45 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -13
- package/dist/index.d.ts +30 -13
- package/dist/index.js +45 -0
- package/dist/index.js.map +1 -1
- package/dist/memory/index.d.cts +7 -7
- package/dist/memory/index.d.ts +7 -7
- package/dist/{objectOrganization-Crk9gJUM.d.ts → objectOrganization-D5Ytjah7.d.ts} +1 -1
- package/dist/{objectOrganization-CUa6jjhV.d.cts → objectOrganization-zgpoUAH1.d.cts} +1 -1
- package/dist/{port-CRP5g9l9.d.cts → port-B9glCG2h.d.cts} +3 -3
- package/dist/{port-CtnELAJQ.d.ts → port-C-p-_lAu.d.ts} +3 -3
- package/dist/{portal-DW5NGBT0.d.ts → portal-B9HCNPTc.d.ts} +2 -2
- package/dist/{portal-C4N9ByaY.d.cts → portal-C_LgvDeh.d.cts} +2 -2
- package/dist/{ports-WwHHNwge.d.ts → ports-BE_5jz-c.d.ts} +2 -2
- package/dist/{ports-YIh9jrCZ.d.cts → ports-BIdYUS-C.d.cts} +2 -2
- package/dist/questions/index.d.cts +9 -10
- package/dist/questions/index.d.ts +9 -10
- package/dist/react/index.cjs +97 -0
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +86 -1
- package/dist/react/index.d.ts +86 -1
- package/dist/react/index.js +97 -0
- package/dist/react/index.js.map +1 -1
- package/dist/realtime/index.d.cts +3 -3
- package/dist/realtime/index.d.ts +3 -3
- package/dist/{record-CxGK1OEK.d.cts → record-BrJNCmH1.d.cts} +1 -1
- package/dist/{record-CxGK1OEK.d.ts → record-BrJNCmH1.d.ts} +1 -1
- package/dist/{relation-Dh-lCkkh.d.ts → relation-BxGXLRaG.d.ts} +3 -3
- package/dist/{relation-DSGhM3tO.d.cts → relation-R10qQyQU.d.cts} +3 -3
- package/dist/{rule-DQpC7WqT.d.cts → rule-BGtYd6Pf.d.cts} +2 -2
- package/dist/{rule-xNwJF6Qo.d.ts → rule-BtjrE42J.d.ts} +2 -2
- package/dist/scopes/index.d.cts +3 -3
- package/dist/scopes/index.d.ts +3 -3
- package/dist/search/index.d.cts +1 -1
- package/dist/search/index.d.ts +1 -1
- package/dist/setup/index.cjs +52 -0
- package/dist/setup/index.cjs.map +1 -1
- package/dist/setup/index.d.cts +12 -13
- package/dist/setup/index.d.ts +12 -13
- package/dist/setup/index.js +52 -0
- package/dist/setup/index.js.map +1 -1
- package/dist/{subscription-BVCn1PVe.d.cts → subscription-BEM4B4dR.d.cts} +3 -3
- package/dist/{subscription-DQzPVKBR.d.ts → subscription-Ca15Z7Gu.d.ts} +3 -3
- package/dist/templates/index.d.cts +10 -10
- package/dist/templates/index.d.ts +10 -10
- package/dist/typed-table/index.cjs +52 -0
- package/dist/typed-table/index.cjs.map +1 -1
- package/dist/typed-table/index.d.cts +10 -11
- package/dist/typed-table/index.d.ts +10 -11
- package/dist/typed-table/index.js +52 -0
- package/dist/typed-table/index.js.map +1 -1
- package/dist/{types-3lM5f6b0.d.cts → types-5ql9_q-o.d.cts} +2 -2
- package/dist/{types-04kFNi3-.d.ts → types-BALEbMc8.d.ts} +2 -2
- package/dist/{types-DKJO83lQ.d.cts → types-BhnjvJ8U.d.cts} +2 -2
- package/dist/{types-SUAmeBId.d.ts → types-CURw95qc.d.ts} +2 -2
- package/dist/{types-DKeGkHpE.d.cts → types-DRMeL0uW.d.cts} +2 -2
- package/dist/{types-DJVccwh0.d.ts → types-_odOqLOe.d.ts} +2 -2
- package/dist/use-cases/index.d.cts +5 -5
- package/dist/use-cases/index.d.ts +5 -5
- package/dist/{validate-BIJtP2KB.d.cts → validate-Cdtk0y18.d.cts} +1 -1
- package/dist/{validate--y-pPc-c.d.ts → validate-ChibJPPI.d.ts} +1 -1
- package/dist/views/index.d.cts +9 -10
- package/dist/views/index.d.ts +9 -10
- package/package.json +2 -2
- package/dist/client-C1B-MNzb.d.ts +0 -2704
- package/dist/client-D2jAgJNn.d.cts +0 -2704
package/dist/index.d.cts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { U as Uuid,
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
5
|
-
export { M as MyLevel, O as OpLedger, P as PERMISSION_LEVELS, g as PermissionLevel, h as RecordsActor, e as RecordsChangeSink, a as RecordsConfig, d as RecordsDataSource, c as RecordsErrorSink, i as RecordsFilter, R as RecordsRealtimePort, j as RecordsResolverPort, k as RecordsResponse, l as RecordsTableQuery, b as RowAgentPort, f as RowAgentTarget, m as asPermissionLevel, n as atLeast, o as createOpLedger, p as defaultOpLedger, q as forgetAllOps, r as highestLevel, s as isOwnOp, t as mintOpId, u as rememberedOpCount } from './ports-
|
|
6
|
-
import {
|
|
7
|
-
export { A as ADDRESS_PARTS,
|
|
8
|
-
export {
|
|
9
|
-
export { D as DEFAULT_PORTAL_ARCHIVE_FILTER, F as FormLookOptions,
|
|
10
|
-
export { A as AggregateBucket,
|
|
11
|
-
export {
|
|
12
|
-
export { a as ObjectKind, O as ObjectOrganizationAnswer, R as RecordOrganizationPort, W as WHERE_ID_OPENS_DOOR, r as readObjectOrganizationAnswer, b as resolveObjectOrganization, w as whereIdOpensPort } from './objectOrganization-
|
|
1
|
+
import { U as Uuid, $ as MergeFieldSource, _ as MergeFieldSemanticType, Z as MergeFieldModifier, a2 as OverridePolicy, B as Delivery, h as Timestamp, M as Freshness, n as RecordDocument, R as RecordsResult } from './record-BrJNCmH1.cjs';
|
|
2
|
+
export { t as ABSENCE_REASONS, u as ACTOR_VOCABULARY, v as AbsenceReason, A as Actor, w as COMPUTE_ON, x as CONTEXT_POLICIES, C as ComputeOn, d as ContextPolicy, y as DECLARABLE_FIELD_KINDS, z as DELIVERIES, D as DeclarableFieldKind, E as ENTITY_TOKENS, G as EntityToken, I as FIELD_SENSITIVITIES, J as FIELD_SOURCES, K as FRESHNESS, o as FieldBehavior, c as FieldSensitivity, F as FieldSource, L as ForbiddenEnvelopeWord, H as HiddenFieldNotice, N as KERNEL_TABLES, Q as KernelTableName, V as KeysetRow, W as MERGE_FIELD_MODIFIERS, X as MERGE_FIELD_SEMANTIC_TYPES, Y as MERGE_FIELD_SOURCES, a0 as ON_DELETE, a1 as OVERRIDE_POLICIES, O as OnDelete, a3 as PARITY_FIELD_TYPES, a4 as PER_VALUE_ACCESS_WORDS, p as ParityFieldType, a5 as PerValueAccessWord, P as PgError, r as PredictedRefusal, a6 as ProvenancePointer, a7 as RELATION_BINDINGS, a8 as RELATION_CARDINALITIES, a9 as RELATION_FLAVORS, aa as RETIRED_ACTOR_WORDS, ab as RULE_NODE_KINDS, ac as RULE_USES, l as ReadRow, s as ReadValue, ad as RecordChange, ae as RecordChangeResult, af as RecordGraphWritten, ag as RecordKeysetPage, ah as RecordPage, k as RecordPageSort, ai as RecordRead, aj as RecordRevision, a as RecordsError, m as RecordsErrorCode, g as RelationBinding, f as RelationCardinality, e as RelationFlavor, ak as RetiredActorWord, i as RuleNodeKind, j as RuleUse, al as STORAGE_MODES, am as STORE_DOORS, an as STORE_KNOBS, ao as STORE_REFUSAL_CODES, q as StaleWriteDetail, S as StorageMode, ap as StoreDoorName, aq as StoreRefusalCode, ar as StoredRecord, as as TABLE_DISPLAYS, at as TABLE_ORIGINS, au as TABLE_TYPES, b as TableDisplay, av as TableOrigin, T as TableType, aw as VALUE_ALTERNATE_KEYS, ax as VALUE_ENVELOPE_KEYS, ay as ValueAlternate, az as ValueAlternateKey, aA as ValueEnvelope, aB as ValueEnvelopeKey, aC as ValueSource, aD as WriteConflict, aE as err, aF as isLockedStub, aG as isRecordsErr, aH as ok, aI as splitLockedRows, aJ as unwrapRecords } from './record-BrJNCmH1.cjs';
|
|
3
|
+
import { J as CaptureFileRef, K as CaptureOutcome, R as RecordsClient } from './client-9fzhCPD5.cjs';
|
|
4
|
+
export { A as ARCHIVE_LANES, b as ARCHIVE_LANE_LABEL, c as ARCHIVE_LANE_MEANS, e as ActionRefusal, f as ActionRunResult, g as AdminTable, h as AnonTokenBinding, i as ArchiveLane, j as ArchivedChecklistTemplate, k as ArchivedDoorRow, l as ArchivedForm, m as ArchivedRow, o as AutomationAction, p as AutomationDeclared, q as AutomationFilter, r as AutomationFlipped, s as AutomationItem, t as AutomationLastRun, u as AutomationList, v as AutomationRun, w as AutomationRunStatus, x as AutomationRuns, y as AutomationSpec, z as AutomationStep, B as AutomationTrigger, C as AutomationValue, D as AutomationValues, E as AutomationWeekday, G as BUILT_KIND_WORD, H as CHOICE_NUDGES, I as CaptureField, L as CaptureQuestion, M as CaptureSheetFace, N as CaptureSheetSummary, O as ChecklistDeclared, P as ChecklistRequirement, Q as ChecklistRequirementKind, S as ChecklistRoleSpec, U as ChecklistRunStarted, V as ChecklistRunStep, W as ChecklistRunSummary, X as ChecklistSpec, Y as ChecklistStepCompleted, Z as ChecklistStepSpec, _ as ChecklistTemplateShape, $ as ChecklistTemplateSummary, a0 as ChecklistTrigger, a1 as ChecklistTriggerKind, a2 as ChoiceCellBack, a3 as ChoiceLike, a4 as ChoiceNudge, a5 as ChoiceOption, a6 as ChoiceRehome, a7 as ChoiceUsage, a8 as ChoicesRehomed, a9 as CommentThreadRead, aa as CommentWritten, ab as ConversationScope, ac as ConversationScopeContext, ad as CustomFieldTableType, ae as DEFAULT_ARCHIVE_LANE, ag as DRILL_CHART_TOKENS, ah as DRILL_DESCRIPTION_MAX, ai as DRILL_DOORS, aj as DRILL_SCHEMA, ak as DataHomeTable, al as DecorationColor, am as DecorationPath, an as DecorationRule, ao as DecorationRuleOp, ap as DecorationTarget, aq as DocRenderRow, ar as DocSignatureCheck, as as DocSignatureRow, at as DocTemplateRow, au as DocToken, av as DocUnresolvedToken, aw as DrillAdHocOp, ax as DrillAnswer, ay as DrillAnswerRow, az as DrillChartToken, aA as DrillDeclaration, aB as DrillDefinition, aC as DrillDimension, aD as DrillFinding, aE as DrillGrain, aF as DrillHaving, aG as DrillLane, aH as DrillLevel, aI as DrillMeasure, aJ as DrillMeasureOp, aK as DrillMeasureWhereValue, aL as DrillPath, aM as DrillQuestion, aN as DrillRecords, aO as DrillRowsPage, aP as DrillSource, aQ as DrillView, aR as EnrichAlternate, aS as EnrichCell, aT as EnrichDeclared, aU as EnrichDueRow, aV as EnrichRun, aW as EnrichSource, aX as Enrichment, aY as EnrichmentSummary, aZ as EntityBackLinkItem, a_ as EntityBackLinks, a$ as EntityFieldRights, b0 as EntityFieldValue, b1 as EntityFieldsAcross, b2 as EntityRecordMatch, b3 as EntityRecordRead, b4 as EntityRecordsFound, b5 as EntityRowWritten, b6 as EntityTableFacts, b7 as ExternalPrincipalCard, F as FieldDrift, b8 as FieldDriftAspect, b9 as FieldHistoryEntry, ba as FieldRetyped, bb as FormArchiveAnswer, bc as FormulaParse, bd as FormulaPreview, be as GridLayout, bf as GridLayoutMode, bg as GridRowHeight, bh as HistoryActor, bi as HistoryActorKind, bj as HistoryChange, bk as Home, bl as ImportBatchResult, bm as ImportColumnPlan, bn as ImportColumnsDeclared, bo as ImportFinished, bp as ImportOpened, bq as ImportOutcome, br as ImportPlan, bs as ImportPolicy, bt as ImportProposal, bu as ImportReport, bv as ImportRun, bw as InboundAddress, bx as InboundDeclared, by as InboxCounts, bz as InboxStateChange, bA as IoExportPage, bB as MigrationEntry, bC as MigrationUndone, bD as NewEntityFieldDeclaration, bE as OutsideShareAnswer, bF as PIPELINE_RULE_KINDS, bG as ParentExtracted, bH as Pipeline, bI as PipelineColumn, bJ as PipelineDeclared, bK as PipelineGate, bL as PipelineGatePreview, bM as PipelineMissingField, bN as PipelineMoveMany, bO as PipelineMoveManyItem, bP as PipelineMoveManyResult, bQ as PipelineMoveResult, bR as PipelineMoveVerdict, bS as PipelineRule, bT as PipelineRuleKind, bU as PipelineSpec, bV as PipelineStage, bW as PipelineVerdict, bY as PublishBinding, bZ as PublishBindingKind, b$ as ROW_WEB_NOT_READY, c0 as RecordChangeAction, c1 as RecordComment, c2 as RecordEvent, c3 as RecordHeader, c4 as RecordHistoryEntry, c6 as RecordRowControls, c7 as RecordScopeComment, c8 as RecordScopeContext, c9 as RecordScopeField, ca as RecordScopeHistoryEntry, cb as RecordScopeRelation, cc as RecordScopeWithheld, cd as RecordSplit, ce as RecordsMerged, cf as RegisteredTable, cg as ResolvedPublishBinding, ch as ResolvedPublishBindingKind, ci as RestorePreview, cj as RestoreResult, ck as RetypeBehaviour, cl as RetypePreview, cm as RowAction, cn as RowActionStep, co as RowDefaultsApplied, cp as SHOWN_TO_LABEL, cq as SHOWN_TO_VALUES, cr as SHOWN_TO_WHO_MAY_CHANGE, cs as STAGE_RULE_ENFORCEMENT, ct as STAGE_RULE_ON_FAIL, cu as ShownTo, cv as StagePending, cw as StagePendingOnBoard, cx as StageRuleEnforcement, cy as StageRuleOnFail, cz as StageRuleWarning, cA as TABLE_KIND_PREFIX, cB as Table, T as TableArchiveProgress, cC as TableCapacity, cD as TableCopyInProgress, cE as TableDecorations, cF as TableDuplicateProgress, cG as TableDuplicated, cI as TableHome, cJ as TableHomeDestination, a as TableKindFacts, cK as TableLevel, cL as TableLevelApproval, cM as TableLevelFacts, cN as TableLevelSet, cO as TableListEntry, cQ as TableMoved, cR as TablePlacement, cS as TablePlacementFact, cT as TableReaderRule, cU as TableRenderSchema, cV as TableRestoreProgress, cW as TableRowCount, cX as TableRowDefaults, cY as TableRowDefaultsPatch, cZ as TableSchemaMode, c_ as TableSyncResult, c$ as TableSyncSource, d0 as TableSyncSpec, d1 as TableWebhook, d2 as TableWebhookDeclared, d3 as TypedChoiceDecision, d4 as ViewLayout, d5 as ViewOrderSet, d6 as WorkApprovalDecision, d7 as WorkApprovalFiled, d8 as WorkApprovalState, d9 as WorkApprover, da as WorkAssignment, db as WorkAssignmentField, dc as WorkChange, dd as WorkDecideMany, de as WorkDecideManyItem, df as WorkDecideManyResult, dg as WorkDecideVerdict, dh as WorkDueState, di as WorkGraph, dj as WorkInboxItem, dk as WorkInboxKind, dl as WorkInboxView, dm as WorkInstantiation, dn as WorkListFlavour, dp as WorkListItem, dq as WorkOrigin, dr as WorkRecordState, ds as WorkSlotHold, dt as WorkState, du as WorkTemplateNode, dv as WorkTemplateRelation, dw as WorkTurn, dx as actionRefusals, dy as archivedByLine, dz as archivedWhen, dA as asChoiceNudge, dC as choiceSlug, dD as choiceValuesOf, dE as choicesOf, dG as decideTypedChoice, dH as declareDrillDefinition, dI as drillAnswerOf, dJ as drillFindingKnob, dK as emptyArchiveLine, dL as exportPageXlsx, dM as fieldKindOf, dN as holdsARetiredChoice, dQ as isArchiveLane, dR as isFoundation, dS as isShownTo, dT as isTableKind, dU as isTheChosen, dV as keptGroups, dW as keptOutOfSight, dX as keptTableHref, dY as levelHasShownTo, dZ as looksLikeAnId, d_ as mayDrag, d$ as moveConsequence, e0 as moveInOrder, e1 as offeredAsContext, e2 as optionKey, e3 as optionLabel, e4 as parseFieldDrift, e5 as parseTableCopiesInProgress, e6 as parseTableDuplicateProgress, e7 as parseTableDuplicated, e8 as parseTableHome, e9 as parseTableMoved, eb as previewRetype, ec as previewRuleChange, ed as recordChangeTrigger, ee as recordSourceKey, ef as recordSourceTable, eg as recordsUseSentence, eh as rehomeSentence, ei as removedChoicesInUse, ej as ruleThatRefuses, ek as rulesWithTopStar, el as sameDocument, em as scopeChip, en as sheetSyncSpec, eo as tableIdOf, ep as tableJsonSchema, eq as tableKindMapping, er as tableKindSlug, es as tableRenderSchema, et as valueConverts, eu as withRowCounts, ew as withTablePlacement } from './client-9fzhCPD5.cjs';
|
|
5
|
+
export { M as MyLevel, O as OpLedger, P as PERMISSION_LEVELS, g as PermissionLevel, h as RecordsActor, e as RecordsChangeSink, a as RecordsConfig, d as RecordsDataSource, c as RecordsErrorSink, i as RecordsFilter, R as RecordsRealtimePort, j as RecordsResolverPort, k as RecordsResponse, l as RecordsTableQuery, b as RowAgentPort, f as RowAgentTarget, m as asPermissionLevel, n as atLeast, o as createOpLedger, p as defaultOpLedger, q as forgetAllOps, r as highestLevel, s as isOwnOp, t as mintOpId, u as rememberedOpCount } from './ports-BIdYUS-C.cjs';
|
|
6
|
+
import { m as CoercibleField } from './field-BLy8drjM.cjs';
|
|
7
|
+
export { A as ADDRESS_PARTS, c as AGENT_WRITER_WORDS, d as AddressPart, e as AddressValue, B as BARCODE_SYMBOLOGIES, f as BUTTON_DOES, g as ButtonDoes, h as ButtonPressed, i as ButtonSettings, C as ChoiceOptions, j as CoerceOptions, k as Coerced, l as CoercedAnswers, n as FIELD_KINDS, F as Field, o as FieldDuplicated, p as FieldKind, q as FieldOptionEdit, r as FieldPatch, s as FieldProposal, b as FieldRule, a as FieldTypeWord, K as KernelTargets, t as NEWER_FIELD_KINDS, u as NOT_A_MEMBER_WORDS, N as NewFieldDeclaration, v as NewerFieldKind, P as ParityFieldTypeDescriptor, w as PersonStamp, R as RelationDisplay, x as RelationNameIndex, y as RelationNameMatch, z as RelationNamesAnswer, S as STATUS_GROUPS, D as STATUS_GROUP_WORDS, E as SYSTEM_WRITER_WORDS, G as StatusGroup, T as TableProposal, H as addressFromText, I as addressMapUrl, J as addressText, L as allowsOtherValues, M as buttonNeeds, O as buttonOf, Q as buttonUrlPlaceholders, U as coerceTypedAnswer, V as coerceTypedAnswers, W as coercionLabel, X as durationText, Y as entityReferenceKindsOf, Z as fieldKindFor, _ as isAddressValue, $ as isButtonField, a0 as isEntityReferenceConfig, a1 as isPersonStamp, a2 as newerKindExportWords, a3 as newerKindOf, a4 as newerKindWords, a5 as personStampText, a6 as ratingMaxOf, a7 as readTypedDuration, a8 as relationNameIndexOf, a9 as relationNameKey, aa as relationNamesIn, ab as richTextPlain, ac as safeLinkHref, ad as splitListCell, ae as statusGroupOf } from './field-BLy8drjM.cjs';
|
|
8
|
+
export { B as BookingAvailability, a as BookingDeclared, b as BookingSummary, c as BookingWindow, d as FormResults, e as FormRoute, F as FormSummary, f as Rule, g as RuleAnswer, R as RuleExpression, h as bookingPath, p as publicFormPath } from './rule-BGtYd6Pf.cjs';
|
|
9
|
+
export { D as DEFAULT_PORTAL_ARCHIVE_FILTER, F as FormLookOptions, a as PORTAL_ACCENTS, b as PORTAL_ARCHIVE_FILTERS, P as PortalAccent, c as PortalArchiveAnswer, d as PortalArchiveFilter, e as PortalCard, f as PortalConfig, g as PortalConfigInput, h as PortalFooterLink, i as PortalFormAnswer, j as PortalFormInput, k as PortalFormRef, l as PortalFormSpec, m as PortalInvitation, n as PortalPreviewRow, o as PortalPrincipal, p as PortalRevocation, q as PortalStage, r as PortalStyle, s as PortalStyleInput, t as PortalSummary, u as PortalTableExposure, v as PortalTableRef, w as PublicPicture, x as emptyPortalArchiveLine, y as isPortalAccent, z as isPortalArchiveFilter, A as portalArchiveConsequence, B as portalConfirmLine, C as portalPath, E as portalTitleTypedBack } from './portal-C_LgvDeh.cjs';
|
|
10
|
+
export { A as AggregateBucket, e as AggregateCompare, f as AggregateCompareKind, g as AggregateCompareWindows, h as AggregateDelta, b as AggregateFilter, i as AggregateGroupValue, c as AggregateMeasure, a as AggregateOperation, j as AggregateRow, k as AggregateWindow, l as DashboardBlock, D as DashboardBlockKind, m as DashboardBlockResult, n as DashboardRunResult, o as DashboardSummary, p as DashboardTarget, q as DashboardTargetBase, r as DashboardTargetOp, s as DashboardTargetResult, t as DashboardTotals, u as DigestPreview, M as MySubscription, Q as QuietHours, R as RecordFilter, v as RowTemplateRow, w as SavedViewColorBy, x as SavedViewDefinition, y as SavedViewLayout, d as SavedViewRow, z as SavedViewSpecIn, B as StoreFilter, C as StuckRow, E as Subscription, F as SubscriptionBlock, S as SubscriptionCadence, G as SubscriptionSpec, H as callersTimeZone, I as hasQuietHours, J as isRuleFilter, K as liftWithheld, L as measureKey, N as stableFilterKey, O as withCallersClock } from './subscription-BEM4B4dR.cjs';
|
|
11
|
+
export { a as EntityRef, E as EntityRefWithWords, b as EntityReferenceKind, R as REVERSE_LINKS_PAGE_MAX, c as REVERSE_LINKS_RECORDS_PER_CALL, d as Relation, e as RelationCarries, f as RelationCoordinate, g as RelationIcons, h as RelationProperties, i as RelationTarget, j as RelationWordsManyArgs, k as ReverseColumn, l as ReverseLink, m as ReverseLinks, n as ReverseLinksFieldsArgs, o as ReverseLinksManyArgs, S as SourceArchived, p as entityReferenceKinds, q as entityReferenceSearch, r as entityReferenceWords, s as entityRefsOf, t as entityRefsToWrite, u as isReverseField, v as sourceArchivedOf } from './relation-R10qQyQU.cjs';
|
|
12
|
+
export { a as ObjectKind, O as ObjectOrganizationAnswer, R as RecordOrganizationPort, W as WHERE_ID_OPENS_DOOR, r as readObjectOrganizationAnswer, b as resolveObjectOrganization, w as whereIdOpensPort } from './objectOrganization-zgpoUAH1.cjs';
|
|
13
|
+
import './doors-Dm5q9H8Y.cjs';
|
|
13
14
|
|
|
14
15
|
type WithFormat = CoercibleField & {
|
|
15
16
|
display_format?: unknown;
|
|
@@ -404,4 +405,20 @@ type MergeFieldResolution = {
|
|
|
404
405
|
reason: string;
|
|
405
406
|
};
|
|
406
407
|
|
|
407
|
-
|
|
408
|
+
interface ChooseAlternateArgs {
|
|
409
|
+
record_id: Uuid;
|
|
410
|
+
field_key: string;
|
|
411
|
+
/** Position in the field's `alternates` list as the record holds it. */
|
|
412
|
+
alternate_index: number;
|
|
413
|
+
}
|
|
414
|
+
/** The patch that makes alternate `alternate_index` of `field_key` the value. Pure; exported for tests. */
|
|
415
|
+
declare function alternatePatch(document: RecordDocument, field_key: string, alternate_index: number): {
|
|
416
|
+
ok: true;
|
|
417
|
+
patch: Record<string, unknown>;
|
|
418
|
+
} | {
|
|
419
|
+
ok: false;
|
|
420
|
+
message: string;
|
|
421
|
+
};
|
|
422
|
+
declare function chooseAlternate(client: Pick<RecordsClient, "recordRead" | "recordUpdate">, { record_id, field_key, alternate_index }: ChooseAlternateArgs): Promise<RecordsResult<number>>;
|
|
423
|
+
|
|
424
|
+
export { CaptureFileRef, CaptureOutcome, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSyncReport, type ChooseAlternateArgs, CoercibleField, Delivery, Freshness, type MergeField, MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, MergeFieldSemanticType, MergeFieldSource, type MergeFieldTransform, type MissingBehavior, OverridePolicy, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, REFUSALS_WORTH_REPEATING, RecordDocument, RecordsResult, type ResolutionTriple, Timestamp, type TypedDate, type TypedMatchScore, type TypedNumber, type TypedTime, Uuid, alternatePatch, autonumberJoin, autonumberPrefixOf, autonumberSearchOf, autonumberWords, chooseAlternate, filterWithAutonumber, indexedDbStore, isAutonumberField, isDecided, localeDateOrder, memoryStore, mintClientKey, openCaptureQueue, rankTypedMatches, readTypedDate, readTypedNumber, readTypedTime, twoDigitYear, typedDateText, typedMatchScore, typedTimeText };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { U as Uuid,
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
5
|
-
export { M as MyLevel, O as OpLedger, P as PERMISSION_LEVELS, g as PermissionLevel, h as RecordsActor, e as RecordsChangeSink, a as RecordsConfig, d as RecordsDataSource, c as RecordsErrorSink, i as RecordsFilter, R as RecordsRealtimePort, j as RecordsResolverPort, k as RecordsResponse, l as RecordsTableQuery, b as RowAgentPort, f as RowAgentTarget, m as asPermissionLevel, n as atLeast, o as createOpLedger, p as defaultOpLedger, q as forgetAllOps, r as highestLevel, s as isOwnOp, t as mintOpId, u as rememberedOpCount } from './ports-
|
|
6
|
-
import {
|
|
7
|
-
export { A as ADDRESS_PARTS,
|
|
8
|
-
export {
|
|
9
|
-
export { D as DEFAULT_PORTAL_ARCHIVE_FILTER, F as FormLookOptions,
|
|
10
|
-
export { A as AggregateBucket,
|
|
11
|
-
export {
|
|
12
|
-
export { a as ObjectKind, O as ObjectOrganizationAnswer, R as RecordOrganizationPort, W as WHERE_ID_OPENS_DOOR, r as readObjectOrganizationAnswer, b as resolveObjectOrganization, w as whereIdOpensPort } from './objectOrganization-
|
|
1
|
+
import { U as Uuid, $ as MergeFieldSource, _ as MergeFieldSemanticType, Z as MergeFieldModifier, a2 as OverridePolicy, B as Delivery, h as Timestamp, M as Freshness, n as RecordDocument, R as RecordsResult } from './record-BrJNCmH1.js';
|
|
2
|
+
export { t as ABSENCE_REASONS, u as ACTOR_VOCABULARY, v as AbsenceReason, A as Actor, w as COMPUTE_ON, x as CONTEXT_POLICIES, C as ComputeOn, d as ContextPolicy, y as DECLARABLE_FIELD_KINDS, z as DELIVERIES, D as DeclarableFieldKind, E as ENTITY_TOKENS, G as EntityToken, I as FIELD_SENSITIVITIES, J as FIELD_SOURCES, K as FRESHNESS, o as FieldBehavior, c as FieldSensitivity, F as FieldSource, L as ForbiddenEnvelopeWord, H as HiddenFieldNotice, N as KERNEL_TABLES, Q as KernelTableName, V as KeysetRow, W as MERGE_FIELD_MODIFIERS, X as MERGE_FIELD_SEMANTIC_TYPES, Y as MERGE_FIELD_SOURCES, a0 as ON_DELETE, a1 as OVERRIDE_POLICIES, O as OnDelete, a3 as PARITY_FIELD_TYPES, a4 as PER_VALUE_ACCESS_WORDS, p as ParityFieldType, a5 as PerValueAccessWord, P as PgError, r as PredictedRefusal, a6 as ProvenancePointer, a7 as RELATION_BINDINGS, a8 as RELATION_CARDINALITIES, a9 as RELATION_FLAVORS, aa as RETIRED_ACTOR_WORDS, ab as RULE_NODE_KINDS, ac as RULE_USES, l as ReadRow, s as ReadValue, ad as RecordChange, ae as RecordChangeResult, af as RecordGraphWritten, ag as RecordKeysetPage, ah as RecordPage, k as RecordPageSort, ai as RecordRead, aj as RecordRevision, a as RecordsError, m as RecordsErrorCode, g as RelationBinding, f as RelationCardinality, e as RelationFlavor, ak as RetiredActorWord, i as RuleNodeKind, j as RuleUse, al as STORAGE_MODES, am as STORE_DOORS, an as STORE_KNOBS, ao as STORE_REFUSAL_CODES, q as StaleWriteDetail, S as StorageMode, ap as StoreDoorName, aq as StoreRefusalCode, ar as StoredRecord, as as TABLE_DISPLAYS, at as TABLE_ORIGINS, au as TABLE_TYPES, b as TableDisplay, av as TableOrigin, T as TableType, aw as VALUE_ALTERNATE_KEYS, ax as VALUE_ENVELOPE_KEYS, ay as ValueAlternate, az as ValueAlternateKey, aA as ValueEnvelope, aB as ValueEnvelopeKey, aC as ValueSource, aD as WriteConflict, aE as err, aF as isLockedStub, aG as isRecordsErr, aH as ok, aI as splitLockedRows, aJ as unwrapRecords } from './record-BrJNCmH1.js';
|
|
3
|
+
import { J as CaptureFileRef, K as CaptureOutcome, R as RecordsClient } from './client-DcWZjmg2.js';
|
|
4
|
+
export { A as ARCHIVE_LANES, b as ARCHIVE_LANE_LABEL, c as ARCHIVE_LANE_MEANS, e as ActionRefusal, f as ActionRunResult, g as AdminTable, h as AnonTokenBinding, i as ArchiveLane, j as ArchivedChecklistTemplate, k as ArchivedDoorRow, l as ArchivedForm, m as ArchivedRow, o as AutomationAction, p as AutomationDeclared, q as AutomationFilter, r as AutomationFlipped, s as AutomationItem, t as AutomationLastRun, u as AutomationList, v as AutomationRun, w as AutomationRunStatus, x as AutomationRuns, y as AutomationSpec, z as AutomationStep, B as AutomationTrigger, C as AutomationValue, D as AutomationValues, E as AutomationWeekday, G as BUILT_KIND_WORD, H as CHOICE_NUDGES, I as CaptureField, L as CaptureQuestion, M as CaptureSheetFace, N as CaptureSheetSummary, O as ChecklistDeclared, P as ChecklistRequirement, Q as ChecklistRequirementKind, S as ChecklistRoleSpec, U as ChecklistRunStarted, V as ChecklistRunStep, W as ChecklistRunSummary, X as ChecklistSpec, Y as ChecklistStepCompleted, Z as ChecklistStepSpec, _ as ChecklistTemplateShape, $ as ChecklistTemplateSummary, a0 as ChecklistTrigger, a1 as ChecklistTriggerKind, a2 as ChoiceCellBack, a3 as ChoiceLike, a4 as ChoiceNudge, a5 as ChoiceOption, a6 as ChoiceRehome, a7 as ChoiceUsage, a8 as ChoicesRehomed, a9 as CommentThreadRead, aa as CommentWritten, ab as ConversationScope, ac as ConversationScopeContext, ad as CustomFieldTableType, ae as DEFAULT_ARCHIVE_LANE, ag as DRILL_CHART_TOKENS, ah as DRILL_DESCRIPTION_MAX, ai as DRILL_DOORS, aj as DRILL_SCHEMA, ak as DataHomeTable, al as DecorationColor, am as DecorationPath, an as DecorationRule, ao as DecorationRuleOp, ap as DecorationTarget, aq as DocRenderRow, ar as DocSignatureCheck, as as DocSignatureRow, at as DocTemplateRow, au as DocToken, av as DocUnresolvedToken, aw as DrillAdHocOp, ax as DrillAnswer, ay as DrillAnswerRow, az as DrillChartToken, aA as DrillDeclaration, aB as DrillDefinition, aC as DrillDimension, aD as DrillFinding, aE as DrillGrain, aF as DrillHaving, aG as DrillLane, aH as DrillLevel, aI as DrillMeasure, aJ as DrillMeasureOp, aK as DrillMeasureWhereValue, aL as DrillPath, aM as DrillQuestion, aN as DrillRecords, aO as DrillRowsPage, aP as DrillSource, aQ as DrillView, aR as EnrichAlternate, aS as EnrichCell, aT as EnrichDeclared, aU as EnrichDueRow, aV as EnrichRun, aW as EnrichSource, aX as Enrichment, aY as EnrichmentSummary, aZ as EntityBackLinkItem, a_ as EntityBackLinks, a$ as EntityFieldRights, b0 as EntityFieldValue, b1 as EntityFieldsAcross, b2 as EntityRecordMatch, b3 as EntityRecordRead, b4 as EntityRecordsFound, b5 as EntityRowWritten, b6 as EntityTableFacts, b7 as ExternalPrincipalCard, F as FieldDrift, b8 as FieldDriftAspect, b9 as FieldHistoryEntry, ba as FieldRetyped, bb as FormArchiveAnswer, bc as FormulaParse, bd as FormulaPreview, be as GridLayout, bf as GridLayoutMode, bg as GridRowHeight, bh as HistoryActor, bi as HistoryActorKind, bj as HistoryChange, bk as Home, bl as ImportBatchResult, bm as ImportColumnPlan, bn as ImportColumnsDeclared, bo as ImportFinished, bp as ImportOpened, bq as ImportOutcome, br as ImportPlan, bs as ImportPolicy, bt as ImportProposal, bu as ImportReport, bv as ImportRun, bw as InboundAddress, bx as InboundDeclared, by as InboxCounts, bz as InboxStateChange, bA as IoExportPage, bB as MigrationEntry, bC as MigrationUndone, bD as NewEntityFieldDeclaration, bE as OutsideShareAnswer, bF as PIPELINE_RULE_KINDS, bG as ParentExtracted, bH as Pipeline, bI as PipelineColumn, bJ as PipelineDeclared, bK as PipelineGate, bL as PipelineGatePreview, bM as PipelineMissingField, bN as PipelineMoveMany, bO as PipelineMoveManyItem, bP as PipelineMoveManyResult, bQ as PipelineMoveResult, bR as PipelineMoveVerdict, bS as PipelineRule, bT as PipelineRuleKind, bU as PipelineSpec, bV as PipelineStage, bW as PipelineVerdict, bY as PublishBinding, bZ as PublishBindingKind, b$ as ROW_WEB_NOT_READY, c0 as RecordChangeAction, c1 as RecordComment, c2 as RecordEvent, c3 as RecordHeader, c4 as RecordHistoryEntry, c6 as RecordRowControls, c7 as RecordScopeComment, c8 as RecordScopeContext, c9 as RecordScopeField, ca as RecordScopeHistoryEntry, cb as RecordScopeRelation, cc as RecordScopeWithheld, cd as RecordSplit, ce as RecordsMerged, cf as RegisteredTable, cg as ResolvedPublishBinding, ch as ResolvedPublishBindingKind, ci as RestorePreview, cj as RestoreResult, ck as RetypeBehaviour, cl as RetypePreview, cm as RowAction, cn as RowActionStep, co as RowDefaultsApplied, cp as SHOWN_TO_LABEL, cq as SHOWN_TO_VALUES, cr as SHOWN_TO_WHO_MAY_CHANGE, cs as STAGE_RULE_ENFORCEMENT, ct as STAGE_RULE_ON_FAIL, cu as ShownTo, cv as StagePending, cw as StagePendingOnBoard, cx as StageRuleEnforcement, cy as StageRuleOnFail, cz as StageRuleWarning, cA as TABLE_KIND_PREFIX, cB as Table, T as TableArchiveProgress, cC as TableCapacity, cD as TableCopyInProgress, cE as TableDecorations, cF as TableDuplicateProgress, cG as TableDuplicated, cI as TableHome, cJ as TableHomeDestination, a as TableKindFacts, cK as TableLevel, cL as TableLevelApproval, cM as TableLevelFacts, cN as TableLevelSet, cO as TableListEntry, cQ as TableMoved, cR as TablePlacement, cS as TablePlacementFact, cT as TableReaderRule, cU as TableRenderSchema, cV as TableRestoreProgress, cW as TableRowCount, cX as TableRowDefaults, cY as TableRowDefaultsPatch, cZ as TableSchemaMode, c_ as TableSyncResult, c$ as TableSyncSource, d0 as TableSyncSpec, d1 as TableWebhook, d2 as TableWebhookDeclared, d3 as TypedChoiceDecision, d4 as ViewLayout, d5 as ViewOrderSet, d6 as WorkApprovalDecision, d7 as WorkApprovalFiled, d8 as WorkApprovalState, d9 as WorkApprover, da as WorkAssignment, db as WorkAssignmentField, dc as WorkChange, dd as WorkDecideMany, de as WorkDecideManyItem, df as WorkDecideManyResult, dg as WorkDecideVerdict, dh as WorkDueState, di as WorkGraph, dj as WorkInboxItem, dk as WorkInboxKind, dl as WorkInboxView, dm as WorkInstantiation, dn as WorkListFlavour, dp as WorkListItem, dq as WorkOrigin, dr as WorkRecordState, ds as WorkSlotHold, dt as WorkState, du as WorkTemplateNode, dv as WorkTemplateRelation, dw as WorkTurn, dx as actionRefusals, dy as archivedByLine, dz as archivedWhen, dA as asChoiceNudge, dC as choiceSlug, dD as choiceValuesOf, dE as choicesOf, dG as decideTypedChoice, dH as declareDrillDefinition, dI as drillAnswerOf, dJ as drillFindingKnob, dK as emptyArchiveLine, dL as exportPageXlsx, dM as fieldKindOf, dN as holdsARetiredChoice, dQ as isArchiveLane, dR as isFoundation, dS as isShownTo, dT as isTableKind, dU as isTheChosen, dV as keptGroups, dW as keptOutOfSight, dX as keptTableHref, dY as levelHasShownTo, dZ as looksLikeAnId, d_ as mayDrag, d$ as moveConsequence, e0 as moveInOrder, e1 as offeredAsContext, e2 as optionKey, e3 as optionLabel, e4 as parseFieldDrift, e5 as parseTableCopiesInProgress, e6 as parseTableDuplicateProgress, e7 as parseTableDuplicated, e8 as parseTableHome, e9 as parseTableMoved, eb as previewRetype, ec as previewRuleChange, ed as recordChangeTrigger, ee as recordSourceKey, ef as recordSourceTable, eg as recordsUseSentence, eh as rehomeSentence, ei as removedChoicesInUse, ej as ruleThatRefuses, ek as rulesWithTopStar, el as sameDocument, em as scopeChip, en as sheetSyncSpec, eo as tableIdOf, ep as tableJsonSchema, eq as tableKindMapping, er as tableKindSlug, es as tableRenderSchema, et as valueConverts, eu as withRowCounts, ew as withTablePlacement } from './client-DcWZjmg2.js';
|
|
5
|
+
export { M as MyLevel, O as OpLedger, P as PERMISSION_LEVELS, g as PermissionLevel, h as RecordsActor, e as RecordsChangeSink, a as RecordsConfig, d as RecordsDataSource, c as RecordsErrorSink, i as RecordsFilter, R as RecordsRealtimePort, j as RecordsResolverPort, k as RecordsResponse, l as RecordsTableQuery, b as RowAgentPort, f as RowAgentTarget, m as asPermissionLevel, n as atLeast, o as createOpLedger, p as defaultOpLedger, q as forgetAllOps, r as highestLevel, s as isOwnOp, t as mintOpId, u as rememberedOpCount } from './ports-BE_5jz-c.js';
|
|
6
|
+
import { m as CoercibleField } from './field-BIRNApm1.js';
|
|
7
|
+
export { A as ADDRESS_PARTS, c as AGENT_WRITER_WORDS, d as AddressPart, e as AddressValue, B as BARCODE_SYMBOLOGIES, f as BUTTON_DOES, g as ButtonDoes, h as ButtonPressed, i as ButtonSettings, C as ChoiceOptions, j as CoerceOptions, k as Coerced, l as CoercedAnswers, n as FIELD_KINDS, F as Field, o as FieldDuplicated, p as FieldKind, q as FieldOptionEdit, r as FieldPatch, s as FieldProposal, b as FieldRule, a as FieldTypeWord, K as KernelTargets, t as NEWER_FIELD_KINDS, u as NOT_A_MEMBER_WORDS, N as NewFieldDeclaration, v as NewerFieldKind, P as ParityFieldTypeDescriptor, w as PersonStamp, R as RelationDisplay, x as RelationNameIndex, y as RelationNameMatch, z as RelationNamesAnswer, S as STATUS_GROUPS, D as STATUS_GROUP_WORDS, E as SYSTEM_WRITER_WORDS, G as StatusGroup, T as TableProposal, H as addressFromText, I as addressMapUrl, J as addressText, L as allowsOtherValues, M as buttonNeeds, O as buttonOf, Q as buttonUrlPlaceholders, U as coerceTypedAnswer, V as coerceTypedAnswers, W as coercionLabel, X as durationText, Y as entityReferenceKindsOf, Z as fieldKindFor, _ as isAddressValue, $ as isButtonField, a0 as isEntityReferenceConfig, a1 as isPersonStamp, a2 as newerKindExportWords, a3 as newerKindOf, a4 as newerKindWords, a5 as personStampText, a6 as ratingMaxOf, a7 as readTypedDuration, a8 as relationNameIndexOf, a9 as relationNameKey, aa as relationNamesIn, ab as richTextPlain, ac as safeLinkHref, ad as splitListCell, ae as statusGroupOf } from './field-BIRNApm1.js';
|
|
8
|
+
export { B as BookingAvailability, a as BookingDeclared, b as BookingSummary, c as BookingWindow, d as FormResults, e as FormRoute, F as FormSummary, f as Rule, g as RuleAnswer, R as RuleExpression, h as bookingPath, p as publicFormPath } from './rule-BtjrE42J.js';
|
|
9
|
+
export { D as DEFAULT_PORTAL_ARCHIVE_FILTER, F as FormLookOptions, a as PORTAL_ACCENTS, b as PORTAL_ARCHIVE_FILTERS, P as PortalAccent, c as PortalArchiveAnswer, d as PortalArchiveFilter, e as PortalCard, f as PortalConfig, g as PortalConfigInput, h as PortalFooterLink, i as PortalFormAnswer, j as PortalFormInput, k as PortalFormRef, l as PortalFormSpec, m as PortalInvitation, n as PortalPreviewRow, o as PortalPrincipal, p as PortalRevocation, q as PortalStage, r as PortalStyle, s as PortalStyleInput, t as PortalSummary, u as PortalTableExposure, v as PortalTableRef, w as PublicPicture, x as emptyPortalArchiveLine, y as isPortalAccent, z as isPortalArchiveFilter, A as portalArchiveConsequence, B as portalConfirmLine, C as portalPath, E as portalTitleTypedBack } from './portal-B9HCNPTc.js';
|
|
10
|
+
export { A as AggregateBucket, e as AggregateCompare, f as AggregateCompareKind, g as AggregateCompareWindows, h as AggregateDelta, b as AggregateFilter, i as AggregateGroupValue, c as AggregateMeasure, a as AggregateOperation, j as AggregateRow, k as AggregateWindow, l as DashboardBlock, D as DashboardBlockKind, m as DashboardBlockResult, n as DashboardRunResult, o as DashboardSummary, p as DashboardTarget, q as DashboardTargetBase, r as DashboardTargetOp, s as DashboardTargetResult, t as DashboardTotals, u as DigestPreview, M as MySubscription, Q as QuietHours, R as RecordFilter, v as RowTemplateRow, w as SavedViewColorBy, x as SavedViewDefinition, y as SavedViewLayout, d as SavedViewRow, z as SavedViewSpecIn, B as StoreFilter, C as StuckRow, E as Subscription, F as SubscriptionBlock, S as SubscriptionCadence, G as SubscriptionSpec, H as callersTimeZone, I as hasQuietHours, J as isRuleFilter, K as liftWithheld, L as measureKey, N as stableFilterKey, O as withCallersClock } from './subscription-Ca15Z7Gu.js';
|
|
11
|
+
export { a as EntityRef, E as EntityRefWithWords, b as EntityReferenceKind, R as REVERSE_LINKS_PAGE_MAX, c as REVERSE_LINKS_RECORDS_PER_CALL, d as Relation, e as RelationCarries, f as RelationCoordinate, g as RelationIcons, h as RelationProperties, i as RelationTarget, j as RelationWordsManyArgs, k as ReverseColumn, l as ReverseLink, m as ReverseLinks, n as ReverseLinksFieldsArgs, o as ReverseLinksManyArgs, S as SourceArchived, p as entityReferenceKinds, q as entityReferenceSearch, r as entityReferenceWords, s as entityRefsOf, t as entityRefsToWrite, u as isReverseField, v as sourceArchivedOf } from './relation-BxGXLRaG.js';
|
|
12
|
+
export { a as ObjectKind, O as ObjectOrganizationAnswer, R as RecordOrganizationPort, W as WHERE_ID_OPENS_DOOR, r as readObjectOrganizationAnswer, b as resolveObjectOrganization, w as whereIdOpensPort } from './objectOrganization-D5Ytjah7.js';
|
|
13
|
+
import './doors-t-Oc2l9E.js';
|
|
13
14
|
|
|
14
15
|
type WithFormat = CoercibleField & {
|
|
15
16
|
display_format?: unknown;
|
|
@@ -404,4 +405,20 @@ type MergeFieldResolution = {
|
|
|
404
405
|
reason: string;
|
|
405
406
|
};
|
|
406
407
|
|
|
407
|
-
|
|
408
|
+
interface ChooseAlternateArgs {
|
|
409
|
+
record_id: Uuid;
|
|
410
|
+
field_key: string;
|
|
411
|
+
/** Position in the field's `alternates` list as the record holds it. */
|
|
412
|
+
alternate_index: number;
|
|
413
|
+
}
|
|
414
|
+
/** The patch that makes alternate `alternate_index` of `field_key` the value. Pure; exported for tests. */
|
|
415
|
+
declare function alternatePatch(document: RecordDocument, field_key: string, alternate_index: number): {
|
|
416
|
+
ok: true;
|
|
417
|
+
patch: Record<string, unknown>;
|
|
418
|
+
} | {
|
|
419
|
+
ok: false;
|
|
420
|
+
message: string;
|
|
421
|
+
};
|
|
422
|
+
declare function chooseAlternate(client: Pick<RecordsClient, "recordRead" | "recordUpdate">, { record_id, field_key, alternate_index }: ChooseAlternateArgs): Promise<RecordsResult<number>>;
|
|
423
|
+
|
|
424
|
+
export { CaptureFileRef, CaptureOutcome, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSyncReport, type ChooseAlternateArgs, CoercibleField, Delivery, Freshness, type MergeField, MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, MergeFieldSemanticType, MergeFieldSource, type MergeFieldTransform, type MissingBehavior, OverridePolicy, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, REFUSALS_WORTH_REPEATING, RecordDocument, RecordsResult, type ResolutionTriple, Timestamp, type TypedDate, type TypedMatchScore, type TypedNumber, type TypedTime, Uuid, alternatePatch, autonumberJoin, autonumberPrefixOf, autonumberSearchOf, autonumberWords, chooseAlternate, filterWithAutonumber, indexedDbStore, isAutonumberField, isDecided, localeDateOrder, memoryStore, mintClientKey, openCaptureQueue, rankTypedMatches, readTypedDate, readTypedNumber, readTypedTime, twoDigitYear, typedDateText, typedMatchScore, typedTimeText };
|
package/dist/index.js
CHANGED
|
@@ -5092,6 +5092,49 @@ function tableRenderSchema(facts) {
|
|
|
5092
5092
|
}
|
|
5093
5093
|
return { kind: slug, fields: out };
|
|
5094
5094
|
}
|
|
5095
|
+
|
|
5096
|
+
// src/alternates.ts
|
|
5097
|
+
function refuse(code, message, hint) {
|
|
5098
|
+
return { ok: false, error: { code, message, hint, ours: true } };
|
|
5099
|
+
}
|
|
5100
|
+
function alternatePatch(document, field_key, alternate_index) {
|
|
5101
|
+
const block = document._values ?? {};
|
|
5102
|
+
const envelope = block[field_key];
|
|
5103
|
+
const alternates = Array.isArray(envelope?.alternates) ? envelope.alternates : [];
|
|
5104
|
+
const chosen = alternates[alternate_index];
|
|
5105
|
+
if (!envelope || !chosen) return { ok: false, message: "That other value is no longer on this record." };
|
|
5106
|
+
const kept = alternates.filter((_, i) => i !== alternate_index);
|
|
5107
|
+
const current = document[field_key];
|
|
5108
|
+
const next = [...kept];
|
|
5109
|
+
if (current !== null && current !== void 0) {
|
|
5110
|
+
const taken = new Set(kept.map((a) => a.rank));
|
|
5111
|
+
let rank = 1;
|
|
5112
|
+
while (taken.has(rank)) rank += 1;
|
|
5113
|
+
next.push({ value: current, ...envelope.src ? { src: envelope.src } : {}, rank });
|
|
5114
|
+
}
|
|
5115
|
+
const { ver: _ver, actor: _actor, at: _at, on_behalf_of: _on, absent: _absent, alternates: _alts, src: _src, ...rest } = envelope;
|
|
5116
|
+
const changed = { ...rest, ...chosen.src ? { src: chosen.src } : {} };
|
|
5117
|
+
if (next.length > 0) changed["alternates"] = next;
|
|
5118
|
+
return {
|
|
5119
|
+
ok: true,
|
|
5120
|
+
patch: {
|
|
5121
|
+
[field_key]: chosen.value,
|
|
5122
|
+
// THE WHOLE BLOCK — every other field's envelope and alternates travel with it.
|
|
5123
|
+
_values: { ...block, [field_key]: changed }
|
|
5124
|
+
}
|
|
5125
|
+
};
|
|
5126
|
+
}
|
|
5127
|
+
async function chooseAlternate(client, { record_id, field_key, alternate_index }) {
|
|
5128
|
+
const read = await client.recordRead({ record_id, withVersion: true });
|
|
5129
|
+
if (!read.ok) return read;
|
|
5130
|
+
const version = read.data.version;
|
|
5131
|
+
if (version === null || version === void 0) {
|
|
5132
|
+
return refuse("stale_read", "Nothing was saved: this record's latest changes could not be checked.", "Reload, then try again.");
|
|
5133
|
+
}
|
|
5134
|
+
const built = alternatePatch(read.data.document, field_key, alternate_index);
|
|
5135
|
+
if (!built.ok) return refuse("not_found", built.message, "Reload, then look again.");
|
|
5136
|
+
return client.recordUpdate({ record_id, patch: built.patch, expectedVersion: version });
|
|
5137
|
+
}
|
|
5095
5138
|
export {
|
|
5096
5139
|
ABSENCE_REASONS,
|
|
5097
5140
|
ACTOR_VOCABULARY,
|
|
@@ -5167,6 +5210,7 @@ export {
|
|
|
5167
5210
|
addressMapUrl,
|
|
5168
5211
|
addressText,
|
|
5169
5212
|
allowsOtherValues,
|
|
5213
|
+
alternatePatch,
|
|
5170
5214
|
archivedByLine,
|
|
5171
5215
|
archivedWhen,
|
|
5172
5216
|
asChoiceNudge,
|
|
@@ -5184,6 +5228,7 @@ export {
|
|
|
5184
5228
|
choiceSlug,
|
|
5185
5229
|
choiceValuesOf,
|
|
5186
5230
|
choicesOf,
|
|
5231
|
+
chooseAlternate,
|
|
5187
5232
|
coerceTypedAnswer,
|
|
5188
5233
|
coerceTypedAnswers,
|
|
5189
5234
|
coercionLabel,
|