@altopelago/sansa 0.9.0 → 0.9.1

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/src/index.d.ts CHANGED
@@ -42,9 +42,38 @@ export type SansaParseErrorCode =
42
42
  | 'SANSA_QUERY_UNEXPECTED_EXPRESSION_TOKEN'
43
43
  | 'SANSA_QUERY_UNTERMINATED_EXPRESSION'
44
44
  | 'SANSA_QUERY_INVALID_NUMBER_LITERAL'
45
+ | 'SANSA_QUERY_EXPECTED_LITERAL_PAYLOAD'
46
+ | 'SANSA_QUERY_INVALID_HEX_LITERAL'
47
+ | 'SANSA_QUERY_INVALID_RADIX_LITERAL'
48
+ | 'SANSA_QUERY_INVALID_ENCODING_LITERAL'
49
+ | 'SANSA_QUERY_INVALID_SEPARATOR_LITERAL'
50
+ | 'SANSA_QUERY_INVALID_NULL_LITERAL'
51
+ | 'SANSA_QUERY_INVALID_TEMPORAL_LITERAL'
45
52
  | 'SANSA_QUERY_INVALID_RESOLUTION_EXPRESSION'
46
53
  | 'SANSA_QUERY_INVALID_FUNCTION_CALL'
47
54
  | 'SANSA_QUERY_INVALID_PROJECTION'
55
+ | 'SANSA_INSTRUCTION_EMPTY'
56
+ | 'SANSA_INSTRUCTION_EXPECTED_MUTATION'
57
+ | 'SANSA_INSTRUCTION_UNTERMINATED_BLOCK_COMMENT'
58
+ | 'SANSA_INSTRUCTION_UNSUPPORTED_QUERY_CLAUSE'
59
+ | 'SANSA_INSTRUCTION_UNSUPPORTED_VERB'
60
+ | 'SANSA_INSTRUCTION_MULTIPLE_MUTATION_VERBS'
61
+ | 'SANSA_INSTRUCTION_DUPLICATE_CLAUSE'
62
+ | 'SANSA_INSTRUCTION_INVALID_CLAUSE_ORDER'
63
+ | 'SANSA_INSTRUCTION_EXPECTED_FROM_ADDRESS'
64
+ | 'SANSA_INSTRUCTION_EXPECTED_WHERE_EXPRESSION'
65
+ | 'SANSA_INSTRUCTION_EXPECTED_REQUIRE_EXPRESSION'
66
+ | 'SANSA_INSTRUCTION_EXPECTED_BECAUSE_TEXT'
67
+ | 'SANSA_INSTRUCTION_EXPECTED_BY_TEXT'
68
+ | 'SANSA_INSTRUCTION_EXPECTED_WITH'
69
+ | 'SANSA_INSTRUCTION_EXPECTED_IN'
70
+ | 'SANSA_INSTRUCTION_EXPECTED_ADDRESS'
71
+ | 'SANSA_INSTRUCTION_EXPECTED_CREATE_DESTINATION'
72
+ | 'SANSA_INSTRUCTION_INVALID_CREATE_DESTINATION'
73
+ | 'SANSA_INSTRUCTION_EXPECTED_VALUE'
74
+ | 'SANSA_INSTRUCTION_INVALID_DATATYPE'
75
+ | 'SANSA_INSTRUCTION_INVALID_VALUE_LITERAL'
76
+ | 'SANSA_INSTRUCTION_INVALID_PLACEMENT'
48
77
  | 'SANSA_PARSE_ERROR';
49
78
 
50
79
  export type SansaWarningCode =
@@ -77,6 +106,11 @@ export interface SansaQueryParseOptions {
77
106
  readonly expression?: SansaQueryExpressionParseOptions;
78
107
  }
79
108
 
109
+ export interface SansaInstructionParseOptions {
110
+ readonly address?: SansaParseOptions;
111
+ readonly expression?: SansaQueryExpressionParseOptions;
112
+ }
113
+
80
114
  export type SansaParseResult =
81
115
  | { readonly ok: true; readonly address: SansaAddress; readonly warnings: readonly SansaWarning[] }
82
116
  | { readonly ok: false; readonly errors: readonly SansaDiagnostic[] };
@@ -89,6 +123,10 @@ export type SansaQueryExpressionParseResult =
89
123
  | { readonly ok: true; readonly expression: SansaQueryExpression; readonly warnings: readonly SansaWarning[] }
90
124
  | { readonly ok: false; readonly errors: readonly SansaDiagnostic[] };
91
125
 
126
+ export type SansaInstructionParseResult =
127
+ | { readonly ok: true; readonly instruction: SansaInstruction; readonly warnings: readonly SansaWarning[] }
128
+ | { readonly ok: false; readonly errors: readonly SansaDiagnostic[] };
129
+
92
130
  export type SansaResolveErrorCode =
93
131
  | 'SANSA_RESOLVE_EXPECTED_NAMESPACE'
94
132
  | 'SANSA_RESOLVE_MISSING_ROOT'
@@ -98,12 +136,18 @@ export type SansaResolveErrorCode =
98
136
  | 'SANSA_RESOLVE_UNSUPPORTED_PARENT'
99
137
  | 'SANSA_RESOLVE_PARENT_TRAVERSAL_FORBIDDEN'
100
138
  | 'SANSA_RESOLVE_BOUNDARY_ESCAPE_FORBIDDEN'
139
+ | 'SANSA_RESOLVE_INVALID_BINDING_LIMIT'
140
+ | 'SANSA_RESOLVE_BINDING_LIMIT_EXCEEDED'
101
141
  | 'SANSA_RESOLVE_EXACT_MULTIPLICITY_VIOLATION'
102
142
  | 'SANSA_RESOLVE_UNSUPPORTED_SELECTOR';
103
143
 
104
144
  export type SansaQueryEvaluateErrorCode =
105
145
  | 'SANSA_QUERY_POLICY_VIOLATION'
106
146
  | 'SANSA_QUERY_BUDGET_EXCEEDED'
147
+ | 'SANSA_QUERY_PATH_ACTIVATION_POLICY_REQUIRED'
148
+ | 'SANSA_QUERY_PATH_ACTIVATION_INVALID_POLICY'
149
+ | 'SANSA_QUERY_PATH_ACTIVATION_DENIED'
150
+ | 'SANSA_QUERY_PATH_ACTIVATION_BINDING_LIMIT_EXCEEDED'
107
151
  | 'SANSA_QUERY_EVALUATE_UNSUPPORTED_FUNCTION'
108
152
  | 'SANSA_QUERY_EVALUATE_UNSUPPORTED_EXTENSION'
109
153
  | 'SANSA_QUERY_EVALUATE_INVALID_FUNCTION_CALL'
@@ -115,14 +159,52 @@ export type SansaQueryEvaluateErrorCode =
115
159
  | 'SANSA_QUERY_EVALUATE_INVALID_COMPARISON'
116
160
  | 'SANSA_QUERY_EVALUATE_INVALID_FROM_SOURCE'
117
161
  | 'SANSA_QUERY_EVALUATE_INVALID_PATH_LITERAL'
162
+ | 'SANSA_QUERY_EVALUATE_INVALID_REFERENCE_TARGET'
163
+ | 'SANSA_QUERY_EVALUATE_MISSING_REFERENCE_TARGET'
118
164
  | 'SANSA_QUERY_EVALUATE_INVALID_EXISTENCE_ARGUMENT'
119
165
  | 'SANSA_QUERY_EVALUATE_INVALID_CARDINALITY_ARGUMENT';
120
166
 
167
+ export type SansaMutateErrorCode =
168
+ | 'SANSA_MUTATE_INVALID_REQUEST'
169
+ | 'SANSA_MUTATE_INVALID_PLAN'
170
+ | 'SANSA_MUTATE_INVALID_OPERATION'
171
+ | 'SANSA_MUTATE_UNSUPPORTED_OPERATION'
172
+ | 'SANSA_MUTATE_UNSUPPORTED_PLACEMENT'
173
+ | 'SANSA_MUTATE_INVALID_TARGET'
174
+ | 'SANSA_MUTATE_NON_EXACT_TARGET'
175
+ | 'SANSA_MUTATE_TARGET_RESOLUTION_FAILED'
176
+ | 'SANSA_MUTATE_TARGET_MISS'
177
+ | 'SANSA_MUTATE_TARGET_MULTIPLICITY'
178
+ | 'SANSA_MUTATE_TARGET_EXISTS'
179
+ | 'SANSA_MUTATE_INVALID_PRECONDITION'
180
+ | 'SANSA_MUTATE_INVALID_VALUE_SEMANTICS_PROFILE'
181
+ | 'SANSA_MUTATE_INVALID_DATATYPE'
182
+ | 'SANSA_MUTATE_INVALID_KIND'
183
+ | 'SANSA_MUTATE_PRECONDITION_EVALUATION_FAILED'
184
+ | 'SANSA_MUTATE_PRECONDITION_FAILED'
185
+ | 'SANSA_MUTATE_BUDGET_EXCEEDED'
186
+ | 'SANSA_MUTATE_DUPLICATE_TARGET'
187
+ | 'SANSA_MUTATE_INVALID_NAME'
188
+ | 'SANSA_MUTATE_ROOT_REMOVE_FORBIDDEN'
189
+ | 'SANSA_MUTATE_INVALID_ANCHOR'
190
+ | 'SANSA_MUTATE_INVALID_MOVE_ANCHOR'
191
+ | 'SANSA_MUTATE_INVALID_MOVE_CONTAINER'
192
+ | 'SANSA_MUTATE_STALE_TARGET'
193
+ | 'SANSA_MUTATE_UNSUPPORTED_ADAPTER_OPERATION'
194
+ | 'SANSA_MUTATE_ATOMIC_APPLY_UNAVAILABLE'
195
+ | 'SANSA_MUTATE_TARGET_UNSUPPORTED_DATATYPE'
196
+ | 'SANSA_MUTATE_TARGET_UNSUPPORTED_FEATURE'
197
+ | 'SANSA_MUTATE_TARGET_UNSUPPORTED_VALUE'
198
+ | 'SANSA_MUTATE_TARGET_UNSUPPORTED_OPERATION'
199
+ | 'SANSA_MUTATE_APPLY_FAILED';
200
+
121
201
  export interface SansaResolveDiagnostic {
122
202
  readonly code: SansaResolveErrorCode | SansaParseErrorCode;
123
203
  readonly message: string;
124
204
  readonly index?: number;
125
205
  readonly selectorIndex?: number;
206
+ readonly limit?: number;
207
+ readonly observed?: number;
126
208
  }
127
209
 
128
210
  export interface SansaQueryEvaluateDiagnostic {
@@ -133,9 +215,29 @@ export interface SansaQueryEvaluateDiagnostic {
133
215
  readonly index?: number;
134
216
  readonly selectorIndex?: number;
135
217
  readonly extension?: string;
218
+ readonly selector?: string;
219
+ readonly budget?: string;
220
+ readonly limit?: number;
221
+ readonly observed?: number;
222
+ }
223
+
224
+ export interface SansaMutateDiagnostic {
225
+ readonly code: SansaMutateErrorCode | SansaResolveErrorCode | SansaParseErrorCode;
226
+ readonly message: string;
227
+ readonly phase?: 'plan' | 'policy' | 'target' | 'apply';
228
+ readonly operationIndex?: number;
229
+ readonly preconditionIndex?: number;
230
+ readonly ruleIndex?: number;
231
+ readonly policyField?: string;
232
+ readonly policyScope?: string;
233
+ readonly policyAddress?: string;
234
+ readonly targetFormat?: string;
235
+ readonly datatype?: string;
236
+ readonly valuePath?: string;
136
237
  readonly budget?: string;
137
238
  readonly limit?: number;
138
239
  readonly observed?: number;
240
+ readonly cause?: unknown;
139
241
  }
140
242
 
141
243
  export interface SansaResolveBinding {
@@ -177,6 +279,10 @@ export interface SansaResolveNamespace<TBinding extends object = SansaResolveBin
177
279
  readonly nullReason?: (binding: TBinding) => string | undefined;
178
280
  readonly semanticTypeMatches?: (binding: TBinding, expected: string) => boolean;
179
281
  readonly representationKindMatches?: (binding: TBinding, expected: string) => boolean;
282
+ readonly bindingHandle?: (binding: TBinding) => unknown;
283
+ readonly observedState?: (binding: TBinding) => unknown;
284
+ readonly namespaceState?: (() => unknown) | unknown;
285
+ readonly mutate?: SansaMutationAdapter<TBinding>;
180
286
  }
181
287
 
182
288
  export interface SansaResolveOptions<TBinding extends object = SansaResolveBinding> {
@@ -185,6 +291,7 @@ export interface SansaResolveOptions<TBinding extends object = SansaResolveBindi
185
291
  readonly allowParentFromEffectiveRoot?: boolean;
186
292
  readonly parentTraversal?: 'allow' | 'forbid';
187
293
  readonly failOnParentFromEffectiveRoot?: boolean;
294
+ readonly maxBindings?: number;
188
295
  }
189
296
 
190
297
  export type SansaResolveResult<TBinding extends object = SansaResolveBinding> =
@@ -194,6 +301,8 @@ export type SansaResolveResult<TBinding extends object = SansaResolveBinding> =
194
301
  export interface SansaQueryEvaluateOptions<TBinding extends object = SansaResolveBinding> {
195
302
  readonly parse?: SansaQueryParseOptions;
196
303
  readonly resolve?: SansaResolveOptions<TBinding>;
304
+ readonly addressActivation?: 'trusted' | SansaAddressActivationPolicy;
305
+ readonly valueSemantics?: AeonValueSemanticsProfileInput;
197
306
  readonly policy?: 'validation' | { readonly mode?: 'validation'; readonly validation?: boolean };
198
307
  readonly extensions?: {
199
308
  readonly transform?: boolean;
@@ -209,6 +318,28 @@ export interface SansaQueryEvaluateOptions<TBinding extends object = SansaResolv
209
318
  };
210
319
  }
211
320
 
321
+ export type SansaAddressActivationSelectorCapability =
322
+ | 'member'
323
+ | 'position'
324
+ | 'range'
325
+ | 'wildcard'
326
+ | 'recursive'
327
+ | 'pattern'
328
+ | 'semanticFilter'
329
+ | 'representationFilter'
330
+ | 'attribute'
331
+ | 'local'
332
+ | 'parent';
333
+
334
+ export interface SansaAddressActivationPolicy {
335
+ readonly mode?: 'constrained' | 'trusted';
336
+ readonly allowedRoots?: readonly (string | SansaAddress)[];
337
+ readonly allowedSelectors?: readonly SansaAddressActivationSelectorCapability[];
338
+ readonly allowContextualRoot?: boolean;
339
+ readonly maxAddressDepth?: number;
340
+ readonly maxBindings?: number;
341
+ }
342
+
212
343
  export type SansaQueryEvaluateResult<TBinding extends object = SansaResolveBinding> =
213
344
  | { readonly ok: true; readonly results: readonly SansaQueryResult<TBinding>[]; readonly diagnostics: readonly SansaQueryEvaluateDiagnostic[] }
214
345
  | { readonly ok: false; readonly results: readonly SansaQueryResult<TBinding>[]; readonly errors: readonly SansaQueryEvaluateDiagnostic[] };
@@ -224,6 +355,391 @@ export interface SansaQueryResult<TBinding extends object = SansaResolveBinding>
224
355
  readonly value: SansaQueryValue<TBinding>;
225
356
  }
226
357
 
358
+ export interface SansaMutationAdapter<TBinding extends object = SansaResolveBinding> {
359
+ readonly supportsCreate?: boolean;
360
+ readonly supportsReplace?: boolean;
361
+ readonly supportsRemove?: boolean;
362
+ readonly supportsOrderedInsert?: boolean;
363
+ readonly supportsMove?: boolean;
364
+ readonly supportsStableBindingIdentity?: boolean;
365
+ readonly supportsAtomicApply?: boolean;
366
+ readonly namespaceState?: () => unknown;
367
+ readonly bindingHandle?: (binding: TBinding) => unknown;
368
+ readonly observedState?: (binding: TBinding) => unknown;
369
+ readonly sameBinding?: (left: TBinding, right: TBinding) => boolean;
370
+ readonly create?: (
371
+ parent: TBinding,
372
+ name: string,
373
+ value: unknown,
374
+ operation: SansaCreateMutationOperation<TBinding>,
375
+ ) => SansaMutationAdapterResult<TBinding> | void;
376
+ readonly replace?: (
377
+ target: TBinding,
378
+ value: unknown,
379
+ operation: SansaReplaceMutationOperation<TBinding>,
380
+ ) => SansaMutationAdapterResult<TBinding> | void;
381
+ readonly remove?: (
382
+ target: TBinding,
383
+ operation: SansaRemoveMutationOperation<TBinding>,
384
+ ) => SansaMutationAdapterResult<TBinding> | void;
385
+ readonly insert?: (
386
+ container: TBinding,
387
+ placement: SansaMutationPlacement<TBinding>,
388
+ value: unknown,
389
+ operation: SansaInsertMutationOperation<TBinding>,
390
+ ) => SansaMutationAdapterResult<TBinding> | void;
391
+ readonly move?: (
392
+ source: TBinding,
393
+ container: TBinding,
394
+ placement: SansaMutationPlacement<TBinding>,
395
+ operation: SansaMoveMutationOperation<TBinding>,
396
+ ) => SansaMutationAdapterResult<TBinding> | void;
397
+ }
398
+
399
+ export type SansaMutationAdapterResult<TBinding extends object = SansaResolveBinding> =
400
+ | {
401
+ readonly ok?: true;
402
+ readonly binding?: TBinding;
403
+ readonly affectedBinding?: TBinding;
404
+ readonly affectedAddress?: string;
405
+ readonly resultingAddress?: string;
406
+ }
407
+ | { readonly ok: false; readonly message?: string; readonly error?: Error };
408
+
409
+ export type SansaMutationRequest<TBinding extends object = SansaResolveBinding> =
410
+ | SansaMutationRequestEnvelope<TBinding>
411
+ | SansaRequestedMutationOperation
412
+ | readonly SansaRequestedMutationOperation[];
413
+
414
+ export interface SansaMutationRequestEnvelope<TBinding extends object = SansaResolveBinding> {
415
+ readonly operations: readonly SansaRequestedMutationOperation[];
416
+ readonly preconditions?: readonly SansaMutationPreconditionInput[];
417
+ readonly provenance?: unknown;
418
+ }
419
+
420
+ export interface SansaMutationPreconditionInput {
421
+ readonly expression: string;
422
+ readonly target?: string | SansaAddress;
423
+ }
424
+
425
+ export type SansaRequestedMutationOperation =
426
+ | SansaRequestedCreateOperation
427
+ | SansaRequestedReplaceOperation
428
+ | SansaRequestedRemoveOperation
429
+ | SansaRequestedInsertOperation
430
+ | SansaRequestedMoveOperation;
431
+
432
+ export interface SansaRequestedCreateOperation {
433
+ readonly op: 'create';
434
+ readonly parent: string | SansaAddress;
435
+ readonly name: string;
436
+ readonly datatype?: string;
437
+ readonly kind?: string;
438
+ readonly value: unknown;
439
+ readonly provenance?: unknown;
440
+ }
441
+
442
+ export interface SansaRequestedReplaceOperation {
443
+ readonly op: 'replace';
444
+ readonly target: string | SansaAddress;
445
+ readonly datatype?: string;
446
+ readonly kind?: string;
447
+ readonly value: unknown;
448
+ readonly provenance?: unknown;
449
+ }
450
+
451
+ export interface SansaRequestedRemoveOperation {
452
+ readonly op: 'remove';
453
+ readonly target: string | SansaAddress;
454
+ readonly provenance?: unknown;
455
+ }
456
+
457
+ export interface SansaRequestedInsertOperation {
458
+ readonly op: 'insert';
459
+ readonly container: string | SansaAddress;
460
+ readonly placement: SansaRequestedMutationPlacement;
461
+ readonly datatype?: string;
462
+ readonly kind?: string;
463
+ readonly value: unknown;
464
+ readonly provenance?: unknown;
465
+ }
466
+
467
+ export interface SansaRequestedMoveOperation {
468
+ readonly op: 'move';
469
+ readonly source: string | SansaAddress;
470
+ readonly container: string | SansaAddress;
471
+ readonly placement: SansaRequestedMutationPlacement;
472
+ readonly provenance?: unknown;
473
+ }
474
+
475
+ export type SansaRequestedMutationPlacement =
476
+ | 'first'
477
+ | 'last'
478
+ | { readonly kind: 'first' | 'last' }
479
+ | { readonly kind: 'before' | 'after'; readonly anchor: string | SansaAddress }
480
+ | { readonly kind: 'before' | 'after'; readonly target: string | SansaAddress };
481
+
482
+ export type SansaPlanMutationResult<TBinding extends object = SansaResolveBinding> =
483
+ | { readonly ok: true; readonly plan: SansaMutationPlan<TBinding>; readonly diagnostics: readonly SansaMutateDiagnostic[] }
484
+ | { readonly ok: false; readonly errors: readonly SansaMutateDiagnostic[] };
485
+
486
+ /**
487
+ * Current-process mutation execution artifact.
488
+ *
489
+ * Plans retain live resolver bindings and local adapter continuity artifacts.
490
+ * They are inspectable but are not a portable serialized plan format.
491
+ */
492
+ export interface SansaMutationPlan<TBinding extends object = SansaResolveBinding> {
493
+ readonly type: 'SansaMutationPlan';
494
+ readonly planVersion: 'sansa.mutate.plan.v1';
495
+ readonly planId?: string;
496
+ readonly namespaceState?: unknown;
497
+ readonly operations: readonly SansaMutationOperation<TBinding>[];
498
+ readonly preconditions: readonly SansaMutationPrecondition<TBinding>[];
499
+ readonly sourceProvenance?: unknown;
500
+ readonly portabilityWarnings?: readonly SansaDiagnostic[];
501
+ readonly diagnostics: readonly SansaMutateDiagnostic[];
502
+ }
503
+
504
+ export type SansaMutationTargetSurfaceInput<TBinding extends object = SansaResolveBinding> =
505
+ | 'aeon'
506
+ | 'json'
507
+ | 'json-compatible'
508
+ | SansaMutationTargetSurface<TBinding>;
509
+
510
+ export interface SansaMutationTargetSurface<TBinding extends object = SansaResolveBinding> {
511
+ readonly id?: string;
512
+ readonly validateOperation: (
513
+ operation: SansaMutationOperation<TBinding>,
514
+ context: SansaMutationTargetSurfaceContext<TBinding>,
515
+ ) => SansaMutationTargetSurfaceOperationResult;
516
+ }
517
+
518
+ export interface SansaMutationTargetSurfaceContext<TBinding extends object = SansaResolveBinding> {
519
+ readonly plan: SansaMutationPlan<TBinding>;
520
+ readonly operationIndex: number;
521
+ readonly targetFormat: string;
522
+ }
523
+
524
+ export type SansaMutationTargetSurfaceOperationResult =
525
+ | boolean
526
+ | void
527
+ | { readonly ok: true }
528
+ | { readonly ok: false; readonly error?: SansaMutateDiagnostic; readonly errors?: readonly SansaMutateDiagnostic[]; readonly code?: SansaMutateErrorCode; readonly message?: string };
529
+
530
+ export type SansaValidateMutationPlanTargetResult =
531
+ | { readonly ok: true; readonly diagnostics: readonly SansaMutateDiagnostic[] }
532
+ | { readonly ok: false; readonly errors: readonly SansaMutateDiagnostic[] };
533
+
534
+ export interface SansaMutationPrecondition<TBinding extends object = SansaResolveBinding> {
535
+ readonly expression: string;
536
+ readonly canonical: string;
537
+ readonly target?: SansaMutationTarget<TBinding>;
538
+ }
539
+
540
+ export type SansaMutationOperation<TBinding extends object = SansaResolveBinding> =
541
+ | SansaCreateMutationOperation<TBinding>
542
+ | SansaReplaceMutationOperation<TBinding>
543
+ | SansaRemoveMutationOperation<TBinding>
544
+ | SansaInsertMutationOperation<TBinding>
545
+ | SansaMoveMutationOperation<TBinding>;
546
+
547
+ /**
548
+ * Exact binding reference captured during planning.
549
+ *
550
+ * `binding`, `bindingHandle`, and `observedState` are local namespace-adapter
551
+ * artifacts used for same-process stale-target checks.
552
+ */
553
+ export interface SansaMutationTarget<TBinding extends object = SansaResolveBinding> {
554
+ readonly requestedAddress: string;
555
+ readonly canonicalAddress: string;
556
+ readonly address: SansaAddress;
557
+ readonly binding: TBinding;
558
+ readonly bindingHandle?: unknown;
559
+ readonly observedState?: unknown;
560
+ readonly portabilityWarnings?: readonly SansaDiagnostic[];
561
+ }
562
+
563
+ export interface SansaCreateMutationOperation<TBinding extends object = SansaResolveBinding> {
564
+ readonly op: 'create';
565
+ readonly parent: SansaMutationTarget<TBinding>;
566
+ readonly name: string;
567
+ readonly datatype?: string;
568
+ readonly kind?: string;
569
+ readonly value: unknown;
570
+ readonly provenance?: unknown;
571
+ }
572
+
573
+ export interface SansaReplaceMutationOperation<TBinding extends object = SansaResolveBinding> {
574
+ readonly op: 'replace';
575
+ readonly target: SansaMutationTarget<TBinding>;
576
+ readonly datatype?: string;
577
+ readonly kind?: string;
578
+ readonly value: unknown;
579
+ readonly provenance?: unknown;
580
+ }
581
+
582
+ export interface SansaRemoveMutationOperation<TBinding extends object = SansaResolveBinding> {
583
+ readonly op: 'remove';
584
+ readonly target: SansaMutationTarget<TBinding>;
585
+ readonly provenance?: unknown;
586
+ }
587
+
588
+ export interface SansaInsertMutationOperation<TBinding extends object = SansaResolveBinding> {
589
+ readonly op: 'insert';
590
+ readonly container: SansaMutationTarget<TBinding>;
591
+ readonly placement: SansaMutationPlacement<TBinding>;
592
+ readonly datatype?: string;
593
+ readonly kind?: string;
594
+ readonly value: unknown;
595
+ readonly provenance?: unknown;
596
+ }
597
+
598
+ export interface SansaMoveMutationOperation<TBinding extends object = SansaResolveBinding> {
599
+ readonly op: 'move';
600
+ readonly source: SansaMutationTarget<TBinding>;
601
+ readonly container: SansaMutationTarget<TBinding>;
602
+ readonly placement: SansaMutationPlacement<TBinding>;
603
+ readonly provenance?: unknown;
604
+ }
605
+
606
+ export type SansaMutationPlacement<TBinding extends object = SansaResolveBinding> =
607
+ | { readonly kind: 'first' | 'last' }
608
+ | { readonly kind: 'before' | 'after'; readonly anchor: SansaMutationTarget<TBinding> };
609
+
610
+ export interface SansaApplyMutationOptions<TBinding extends object = SansaResolveBinding> {
611
+ readonly resolve?: SansaResolveOptions<TBinding>;
612
+ readonly requireAtomic?: boolean;
613
+ readonly recheckPreconditions?: boolean;
614
+ readonly valueSemantics?: AeonValueSemanticsProfileInput;
615
+ readonly budget?: SansaMutationBudgetOptions;
616
+ readonly parse?: SansaParseOptions | {
617
+ readonly address?: SansaParseOptions;
618
+ readonly expression?: SansaQueryExpressionParseOptions;
619
+ };
620
+ }
621
+
622
+ export interface SansaMutationBudgetOptions {
623
+ readonly maxOperations?: number;
624
+ readonly maxPreconditions?: number;
625
+ readonly maxValueNodes?: number;
626
+ readonly maxValueDepth?: number;
627
+ readonly maxStringLength?: number;
628
+ }
629
+
630
+ export interface SansaPlanMutationOptions<TBinding extends object = SansaResolveBinding> {
631
+ readonly parse?: SansaParseOptions | {
632
+ readonly address?: SansaParseOptions;
633
+ readonly expression?: SansaQueryExpressionParseOptions;
634
+ };
635
+ readonly resolve?: SansaResolveOptions<TBinding>;
636
+ readonly contextualRoot?: TBinding;
637
+ readonly allowParentFromEffectiveRoot?: boolean;
638
+ readonly parentTraversal?: 'allow' | 'forbid';
639
+ readonly failOnParentFromEffectiveRoot?: boolean;
640
+ readonly namespaceState?: unknown;
641
+ readonly valueSemantics?: AeonValueSemanticsProfileInput;
642
+ readonly budget?: SansaMutationBudgetOptions;
643
+ }
644
+
645
+ export type SansaApplyMutationPlanResult<TBinding extends object = SansaResolveBinding> =
646
+ | {
647
+ readonly ok: true;
648
+ readonly planId?: string;
649
+ readonly stateBefore?: unknown;
650
+ readonly stateAfter?: unknown;
651
+ readonly operationResults: readonly SansaMutationOperationResult<TBinding>[];
652
+ readonly diagnostics: readonly SansaMutateDiagnostic[];
653
+ }
654
+ | {
655
+ readonly ok: false;
656
+ readonly operationResults: readonly SansaMutationOperationResult<TBinding>[];
657
+ readonly errors: readonly SansaMutateDiagnostic[];
658
+ };
659
+
660
+ export interface SansaMutationOperationResult<TBinding extends object = SansaResolveBinding> {
661
+ readonly operationIndex: number;
662
+ readonly status: 'applied';
663
+ readonly targetAddress?: string;
664
+ readonly parentAddress?: string;
665
+ readonly containerAddress?: string;
666
+ readonly sourceAddress?: string;
667
+ readonly anchorAddress?: string;
668
+ readonly previousAddress?: string;
669
+ readonly affectedAddress?: string;
670
+ readonly resultingAddress?: string;
671
+ readonly affectedBinding?: TBinding;
672
+ }
673
+
674
+ export type SansaInstructionLowerErrorCode =
675
+ | 'SANSA_INSTRUCTION_PARSE_FAILED'
676
+ | 'SANSA_INSTRUCTION_LOWERING_REQUIRES_NAMESPACE'
677
+ | 'SANSA_INSTRUCTION_LOWERING_REQUIRES_CANDIDATE_EVALUATION'
678
+ | 'SANSA_INSTRUCTION_INVALID_VALUE_SEMANTICS_PROFILE'
679
+ | 'SANSA_INSTRUCTION_CANDIDATE_RESOLUTION_FAILED'
680
+ | 'SANSA_INSTRUCTION_WHERE_EVALUATION_FAILED'
681
+ | 'SANSA_INSTRUCTION_CANDIDATE_ADDRESS_UNAVAILABLE'
682
+ | 'SANSA_INSTRUCTION_TARGET_RESOLUTION_FAILED'
683
+ | 'SANSA_INSTRUCTION_TARGET_MISS'
684
+ | 'SANSA_INSTRUCTION_TARGET_MULTIPLICITY'
685
+ | 'SANSA_INSTRUCTION_TARGET_ADDRESS_UNAVAILABLE'
686
+ | 'SANSA_INSTRUCTION_NON_EXACT_TARGET'
687
+ | 'SANSA_INSTRUCTION_UNSUPPORTED_VERB'
688
+ | 'SANSA_INSTRUCTION_CREATE_DESTINATION_NOT_MEMBER';
689
+
690
+ export interface SansaInstructionLowerDiagnostic {
691
+ readonly code: SansaInstructionLowerErrorCode;
692
+ readonly message: string;
693
+ readonly phase: 'parse' | 'lower';
694
+ readonly cause?: unknown;
695
+ }
696
+
697
+ export interface SansaLowerInstructionOptions {
698
+ readonly parse?: SansaInstructionParseOptions;
699
+ readonly namespace?: SansaResolveNamespace;
700
+ readonly resolve?: SansaResolveOptions;
701
+ readonly contextualRoot?: SansaResolveBinding;
702
+ readonly valueSemantics?: AeonValueSemanticsProfileInput;
703
+ }
704
+
705
+ export type SansaLowerInstructionResult =
706
+ | {
707
+ readonly ok: true;
708
+ readonly request: SansaMutationRequestEnvelope | SansaRequestedMutationOperation | readonly SansaRequestedMutationOperation[];
709
+ readonly provenance: SansaInstructionProvenance;
710
+ readonly diagnostics: readonly SansaInstructionLowerDiagnostic[];
711
+ readonly warnings: readonly SansaWarning[];
712
+ }
713
+ | {
714
+ readonly ok: false;
715
+ readonly errors: readonly SansaInstructionLowerDiagnostic[];
716
+ };
717
+
718
+ export interface SansaPlanInstructionOptions extends SansaLowerInstructionOptions {
719
+ readonly mutate?: SansaPlanMutationOptions;
720
+ }
721
+
722
+ export type SansaPlanInstructionResult<TBinding extends object = SansaResolveBinding> =
723
+ | {
724
+ readonly ok: true;
725
+ readonly plan: SansaMutationPlan<TBinding>;
726
+ readonly loweredRequest: SansaMutationRequestEnvelope | SansaRequestedMutationOperation | readonly SansaRequestedMutationOperation[];
727
+ readonly diagnostics: readonly SansaMutateDiagnostic[];
728
+ readonly warnings: readonly SansaWarning[];
729
+ }
730
+ | {
731
+ readonly ok: false;
732
+ readonly phase: 'lower';
733
+ readonly errors: readonly SansaInstructionLowerDiagnostic[];
734
+ }
735
+ | {
736
+ readonly ok: false;
737
+ readonly phase: 'plan';
738
+ readonly loweredRequest: SansaMutationRequestEnvelope | SansaRequestedMutationOperation | readonly SansaRequestedMutationOperation[];
739
+ readonly errors: readonly SansaMutateDiagnostic[];
740
+ readonly warnings: readonly SansaWarning[];
741
+ };
742
+
227
743
  export type SansaQueryValue<TBinding extends object = SansaResolveBinding> =
228
744
  | SansaQueryScalarValue
229
745
  | SansaQueryBindingSetValue<TBinding>
@@ -253,16 +769,61 @@ export type AeonValueSemanticsCategory =
253
769
  | 'nan'
254
770
  | 'string'
255
771
  | 'boolean'
772
+ | 'toggle'
773
+ | 'hex'
774
+ | 'radix'
775
+ | 'encoding'
776
+ | 'separator'
777
+ | 'sansaAddress'
778
+ | 'referenceForm'
779
+ | 'temporal'
780
+ | 'lexicalStructuredScalar'
256
781
  | 'explicitNull'
257
782
  | 'explicitAbsence'
258
783
  | 'missing'
259
784
  | 'container'
260
785
  | 'bindingSet';
261
786
 
787
+ export interface AeonValueSemanticsProfile {
788
+ readonly id?: string;
789
+ readonly locale?: string | readonly string[];
790
+ readonly stringOrder?: string;
791
+ readonly temporalOrder?: string;
792
+ readonly caseMapping?: string;
793
+ readonly compareStrings: (left: string, right: string) => number;
794
+ readonly compareTemporal: (left: AeonTemporalSemanticValue, right: AeonTemporalSemanticValue) => number;
795
+ readonly lowerString: (value: string) => string;
796
+ readonly upperString: (value: string) => string;
797
+ }
798
+
799
+ export interface AeonTemporalSemanticValue {
800
+ readonly payload: string;
801
+ readonly semanticType?: string;
802
+ }
803
+
804
+ export interface AeonValueSemanticsProfileOptions {
805
+ readonly id?: string;
806
+ readonly locale?: string | readonly string[];
807
+ readonly usage?: 'sort' | 'search';
808
+ readonly sensitivity?: 'base' | 'accent' | 'case' | 'variant';
809
+ readonly ignorePunctuation?: boolean;
810
+ readonly numeric?: boolean;
811
+ readonly caseFirst?: 'upper' | 'lower' | 'false';
812
+ readonly compareTemporal?: (left: AeonTemporalSemanticValue, right: AeonTemporalSemanticValue) => number;
813
+ }
814
+
815
+ export type AeonValueSemanticsProfileInput =
816
+ | 'default'
817
+ | string
818
+ | AeonValueSemanticsProfile
819
+ | AeonValueSemanticsProfileOptions
820
+ | { readonly profile: AeonValueSemanticsProfileInput };
821
+
262
822
  export interface AeonValueSemanticsValueDescriptor {
263
823
  readonly category: AeonValueSemanticsCategory;
264
824
  readonly value?: unknown;
265
825
  readonly reason?: string;
826
+ readonly semanticType?: string;
266
827
  readonly containerKind?: string;
267
828
  readonly count?: number;
268
829
  }
@@ -271,11 +832,19 @@ export type AeonValueSemanticsOperationInput =
271
832
  | {
272
833
  readonly left: AeonValueSemanticsValueDescriptor;
273
834
  readonly right: AeonValueSemanticsValueDescriptor;
835
+ readonly valueSemantics?: AeonValueSemanticsProfileInput;
836
+ readonly profile?: AeonValueSemanticsProfileInput;
274
837
  }
275
838
  | {
276
839
  readonly value: AeonValueSemanticsValueDescriptor;
840
+ readonly valueSemantics?: AeonValueSemanticsProfileInput;
841
+ readonly profile?: AeonValueSemanticsProfileInput;
277
842
  };
278
843
 
844
+ export interface AeonValueSemanticsOperationOptions {
845
+ readonly valueSemantics?: AeonValueSemanticsProfileInput;
846
+ }
847
+
279
848
  export type AeonValueSemanticsResult =
280
849
  | {
281
850
  readonly ok: true;
@@ -297,8 +866,16 @@ export type AeonValueSemanticsResult =
297
866
  export function evaluateValueSemanticsOperation(
298
867
  operation: AeonValueSemanticsOperation,
299
868
  input: AeonValueSemanticsOperationInput,
869
+ options?: AeonValueSemanticsOperationOptions,
300
870
  ): AeonValueSemanticsResult;
301
871
 
872
+ export const aeonValueSemanticsDefaultProfile: AeonValueSemanticsProfile;
873
+ export function createIntlValueSemanticsProfile(options?: AeonValueSemanticsProfileOptions): AeonValueSemanticsProfile;
874
+ export function createFrenchValueSemanticsProfile(
875
+ options?: Omit<AeonValueSemanticsProfileOptions, 'locale'> & { readonly locale?: 'fr' | 'fr-FR' },
876
+ ): AeonValueSemanticsProfile;
877
+ export function createNaturalAsciiValueSemanticsProfile(options?: Omit<AeonValueSemanticsProfileOptions, 'locale'>): AeonValueSemanticsProfile;
878
+
302
879
  export interface SansaAddress {
303
880
  readonly type: 'SansaAddress';
304
881
  readonly root: RootSelector;
@@ -374,8 +951,22 @@ export type SansaQueryExpression =
374
951
 
375
952
  export interface SansaQueryLiteralExpression {
376
953
  readonly type: 'literalExpression';
377
- readonly kind: 'string' | 'number' | 'boolean';
378
- readonly value: string | number | boolean;
954
+ readonly kind:
955
+ | 'string'
956
+ | 'number'
957
+ | 'boolean'
958
+ | 'toggle'
959
+ | 'hex'
960
+ | 'radix'
961
+ | 'encoding'
962
+ | 'separator'
963
+ | 'date'
964
+ | 'time'
965
+ | 'datetime'
966
+ | 'zrut'
967
+ | 'null';
968
+ readonly value: string | number | boolean | null;
969
+ readonly nullReason?: string;
379
970
  readonly canonical: string;
380
971
  }
381
972
 
@@ -445,6 +1036,197 @@ export interface SansaQueryProjectionField {
445
1036
  readonly expression: SansaQueryExpression;
446
1037
  }
447
1038
 
1039
+ export interface SansaInstruction {
1040
+ readonly type: 'SansaInstruction';
1041
+ readonly provenance: SansaInstructionProvenance;
1042
+ readonly from: SansaInstructionFromClause | null;
1043
+ readonly where: SansaInstructionWhereClause | null;
1044
+ readonly requires: readonly SansaInstructionRequireClause[];
1045
+ readonly mutation: SansaInstructionMutationClause;
1046
+ readonly clauses: readonly SansaInstructionClauseName[];
1047
+ readonly canonical: string;
1048
+ }
1049
+
1050
+ export interface SansaInstructionProvenance {
1051
+ readonly reason?: string;
1052
+ readonly claimedAuthor?: string;
1053
+ }
1054
+
1055
+ export type SansaInstructionClauseName = 'because' | 'by' | 'from' | 'where' | 'require' | 'create' | 'replace' | 'remove' | 'insert' | 'append' | 'move';
1056
+
1057
+ export interface SansaInstructionFromClause {
1058
+ readonly type: 'fromClause';
1059
+ readonly source: 'address';
1060
+ readonly address: SansaAddress;
1061
+ }
1062
+
1063
+ export interface SansaInstructionWhereClause {
1064
+ readonly type: 'whereClause';
1065
+ readonly expression: string;
1066
+ readonly ast: SansaQueryExpression;
1067
+ }
1068
+
1069
+ export interface SansaInstructionRequireClause {
1070
+ readonly type: 'requireClause';
1071
+ readonly expression: string;
1072
+ readonly ast: SansaQueryExpression;
1073
+ }
1074
+
1075
+ export type SansaInstructionMutationClause =
1076
+ | SansaInstructionCreateClause
1077
+ | SansaInstructionReplaceClause
1078
+ | SansaInstructionRemoveClause
1079
+ | SansaInstructionInsertClause
1080
+ | SansaInstructionMoveClause;
1081
+
1082
+ export interface SansaInstructionCreateClause {
1083
+ readonly type: 'mutationClause';
1084
+ readonly verb: 'create';
1085
+ readonly destination: SansaInstructionCreateDestination;
1086
+ readonly value: SansaInstructionValue;
1087
+ }
1088
+
1089
+ export interface SansaInstructionReplaceClause {
1090
+ readonly type: 'mutationClause';
1091
+ readonly verb: 'replace';
1092
+ readonly target: SansaInstructionAddress;
1093
+ readonly value: SansaInstructionValue;
1094
+ }
1095
+
1096
+ export interface SansaInstructionRemoveClause {
1097
+ readonly type: 'mutationClause';
1098
+ readonly verb: 'remove';
1099
+ readonly target: SansaInstructionAddress;
1100
+ }
1101
+
1102
+ export interface SansaInstructionInsertClause {
1103
+ readonly type: 'mutationClause';
1104
+ readonly verb: 'insert';
1105
+ readonly placement: SansaInstructionPlacement;
1106
+ readonly container: SansaInstructionAddress;
1107
+ readonly value: SansaInstructionValue;
1108
+ }
1109
+
1110
+ export interface SansaInstructionMoveClause {
1111
+ readonly type: 'mutationClause';
1112
+ readonly verb: 'move';
1113
+ readonly source: SansaInstructionAddress;
1114
+ readonly placement: SansaInstructionPlacement;
1115
+ readonly container: SansaInstructionAddress;
1116
+ }
1117
+
1118
+ export type SansaInstructionCreateDestination =
1119
+ | {
1120
+ readonly type: 'createDestination';
1121
+ readonly kind: 'member';
1122
+ readonly name: string;
1123
+ readonly canonical: string;
1124
+ }
1125
+ | {
1126
+ readonly type: 'createDestination';
1127
+ readonly kind: 'address';
1128
+ readonly address: SansaAddress;
1129
+ readonly canonical: string;
1130
+ };
1131
+
1132
+ export interface SansaInstructionAddress {
1133
+ readonly type: 'instructionAddress';
1134
+ readonly source: string;
1135
+ readonly address: SansaAddress;
1136
+ readonly canonical: string;
1137
+ }
1138
+
1139
+ export type SansaInstructionPlacement =
1140
+ | {
1141
+ readonly type: 'placement';
1142
+ readonly kind: 'first' | 'last';
1143
+ }
1144
+ | {
1145
+ readonly type: 'placement';
1146
+ readonly kind: 'before' | 'after';
1147
+ readonly anchor: SansaInstructionAddress;
1148
+ };
1149
+
1150
+ export interface SansaInstructionValue {
1151
+ readonly type: 'InstructionValue';
1152
+ readonly datatype?: string;
1153
+ readonly kind: SansaInstructionValueKind;
1154
+ readonly value: SansaInstructionValuePayload;
1155
+ readonly literal: SansaInstructionValueLiteral;
1156
+ readonly canonical: string;
1157
+ }
1158
+
1159
+ export type SansaInstructionValueKind =
1160
+ | SansaQueryLiteralExpression['kind']
1161
+ | 'sansa'
1162
+ | 'object'
1163
+ | 'list'
1164
+ | 'tuple'
1165
+ | 'node';
1166
+
1167
+ export type SansaInstructionScalarPayload = string | number | boolean | null;
1168
+
1169
+ export type SansaInstructionValuePayload =
1170
+ | SansaInstructionScalarPayload
1171
+ | readonly SansaInstructionValuePayload[]
1172
+ | { readonly [key: string]: SansaInstructionValuePayload }
1173
+ | {
1174
+ readonly tag: string;
1175
+ readonly children: readonly SansaInstructionValuePayload[];
1176
+ };
1177
+
1178
+ export type SansaInstructionValueLiteral =
1179
+ | {
1180
+ readonly type: 'instructionValueLiteral';
1181
+ readonly kind: 'sansa';
1182
+ readonly value: string;
1183
+ readonly address: SansaAddress;
1184
+ readonly canonical: string;
1185
+ }
1186
+ | {
1187
+ readonly type: 'instructionValueLiteral';
1188
+ readonly kind: SansaQueryLiteralExpression['kind'];
1189
+ readonly value: string | number | boolean | null;
1190
+ readonly expression: SansaQueryLiteralExpression;
1191
+ readonly canonical: string;
1192
+ }
1193
+ | {
1194
+ readonly type: 'instructionValueLiteral';
1195
+ readonly kind: 'object';
1196
+ readonly value: { readonly [key: string]: SansaInstructionValuePayload };
1197
+ readonly fields: readonly {
1198
+ readonly name: string;
1199
+ readonly canonicalName: string;
1200
+ readonly value: SansaInstructionValue;
1201
+ }[];
1202
+ readonly canonical: string;
1203
+ }
1204
+ | {
1205
+ readonly type: 'instructionValueLiteral';
1206
+ readonly kind: 'list';
1207
+ readonly value: readonly SansaInstructionValuePayload[];
1208
+ readonly items: readonly SansaInstructionValue[];
1209
+ readonly canonical: string;
1210
+ }
1211
+ | {
1212
+ readonly type: 'instructionValueLiteral';
1213
+ readonly kind: 'tuple';
1214
+ readonly value: readonly SansaInstructionValuePayload[];
1215
+ readonly items: readonly SansaInstructionValue[];
1216
+ readonly canonical: string;
1217
+ }
1218
+ | {
1219
+ readonly type: 'instructionValueLiteral';
1220
+ readonly kind: 'node';
1221
+ readonly value: {
1222
+ readonly tag: string;
1223
+ readonly children: readonly SansaInstructionValuePayload[];
1224
+ };
1225
+ readonly tag: string;
1226
+ readonly children: readonly SansaInstructionValue[];
1227
+ readonly canonical: string;
1228
+ };
1229
+
448
1230
  export interface RootSelector {
449
1231
  readonly type: 'root';
450
1232
  readonly kind: 'absolute' | 'contextual';
@@ -558,11 +1340,38 @@ export function parseQuery(input: string, options?: SansaQueryParseOptions): San
558
1340
  export function parseQueryOrThrow(input: string, options?: SansaQueryParseOptions): SansaQuery;
559
1341
  export function parseQueryExpression(input: string, options?: SansaQueryExpressionParseOptions): SansaQueryExpressionParseResult;
560
1342
  export function parseQueryExpressionOrThrow(input: string, options?: SansaQueryExpressionParseOptions): SansaQueryExpression;
1343
+ export function parseInstruction(input: string, options?: SansaInstructionParseOptions): SansaInstructionParseResult;
1344
+ export function parseInstructionOrThrow(input: string, options?: SansaInstructionParseOptions): SansaInstruction;
1345
+ export function lowerInstruction(input: string | SansaInstruction, options?: SansaLowerInstructionOptions): SansaLowerInstructionResult;
1346
+ export function lowerInstruction(
1347
+ input: string | SansaInstruction,
1348
+ namespace: SansaResolveNamespace,
1349
+ options?: Omit<SansaLowerInstructionOptions, 'namespace'>,
1350
+ ): SansaLowerInstructionResult;
1351
+ export function planInstruction<TBinding extends object = SansaResolveBinding>(
1352
+ input: string | SansaInstruction,
1353
+ namespace: SansaResolveNamespace<TBinding>,
1354
+ options?: SansaPlanInstructionOptions,
1355
+ ): SansaPlanInstructionResult<TBinding>;
561
1356
  export function evaluateQuery<TBinding extends object = SansaResolveBinding>(
562
1357
  input: string | SansaQuery,
563
1358
  namespace: SansaResolveNamespace<TBinding>,
564
1359
  options?: SansaQueryEvaluateOptions<TBinding>,
565
1360
  ): SansaQueryEvaluateResult<TBinding>;
1361
+ export function planMutation<TBinding extends object = SansaResolveBinding>(
1362
+ input: SansaMutationRequest<TBinding>,
1363
+ namespace: SansaResolveNamespace<TBinding>,
1364
+ options?: SansaPlanMutationOptions<TBinding>,
1365
+ ): SansaPlanMutationResult<TBinding>;
1366
+ export function validateMutationPlanTarget<TBinding extends object = SansaResolveBinding>(
1367
+ plan: SansaMutationPlan<TBinding>,
1368
+ targetSurface?: SansaMutationTargetSurfaceInput<TBinding>,
1369
+ ): SansaValidateMutationPlanTargetResult;
1370
+ export function applyMutationPlan<TBinding extends object = SansaResolveBinding>(
1371
+ plan: SansaMutationPlan<TBinding>,
1372
+ namespace: SansaResolveNamespace<TBinding>,
1373
+ options?: SansaApplyMutationOptions<TBinding>,
1374
+ ): SansaApplyMutationPlanResult<TBinding>;
566
1375
  export function resolveAddress<TBinding extends object = SansaResolveBinding>(
567
1376
  input: string | SansaAddress,
568
1377
  namespace: SansaResolveNamespace<TBinding>,