@stndrds/schema 0.1.0-alpha.51 → 0.1.0-alpha.53
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/dist/{chunk-EK56IQJ7.mjs → chunk-2EIZ6QXN.mjs} +272 -135
- package/dist/{chunk-IEHBD7WL.js → chunk-67XEOXQL.js} +362 -225
- package/dist/index.d.mts +96 -8
- package/dist/index.d.ts +96 -8
- package/dist/index.js +10 -6
- package/dist/index.mjs +7 -3
- package/dist/{runtime-DRiI1SCJ.d.mts → runtime-B5JYQdZx.d.mts} +661 -689
- package/dist/{runtime-DRiI1SCJ.d.ts → runtime-B5JYQdZx.d.ts} +661 -689
- package/dist/runtime.d.mts +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +6 -2
- package/dist/runtime.mjs +7 -3
- package/package.json +2 -2
|
@@ -178,6 +178,16 @@ interface AITodoList {
|
|
|
178
178
|
progress: number;
|
|
179
179
|
isComplete: boolean;
|
|
180
180
|
}
|
|
181
|
+
/**
|
|
182
|
+
* Resolved attachment metadata (populated when fetching messages)
|
|
183
|
+
*/
|
|
184
|
+
interface AIMessageAttachment {
|
|
185
|
+
id: string;
|
|
186
|
+
name: string;
|
|
187
|
+
size: number;
|
|
188
|
+
mimeType: string;
|
|
189
|
+
url: string;
|
|
190
|
+
}
|
|
181
191
|
/**
|
|
182
192
|
* AI Conversation record
|
|
183
193
|
*/
|
|
@@ -211,6 +221,8 @@ interface AIMessage {
|
|
|
211
221
|
model: string | null;
|
|
212
222
|
/** File attachment IDs (references files table) */
|
|
213
223
|
attachmentIds: string[] | null;
|
|
224
|
+
/** Resolved attachments (populated when fetching messages) */
|
|
225
|
+
attachments?: AIMessageAttachment[];
|
|
214
226
|
createdAt: Date;
|
|
215
227
|
}
|
|
216
228
|
/**
|
|
@@ -370,244 +382,6 @@ declare function generateId(): Uuid;
|
|
|
370
382
|
*/
|
|
371
383
|
declare function generatePrefixedId(prefix: string): Uuid;
|
|
372
384
|
|
|
373
|
-
/**
|
|
374
|
-
* BlockNote text styles (inline formatting)
|
|
375
|
-
* Applied to StyledText nodes within inline content.
|
|
376
|
-
*/
|
|
377
|
-
interface BlockNoteStyles {
|
|
378
|
-
/** Bold text */
|
|
379
|
-
bold?: boolean;
|
|
380
|
-
/** Italic text */
|
|
381
|
-
italic?: boolean;
|
|
382
|
-
/** Underlined text */
|
|
383
|
-
underline?: boolean;
|
|
384
|
-
/** Strikethrough text */
|
|
385
|
-
strikethrough?: boolean;
|
|
386
|
-
/** Monospace/code text */
|
|
387
|
-
code?: boolean;
|
|
388
|
-
/** Text color (color name or CSS value) */
|
|
389
|
-
textColor?: string;
|
|
390
|
-
/** Background/highlight color (color name or CSS value) */
|
|
391
|
-
backgroundColor?: string;
|
|
392
|
-
}
|
|
393
|
-
/**
|
|
394
|
-
* Styled text node - the basic text unit with formatting
|
|
395
|
-
*/
|
|
396
|
-
interface BlockNoteStyledText {
|
|
397
|
-
type: "text";
|
|
398
|
-
/** The text content */
|
|
399
|
-
text: string;
|
|
400
|
-
/** Applied styles */
|
|
401
|
-
styles: BlockNoteStyles;
|
|
402
|
-
}
|
|
403
|
-
/**
|
|
404
|
-
* Link inline content - contains styled text with a URL
|
|
405
|
-
*/
|
|
406
|
-
interface BlockNoteLink {
|
|
407
|
-
type: "link";
|
|
408
|
-
/** Link URL */
|
|
409
|
-
href: string;
|
|
410
|
-
/** Link text content (styled text nodes) */
|
|
411
|
-
content: BlockNoteStyledText[];
|
|
412
|
-
}
|
|
413
|
-
/**
|
|
414
|
-
* Custom inline content (for extensions)
|
|
415
|
-
*/
|
|
416
|
-
interface BlockNoteCustomInlineContent {
|
|
417
|
-
type: string;
|
|
418
|
-
/** Props specific to this inline content type */
|
|
419
|
-
props?: Record<string, unknown>;
|
|
420
|
-
/** Styled content (for inline content with "styled" content type) */
|
|
421
|
-
content?: BlockNoteStyledText[];
|
|
422
|
-
}
|
|
423
|
-
/**
|
|
424
|
-
* Union of all inline content types
|
|
425
|
-
*/
|
|
426
|
-
type BlockNoteInlineContent = BlockNoteStyledText | BlockNoteLink | BlockNoteCustomInlineContent;
|
|
427
|
-
/**
|
|
428
|
-
* Table cell properties
|
|
429
|
-
*/
|
|
430
|
-
interface BlockNoteTableCellProps {
|
|
431
|
-
/** Cell background color */
|
|
432
|
-
backgroundColor?: string;
|
|
433
|
-
/** Cell text color */
|
|
434
|
-
textColor?: string;
|
|
435
|
-
/** Text alignment within cell */
|
|
436
|
-
textAlignment?: "left" | "center" | "right" | "justify";
|
|
437
|
-
/** Column span (merge cells horizontally) */
|
|
438
|
-
colspan?: number;
|
|
439
|
-
/** Row span (merge cells vertically) */
|
|
440
|
-
rowspan?: number;
|
|
441
|
-
}
|
|
442
|
-
/**
|
|
443
|
-
* Table cell with explicit props
|
|
444
|
-
*/
|
|
445
|
-
interface BlockNoteTableCell {
|
|
446
|
-
type: "tableCell";
|
|
447
|
-
props: BlockNoteTableCellProps;
|
|
448
|
-
content: BlockNoteInlineContent[];
|
|
449
|
-
}
|
|
450
|
-
/**
|
|
451
|
-
* Table content structure
|
|
452
|
-
* Used as the content of table blocks.
|
|
453
|
-
*/
|
|
454
|
-
interface BlockNoteTableContent {
|
|
455
|
-
type: "tableContent";
|
|
456
|
-
/** Column widths (undefined = auto) */
|
|
457
|
-
columnWidths: (number | undefined)[];
|
|
458
|
-
/** Number of header rows (frozen at top) */
|
|
459
|
-
headerRows?: number;
|
|
460
|
-
/** Number of header columns (frozen at left) */
|
|
461
|
-
headerCols?: number;
|
|
462
|
-
/** Table rows */
|
|
463
|
-
rows: Array<{
|
|
464
|
-
/** Row cells - either simple inline content arrays or explicit TableCell objects */
|
|
465
|
-
cells: BlockNoteInlineContent[][] | BlockNoteTableCell[];
|
|
466
|
-
}>;
|
|
467
|
-
}
|
|
468
|
-
/**
|
|
469
|
-
* Default block properties available on all blocks
|
|
470
|
-
*/
|
|
471
|
-
interface BlockNoteDefaultProps {
|
|
472
|
-
/** Background color (color name or CSS value, "default" for none) */
|
|
473
|
-
backgroundColor?: string;
|
|
474
|
-
/** Text color (color name or CSS value, "default" for none) */
|
|
475
|
-
textColor?: string;
|
|
476
|
-
/** Text alignment */
|
|
477
|
-
textAlignment?: "left" | "center" | "right" | "justify";
|
|
478
|
-
}
|
|
479
|
-
/**
|
|
480
|
-
* BlockNote block structure
|
|
481
|
-
* Represents a single block in the editor document.
|
|
482
|
-
*
|
|
483
|
-
* @example Paragraph block
|
|
484
|
-
* ```typescript
|
|
485
|
-
* {
|
|
486
|
-
* id: "abc123",
|
|
487
|
-
* type: "paragraph",
|
|
488
|
-
* props: { textAlignment: "left" },
|
|
489
|
-
* content: [{ type: "text", text: "Hello world", styles: {} }],
|
|
490
|
-
* children: []
|
|
491
|
-
* }
|
|
492
|
-
* ```
|
|
493
|
-
*
|
|
494
|
-
* @example Heading block
|
|
495
|
-
* ```typescript
|
|
496
|
-
* {
|
|
497
|
-
* id: "def456",
|
|
498
|
-
* type: "heading",
|
|
499
|
-
* props: { level: 2, textAlignment: "left" },
|
|
500
|
-
* content: [{ type: "text", text: "My Heading", styles: { bold: true } }],
|
|
501
|
-
* children: []
|
|
502
|
-
* }
|
|
503
|
-
* ```
|
|
504
|
-
*
|
|
505
|
-
* @example Nested list
|
|
506
|
-
* ```typescript
|
|
507
|
-
* {
|
|
508
|
-
* id: "ghi789",
|
|
509
|
-
* type: "bulletListItem",
|
|
510
|
-
* props: { textAlignment: "left" },
|
|
511
|
-
* content: [{ type: "text", text: "Parent item", styles: {} }],
|
|
512
|
-
* children: [
|
|
513
|
-
* {
|
|
514
|
-
* id: "jkl012",
|
|
515
|
-
* type: "bulletListItem",
|
|
516
|
-
* props: { textAlignment: "left" },
|
|
517
|
-
* content: [{ type: "text", text: "Child item", styles: {} }],
|
|
518
|
-
* children: []
|
|
519
|
-
* }
|
|
520
|
-
* ]
|
|
521
|
-
* }
|
|
522
|
-
* ```
|
|
523
|
-
*/
|
|
524
|
-
interface BlockNoteBlock {
|
|
525
|
-
/** Unique block identifier (auto-generated if not provided) */
|
|
526
|
-
id: string;
|
|
527
|
-
/**
|
|
528
|
-
* Block type identifier
|
|
529
|
-
* Built-in types: paragraph, heading, bulletListItem, numberedListItem,
|
|
530
|
-
* checkListItem, table, image, video, audio, file, codeBlock, quote
|
|
531
|
-
*/
|
|
532
|
-
type: string;
|
|
533
|
-
/**
|
|
534
|
-
* Block-specific properties
|
|
535
|
-
* All blocks have defaultProps (backgroundColor, textColor, textAlignment)
|
|
536
|
-
* Additional props depend on block type (e.g., level for headings, checked for checkListItem)
|
|
537
|
-
*/
|
|
538
|
-
props: Record<string, boolean | number | string>;
|
|
539
|
-
/**
|
|
540
|
-
* Block content
|
|
541
|
-
* - InlineContent[] for text blocks (paragraph, heading, list items, etc.)
|
|
542
|
-
* - TableContent for table blocks
|
|
543
|
-
* - undefined for void blocks (image, video, file, divider, etc.)
|
|
544
|
-
*/
|
|
545
|
-
content?: BlockNoteInlineContent[] | BlockNoteTableContent;
|
|
546
|
-
/** Nested child blocks (for indentation/nesting) */
|
|
547
|
-
children: BlockNoteBlock[];
|
|
548
|
-
}
|
|
549
|
-
/**
|
|
550
|
-
* BlockNote document content
|
|
551
|
-
* An array of blocks representing the full editor document.
|
|
552
|
-
* This is the format returned by `editor.document` and accepted by `initialContent`.
|
|
553
|
-
*/
|
|
554
|
-
type BlockNoteContent = BlockNoteBlock[];
|
|
555
|
-
/**
|
|
556
|
-
* Partial styled text (text can be a plain string shorthand)
|
|
557
|
-
*/
|
|
558
|
-
type PartialBlockNoteStyledText = string | {
|
|
559
|
-
type: "text";
|
|
560
|
-
text: string;
|
|
561
|
-
styles?: Partial<BlockNoteStyles>;
|
|
562
|
-
};
|
|
563
|
-
/**
|
|
564
|
-
* Partial link (content can be a string shorthand)
|
|
565
|
-
*/
|
|
566
|
-
interface PartialBlockNoteLink {
|
|
567
|
-
type: "link";
|
|
568
|
-
href: string;
|
|
569
|
-
content: string | BlockNoteStyledText[];
|
|
570
|
-
}
|
|
571
|
-
/**
|
|
572
|
-
* Partial inline content union
|
|
573
|
-
*/
|
|
574
|
-
type PartialBlockNoteInlineContent = PartialBlockNoteStyledText | PartialBlockNoteLink | BlockNoteCustomInlineContent;
|
|
575
|
-
/**
|
|
576
|
-
* Partial table cell
|
|
577
|
-
*/
|
|
578
|
-
interface PartialBlockNoteTableCell {
|
|
579
|
-
type: "tableCell";
|
|
580
|
-
props?: Partial<BlockNoteTableCellProps>;
|
|
581
|
-
content?: PartialBlockNoteInlineContent[];
|
|
582
|
-
}
|
|
583
|
-
/**
|
|
584
|
-
* Partial table content
|
|
585
|
-
*/
|
|
586
|
-
interface PartialBlockNoteTableContent {
|
|
587
|
-
type: "tableContent";
|
|
588
|
-
columnWidths?: (number | undefined)[];
|
|
589
|
-
headerRows?: number;
|
|
590
|
-
headerCols?: number;
|
|
591
|
-
rows: Array<{
|
|
592
|
-
cells: PartialBlockNoteInlineContent[][] | PartialBlockNoteTableCell[];
|
|
593
|
-
}>;
|
|
594
|
-
}
|
|
595
|
-
/**
|
|
596
|
-
* Partial block for creation/updates
|
|
597
|
-
* All properties are optional except that at least `type` should be provided for new blocks.
|
|
598
|
-
*/
|
|
599
|
-
interface PartialBlockNoteBlock {
|
|
600
|
-
id?: string;
|
|
601
|
-
type?: string;
|
|
602
|
-
props?: Partial<Record<string, boolean | number | string>>;
|
|
603
|
-
content?: PartialBlockNoteInlineContent[] | PartialBlockNoteTableContent | string;
|
|
604
|
-
children?: PartialBlockNoteBlock[];
|
|
605
|
-
}
|
|
606
|
-
/**
|
|
607
|
-
* Partial document content for initialization
|
|
608
|
-
*/
|
|
609
|
-
type PartialBlockNoteContent = PartialBlockNoteBlock[];
|
|
610
|
-
|
|
611
385
|
type AttributeType = "text" | "textarea" | "richtext" | "number" | "checkbox" | "date" | "phone" | "currency" | "status" | "location" | "select" | "multiselect" | "file" | "user" | "relation" | "rating" | "formula" | "rollup";
|
|
612
386
|
/**
|
|
613
387
|
* Status group categorization
|
|
@@ -846,15 +620,15 @@ declare function isUniversalRelation(attr: RelationAttribute): boolean;
|
|
|
846
620
|
interface TextAreaAttribute extends BaseAttribute<string> {
|
|
847
621
|
type: "textarea";
|
|
848
622
|
}
|
|
849
|
-
|
|
850
623
|
/**
|
|
851
624
|
* Available features for richtext editor
|
|
852
625
|
*/
|
|
853
626
|
type RichtextFeature = "headings" | "bold" | "italic" | "lists" | "links" | "images" | "codeBlocks" | "tables";
|
|
854
627
|
/**
|
|
855
|
-
* RichtextAttribute - Rich text content using
|
|
628
|
+
* RichtextAttribute - Rich text content using semantic markdown
|
|
856
629
|
*
|
|
857
|
-
* Stores content as
|
|
630
|
+
* Stores content as semantic markdown string (with directives like :::callout).
|
|
631
|
+
* Parsed at runtime to Tiptap JSON for editing.
|
|
858
632
|
* Use this for: Notes, articles, descriptions, long-form content.
|
|
859
633
|
*
|
|
860
634
|
* @example
|
|
@@ -864,9 +638,9 @@ type RichtextFeature = "headings" | "bold" | "italic" | "lists" | "links" | "ima
|
|
|
864
638
|
* .required()
|
|
865
639
|
* ```
|
|
866
640
|
*/
|
|
867
|
-
interface RichtextAttribute extends BaseAttribute<
|
|
641
|
+
interface RichtextAttribute extends BaseAttribute<string> {
|
|
868
642
|
type: "richtext";
|
|
869
|
-
/** Enabled
|
|
643
|
+
/** Enabled features. If undefined, all features are enabled. */
|
|
870
644
|
features?: RichtextFeature[];
|
|
871
645
|
}
|
|
872
646
|
interface RatingAttribute extends BaseAttribute<number> {
|
|
@@ -1086,6 +860,15 @@ interface Timestamps {
|
|
|
1086
860
|
createdAt: Date;
|
|
1087
861
|
updatedAt: Date;
|
|
1088
862
|
}
|
|
863
|
+
/**
|
|
864
|
+
* Sharing mode for multi-tenant object access.
|
|
865
|
+
*
|
|
866
|
+
* - `private`: Object is only visible to its owner tenant (default)
|
|
867
|
+
* - `shared`: Object is readable by all tenants, but only writable by the owner tenant
|
|
868
|
+
*
|
|
869
|
+
* Records inherit the sharing mode of their parent object.
|
|
870
|
+
*/
|
|
871
|
+
type SharingMode = "private" | "shared";
|
|
1089
872
|
/**
|
|
1090
873
|
* Object definition - Represents a database table/entity
|
|
1091
874
|
*/
|
|
@@ -1117,6 +900,15 @@ interface ObjectDefinition {
|
|
|
1117
900
|
labelExpression: string;
|
|
1118
901
|
attributes: Attribute[];
|
|
1119
902
|
system?: boolean;
|
|
903
|
+
/**
|
|
904
|
+
* Sharing mode for multi-tenant access.
|
|
905
|
+
* - `private`: Only visible to the owner tenant (default)
|
|
906
|
+
* - `shared`: Readable by all tenants, writable only by the owner
|
|
907
|
+
*
|
|
908
|
+
* Records inherit the sharing mode of their parent object.
|
|
909
|
+
* @default "private"
|
|
910
|
+
*/
|
|
911
|
+
sharingMode?: SharingMode;
|
|
1120
912
|
metadata?: Record<string, unknown>;
|
|
1121
913
|
}
|
|
1122
914
|
/**
|
|
@@ -1771,7 +1563,8 @@ declare class NoopGeocodingAdapter implements GeocodingAdapter {
|
|
|
1771
1563
|
type AttributeValueMap = {
|
|
1772
1564
|
text: string;
|
|
1773
1565
|
textarea: string;
|
|
1774
|
-
|
|
1566
|
+
/** Semantic markdown string (parsed at runtime to TiptapDocument) */
|
|
1567
|
+
richtext: string;
|
|
1775
1568
|
number: number;
|
|
1776
1569
|
checkbox: boolean;
|
|
1777
1570
|
date: string | Date;
|
|
@@ -3665,6 +3458,12 @@ interface DBObject extends Timestamps {
|
|
|
3665
3458
|
icon?: IconName;
|
|
3666
3459
|
labelExpression: string;
|
|
3667
3460
|
system: boolean;
|
|
3461
|
+
/**
|
|
3462
|
+
* Sharing mode for multi-tenant access.
|
|
3463
|
+
* - `private`: Only visible to the owner tenant (default)
|
|
3464
|
+
* - `shared`: Readable by all tenants, writable only by the owner
|
|
3465
|
+
*/
|
|
3466
|
+
sharingMode: SharingMode;
|
|
3668
3467
|
metadata?: Record<string, unknown>;
|
|
3669
3468
|
}
|
|
3670
3469
|
/**
|
|
@@ -3679,6 +3478,7 @@ interface CreateDBObject {
|
|
|
3679
3478
|
icon?: IconName;
|
|
3680
3479
|
labelExpression: string;
|
|
3681
3480
|
system?: boolean;
|
|
3481
|
+
sharingMode?: SharingMode;
|
|
3682
3482
|
metadata?: Record<string, unknown>;
|
|
3683
3483
|
}
|
|
3684
3484
|
interface UpdateDBObject {
|
|
@@ -3687,6 +3487,7 @@ interface UpdateDBObject {
|
|
|
3687
3487
|
description?: string;
|
|
3688
3488
|
icon?: IconName;
|
|
3689
3489
|
labelExpression?: string;
|
|
3490
|
+
sharingMode?: SharingMode;
|
|
3690
3491
|
metadata?: Record<string, unknown>;
|
|
3691
3492
|
}
|
|
3692
3493
|
/**
|
|
@@ -3695,6 +3496,7 @@ interface UpdateDBObject {
|
|
|
3695
3496
|
*/
|
|
3696
3497
|
interface UpsertDBObject extends CreateDBObject {
|
|
3697
3498
|
system: boolean;
|
|
3499
|
+
sharingMode: SharingMode;
|
|
3698
3500
|
}
|
|
3699
3501
|
/**
|
|
3700
3502
|
* Attribute as stored in database (metadata)
|
|
@@ -5128,19 +4930,18 @@ declare function createRollupValidator(_attr: RollupAttribute, _messages?: Valid
|
|
|
5128
4930
|
declare function createTextAreaValidator(_attr: TextAreaAttribute, _messages?: ValidationMessages): z.ZodString;
|
|
5129
4931
|
/**
|
|
5130
4932
|
* Create a Zod schema for a richtext attribute.
|
|
5131
|
-
* Validates
|
|
4933
|
+
* Validates semantic markdown content as a string.
|
|
5132
4934
|
*
|
|
5133
|
-
* @example Valid
|
|
4935
|
+
* @example Valid richtext content (semantic markdown)
|
|
5134
4936
|
* ```typescript
|
|
5135
|
-
*
|
|
5136
|
-
*
|
|
5137
|
-
*
|
|
5138
|
-
*
|
|
5139
|
-
*
|
|
5140
|
-
*
|
|
5141
|
-
*
|
|
5142
|
-
*
|
|
5143
|
-
* ]
|
|
4937
|
+
* `# Heading
|
|
4938
|
+
*
|
|
4939
|
+
* Some paragraph text.
|
|
4940
|
+
*
|
|
4941
|
+
* :::callout{variant="info"}
|
|
4942
|
+
* This is a callout block
|
|
4943
|
+
* :::
|
|
4944
|
+
* `
|
|
5144
4945
|
* ```
|
|
5145
4946
|
*/
|
|
5146
4947
|
declare function createRichtextValidator(attr: RichtextAttribute, messages?: ValidationMessages): z.ZodTypeAny;
|
|
@@ -5454,6 +5255,22 @@ declare const cacheKeys: {
|
|
|
5454
5255
|
readonly allWorkflows: (tenantId: string) => string;
|
|
5455
5256
|
/** All cache for a tenant (nuclear option) */
|
|
5456
5257
|
readonly allForTenant: (tenantId: string) => string;
|
|
5258
|
+
/** Object schema for shared object (not tenant-scoped) */
|
|
5259
|
+
readonly sharedObjectSchema: (objectId: string) => string;
|
|
5260
|
+
/** Object schema for shared object by name */
|
|
5261
|
+
readonly sharedObjectSchemaByName: (name: string) => string;
|
|
5262
|
+
/** Attributes for a shared object */
|
|
5263
|
+
readonly sharedObjectAttributes: (objectId: string) => string;
|
|
5264
|
+
/** Record from a shared object */
|
|
5265
|
+
readonly sharedRecord: (recordId: string) => string;
|
|
5266
|
+
/** Record list for a shared object */
|
|
5267
|
+
readonly sharedRecordList: (objectId: string, hash: string) => string;
|
|
5268
|
+
/** All shared record lists for an object (for invalidation) */
|
|
5269
|
+
readonly allSharedRecordLists: (objectId: string) => string;
|
|
5270
|
+
/** All shared schemas (for invalidation) */
|
|
5271
|
+
readonly allSharedSchemas: () => string;
|
|
5272
|
+
/** All shared records (for invalidation) */
|
|
5273
|
+
readonly allSharedRecords: () => string;
|
|
5457
5274
|
};
|
|
5458
5275
|
/**
|
|
5459
5276
|
* Recommended TTL values for different resource types.
|
|
@@ -7867,6 +7684,19 @@ declare class ObjectSchemaService extends BaseService {
|
|
|
7867
7684
|
* Internal method to fetch all object schemas (no caching)
|
|
7868
7685
|
*/
|
|
7869
7686
|
private fetchObjectSchemaList;
|
|
7687
|
+
/**
|
|
7688
|
+
* Get object ownership info for write access checks.
|
|
7689
|
+
*
|
|
7690
|
+
* Used by RecordService to verify if the current tenant can write
|
|
7691
|
+
* to a shared object's records.
|
|
7692
|
+
*
|
|
7693
|
+
* @param objectId - Object UUID
|
|
7694
|
+
* @returns Object ownership info with tenantId and sharingMode
|
|
7695
|
+
*/
|
|
7696
|
+
getObjectOwnerInfo(objectId: string): Promise<{
|
|
7697
|
+
tenantId: TenantId;
|
|
7698
|
+
sharingMode: SharingMode;
|
|
7699
|
+
}>;
|
|
7870
7700
|
/**
|
|
7871
7701
|
* Invalidate all schema-related cache for the current tenant.
|
|
7872
7702
|
* Called automatically after schema mutations.
|
|
@@ -8097,6 +7927,7 @@ interface RecordServiceOptions {
|
|
|
8097
7927
|
declare class RecordService extends BaseService {
|
|
8098
7928
|
private schemaService;
|
|
8099
7929
|
private queryService;
|
|
7930
|
+
private recordResolver;
|
|
8100
7931
|
private relationService;
|
|
8101
7932
|
private userService;
|
|
8102
7933
|
private rollupService;
|
|
@@ -8202,95 +8033,476 @@ declare class RecordService extends BaseService {
|
|
|
8202
8033
|
}
|
|
8203
8034
|
|
|
8204
8035
|
/**
|
|
8205
|
-
*
|
|
8036
|
+
* Default fallback value when expression resolves to empty string
|
|
8206
8037
|
*/
|
|
8207
|
-
|
|
8208
|
-
|
|
8209
|
-
errors: RelationValidationError[];
|
|
8210
|
-
}
|
|
8038
|
+
declare const DEFAULT_LABEL_FALLBACK = "(Untitled)";
|
|
8039
|
+
declare function renderLabelExpression(template: string, values: Record<string, unknown>, fallback?: string): string;
|
|
8211
8040
|
/**
|
|
8212
|
-
*
|
|
8041
|
+
* Check if a string is a valid label expression template
|
|
8042
|
+
* A valid template contains at least one {{ variable }} block with a non-empty variable
|
|
8213
8043
|
*/
|
|
8214
|
-
|
|
8215
|
-
/** Attribute name */
|
|
8216
|
-
attribute: string;
|
|
8217
|
-
/** Error message */
|
|
8218
|
-
message: string;
|
|
8219
|
-
/** Invalid record IDs */
|
|
8220
|
-
invalidIds?: string[];
|
|
8221
|
-
}
|
|
8044
|
+
declare function isLabelExpression(value: string): boolean;
|
|
8222
8045
|
/**
|
|
8223
|
-
*
|
|
8046
|
+
* Extract attribute names referenced in a label expression
|
|
8047
|
+
* Useful for validation or dependency tracking
|
|
8224
8048
|
*
|
|
8225
|
-
*
|
|
8226
|
-
*
|
|
8227
|
-
*
|
|
8228
|
-
* on an object to access its record data.
|
|
8049
|
+
* @example
|
|
8050
|
+
* extractAttributeNames("{{ firstName }} {{ lastName | UPPER }}")
|
|
8051
|
+
* // → ["firstName", "lastName"]
|
|
8229
8052
|
*/
|
|
8230
|
-
|
|
8231
|
-
/** Record ID */
|
|
8232
|
-
id: string;
|
|
8233
|
-
/** Object ID */
|
|
8234
|
-
objectId: string;
|
|
8235
|
-
/** Object name (technical name) */
|
|
8236
|
-
objectName: string;
|
|
8237
|
-
/** Object label (display name) */
|
|
8238
|
-
objectLabel: string;
|
|
8239
|
-
/** Object icon */
|
|
8240
|
-
objectIcon?: string;
|
|
8241
|
-
/** Display label (computed from labelExpression) */
|
|
8242
|
-
label: string;
|
|
8243
|
-
}
|
|
8053
|
+
declare function extractAttributeNames(template: string): string[];
|
|
8244
8054
|
/**
|
|
8245
|
-
*
|
|
8055
|
+
* Enrich record values by formatting complex types for display
|
|
8056
|
+
*
|
|
8057
|
+
* Transforms raw values (objects, dates, etc.) into human-readable strings
|
|
8058
|
+
* for use in label expression rendering. Uses formatAttributeValue internally.
|
|
8059
|
+
*
|
|
8060
|
+
* @param values - Record values containing raw attribute values
|
|
8061
|
+
* @param attributes - Attribute definitions for formatting
|
|
8062
|
+
* @returns New object with complex values formatted as strings
|
|
8063
|
+
*
|
|
8064
|
+
* @example
|
|
8065
|
+
* ```typescript
|
|
8066
|
+
* const enriched = enrichValuesForDisplay(
|
|
8067
|
+
* { status: "active", price: { value: 1500, code: "EUR" } },
|
|
8068
|
+
* [
|
|
8069
|
+
* { type: "select", name: "status", options: [{ value: "active", label: "Active" }] },
|
|
8070
|
+
* { type: "currency", name: "price" }
|
|
8071
|
+
* ]
|
|
8072
|
+
* );
|
|
8073
|
+
* // → { status: "Active", price: "1,500.00 EUR" }
|
|
8074
|
+
* ```
|
|
8246
8075
|
*/
|
|
8247
|
-
|
|
8248
|
-
options: RelationOption[];
|
|
8249
|
-
hasMore: boolean;
|
|
8250
|
-
total: number;
|
|
8251
|
-
}
|
|
8076
|
+
declare function enrichValuesForDisplay(values: Record<string, unknown>, attributes: Attribute[]): Record<string, unknown>;
|
|
8252
8077
|
/**
|
|
8253
|
-
*
|
|
8078
|
+
* @deprecated Use `enrichValuesForDisplay` instead
|
|
8254
8079
|
*/
|
|
8255
|
-
|
|
8256
|
-
/** Search query */
|
|
8257
|
-
query?: string;
|
|
8258
|
-
/** Page number (1-based) */
|
|
8259
|
-
page?: number;
|
|
8260
|
-
/** Page size */
|
|
8261
|
-
pageSize?: number;
|
|
8262
|
-
/** Filter by specific target object */
|
|
8263
|
-
targetObject?: string;
|
|
8264
|
-
/** Additional filter to apply (e.g., workflow context filtering) */
|
|
8265
|
-
filter?: FilterState;
|
|
8266
|
-
}
|
|
8080
|
+
declare const enrichValuesWithSelectLabels: typeof enrichValuesForDisplay;
|
|
8267
8081
|
/**
|
|
8268
|
-
*
|
|
8082
|
+
* Extract relation IDs from a value (string or array)
|
|
8083
|
+
* For cardinality "many", only the first ID is extracted for label display
|
|
8084
|
+
*
|
|
8085
|
+
* @param val - Relation value (string ID or array of IDs)
|
|
8086
|
+
* @returns Array of IDs (max 1 element for display purposes)
|
|
8087
|
+
*
|
|
8088
|
+
* @example
|
|
8089
|
+
* ```typescript
|
|
8090
|
+
* extractRelationIds("rec-123") // → ["rec-123"]
|
|
8091
|
+
* extractRelationIds(["rec-1", "rec-2"]) // → ["rec-1"]
|
|
8092
|
+
* extractRelationIds(null) // → []
|
|
8093
|
+
* ```
|
|
8269
8094
|
*/
|
|
8270
|
-
|
|
8271
|
-
/**
|
|
8272
|
-
* Record query service for fetching relation options.
|
|
8273
|
-
* Required for getOptions() to work.
|
|
8274
|
-
* If not provided, getOptions() will throw.
|
|
8275
|
-
*/
|
|
8276
|
-
queryService?: RecordQueryService;
|
|
8277
|
-
}
|
|
8095
|
+
declare function extractRelationIds(val: unknown): string[];
|
|
8278
8096
|
/**
|
|
8279
|
-
*
|
|
8097
|
+
* Resolver function type for fetching relation labels
|
|
8098
|
+
* Takes an array of record IDs and returns a map of ID → label
|
|
8280
8099
|
*/
|
|
8281
|
-
|
|
8282
|
-
/** Relation attribute ID */
|
|
8283
|
-
attributeId: string;
|
|
8284
|
-
/** Record IDs to resolve for this attribute */
|
|
8285
|
-
ids: string[];
|
|
8286
|
-
}
|
|
8100
|
+
type RelationLabelResolver = (ids: string[]) => Promise<Map<string, string>>;
|
|
8287
8101
|
/**
|
|
8288
|
-
*
|
|
8289
|
-
*
|
|
8102
|
+
* Compute a label from a template with full relation resolution (1 level deep)
|
|
8103
|
+
*
|
|
8104
|
+
* Uses pre-computed record.label for nested relations to avoid infinite recursion.
|
|
8105
|
+
* This function enriches select/multiselect values AND resolves relation IDs to their labels.
|
|
8106
|
+
*
|
|
8107
|
+
* @param template - Label expression template (e.g., "{{ company }} - {{ name }}")
|
|
8108
|
+
* @param values - Record values to interpolate
|
|
8109
|
+
* @param attributes - Attribute definitions for the object
|
|
8110
|
+
* @param resolveRelationIds - Function to resolve record IDs to their labels
|
|
8111
|
+
* @returns The rendered label string
|
|
8112
|
+
*
|
|
8113
|
+
* @example
|
|
8114
|
+
* ```typescript
|
|
8115
|
+
* const label = await computeLabelWithRelations(
|
|
8116
|
+
* "{{ company }} - {{ name }}",
|
|
8117
|
+
* { company: "rec-123", name: "Product A" },
|
|
8118
|
+
* objectSchema.attributes,
|
|
8119
|
+
* async (ids) => {
|
|
8120
|
+
* const records = await adapter.objectRecords.findByIds(ids);
|
|
8121
|
+
* return new Map(records.map(r => [r.id, r.label]));
|
|
8122
|
+
* }
|
|
8123
|
+
* );
|
|
8124
|
+
* // → "Acme Corp - Product A"
|
|
8125
|
+
* ```
|
|
8290
8126
|
*/
|
|
8291
|
-
|
|
8292
|
-
|
|
8293
|
-
|
|
8127
|
+
declare function computeLabelWithRelations(template: string, values: Record<string, unknown>, attributes: Attribute[], resolveRelationIds: RelationLabelResolver): Promise<string>;
|
|
8128
|
+
|
|
8129
|
+
/**
|
|
8130
|
+
* Interface for resolving relation labels.
|
|
8131
|
+
* Allows dependency injection for testing and decoupling.
|
|
8132
|
+
*/
|
|
8133
|
+
interface LabelResolver {
|
|
8134
|
+
resolveRelationIds(ids: string[], attributeId: string): Promise<Array<{
|
|
8135
|
+
id: string;
|
|
8136
|
+
label: string;
|
|
8137
|
+
}>>;
|
|
8138
|
+
findRecordLabels(ids: string[]): Promise<Array<{
|
|
8139
|
+
id: string;
|
|
8140
|
+
label?: string;
|
|
8141
|
+
}>>;
|
|
8142
|
+
}
|
|
8143
|
+
/**
|
|
8144
|
+
* Compute display label from schema expression.
|
|
8145
|
+
* Automatically resolves relation attribute values to their labels
|
|
8146
|
+
* and select/multiselect values to their option labels.
|
|
8147
|
+
*
|
|
8148
|
+
* @param schema - Object schema with labelExpression
|
|
8149
|
+
* @param values - Record values
|
|
8150
|
+
* @param resolver - Resolver for relation labels
|
|
8151
|
+
* @returns Computed label string
|
|
8152
|
+
*/
|
|
8153
|
+
declare function computeLabel(schema: ObjectDefinition, values: Record<string, unknown>, resolver: LabelResolver): Promise<string>;
|
|
8154
|
+
|
|
8155
|
+
/**
|
|
8156
|
+
* Result of a rollup calculation
|
|
8157
|
+
*/
|
|
8158
|
+
interface RollupResult {
|
|
8159
|
+
/** Computed value */
|
|
8160
|
+
value: unknown;
|
|
8161
|
+
/** Number of records that contributed to the calculation */
|
|
8162
|
+
recordCount: number;
|
|
8163
|
+
}
|
|
8164
|
+
/**
|
|
8165
|
+
* Options for RollupService constructor
|
|
8166
|
+
*/
|
|
8167
|
+
interface RollupServiceOptions {
|
|
8168
|
+
/**
|
|
8169
|
+
* Record resolver for cached record fetching.
|
|
8170
|
+
* Required for cached access to records.
|
|
8171
|
+
*/
|
|
8172
|
+
recordResolver: RecordResolverService;
|
|
8173
|
+
}
|
|
8174
|
+
/**
|
|
8175
|
+
* Service for calculating rollup attribute values
|
|
8176
|
+
*
|
|
8177
|
+
* Rollups aggregate values from related records (e.g., sum of order amounts
|
|
8178
|
+
* for a company). They are calculated when needed and can be materialized
|
|
8179
|
+
* (stored) for performance.
|
|
8180
|
+
*
|
|
8181
|
+
* Supports optional caching via CacheAdapter for improved performance.
|
|
8182
|
+
* Rollup values have a short TTL (2 minutes) due to high volatility.
|
|
8183
|
+
*
|
|
8184
|
+
* Phase 3: Supports single-level relation rollups
|
|
8185
|
+
*/
|
|
8186
|
+
declare class RollupService extends BaseService {
|
|
8187
|
+
private recordResolver;
|
|
8188
|
+
constructor(adapter: DatabaseAdapter, options: RollupServiceOptions);
|
|
8189
|
+
/**
|
|
8190
|
+
* Calculate a rollup value for a record
|
|
8191
|
+
*
|
|
8192
|
+
* Results are cached if a CacheAdapter is configured.
|
|
8193
|
+
*
|
|
8194
|
+
* @param recordId - ID of the parent record
|
|
8195
|
+
* @param rollupAttr - Rollup attribute definition
|
|
8196
|
+
* @param schema - Schema of the parent object
|
|
8197
|
+
* @returns Computed rollup value
|
|
8198
|
+
*
|
|
8199
|
+
* @example
|
|
8200
|
+
* ```typescript
|
|
8201
|
+
* // Sum all order amounts for a company
|
|
8202
|
+
* const totalOrders = await rollupService.calculate(
|
|
8203
|
+
* "company-123",
|
|
8204
|
+
* {
|
|
8205
|
+
* type: "rollup",
|
|
8206
|
+
* name: "totalOrders",
|
|
8207
|
+
* relationAttribute: "orders",
|
|
8208
|
+
* targetAttribute: "amount",
|
|
8209
|
+
* function: "sum",
|
|
8210
|
+
* ...
|
|
8211
|
+
* },
|
|
8212
|
+
* companySchema
|
|
8213
|
+
* );
|
|
8214
|
+
* ```
|
|
8215
|
+
*/
|
|
8216
|
+
calculate(recordId: string, rollupAttr: RollupAttribute, schema: ObjectDefinition): Promise<RollupResult>;
|
|
8217
|
+
/**
|
|
8218
|
+
* Internal method to compute rollup value (no caching)
|
|
8219
|
+
*/
|
|
8220
|
+
private computeRollup;
|
|
8221
|
+
/**
|
|
8222
|
+
* Forward pattern: this record has a relation attribute pointing to other records
|
|
8223
|
+
* Example: entreprise222 has relation "entreprises" → companies, rollup collects from companies
|
|
8224
|
+
*/
|
|
8225
|
+
private calculateForward;
|
|
8226
|
+
/**
|
|
8227
|
+
* Reverse pattern: other records have a relation pointing to this record
|
|
8228
|
+
* Example: Company has rollup on "orders", Order has relation "company" → companies
|
|
8229
|
+
*/
|
|
8230
|
+
private calculateReverse;
|
|
8231
|
+
/**
|
|
8232
|
+
* Extract and aggregate values from related records
|
|
8233
|
+
*/
|
|
8234
|
+
private aggregateValues;
|
|
8235
|
+
/**
|
|
8236
|
+
* Calculate rollup values for multiple records (batched)
|
|
8237
|
+
*
|
|
8238
|
+
* More efficient than calling calculate() for each record individually.
|
|
8239
|
+
*/
|
|
8240
|
+
calculateForMany(recordIds: string[], rollupAttr: RollupAttribute, schema: ObjectDefinition): Promise<Map<string, RollupResult>>;
|
|
8241
|
+
/**
|
|
8242
|
+
* Apply aggregation function to a set of values
|
|
8243
|
+
*/
|
|
8244
|
+
private aggregate;
|
|
8245
|
+
/**
|
|
8246
|
+
* Get the default empty value for a rollup function
|
|
8247
|
+
*/
|
|
8248
|
+
private getEmptyValue;
|
|
8249
|
+
/**
|
|
8250
|
+
* Sum numeric values
|
|
8251
|
+
*/
|
|
8252
|
+
private sumNumbers;
|
|
8253
|
+
/**
|
|
8254
|
+
* Average numeric values
|
|
8255
|
+
*/
|
|
8256
|
+
private averageNumbers;
|
|
8257
|
+
/**
|
|
8258
|
+
* Get earliest date from values
|
|
8259
|
+
*/
|
|
8260
|
+
private earliestDate;
|
|
8261
|
+
/**
|
|
8262
|
+
* Get latest date from values
|
|
8263
|
+
*/
|
|
8264
|
+
private latestDate;
|
|
8265
|
+
/**
|
|
8266
|
+
* Recalculate all rollup attributes for a record and update it
|
|
8267
|
+
*
|
|
8268
|
+
* Called after related records change to keep rollups up-to-date.
|
|
8269
|
+
*/
|
|
8270
|
+
recalculateAndUpdate(record: ObjectRecord, schema: ObjectDefinition): Promise<ObjectRecord>;
|
|
8271
|
+
/**
|
|
8272
|
+
* Find parent records that need rollup recalculation when a child record changes
|
|
8273
|
+
*
|
|
8274
|
+
* Used by hooks to determine which parent records to recalculate after
|
|
8275
|
+
* a child record is created, updated, or deleted.
|
|
8276
|
+
*
|
|
8277
|
+
* @param changedRecord - The record that was modified
|
|
8278
|
+
* @param changedSchema - Schema of the changed record's object
|
|
8279
|
+
* @returns Array of parent record IDs that need recalculation
|
|
8280
|
+
*/
|
|
8281
|
+
findAffectedParentRecords(changedRecord: ObjectRecord, changedSchema: ObjectDefinition): Promise<string[]>;
|
|
8282
|
+
/**
|
|
8283
|
+
* Invalidate cached rollups for affected parent records.
|
|
8284
|
+
* Call this after a child record is created, updated, or deleted.
|
|
8285
|
+
*
|
|
8286
|
+
* @param affectedParentIds - Array of parent record IDs whose rollups need invalidation
|
|
8287
|
+
*/
|
|
8288
|
+
invalidateAffectedRollups(affectedParentIds: string[]): Promise<void>;
|
|
8289
|
+
/**
|
|
8290
|
+
* Invalidate all cached rollups for the current tenant.
|
|
8291
|
+
* Use sparingly - prefer targeted invalidation.
|
|
8292
|
+
*/
|
|
8293
|
+
invalidateAllRollups(): Promise<void>;
|
|
8294
|
+
/**
|
|
8295
|
+
* Find records that have forward rollups pointing to the modified record.
|
|
8296
|
+
*
|
|
8297
|
+
* Forward rollups are rollups where the record has a relation attribute
|
|
8298
|
+
* pointing to another object, and the rollup aggregates values from that target.
|
|
8299
|
+
* When the target record changes, we need to recalculate these rollups.
|
|
8300
|
+
*
|
|
8301
|
+
* Example: Order has relation "company" → Company, and rollup "capitalSocial"
|
|
8302
|
+
* aggregating from the Company. When Company.capitalSocial changes,
|
|
8303
|
+
* all Orders pointing to that Company need their rollup recalculated.
|
|
8304
|
+
*
|
|
8305
|
+
* @param changedRecord - The record that was modified
|
|
8306
|
+
* @param changedSchema - Schema of the changed record's object
|
|
8307
|
+
* @returns Array of records that need their forward rollups recalculated
|
|
8308
|
+
*/
|
|
8309
|
+
findRecordsWithForwardRollup(changedRecord: ObjectRecord, changedSchema: ObjectDefinition): Promise<ObjectRecord[]>;
|
|
8310
|
+
}
|
|
8311
|
+
|
|
8312
|
+
/**
|
|
8313
|
+
* Context for rollup cascade operations.
|
|
8314
|
+
* Provides the necessary services via dependency injection.
|
|
8315
|
+
*/
|
|
8316
|
+
interface RollupCascadeContext {
|
|
8317
|
+
rollupService: RollupService;
|
|
8318
|
+
schemaService: ObjectSchemaService;
|
|
8319
|
+
findRecordsByIds: (ids: string[]) => Promise<ObjectRecord[]>;
|
|
8320
|
+
}
|
|
8321
|
+
/**
|
|
8322
|
+
* Recalculate rollups after a record changes.
|
|
8323
|
+
*
|
|
8324
|
+
* This handles three cases:
|
|
8325
|
+
* 1. The record itself has rollups (e.g., aggregating from related records it points to)
|
|
8326
|
+
* 2. Parent records have rollups that aggregate from this record (reverse pattern)
|
|
8327
|
+
* 3. Records that have forward rollups pointing to this record (forward pattern)
|
|
8328
|
+
*
|
|
8329
|
+
* Optimized: Pre-loads schemas by objectId to avoid N redundant calls
|
|
8330
|
+
* when multiple records share the same objectId.
|
|
8331
|
+
*
|
|
8332
|
+
* @param record - The record that was modified
|
|
8333
|
+
* @param schema - Schema of the record's object
|
|
8334
|
+
* @param ctx - Context with required services
|
|
8335
|
+
*/
|
|
8336
|
+
declare function recalculateParentRollups(record: ObjectRecord, schema: ObjectDefinition, ctx: RollupCascadeContext): Promise<void>;
|
|
8337
|
+
|
|
8338
|
+
/**
|
|
8339
|
+
* Service for cached record resolution.
|
|
8340
|
+
*
|
|
8341
|
+
* Centralizes all record fetching with automatic caching to avoid
|
|
8342
|
+
* redundant database queries across services (relation, rollup, formulas).
|
|
8343
|
+
*
|
|
8344
|
+
* Also provides factory methods for creating resolver interfaces used by
|
|
8345
|
+
* helpers (label computation, rollup cascade).
|
|
8346
|
+
*
|
|
8347
|
+
* @example
|
|
8348
|
+
* ```typescript
|
|
8349
|
+
* const resolver = new RecordResolverService(adapter);
|
|
8350
|
+
*
|
|
8351
|
+
* // Cached record fetching
|
|
8352
|
+
* const record = await resolver.findById("rec-123");
|
|
8353
|
+
* const records = await resolver.findByIds(["rec-1", "rec-2"]);
|
|
8354
|
+
*
|
|
8355
|
+
* // Factory methods for helpers
|
|
8356
|
+
* const labelResolver = resolver.createLabelResolver(relationService);
|
|
8357
|
+
* const rollupContext = resolver.createRollupContext(rollupService, schemaService);
|
|
8358
|
+
* ```
|
|
8359
|
+
*/
|
|
8360
|
+
declare class RecordResolverService extends BaseService {
|
|
8361
|
+
constructor(adapter: DatabaseAdapter);
|
|
8362
|
+
/**
|
|
8363
|
+
* Find a record by ID with caching.
|
|
8364
|
+
*
|
|
8365
|
+
* Uses the shared record cache for optimal performance.
|
|
8366
|
+
* Delegates to findByIds for consistent cache handling.
|
|
8367
|
+
*
|
|
8368
|
+
* @param id - Record ID
|
|
8369
|
+
* @returns Record or null if not found
|
|
8370
|
+
*/
|
|
8371
|
+
findById(id: string): Promise<ObjectRecord | null>;
|
|
8372
|
+
/**
|
|
8373
|
+
* Find multiple records by IDs with caching.
|
|
8374
|
+
*
|
|
8375
|
+
* Each record is cached individually for reuse across services.
|
|
8376
|
+
* Only fetches records not already in cache.
|
|
8377
|
+
*
|
|
8378
|
+
* @param ids - Record IDs to fetch
|
|
8379
|
+
* @returns Array of found records (missing IDs are not included)
|
|
8380
|
+
*/
|
|
8381
|
+
findByIds(ids: string[]): Promise<ObjectRecord[]>;
|
|
8382
|
+
/**
|
|
8383
|
+
* Create a RelationLabelResolver callback for computeLabelWithRelations.
|
|
8384
|
+
*
|
|
8385
|
+
* Used by RelationService.resolveLabel() and ObjectSchemaService.
|
|
8386
|
+
*
|
|
8387
|
+
* @returns Callback that resolves record IDs to their labels (cached)
|
|
8388
|
+
*/
|
|
8389
|
+
createRelationLabelResolver(): RelationLabelResolver;
|
|
8390
|
+
/**
|
|
8391
|
+
* Create a LabelResolver interface for label computation helpers.
|
|
8392
|
+
*
|
|
8393
|
+
* Used by RecordService for computing record labels.
|
|
8394
|
+
*
|
|
8395
|
+
* @param relationService - RelationService for resolving relation display labels
|
|
8396
|
+
* @returns LabelResolver interface with cached record fetching
|
|
8397
|
+
*/
|
|
8398
|
+
createLabelResolver(relationService: RelationService): LabelResolver;
|
|
8399
|
+
/**
|
|
8400
|
+
* Create a RollupCascadeContext for rollup recalculation.
|
|
8401
|
+
*
|
|
8402
|
+
* Used by RecordService after create/update/delete operations.
|
|
8403
|
+
*
|
|
8404
|
+
* @param rollupService - RollupService for recalculating rollups
|
|
8405
|
+
* @param schemaService - ObjectSchemaService for fetching schemas
|
|
8406
|
+
* @returns Context with cached record fetching
|
|
8407
|
+
*/
|
|
8408
|
+
createRollupContext(rollupService: RollupService, schemaService: ObjectSchemaService): RollupCascadeContext;
|
|
8409
|
+
}
|
|
8410
|
+
|
|
8411
|
+
/**
|
|
8412
|
+
* Result of relation validation
|
|
8413
|
+
*/
|
|
8414
|
+
interface RelationValidationResult {
|
|
8415
|
+
valid: boolean;
|
|
8416
|
+
errors: RelationValidationError[];
|
|
8417
|
+
}
|
|
8418
|
+
/**
|
|
8419
|
+
* Individual relation validation error
|
|
8420
|
+
*/
|
|
8421
|
+
interface RelationValidationError {
|
|
8422
|
+
/** Attribute name */
|
|
8423
|
+
attribute: string;
|
|
8424
|
+
/** Error message */
|
|
8425
|
+
message: string;
|
|
8426
|
+
/** Invalid record IDs */
|
|
8427
|
+
invalidIds?: string[];
|
|
8428
|
+
}
|
|
8429
|
+
/**
|
|
8430
|
+
* Resolved relation option
|
|
8431
|
+
*
|
|
8432
|
+
* SECURITY: This type intentionally excludes raw record data.
|
|
8433
|
+
* Only the computed label is exposed to prevent unauthorized data access
|
|
8434
|
+
* through relation lookups. Users must have explicit read permissions
|
|
8435
|
+
* on an object to access its record data.
|
|
8436
|
+
*/
|
|
8437
|
+
interface RelationOption {
|
|
8438
|
+
/** Record ID */
|
|
8439
|
+
id: string;
|
|
8440
|
+
/** Object ID */
|
|
8441
|
+
objectId: string;
|
|
8442
|
+
/** Object name (technical name) */
|
|
8443
|
+
objectName: string;
|
|
8444
|
+
/** Object label (display name) */
|
|
8445
|
+
objectLabel: string;
|
|
8446
|
+
/** Object icon */
|
|
8447
|
+
objectIcon?: string;
|
|
8448
|
+
/** Display label (computed from labelExpression) */
|
|
8449
|
+
label: string;
|
|
8450
|
+
}
|
|
8451
|
+
/**
|
|
8452
|
+
* Response for relation options
|
|
8453
|
+
*/
|
|
8454
|
+
interface RelationOptionsResponse {
|
|
8455
|
+
options: RelationOption[];
|
|
8456
|
+
hasMore: boolean;
|
|
8457
|
+
total: number;
|
|
8458
|
+
}
|
|
8459
|
+
/**
|
|
8460
|
+
* Parameters for fetching relation options
|
|
8461
|
+
*/
|
|
8462
|
+
interface GetRelationOptionsParams {
|
|
8463
|
+
/** Search query */
|
|
8464
|
+
query?: string;
|
|
8465
|
+
/** Page number (1-based) */
|
|
8466
|
+
page?: number;
|
|
8467
|
+
/** Page size */
|
|
8468
|
+
pageSize?: number;
|
|
8469
|
+
/** Filter by specific target object */
|
|
8470
|
+
targetObject?: string;
|
|
8471
|
+
/** Additional filter to apply (e.g., workflow context filtering) */
|
|
8472
|
+
filter?: FilterState;
|
|
8473
|
+
}
|
|
8474
|
+
/**
|
|
8475
|
+
* Options for RelationService constructor
|
|
8476
|
+
*/
|
|
8477
|
+
interface RelationServiceOptions {
|
|
8478
|
+
/**
|
|
8479
|
+
* Record query service for fetching relation options.
|
|
8480
|
+
* Required for getOptions() to work.
|
|
8481
|
+
* If not provided, getOptions() will throw.
|
|
8482
|
+
*/
|
|
8483
|
+
queryService?: RecordQueryService;
|
|
8484
|
+
/**
|
|
8485
|
+
* Record resolver for cached record fetching.
|
|
8486
|
+
* Required for cached access to records.
|
|
8487
|
+
*/
|
|
8488
|
+
recordResolver: RecordResolverService;
|
|
8489
|
+
}
|
|
8490
|
+
/**
|
|
8491
|
+
* Request item for batch relation resolution
|
|
8492
|
+
*/
|
|
8493
|
+
interface ResolveIdsBatchRequest {
|
|
8494
|
+
/** Relation attribute ID */
|
|
8495
|
+
attributeId: string;
|
|
8496
|
+
/** Record IDs to resolve for this attribute */
|
|
8497
|
+
ids: string[];
|
|
8498
|
+
}
|
|
8499
|
+
/**
|
|
8500
|
+
* Response for batch relation resolution
|
|
8501
|
+
* Maps attributeId to resolved options
|
|
8502
|
+
*/
|
|
8503
|
+
interface ResolveIdsBatchResponse {
|
|
8504
|
+
[attributeId: string]: RelationOption[];
|
|
8505
|
+
}
|
|
8294
8506
|
/**
|
|
8295
8507
|
* Service for validating relation attributes.
|
|
8296
8508
|
* Ensures referenced records exist and belong to valid target objects.
|
|
@@ -8302,7 +8514,8 @@ interface ResolveIdsBatchResponse {
|
|
|
8302
8514
|
declare class RelationService extends BaseService {
|
|
8303
8515
|
private schemaService;
|
|
8304
8516
|
private queryService?;
|
|
8305
|
-
|
|
8517
|
+
private recordResolver;
|
|
8518
|
+
constructor(adapter: DatabaseAdapter, nativeRegistry: typeof registry, options: RelationServiceOptions);
|
|
8306
8519
|
/**
|
|
8307
8520
|
* Set the query service after construction.
|
|
8308
8521
|
* Useful for breaking circular dependencies during initialization.
|
|
@@ -8414,239 +8627,117 @@ declare class RelationService extends BaseService {
|
|
|
8414
8627
|
* // { "attr-company": [...], "attr-contact": [...] }
|
|
8415
8628
|
* ```
|
|
8416
8629
|
*/
|
|
8417
|
-
resolveIdsBatch(requests: ResolveIdsBatchRequest[]): Promise<ResolveIdsBatchResponse>;
|
|
8418
|
-
/**
|
|
8419
|
-
* Internal method to fetch and resolve multiple composite IDs at once.
|
|
8420
|
-
* Optimized for batch operations - single DB query for all records.
|
|
8421
|
-
*/
|
|
8422
|
-
private fetchResolveIdsBatch;
|
|
8423
|
-
/**
|
|
8424
|
-
* Internal method to fetch and resolve relation IDs (no caching).
|
|
8425
|
-
* Uses batch fetching for performance - fetches all records in one query,
|
|
8426
|
-
* then groups by objectId to minimize schema lookups.
|
|
8427
|
-
*/
|
|
8428
|
-
private fetchResolveIds;
|
|
8429
|
-
/**
|
|
8430
|
-
* Find a relation attribute by ID.
|
|
8431
|
-
* Results are cached if a CacheAdapter is configured.
|
|
8432
|
-
* Cache is invalidated by ObjectSchemaService.invalidateSchemaCache() via allAttributes pattern.
|
|
8433
|
-
*/
|
|
8434
|
-
findAttributeById(attributeId: string): Promise<RelationAttribute | null>;
|
|
8435
|
-
/**
|
|
8436
|
-
* Internal method to fetch attribute by ID (no caching)
|
|
8437
|
-
*/
|
|
8438
|
-
private fetchAttributeById;
|
|
8439
|
-
}
|
|
8440
|
-
|
|
8441
|
-
/**
|
|
8442
|
-
* Resolved relation values for a record
|
|
8443
|
-
* Maps relation attribute name to the resolved record's values
|
|
8444
|
-
*/
|
|
8445
|
-
type ResolvedRelations = Record<string, Record<string, unknown>>;
|
|
8446
|
-
/**
|
|
8447
|
-
* Service for resolving relation values from related records
|
|
8448
|
-
*
|
|
8449
|
-
* Used by formula evaluation to access values from related records
|
|
8450
|
-
* (e.g., "company.name" in a formula on an order)
|
|
8451
|
-
*/
|
|
8452
|
-
declare class RelationResolverService {
|
|
8453
|
-
private adapter;
|
|
8454
|
-
constructor(adapter: DatabaseAdapter);
|
|
8455
|
-
/**
|
|
8456
|
-
* Resolve values from related records for formula evaluation
|
|
8457
|
-
*
|
|
8458
|
-
* Phase 2: Supports 1 level of relation traversal only
|
|
8459
|
-
*
|
|
8460
|
-
* @param record - The source record
|
|
8461
|
-
* @param schema - Schema of the source object
|
|
8462
|
-
* @param relationNames - Names of relation attributes to resolve
|
|
8463
|
-
* @returns Map of relation name to related record's values
|
|
8464
|
-
*
|
|
8465
|
-
* @example
|
|
8466
|
-
* ```typescript
|
|
8467
|
-
* // For an order with company relation
|
|
8468
|
-
* const resolved = await resolver.resolveRelationValues(
|
|
8469
|
-
* orderRecord,
|
|
8470
|
-
* orderSchema,
|
|
8471
|
-
* ["company"]
|
|
8472
|
-
* );
|
|
8473
|
-
* // → { company: { id: "...", name: "Acme Corp", ... } }
|
|
8474
|
-
* ```
|
|
8475
|
-
*/
|
|
8476
|
-
resolveRelationValues(record: ObjectRecord, schema: ObjectDefinition, relationNames: string[]): Promise<ResolvedRelations>;
|
|
8477
|
-
/**
|
|
8478
|
-
* Resolve relation values for multiple records (batched)
|
|
8479
|
-
*
|
|
8480
|
-
* Optimized for list operations - fetches all related records in one batch
|
|
8481
|
-
*
|
|
8482
|
-
* @param records - Source records
|
|
8483
|
-
* @param schema - Schema of the source object
|
|
8484
|
-
* @param relationNames - Names of relation attributes to resolve
|
|
8485
|
-
* @returns Map of record ID to resolved relations
|
|
8486
|
-
*/
|
|
8487
|
-
resolveRelationValuesForMany(records: ObjectRecord[], schema: ObjectDefinition, relationNames: string[]): Promise<Map<string, ResolvedRelations>>;
|
|
8488
|
-
/**
|
|
8489
|
-
* Flatten resolved relations for formula evaluation
|
|
8490
|
-
*
|
|
8491
|
-
* Converts nested structure to dot-notation keys:
|
|
8492
|
-
* { company: { name: "Acme" } } → { "company.name": "Acme" }
|
|
8493
|
-
*
|
|
8494
|
-
* @param resolved - Resolved relations from resolveRelationValues
|
|
8495
|
-
* @returns Flattened values suitable for formula evaluation
|
|
8496
|
-
*/
|
|
8497
|
-
flattenResolvedRelations(resolved: ResolvedRelations): Record<string, unknown>;
|
|
8498
|
-
/**
|
|
8499
|
-
* Extract a single relation ID from a value
|
|
8500
|
-
* Handles both single (string) and multi (array) relations
|
|
8501
|
-
* @internal
|
|
8502
|
-
*/
|
|
8503
|
-
private extractSingleId;
|
|
8504
|
-
}
|
|
8505
|
-
|
|
8506
|
-
/**
|
|
8507
|
-
* Result of a rollup calculation
|
|
8508
|
-
*/
|
|
8509
|
-
interface RollupResult {
|
|
8510
|
-
/** Computed value */
|
|
8511
|
-
value: unknown;
|
|
8512
|
-
/** Number of records that contributed to the calculation */
|
|
8513
|
-
recordCount: number;
|
|
8514
|
-
}
|
|
8515
|
-
/**
|
|
8516
|
-
* Service for calculating rollup attribute values
|
|
8517
|
-
*
|
|
8518
|
-
* Rollups aggregate values from related records (e.g., sum of order amounts
|
|
8519
|
-
* for a company). They are calculated when needed and can be materialized
|
|
8520
|
-
* (stored) for performance.
|
|
8521
|
-
*
|
|
8522
|
-
* Supports optional caching via CacheAdapter for improved performance.
|
|
8523
|
-
* Rollup values have a short TTL (2 minutes) due to high volatility.
|
|
8524
|
-
*
|
|
8525
|
-
* Phase 3: Supports single-level relation rollups
|
|
8526
|
-
*/
|
|
8527
|
-
declare class RollupService extends BaseService {
|
|
8528
|
-
constructor(adapter: DatabaseAdapter);
|
|
8529
|
-
/**
|
|
8530
|
-
* Calculate a rollup value for a record
|
|
8531
|
-
*
|
|
8532
|
-
* Results are cached if a CacheAdapter is configured.
|
|
8533
|
-
*
|
|
8534
|
-
* @param recordId - ID of the parent record
|
|
8535
|
-
* @param rollupAttr - Rollup attribute definition
|
|
8536
|
-
* @param schema - Schema of the parent object
|
|
8537
|
-
* @returns Computed rollup value
|
|
8538
|
-
*
|
|
8539
|
-
* @example
|
|
8540
|
-
* ```typescript
|
|
8541
|
-
* // Sum all order amounts for a company
|
|
8542
|
-
* const totalOrders = await rollupService.calculate(
|
|
8543
|
-
* "company-123",
|
|
8544
|
-
* {
|
|
8545
|
-
* type: "rollup",
|
|
8546
|
-
* name: "totalOrders",
|
|
8547
|
-
* relationAttribute: "orders",
|
|
8548
|
-
* targetAttribute: "amount",
|
|
8549
|
-
* function: "sum",
|
|
8550
|
-
* ...
|
|
8551
|
-
* },
|
|
8552
|
-
* companySchema
|
|
8553
|
-
* );
|
|
8554
|
-
* ```
|
|
8555
|
-
*/
|
|
8556
|
-
calculate(recordId: string, rollupAttr: RollupAttribute, schema: ObjectDefinition): Promise<RollupResult>;
|
|
8557
|
-
/**
|
|
8558
|
-
* Internal method to compute rollup value (no caching)
|
|
8559
|
-
*/
|
|
8560
|
-
private computeRollup;
|
|
8561
|
-
/**
|
|
8562
|
-
* Forward pattern: this record has a relation attribute pointing to other records
|
|
8563
|
-
* Example: entreprise222 has relation "entreprises" → companies, rollup collects from companies
|
|
8564
|
-
*/
|
|
8565
|
-
private calculateForward;
|
|
8566
|
-
/**
|
|
8567
|
-
* Reverse pattern: other records have a relation pointing to this record
|
|
8568
|
-
* Example: Company has rollup on "orders", Order has relation "company" → companies
|
|
8569
|
-
*/
|
|
8570
|
-
private calculateReverse;
|
|
8571
|
-
/**
|
|
8572
|
-
* Extract and aggregate values from related records
|
|
8573
|
-
*/
|
|
8574
|
-
private aggregateValues;
|
|
8575
|
-
/**
|
|
8576
|
-
* Calculate rollup values for multiple records (batched)
|
|
8577
|
-
*
|
|
8578
|
-
* More efficient than calling calculate() for each record individually.
|
|
8579
|
-
*/
|
|
8580
|
-
calculateForMany(recordIds: string[], rollupAttr: RollupAttribute, schema: ObjectDefinition): Promise<Map<string, RollupResult>>;
|
|
8581
|
-
/**
|
|
8582
|
-
* Apply aggregation function to a set of values
|
|
8583
|
-
*/
|
|
8584
|
-
private aggregate;
|
|
8585
|
-
/**
|
|
8586
|
-
* Get the default empty value for a rollup function
|
|
8587
|
-
*/
|
|
8588
|
-
private getEmptyValue;
|
|
8630
|
+
resolveIdsBatch(requests: ResolveIdsBatchRequest[]): Promise<ResolveIdsBatchResponse>;
|
|
8589
8631
|
/**
|
|
8590
|
-
*
|
|
8632
|
+
* Internal method to resolve multiple composite IDs at once.
|
|
8633
|
+
* Optimized for batch operations - single DB query for all records.
|
|
8634
|
+
*
|
|
8635
|
+
* @param compositeIds - Array of composite IDs in format "attributeId:recordId"
|
|
8591
8636
|
*/
|
|
8592
|
-
private
|
|
8637
|
+
private resolveCompositeIds;
|
|
8593
8638
|
/**
|
|
8594
|
-
*
|
|
8639
|
+
* Resolve the display label for a record.
|
|
8640
|
+
* Uses custom template if provided, otherwise falls back to pre-computed label.
|
|
8595
8641
|
*/
|
|
8596
|
-
private
|
|
8642
|
+
private resolveLabel;
|
|
8597
8643
|
/**
|
|
8598
|
-
*
|
|
8644
|
+
* Find a relation attribute by ID.
|
|
8645
|
+
* Results are cached if a CacheAdapter is configured.
|
|
8646
|
+
* Cache is invalidated by ObjectSchemaService.invalidateSchemaCache() via allAttributes pattern.
|
|
8599
8647
|
*/
|
|
8600
|
-
|
|
8648
|
+
findAttributeById(attributeId: string): Promise<RelationAttribute | null>;
|
|
8601
8649
|
/**
|
|
8602
|
-
*
|
|
8650
|
+
* Internal method to fetch attribute by ID (no caching)
|
|
8603
8651
|
*/
|
|
8604
|
-
private
|
|
8652
|
+
private fetchAttributeById;
|
|
8653
|
+
}
|
|
8654
|
+
|
|
8655
|
+
/**
|
|
8656
|
+
* Resolved relation values for a record
|
|
8657
|
+
* Maps relation attribute name to the resolved record's values
|
|
8658
|
+
*/
|
|
8659
|
+
type ResolvedRelations = Record<string, Record<string, unknown>>;
|
|
8660
|
+
/**
|
|
8661
|
+
* Options for FormulaResolverService constructor
|
|
8662
|
+
*/
|
|
8663
|
+
interface FormulaResolverServiceOptions {
|
|
8605
8664
|
/**
|
|
8606
|
-
*
|
|
8607
|
-
*
|
|
8608
|
-
* Called after related records change to keep rollups up-to-date.
|
|
8665
|
+
* Record resolver for cached record fetching.
|
|
8666
|
+
* Required for cached access to records.
|
|
8609
8667
|
*/
|
|
8610
|
-
|
|
8668
|
+
recordResolver: RecordResolverService;
|
|
8669
|
+
}
|
|
8670
|
+
/**
|
|
8671
|
+
* Service for resolving relation values from related records.
|
|
8672
|
+
*
|
|
8673
|
+
* Used by formula evaluation to access values from related records
|
|
8674
|
+
* (e.g., "company.name" in a formula on an order).
|
|
8675
|
+
*
|
|
8676
|
+
* Supports optional RecordResolverService injection for cached record fetching.
|
|
8677
|
+
*
|
|
8678
|
+
* @example
|
|
8679
|
+
* ```typescript
|
|
8680
|
+
* const resolver = new FormulaResolverService(adapter, { recordResolver });
|
|
8681
|
+
*
|
|
8682
|
+
* // Resolve relation values for formula evaluation
|
|
8683
|
+
* const resolved = await resolver.resolveRelationValues(
|
|
8684
|
+
* orderRecord,
|
|
8685
|
+
* orderSchema,
|
|
8686
|
+
* ["company"]
|
|
8687
|
+
* );
|
|
8688
|
+
* // → { company: { id: "...", name: "Acme Corp", ... } }
|
|
8689
|
+
* ```
|
|
8690
|
+
*/
|
|
8691
|
+
declare class FormulaResolverService extends BaseService {
|
|
8692
|
+
private recordResolver;
|
|
8693
|
+
constructor(adapter: DatabaseAdapter, options: FormulaResolverServiceOptions);
|
|
8611
8694
|
/**
|
|
8612
|
-
*
|
|
8695
|
+
* Resolve values from related records for formula evaluation
|
|
8613
8696
|
*
|
|
8614
|
-
*
|
|
8615
|
-
* a child record is created, updated, or deleted.
|
|
8697
|
+
* Supports 1 level of relation traversal only.
|
|
8616
8698
|
*
|
|
8617
|
-
* @param
|
|
8618
|
-
* @param
|
|
8619
|
-
* @
|
|
8620
|
-
|
|
8621
|
-
findAffectedParentRecords(changedRecord: ObjectRecord, changedSchema: ObjectDefinition): Promise<string[]>;
|
|
8622
|
-
/**
|
|
8623
|
-
* Invalidate cached rollups for affected parent records.
|
|
8624
|
-
* Call this after a child record is created, updated, or deleted.
|
|
8699
|
+
* @param record - The source record
|
|
8700
|
+
* @param schema - Schema of the source object
|
|
8701
|
+
* @param relationNames - Names of relation attributes to resolve
|
|
8702
|
+
* @returns Map of relation name to related record's values
|
|
8625
8703
|
*
|
|
8626
|
-
* @
|
|
8704
|
+
* @example
|
|
8705
|
+
* ```typescript
|
|
8706
|
+
* const resolved = await resolver.resolveRelationValues(
|
|
8707
|
+
* orderRecord,
|
|
8708
|
+
* orderSchema,
|
|
8709
|
+
* ["company"]
|
|
8710
|
+
* );
|
|
8711
|
+
* // → { company: { id: "...", name: "Acme Corp", ... } }
|
|
8712
|
+
* ```
|
|
8627
8713
|
*/
|
|
8628
|
-
|
|
8714
|
+
resolveRelationValues(record: ObjectRecord, schema: ObjectDefinition, relationNames: string[]): Promise<ResolvedRelations>;
|
|
8629
8715
|
/**
|
|
8630
|
-
*
|
|
8631
|
-
*
|
|
8716
|
+
* Resolve relation values for multiple records (batched)
|
|
8717
|
+
*
|
|
8718
|
+
* Optimized for list operations - fetches all related records in one batch
|
|
8719
|
+
*
|
|
8720
|
+
* @param records - Source records
|
|
8721
|
+
* @param schema - Schema of the source object
|
|
8722
|
+
* @param relationNames - Names of relation attributes to resolve
|
|
8723
|
+
* @returns Map of record ID to resolved relations
|
|
8632
8724
|
*/
|
|
8633
|
-
|
|
8725
|
+
resolveRelationValuesForMany(records: ObjectRecord[], schema: ObjectDefinition, relationNames: string[]): Promise<Map<string, ResolvedRelations>>;
|
|
8634
8726
|
/**
|
|
8635
|
-
*
|
|
8636
|
-
*
|
|
8637
|
-
* Forward rollups are rollups where the record has a relation attribute
|
|
8638
|
-
* pointing to another object, and the rollup aggregates values from that target.
|
|
8639
|
-
* When the target record changes, we need to recalculate these rollups.
|
|
8727
|
+
* Flatten resolved relations for formula evaluation
|
|
8640
8728
|
*
|
|
8641
|
-
*
|
|
8642
|
-
*
|
|
8643
|
-
* all Orders pointing to that Company need their rollup recalculated.
|
|
8729
|
+
* Converts nested structure to dot-notation keys:
|
|
8730
|
+
* { company: { name: "Acme" } } → { "company.name": "Acme" }
|
|
8644
8731
|
*
|
|
8645
|
-
* @param
|
|
8646
|
-
* @
|
|
8647
|
-
* @returns Array of records that need their forward rollups recalculated
|
|
8732
|
+
* @param resolved - Resolved relations from resolveRelationValues
|
|
8733
|
+
* @returns Flattened values suitable for formula evaluation
|
|
8648
8734
|
*/
|
|
8649
|
-
|
|
8735
|
+
flattenResolvedRelations(resolved: ResolvedRelations): Record<string, unknown>;
|
|
8736
|
+
/**
|
|
8737
|
+
* Extract a single relation ID from a value
|
|
8738
|
+
* Handles both single (string) and multi (array) relations
|
|
8739
|
+
*/
|
|
8740
|
+
private extractSingleId;
|
|
8650
8741
|
}
|
|
8651
8742
|
|
|
8652
8743
|
/**
|
|
@@ -8657,6 +8748,8 @@ interface RollupSchedulerOptions {
|
|
|
8657
8748
|
debounceMs?: number;
|
|
8658
8749
|
/** Maximum pending recalculations before forced flush (default: 100) */
|
|
8659
8750
|
maxPending?: number;
|
|
8751
|
+
/** Record resolver for cached record fetching (required) */
|
|
8752
|
+
recordResolver: RecordResolverService;
|
|
8660
8753
|
}
|
|
8661
8754
|
/**
|
|
8662
8755
|
* Scheduler for debouncing rollup recalculations
|
|
@@ -8666,7 +8759,8 @@ interface RollupSchedulerOptions {
|
|
|
8666
8759
|
*
|
|
8667
8760
|
* @example
|
|
8668
8761
|
* ```typescript
|
|
8669
|
-
* const scheduler = new RollupScheduler(adapter, {
|
|
8762
|
+
* const scheduler = new RollupScheduler(adapter, getSchemaById, {
|
|
8763
|
+
* recordResolver,
|
|
8670
8764
|
* debounceMs: 100,
|
|
8671
8765
|
* maxPending: 50,
|
|
8672
8766
|
* });
|
|
@@ -8686,7 +8780,7 @@ declare class RollupScheduler {
|
|
|
8686
8780
|
private rollupService;
|
|
8687
8781
|
private debounceMs;
|
|
8688
8782
|
private maxPending;
|
|
8689
|
-
constructor(adapter: DatabaseAdapter, getSchemaById: (id: string) => Promise<ObjectDefinition | null>, options
|
|
8783
|
+
constructor(adapter: DatabaseAdapter, getSchemaById: (id: string) => Promise<ObjectDefinition | null>, options: RollupSchedulerOptions);
|
|
8690
8784
|
/**
|
|
8691
8785
|
* Schedule a rollup recalculation for a parent record.
|
|
8692
8786
|
*
|
|
@@ -8754,32 +8848,19 @@ declare function checkRecordModifyOrThrow(policy: RecordPolicy, record: ObjectRe
|
|
|
8754
8848
|
* Throws PolicyViolationError if denied.
|
|
8755
8849
|
*/
|
|
8756
8850
|
declare function checkRecordDeleteOrThrow(policy: RecordPolicy, record: ObjectRecord, context: PolicyContext): void;
|
|
8757
|
-
|
|
8758
|
-
/**
|
|
8759
|
-
* Interface for resolving relation labels.
|
|
8760
|
-
* Allows dependency injection for testing and decoupling.
|
|
8761
|
-
*/
|
|
8762
|
-
interface LabelResolver {
|
|
8763
|
-
resolveRelationIds(ids: string[], attributeId: string): Promise<Array<{
|
|
8764
|
-
id: string;
|
|
8765
|
-
label: string;
|
|
8766
|
-
}>>;
|
|
8767
|
-
findRecordLabels(ids: string[]): Promise<Array<{
|
|
8768
|
-
id: string;
|
|
8769
|
-
label?: string;
|
|
8770
|
-
}>>;
|
|
8771
|
-
}
|
|
8772
8851
|
/**
|
|
8773
|
-
*
|
|
8774
|
-
* Automatically resolves relation attribute values to their labels
|
|
8775
|
-
* and select/multiselect values to their option labels.
|
|
8852
|
+
* Check if the current tenant can write to an object based on sharing mode.
|
|
8776
8853
|
*
|
|
8777
|
-
*
|
|
8778
|
-
*
|
|
8779
|
-
*
|
|
8780
|
-
* @
|
|
8854
|
+
* Shared objects are read-only for non-owner tenants.
|
|
8855
|
+
* Only the tenant that owns the object (tenant_id) can perform write operations.
|
|
8856
|
+
*
|
|
8857
|
+
* @param objectName - Name of the object (for error messages)
|
|
8858
|
+
* @param sharingMode - Sharing mode of the object
|
|
8859
|
+
* @param objectOwnerTenantId - Tenant ID that owns the object
|
|
8860
|
+
* @param currentTenantId - Current tenant ID from context
|
|
8861
|
+
* @throws ForbiddenError if the object is shared and current tenant is not the owner
|
|
8781
8862
|
*/
|
|
8782
|
-
declare function
|
|
8863
|
+
declare function checkSharedObjectWriteAccess(objectName: string, sharingMode: SharingMode | undefined, objectOwnerTenantId: TenantId, currentTenantId: TenantId): void;
|
|
8783
8864
|
|
|
8784
8865
|
/**
|
|
8785
8866
|
* Enrich a record with computed formula values.
|
|
@@ -8818,32 +8899,6 @@ declare function createContextForDelete(schema: ObjectDefinition, tenantId: stri
|
|
|
8818
8899
|
*/
|
|
8819
8900
|
declare function createContextForRestore(schema: ObjectDefinition, tenantId: string, record: ObjectRecord, metadata?: Record<string, unknown>): HookContext;
|
|
8820
8901
|
|
|
8821
|
-
/**
|
|
8822
|
-
* Context for rollup cascade operations.
|
|
8823
|
-
* Provides the necessary services via dependency injection.
|
|
8824
|
-
*/
|
|
8825
|
-
interface RollupCascadeContext {
|
|
8826
|
-
rollupService: RollupService;
|
|
8827
|
-
schemaService: ObjectSchemaService;
|
|
8828
|
-
findRecordsByIds: (ids: string[]) => Promise<ObjectRecord[]>;
|
|
8829
|
-
}
|
|
8830
|
-
/**
|
|
8831
|
-
* Recalculate rollups after a record changes.
|
|
8832
|
-
*
|
|
8833
|
-
* This handles three cases:
|
|
8834
|
-
* 1. The record itself has rollups (e.g., aggregating from related records it points to)
|
|
8835
|
-
* 2. Parent records have rollups that aggregate from this record (reverse pattern)
|
|
8836
|
-
* 3. Records that have forward rollups pointing to this record (forward pattern)
|
|
8837
|
-
*
|
|
8838
|
-
* Optimized: Pre-loads schemas by objectId to avoid N redundant calls
|
|
8839
|
-
* when multiple records share the same objectId.
|
|
8840
|
-
*
|
|
8841
|
-
* @param record - The record that was modified
|
|
8842
|
-
* @param schema - Schema of the record's object
|
|
8843
|
-
* @param ctx - Context with required services
|
|
8844
|
-
*/
|
|
8845
|
-
declare function recalculateParentRollups(record: ObjectRecord, schema: ObjectDefinition, ctx: RollupCascadeContext): Promise<void>;
|
|
8846
|
-
|
|
8847
8902
|
/**
|
|
8848
8903
|
* Fluent query builder for schema records.
|
|
8849
8904
|
* Supports chained filters, sorts, and pagination.
|
|
@@ -9861,7 +9916,7 @@ declare function flattenRelationsForEval(resolvedRelations: ResolvedRelations):
|
|
|
9861
9916
|
* // → "Acme Corp - ORD-001"
|
|
9862
9917
|
* ```
|
|
9863
9918
|
*/
|
|
9864
|
-
declare function evaluateFormulaWithRelations(expression: string, record: ObjectRecord, schema: ObjectDefinition, resolver:
|
|
9919
|
+
declare function evaluateFormulaWithRelations(expression: string, record: ObjectRecord, schema: ObjectDefinition, resolver: FormulaResolverService): Promise<unknown>;
|
|
9865
9920
|
/**
|
|
9866
9921
|
* Evaluate a formula attribute that may contain relation references
|
|
9867
9922
|
*
|
|
@@ -9871,7 +9926,7 @@ declare function evaluateFormulaWithRelations(expression: string, record: Object
|
|
|
9871
9926
|
* @param resolver - Relation resolver service
|
|
9872
9927
|
* @returns Formatted computed value
|
|
9873
9928
|
*/
|
|
9874
|
-
declare function evaluateFormulaAttributeWithRelations(attr: FormulaAttribute, record: ObjectRecord, schema: ObjectDefinition, resolver:
|
|
9929
|
+
declare function evaluateFormulaAttributeWithRelations(attr: FormulaAttribute, record: ObjectRecord, schema: ObjectDefinition, resolver: FormulaResolverService): Promise<unknown>;
|
|
9875
9930
|
|
|
9876
9931
|
/**
|
|
9877
9932
|
* Type of a path segment
|
|
@@ -11382,6 +11437,17 @@ interface SyncResult {
|
|
|
11382
11437
|
interface SyncOptions {
|
|
11383
11438
|
dryRun?: boolean;
|
|
11384
11439
|
verbose?: boolean;
|
|
11440
|
+
/**
|
|
11441
|
+
* Master tenant ID for shared object validation.
|
|
11442
|
+
* If provided, only this tenant can sync shared objects.
|
|
11443
|
+
* If not provided and a shared object is synced, an error will be thrown.
|
|
11444
|
+
*/
|
|
11445
|
+
masterTenantId?: string;
|
|
11446
|
+
/**
|
|
11447
|
+
* Current tenant ID executing the sync.
|
|
11448
|
+
* Required when syncing shared objects to validate against masterTenantId.
|
|
11449
|
+
*/
|
|
11450
|
+
tenantId?: string;
|
|
11385
11451
|
}
|
|
11386
11452
|
/**
|
|
11387
11453
|
* Sync native objects from registry to database
|
|
@@ -11484,98 +11550,4 @@ interface FullSyncOptions extends SyncOptions, ViewSyncOptions {
|
|
|
11484
11550
|
*/
|
|
11485
11551
|
declare function syncAll(adapter: DatabaseAdapter, objectRegistry: typeof registry, nativeViewRegistry: typeof viewRegistry, options?: FullSyncOptions): Promise<FullSyncResult>;
|
|
11486
11552
|
|
|
11487
|
-
/**
|
|
11488
|
-
* Default fallback value when expression resolves to empty string
|
|
11489
|
-
*/
|
|
11490
|
-
declare const DEFAULT_LABEL_FALLBACK = "(Untitled)";
|
|
11491
|
-
declare function renderLabelExpression(template: string, values: Record<string, unknown>, fallback?: string): string;
|
|
11492
|
-
/**
|
|
11493
|
-
* Check if a string is a valid label expression template
|
|
11494
|
-
* A valid template contains at least one {{ variable }} block with a non-empty variable
|
|
11495
|
-
*/
|
|
11496
|
-
declare function isLabelExpression(value: string): boolean;
|
|
11497
|
-
/**
|
|
11498
|
-
* Extract attribute names referenced in a label expression
|
|
11499
|
-
* Useful for validation or dependency tracking
|
|
11500
|
-
*
|
|
11501
|
-
* @example
|
|
11502
|
-
* extractAttributeNames("{{ firstName }} {{ lastName | UPPER }}")
|
|
11503
|
-
* // → ["firstName", "lastName"]
|
|
11504
|
-
*/
|
|
11505
|
-
declare function extractAttributeNames(template: string): string[];
|
|
11506
|
-
/**
|
|
11507
|
-
* Enrich record values by formatting complex types for display
|
|
11508
|
-
*
|
|
11509
|
-
* Transforms raw values (objects, dates, etc.) into human-readable strings
|
|
11510
|
-
* for use in label expression rendering. Uses formatAttributeValue internally.
|
|
11511
|
-
*
|
|
11512
|
-
* @param values - Record values containing raw attribute values
|
|
11513
|
-
* @param attributes - Attribute definitions for formatting
|
|
11514
|
-
* @returns New object with complex values formatted as strings
|
|
11515
|
-
*
|
|
11516
|
-
* @example
|
|
11517
|
-
* ```typescript
|
|
11518
|
-
* const enriched = enrichValuesForDisplay(
|
|
11519
|
-
* { status: "active", price: { value: 1500, code: "EUR" } },
|
|
11520
|
-
* [
|
|
11521
|
-
* { type: "select", name: "status", options: [{ value: "active", label: "Active" }] },
|
|
11522
|
-
* { type: "currency", name: "price" }
|
|
11523
|
-
* ]
|
|
11524
|
-
* );
|
|
11525
|
-
* // → { status: "Active", price: "1,500.00 EUR" }
|
|
11526
|
-
* ```
|
|
11527
|
-
*/
|
|
11528
|
-
declare function enrichValuesForDisplay(values: Record<string, unknown>, attributes: Attribute[]): Record<string, unknown>;
|
|
11529
|
-
/**
|
|
11530
|
-
* @deprecated Use `enrichValuesForDisplay` instead
|
|
11531
|
-
*/
|
|
11532
|
-
declare const enrichValuesWithSelectLabels: typeof enrichValuesForDisplay;
|
|
11533
|
-
/**
|
|
11534
|
-
* Extract relation IDs from a value (string or array)
|
|
11535
|
-
* For cardinality "many", only the first ID is extracted for label display
|
|
11536
|
-
*
|
|
11537
|
-
* @param val - Relation value (string ID or array of IDs)
|
|
11538
|
-
* @returns Array of IDs (max 1 element for display purposes)
|
|
11539
|
-
*
|
|
11540
|
-
* @example
|
|
11541
|
-
* ```typescript
|
|
11542
|
-
* extractRelationIds("rec-123") // → ["rec-123"]
|
|
11543
|
-
* extractRelationIds(["rec-1", "rec-2"]) // → ["rec-1"]
|
|
11544
|
-
* extractRelationIds(null) // → []
|
|
11545
|
-
* ```
|
|
11546
|
-
*/
|
|
11547
|
-
declare function extractRelationIds(val: unknown): string[];
|
|
11548
|
-
/**
|
|
11549
|
-
* Resolver function type for fetching relation labels
|
|
11550
|
-
* Takes an array of record IDs and returns a map of ID → label
|
|
11551
|
-
*/
|
|
11552
|
-
type RelationLabelResolver = (ids: string[]) => Promise<Map<string, string>>;
|
|
11553
|
-
/**
|
|
11554
|
-
* Compute a label from a template with full relation resolution (1 level deep)
|
|
11555
|
-
*
|
|
11556
|
-
* Uses pre-computed record.label for nested relations to avoid infinite recursion.
|
|
11557
|
-
* This function enriches select/multiselect values AND resolves relation IDs to their labels.
|
|
11558
|
-
*
|
|
11559
|
-
* @param template - Label expression template (e.g., "{{ company }} - {{ name }}")
|
|
11560
|
-
* @param values - Record values to interpolate
|
|
11561
|
-
* @param attributes - Attribute definitions for the object
|
|
11562
|
-
* @param resolveRelationIds - Function to resolve record IDs to their labels
|
|
11563
|
-
* @returns The rendered label string
|
|
11564
|
-
*
|
|
11565
|
-
* @example
|
|
11566
|
-
* ```typescript
|
|
11567
|
-
* const label = await computeLabelWithRelations(
|
|
11568
|
-
* "{{ company }} - {{ name }}",
|
|
11569
|
-
* { company: "rec-123", name: "Product A" },
|
|
11570
|
-
* objectSchema.attributes,
|
|
11571
|
-
* async (ids) => {
|
|
11572
|
-
* const records = await adapter.objectRecords.findByIds(ids);
|
|
11573
|
-
* return new Map(records.map(r => [r.id, r.label]));
|
|
11574
|
-
* }
|
|
11575
|
-
* );
|
|
11576
|
-
* // → "Acme Corp - Product A"
|
|
11577
|
-
* ```
|
|
11578
|
-
*/
|
|
11579
|
-
declare function computeLabelWithRelations(template: string, values: Record<string, unknown>, attributes: Attribute[], resolveRelationIds: RelationLabelResolver): Promise<string>;
|
|
11580
|
-
|
|
11581
|
-
export { type FlowRow as $, type Attribute as A, type DirectTableTab as B, type CheckboxAttribute as C, type DateAttribute as D, type WorkflowConfig as E, type FileAttribute as F, type Group as G, type SlotMode as H, type InferAttributeValue as I, type AuthMethod as J, type AuthChannel as K, type LocationAttribute as L, type MultiselectAttribute as M, type NumberAttribute as N, type ObjectAction as O, type PhoneAttribute as P, type ParticipantTemplate as Q, type RichtextAttribute as R, type SystemResource as S, type TextAttribute as T, type UserAttribute as U, type ViewLayout as V, type WorkflowTheme as W, type ConditionGroup as X, type ConditionRule as Y, type WorkflowNode as Z, type WorkflowDefinition as _, type SystemAction as a, type AuditServiceOptions as a$, type BlockNoteContent as a0, type AIMessageRole as a1, type AIThinkingLevel as a2, type AIToolCallStatus as a3, type AIToolCall as a4, type AIChatMessagePartType as a5, type TextPartData as a6, type ToolPartData as a7, type ThinkingPartData as a8, type ReasoningPartData as a9, RELATION_TARGET_ANY as aA, type RelationAttribute as aB, isUniversalRelation as aC, type BlockNoteBlock as aD, type BlockNoteCustomInlineContent as aE, type BlockNoteDefaultProps as aF, type BlockNoteInlineContent as aG, type BlockNoteLink as aH, type BlockNoteStyledText as aI, type BlockNoteStyles as aJ, type BlockNoteTableCell as aK, type BlockNoteTableCellProps as aL, type BlockNoteTableContent as aM, type PartialBlockNoteBlock as aN, type PartialBlockNoteContent as aO, type PartialBlockNoteInlineContent as aP, type PartialBlockNoteLink as aQ, type PartialBlockNoteStyledText as aR, type PartialBlockNoteTableCell as aS, type PartialBlockNoteTableContent as aT, type AuditResourceType as aU, type AuditAction as aV, type AuditActorType as aW, type AuditChange as aX, type AuditLogEntry as aY, type CreateAuditLogInput as aZ, type AuditListOptions as a_, type AIChatMessagePart as aa, type AIChatMessage as ab, type AIQuestionType as ac, type AIQuestionOption as ad, type AIQuestion as ae, type AIQuestionAnswer as af, type AITodoStatus as ag, type AITodoItem as ah, type AITodoList as ai, type AIConversation as aj, type AIMessage as ak, type AIToolCallRecord as al, type AIUserMemory as am, type AIUsageMetrics as an, type AIProviderMetrics as ao, type CreateAIMessageInput as ap, type StatusGroup as aq, type AttributeGroup as ar, type BaseAttribute as as, type NumberUnit as at, type DateFormat as au, type DateValue as av, type Phone as aw, type Currency as ax, type Location as ay, type LocationGranularity as az, type TextAreaAttribute as b, type ExtractRecordUpdate as b$, type StorageProvider as b0, type FileVisibility as b1, type File as b2, type CreateFile as b3, type UpdateFile as b4, type TextFilterOperator as b5, type NumberFilterOperator as b6, type CheckboxFilterOperator as b7, type DateFilterOperator as b8, type SelectFilterOperator as b9, type FlowDefinition as bA, isFlowDefinition as bB, isFlowPublished as bC, isSystemFlow as bD, type GeocodingSuggestion as bE, type GeocodingAutocompleteParams as bF, type ReverseGeocodingParams as bG, type GeocodingParams as bH, type GeocodingAdapter as bI, NoopGeocodingAdapter as bJ, type AttributeSchema as bK, type InferRecordFromSchema as bL, type InferRecordWithRequirements as bM, type TypedAttribute as bN, type AttributeMap as bO, type AddAttribute as bP, type InferRecord as bQ, type InferRecordInput as bR, type InferRecordUpdate as bS, type CustomAttributeValue as bT, type WithCustomAttributes as bU, type RecordMetadata as bV, type SystemFields as bW, type ExtractRecord as bX, type ExtractRecordStrict as bY, type ExtractRecordInput as bZ, type ExtractRecordInputStrict as b_, type MultiselectFilterOperator as ba, type RelationFilterOperator as bb, type FilterOperator as bc, type RelativeDateValue as bd, type CurrencyFilterValue as be, type PhoneFilterValue as bf, type FilterValue as bg, type FilterRule as bh, type ExtendedFilterRule as bi, type FilterCombinator as bj, type FilterGroup as bk, type AdvancedFilterState as bl, isAdvancedFilterState as bm, toAdvancedFilterState as bn, toSimpleFilterState as bo, type SortDirection as bp, type QueryState as bq, OPERATORS_BY_TYPE as br, type NoValueOperator as bs, NO_VALUE_OPERATORS as bt, isNoValueOperator as bu, type FlowSlot as bv, type FlowRowField as bw, type FlowPage as bx, type FlowRelation as by, type FlowStatus as bz, type RichtextFeature as c, eq as c$, type ExtractRecordUpdateStrict as c0, type ExtractAttributes as c1, type TypedObjectRecord as c2, type ExtractObjectRecord as c3, type ExtractObjectRecordWithCustom as c4, RESERVED_ATTRIBUTE_NAMES as c5, SYSTEM_FIELD_NAMES as c6, type ReservedAttributeName as c7, type SystemFieldName as c8, type Timestamps as c9, type ActivityTab as cA, type NotesTab as cB, type FlowsTab as cC, isFormTab as cD, isTableTab as cE, isDirectTableTab as cF, isInverseTableTab as cG, isCustomTab as cH, isActivityTab as cI, isNotesTab as cJ, isFlowsTab as cK, type StartNode as cL, type FormNode as cM, type FormFieldRef as cN, type ConditionNode as cO, type EndNode as cP, type WorkflowNodeType as cQ, isStartNode as cR, isFormNode as cS, isConditionNode as cT, isEndNode as cU, isSimpleFormNode as cV, isAdvancedFormNode as cW, getNodeOutputs as cX, type ConditionOperator as cY, isConditionRule as cZ, isConditionGroup as c_, type ObjectAttribute as ca, type CompletionStatus as cb, type ObjectRecord as cc, type PermissionScope as cd, type Role as ce, type Permission as cf, type UserRoleAssignment as cg, type EffectivePermissions as ch, type ObjectPermissions as ci, type SystemPermissions as cj, type CreateRoleInput as ck, type UpdateRoleInput as cl, type CreatePermissionInput as cm, type AssignRoleInput as cn, type PolicyContext as co, type RecordPolicy as cp, PolicyViolationError as cq, type UserRole as cr, type UserStatus as cs, type UserProfile as ct, type CreateUserProfile as cu, type UpdateUserProfile as cv, type InviteUserInput as cw, type TabType as cx, type FormTab as cy, type CustomTab as cz, type CurrencyAttribute as d, textConfigSchema as d$, neq as d0, and as d1, or as d2, inValues as d3, isEmpty as d4, isNotEmpty as d5, type WorkflowSlot as d6, type NodePosition as d7, type CanvasViewport as d8, type WorkflowLayout as d9, createEmptyContext as dA, getContextValue as dB, setContextValue as dC, mergeFormToSlot as dD, type WorkflowAccessMode as dE, type ReadOnlyReason as dF, type FormFieldContext as dG, type FormFieldRow as dH, type FormNodeInfo as dI, type FormContextResponse as dJ, type ThemeLogo as dK, type ThemeColors as dL, type ThemeTypography as dM, DEFAULT_THEME as dN, mergeWithDefaults as dO, generateCssVariables as dP, type Uuid as dQ, type TenantId as dR, type UserId as dS, asTenantId as dT, asUserId as dU, generateId as dV, generatePrefixedId as dW, registry as dX, viewRegistry as dY, type ValidationMessages as dZ, DEFAULT_VALIDATION_MESSAGES as d_, type ParticipantAuthConfig as da, type WorkflowStatus as db, isWorkflowDefinition as dc, isWorkflowPublished as dd, isSystemWorkflow as de, type WorkflowTransition as df, type WorkflowError as dg, type PendingAction as dh, type WorkflowInstance as di, isInstanceTerminal as dj, isInstanceWaiting as dk, canResumeInstance as dl, createStartTransition as dm, type ParticipationStatus as dn, type SignedLinkAuth as dp, type PinCodeAuth as dq, type ParticipationAuth as dr, type WorkflowParticipation as ds, isSignedLinkAuth as dt, isPinCodeAuth as du, canParticipate as dv, canAuthenticate as dw, canExecuteNode as dx, type GeneratedDocument as dy, type WorkflowExecutionContext as dz, type Option as e, getDefaultPinCodeService as e$, textareaConfigSchema as e0, richtextConfigSchema as e1, numberConfigSchema as e2, checkboxConfigSchema as e3, dateConfigSchema as e4, phoneConfigSchema as e5, currencyConfigSchema as e6, statusConfigSchema as e7, locationConfigSchema as e8, selectConfigSchema as e9, createRelationValidator as eA, createRatingValidator as eB, createFormulaValidator as eC, createRollupValidator as eD, createTextAreaValidator as eE, createRichtextValidator as eF, createAttributeValidator as eG, createFormAttributeValidator as eH, createObjectValidator as eI, type ValidationResult as eJ, validateAttribute as eK, validateObject as eL, validateObjectOrThrow as eM, createDraftValidator as eN, validateDraft as eO, validateDraftOrThrow as eP, getMissingRequiredAttributes as eQ, isRecordComplete as eR, computeRecordStatus as eS, type DatabaseAdapter as eT, ParticipationTokenService as eU, getDefaultTokenService as eV, initializeTokenService as eW, type ParticipationTokenPayload as eX, type TokenGenerationOptions as eY, type TokenVerificationResult as eZ, PinCodeService as e_, multiselectConfigSchema as ea, fileConfigSchema as eb, userConfigSchema as ec, relationConfigSchema as ed, ratingConfigSchema as ee, formulaConfigSchema as ef, rollupConfigSchema as eg, attributeConfigSchemas as eh, getAttributeConfigSchema as ei, validateAttributeConfig as ej, parseAttributeConfig as ek, safeParseAttributeConfig as el, createTextValidator as em, createNumberValidator as en, createCheckboxValidator as eo, createDateValidator as ep, createPhoneValidator as eq, createCurrencyValidator as er, createStatusValidator as es, createSelectValidator as et, createMultiselectValidator as eu, createLocationValidator as ev, createFileValidator as ew, createUserValidator as ex, createSingleRelationValidator as ey, createMultiRelationValidator as ez, type StatusAttribute as f, ConditionExecutor as f$, initializePinCodeService as f0, type PinCodeGenerationOptions as f1, type PinCodeVerificationResult as f2, type CacheKeyType as f3, hashOptions as f4, type CacheAdapter as f5, type CacheOptions as f6, cacheKeys as f7, cacheTtl as f8, defaultTtl as f9, getSchemaContext as fA, getSchemaFromContext as fB, hasSchemaContext as fC, runWithMergedSchemaContext as fD, runWithSchemaContext as fE, type SchemaContext as fF, getContext as fG, getTenantId as fH, getUserId as fI, hasContext as fJ, runWithContext as fK, withTenantContext as fL, type TenantContext as fM, createDefaultExecutorRegistry as fN, getDefaultExecutorRegistry as fO, type ExecutorCompleteResult as fP, type ExecutorContext as fQ, type ExecutorErrorResult as fR, type ExecutorResult as fS, type ExecutorSuccessResult as fT, type ExecutorWaitResult as fU, type NodeExecutor as fV, complete as fW, error as fX, ExecutorRegistry as fY, success as fZ, wait as f_, NoopCacheAdapter as fa, type FetchResult as fb, type FormattedRecord as fc, type GroupedFetchResult as fd, type InsertOptions as fe, type QueryBuilderState as ff, type RegistryMap as fg, type RegistryObjectNames as fh, type ShortcutOperator as fi, createDefaultState as fj, formatRecord as fk, formatRecords as fl, QueryMultipleResultsError as fm, QueryNoResultError as fn, SHORTCUT_TO_FILTER_OPERATOR as fo, createQueryBuilder as fp, QueryBuilder as fq, type QueryBuilderOptions as fr, type EvaluationResult as fs, type EvaluationTrace as ft, evaluateCondition as fu, evaluate as fv, evaluateWithTrace as fw, TenantContextError as fx, addSchemaToContext as fy, getSchemaByNameFromContext as fz, type SelectAttribute as g, TenantAwareService as g$, EndExecutor as g0, FormExecutor as g1, StartExecutor as g2, evaluateFormula as g3, evaluateFormulaAttribute as g4, evaluateFormulaAttributeWithRelations as g5, evaluateFormulaWithRelations as g6, evaluateFormulaWithResult as g7, extractFormulaVariables as g8, extractRelationNames as g9, type HookHandler as gA, type HookType as gB, NoopHookRegistry as gC, type HookRegistry as gD, createMockAdapter as gE, defaultPolicyRegistry as gF, PolicyRegistry as gG, notesPolicy as gH, type ObjectsRepository as gI, type AttributesRepository as gJ, type UserProfilesRepository as gK, type FilesRepository as gL, type ObjectRecordsRepository as gM, type ViewsRepository as gN, type WorkflowsRepository as gO, type WorkflowInstancesRepository as gP, type WorkflowParticipationsRepository as gQ, type AuditRepository as gR, type PermissionsRepository as gS, type AIConversationsRepository as gT, type AIUserMemoryRepository as gU, type AIUsageMetricsRepository as gV, BaseService as gW, BaseRepository as gX, type SchemaContextAware as gY, SchemaContextAwareRepository as gZ, TenantAwareRepository as g_, extractRelationReferences as ga, flattenRelationsForEval as gb, formatFormulaResult as gc, hasRelationReferences as gd, validateFormulaExpression as ge, type FormulaResult as gf, getPathDepth as gg, getRelationPath as gh, getTargetAttributeName as gi, InvalidPathError as gj, MaxDepthExceededError as gk, parsePath as gl, pathHasManyCardinality as gm, validatePath as gn, type PathCardinality as go, type PathSegment as gp, type PathSegmentType as gq, type SchemaResolver as gr, resolveMultiplePaths as gs, resolveSingleValue as gt, traversePath as gu, type TraversalOptions as gv, type TraversalResult as gw, type AttributeChange as gx, type HookContext as gy, type HookDefinition as gz, type SingleRelationAttribute as h, AuditService as h$, type CreateCustomObjectInput as h0, type AddAttributeInput as h1, type UpdateObjectInput as h2, type ObjectSchemaServiceOptions as h3, ObjectSchemaService as h4, type RecordServiceOptions as h5, RecordService as h6, type RecordQueryServiceOptions as h7, type QueryOptions as h8, type SearchQueryOptions as h9, enrichWithFormulas as hA, enrichRecordsWithFormulas as hB, createContextForCreate as hC, createContextForUpdate as hD, createContextForDelete as hE, createContextForRestore as hF, recalculateParentRollups as hG, type RollupCascadeContext as hH, type CreateWorkflowInput as hI, type UpdateWorkflowInput as hJ, type WorkflowServiceOptions as hK, WorkflowService as hL, type StartWorkflowInput as hM, type ResumeWorkflowInput as hN, type WorkflowInstanceServiceOptions as hO, WorkflowInstanceService as hP, type CreateParticipationInput as hQ, type CreateParticipationResult as hR, type AuthenticationResult as hS, WorkflowParticipationService as hT, type FieldReadOnlyResult as hU, WorkflowRelationService as hV, type UserValidationResult as hW, type UserValidationError as hX, UserService as hY, type UserProfileServiceOptions as hZ, UserProfileService as h_, type QueryResult as ha, RecordQueryService as hb, type RelationValidationResult as hc, type RelationValidationError as hd, type RelationOption as he, type RelationOptionsResponse as hf, type GetRelationOptionsParams as hg, type RelationServiceOptions as hh, type ResolveIdsBatchRequest as hi, type ResolveIdsBatchResponse as hj, RelationService as hk, type ResolvedRelations as hl, RelationResolverService as hm, type RollupResult as hn, RollupService as ho, type RollupSchedulerOptions as hp, RollupScheduler as hq, applyDefaultValues as hr, checkPermission as hs, getPolicy as ht, buildPolicyContext as hu, checkRecordAccess as hv, checkRecordModifyOrThrow as hw, checkRecordDeleteOrThrow as hx, computeLabel as hy, type LabelResolver as hz, type MultiRelationAttribute as i, type ViewSyncResult as i$, buildAuditChanges as i0, type FileServiceOptions as i1, FileService as i2, GeocodingService as i3, GlobalSearchService as i4, type PermissionServiceOptions as i5, PermissionService as i6, type CreateViewInput as i7, type UpdateViewInput as i8, ViewService as i9, type CreateDBObject as iA, type UpdateDBObject as iB, type UpsertDBObject as iC, type DBAttribute as iD, type CreateDBAttribute as iE, type UpdateDBAttribute as iF, type UpsertDBAttribute as iG, type CreateObjectRecord as iH, type ListOptions as iI, type SearchOptions as iJ, type GlobalSearchOptions as iK, type GlobalSearchResultItem as iL, type FileListOptions as iM, type DBView as iN, type CreateDBView as iO, type UpdateDBView as iP, type UpsertDBView as iQ, type DBWorkflow as iR, type CreateDBWorkflow as iS, type UpdateDBWorkflow as iT, type DBWorkflowInstance as iU, type CreateDBWorkflowInstance as iV, type UpdateDBWorkflowInstance as iW, type DBWorkflowParticipation as iX, type CreateDBWorkflowParticipation as iY, type UpdateDBWorkflowParticipation as iZ, type OperationResult as i_, type FileContent as ia, type StorageUploadInput as ib, type StorageUploadResult as ic, type SignedUrlOptions as id, type StorageAdapter as ie, type UploadFileInput as ig, type SyncResult as ih, type SyncOptions as ii, syncNativeObjects as ij, verifyNativeObjectsSync as ik, getSyncPreview as il, type FullSyncResult as im, type FullSyncOptions as io, syncAll as ip, DEFAULT_LABEL_FALLBACK as iq, renderLabelExpression as ir, isLabelExpression as is, extractAttributeNames as it, enrichValuesForDisplay as iu, enrichValuesWithSelectLabels as iv, extractRelationIds as iw, type RelationLabelResolver as ix, computeLabelWithRelations as iy, type DBObject as iz, type RelationTarget as j, type ViewSyncOptions as j0, syncNativeViews as j1, verifyNativeViewsSync as j2, getViewSyncPreview as j3, type RatingAttribute as k, type FormulaAttribute as l, type FormulaReturnType as m, type RollupAttribute as n, type RollupFunction as o, type AttributeType as p, type ObjectDefinition as q, type Field as r, type AttributeGroupField as s, type TableTab as t, type InverseTableTab as u, type ViewDefinition as v, type InstanceStatus as w, type Tab as x, type FilterState as y, type SortRule as z };
|
|
11553
|
+
export { type FlowRow as $, type Attribute as A, type DirectTableTab as B, type CheckboxAttribute as C, type DateAttribute as D, type WorkflowConfig as E, type FileAttribute as F, type Group as G, type SlotMode as H, type InferAttributeValue as I, type AuthMethod as J, type AuthChannel as K, type LocationAttribute as L, type MultiselectAttribute as M, type NumberAttribute as N, type ObjectAction as O, type PhoneAttribute as P, type ParticipantTemplate as Q, type RichtextAttribute as R, type SystemResource as S, type TextAttribute as T, type UserAttribute as U, type ViewLayout as V, type WorkflowTheme as W, type ConditionGroup as X, type ConditionRule as Y, type WorkflowNode as Z, type WorkflowDefinition as _, type SystemAction as a, type FilterValue as a$, type AIMessageRole as a0, type AIThinkingLevel as a1, type AIToolCallStatus as a2, type AIToolCall as a3, type AIChatMessagePartType as a4, type TextPartData as a5, type ToolPartData as a6, type ThinkingPartData as a7, type ReasoningPartData as a8, type AIChatMessagePart as a9, RELATION_TARGET_ANY as aA, type RelationAttribute as aB, isUniversalRelation as aC, type AuditResourceType as aD, type AuditAction as aE, type AuditActorType as aF, type AuditChange as aG, type AuditLogEntry as aH, type CreateAuditLogInput as aI, type AuditListOptions as aJ, type AuditServiceOptions as aK, type StorageProvider as aL, type FileVisibility as aM, type File as aN, type CreateFile as aO, type UpdateFile as aP, type TextFilterOperator as aQ, type NumberFilterOperator as aR, type CheckboxFilterOperator as aS, type DateFilterOperator as aT, type SelectFilterOperator as aU, type MultiselectFilterOperator as aV, type RelationFilterOperator as aW, type FilterOperator as aX, type RelativeDateValue as aY, type CurrencyFilterValue as aZ, type PhoneFilterValue as a_, type AIChatMessage as aa, type AIQuestionType as ab, type AIQuestionOption as ac, type AIQuestion as ad, type AIQuestionAnswer as ae, type AITodoStatus as af, type AITodoItem as ag, type AITodoList as ah, type AIMessageAttachment as ai, type AIConversation as aj, type AIMessage as ak, type AIToolCallRecord as al, type AIUserMemory as am, type AIUsageMetrics as an, type AIProviderMetrics as ao, type CreateAIMessageInput as ap, type StatusGroup as aq, type AttributeGroup as ar, type BaseAttribute as as, type NumberUnit as at, type DateFormat as au, type DateValue as av, type Phone as aw, type Currency as ax, type Location as ay, type LocationGranularity as az, type TextAreaAttribute as b, type Permission as b$, type FilterRule as b0, type ExtendedFilterRule as b1, type FilterCombinator as b2, type FilterGroup as b3, type AdvancedFilterState as b4, isAdvancedFilterState as b5, toAdvancedFilterState as b6, toSimpleFilterState as b7, type SortDirection as b8, type QueryState as b9, type InferRecordInput as bA, type InferRecordUpdate as bB, type CustomAttributeValue as bC, type WithCustomAttributes as bD, type RecordMetadata as bE, type SystemFields as bF, type ExtractRecord as bG, type ExtractRecordStrict as bH, type ExtractRecordInput as bI, type ExtractRecordInputStrict as bJ, type ExtractRecordUpdate as bK, type ExtractRecordUpdateStrict as bL, type ExtractAttributes as bM, type TypedObjectRecord as bN, type ExtractObjectRecord as bO, type ExtractObjectRecordWithCustom as bP, RESERVED_ATTRIBUTE_NAMES as bQ, SYSTEM_FIELD_NAMES as bR, type ReservedAttributeName as bS, type SystemFieldName as bT, type Timestamps as bU, type SharingMode as bV, type ObjectAttribute as bW, type CompletionStatus as bX, type ObjectRecord as bY, type PermissionScope as bZ, type Role as b_, OPERATORS_BY_TYPE as ba, type NoValueOperator as bb, NO_VALUE_OPERATORS as bc, isNoValueOperator as bd, type FlowSlot as be, type FlowRowField as bf, type FlowPage as bg, type FlowRelation as bh, type FlowStatus as bi, type FlowDefinition as bj, isFlowDefinition as bk, isFlowPublished as bl, isSystemFlow as bm, type GeocodingSuggestion as bn, type GeocodingAutocompleteParams as bo, type ReverseGeocodingParams as bp, type GeocodingParams as bq, type GeocodingAdapter as br, NoopGeocodingAdapter as bs, type AttributeSchema as bt, type InferRecordFromSchema as bu, type InferRecordWithRequirements as bv, type TypedAttribute as bw, type AttributeMap as bx, type AddAttribute as by, type InferRecord as bz, type RichtextFeature as c, type WorkflowTransition as c$, type UserRoleAssignment as c0, type EffectivePermissions as c1, type ObjectPermissions as c2, type SystemPermissions as c3, type CreateRoleInput as c4, type UpdateRoleInput as c5, type CreatePermissionInput as c6, type AssignRoleInput as c7, type PolicyContext as c8, type RecordPolicy as c9, type WorkflowNodeType as cA, isStartNode as cB, isFormNode as cC, isConditionNode as cD, isEndNode as cE, isSimpleFormNode as cF, isAdvancedFormNode as cG, getNodeOutputs as cH, type ConditionOperator as cI, isConditionRule as cJ, isConditionGroup as cK, eq as cL, neq as cM, and as cN, or as cO, inValues as cP, isEmpty as cQ, isNotEmpty as cR, type WorkflowSlot as cS, type NodePosition as cT, type CanvasViewport as cU, type WorkflowLayout as cV, type ParticipantAuthConfig as cW, type WorkflowStatus as cX, isWorkflowDefinition as cY, isWorkflowPublished as cZ, isSystemWorkflow as c_, PolicyViolationError as ca, type UserRole as cb, type UserStatus as cc, type UserProfile as cd, type CreateUserProfile as ce, type UpdateUserProfile as cf, type InviteUserInput as cg, type TabType as ch, type FormTab as ci, type CustomTab as cj, type ActivityTab as ck, type NotesTab as cl, type FlowsTab as cm, isFormTab as cn, isTableTab as co, isDirectTableTab as cp, isInverseTableTab as cq, isCustomTab as cr, isActivityTab as cs, isNotesTab as ct, isFlowsTab as cu, type StartNode as cv, type FormNode as cw, type FormFieldRef as cx, type ConditionNode as cy, type EndNode as cz, type CurrencyAttribute as d, formulaConfigSchema as d$, type WorkflowError as d0, type PendingAction as d1, type WorkflowInstance as d2, isInstanceTerminal as d3, isInstanceWaiting as d4, canResumeInstance as d5, createStartTransition as d6, type ParticipationStatus as d7, type SignedLinkAuth as d8, type PinCodeAuth as d9, type Uuid as dA, type TenantId as dB, type UserId as dC, asTenantId as dD, asUserId as dE, generateId as dF, generatePrefixedId as dG, registry as dH, viewRegistry as dI, type ValidationMessages as dJ, DEFAULT_VALIDATION_MESSAGES as dK, textConfigSchema as dL, textareaConfigSchema as dM, richtextConfigSchema as dN, numberConfigSchema as dO, checkboxConfigSchema as dP, dateConfigSchema as dQ, phoneConfigSchema as dR, currencyConfigSchema as dS, statusConfigSchema as dT, locationConfigSchema as dU, selectConfigSchema as dV, multiselectConfigSchema as dW, fileConfigSchema as dX, userConfigSchema as dY, relationConfigSchema as dZ, ratingConfigSchema as d_, type ParticipationAuth as da, type WorkflowParticipation as db, isSignedLinkAuth as dc, isPinCodeAuth as dd, canParticipate as de, canAuthenticate as df, canExecuteNode as dg, type GeneratedDocument as dh, type WorkflowExecutionContext as di, createEmptyContext as dj, getContextValue as dk, setContextValue as dl, mergeFormToSlot as dm, type WorkflowAccessMode as dn, type ReadOnlyReason as dp, type FormFieldContext as dq, type FormFieldRow as dr, type FormNodeInfo as ds, type FormContextResponse as dt, type ThemeLogo as du, type ThemeColors as dv, type ThemeTypography as dw, DEFAULT_THEME as dx, mergeWithDefaults as dy, generateCssVariables as dz, type Option as e, type QueryBuilderState as e$, rollupConfigSchema as e0, attributeConfigSchemas as e1, getAttributeConfigSchema as e2, validateAttributeConfig as e3, parseAttributeConfig as e4, safeParseAttributeConfig as e5, createTextValidator as e6, createNumberValidator as e7, createCheckboxValidator as e8, createDateValidator as e9, getMissingRequiredAttributes as eA, isRecordComplete as eB, computeRecordStatus as eC, type DatabaseAdapter as eD, ParticipationTokenService as eE, getDefaultTokenService as eF, initializeTokenService as eG, type ParticipationTokenPayload as eH, type TokenGenerationOptions as eI, type TokenVerificationResult as eJ, PinCodeService as eK, getDefaultPinCodeService as eL, initializePinCodeService as eM, type PinCodeGenerationOptions as eN, type PinCodeVerificationResult as eO, type CacheKeyType as eP, hashOptions as eQ, type CacheAdapter as eR, type CacheOptions as eS, cacheKeys as eT, cacheTtl as eU, defaultTtl as eV, NoopCacheAdapter as eW, type FetchResult as eX, type FormattedRecord as eY, type GroupedFetchResult as eZ, type InsertOptions as e_, createPhoneValidator as ea, createCurrencyValidator as eb, createStatusValidator as ec, createSelectValidator as ed, createMultiselectValidator as ee, createLocationValidator as ef, createFileValidator as eg, createUserValidator as eh, createSingleRelationValidator as ei, createMultiRelationValidator as ej, createRelationValidator as ek, createRatingValidator as el, createFormulaValidator as em, createRollupValidator as en, createTextAreaValidator as eo, createRichtextValidator as ep, createAttributeValidator as eq, createFormAttributeValidator as er, createObjectValidator as es, type ValidationResult as et, validateAttribute as eu, validateObject as ev, validateObjectOrThrow as ew, createDraftValidator as ex, validateDraft as ey, validateDraftOrThrow as ez, type StatusAttribute as f, type FormulaResult as f$, type RegistryMap as f0, type RegistryObjectNames as f1, type ShortcutOperator as f2, createDefaultState as f3, formatRecord as f4, formatRecords as f5, QueryMultipleResultsError as f6, QueryNoResultError as f7, SHORTCUT_TO_FILTER_OPERATOR as f8, createQueryBuilder as f9, type ExecutorContext as fA, type ExecutorErrorResult as fB, type ExecutorResult as fC, type ExecutorSuccessResult as fD, type ExecutorWaitResult as fE, type NodeExecutor as fF, complete as fG, error as fH, ExecutorRegistry as fI, success as fJ, wait as fK, ConditionExecutor as fL, EndExecutor as fM, FormExecutor as fN, StartExecutor as fO, evaluateFormula as fP, evaluateFormulaAttribute as fQ, evaluateFormulaAttributeWithRelations as fR, evaluateFormulaWithRelations as fS, evaluateFormulaWithResult as fT, extractFormulaVariables as fU, extractRelationNames as fV, extractRelationReferences as fW, flattenRelationsForEval as fX, formatFormulaResult as fY, hasRelationReferences as fZ, validateFormulaExpression as f_, QueryBuilder as fa, type QueryBuilderOptions as fb, type EvaluationResult as fc, type EvaluationTrace as fd, evaluateCondition as fe, evaluate as ff, evaluateWithTrace as fg, TenantContextError as fh, addSchemaToContext as fi, getSchemaByNameFromContext as fj, getSchemaContext as fk, getSchemaFromContext as fl, hasSchemaContext as fm, runWithMergedSchemaContext as fn, runWithSchemaContext as fo, type SchemaContext as fp, getContext as fq, getTenantId as fr, getUserId as fs, hasContext as ft, runWithContext as fu, withTenantContext as fv, type TenantContext as fw, createDefaultExecutorRegistry as fx, getDefaultExecutorRegistry as fy, type ExecutorCompleteResult as fz, type SelectAttribute as g, type RelationOptionsResponse as g$, getPathDepth as g0, getRelationPath as g1, getTargetAttributeName as g2, InvalidPathError as g3, MaxDepthExceededError as g4, parsePath as g5, pathHasManyCardinality as g6, validatePath as g7, type PathCardinality as g8, type PathSegment as g9, type WorkflowParticipationsRepository as gA, type AuditRepository as gB, type PermissionsRepository as gC, type AIConversationsRepository as gD, type AIUserMemoryRepository as gE, type AIUsageMetricsRepository as gF, BaseService as gG, BaseRepository as gH, type SchemaContextAware as gI, SchemaContextAwareRepository as gJ, TenantAwareRepository as gK, TenantAwareService as gL, type CreateCustomObjectInput as gM, type AddAttributeInput as gN, type UpdateObjectInput as gO, type ObjectSchemaServiceOptions as gP, ObjectSchemaService as gQ, type RecordServiceOptions as gR, RecordService as gS, type RecordQueryServiceOptions as gT, type QueryOptions as gU, type SearchQueryOptions as gV, type QueryResult as gW, RecordQueryService as gX, type RelationValidationResult as gY, type RelationValidationError as gZ, type RelationOption as g_, type PathSegmentType as ga, type SchemaResolver as gb, resolveMultiplePaths as gc, resolveSingleValue as gd, traversePath as ge, type TraversalOptions as gf, type TraversalResult as gg, type AttributeChange as gh, type HookContext as gi, type HookDefinition as gj, type HookHandler as gk, type HookType as gl, NoopHookRegistry as gm, type HookRegistry as gn, createMockAdapter as go, defaultPolicyRegistry as gp, PolicyRegistry as gq, notesPolicy as gr, type ObjectsRepository as gs, type AttributesRepository as gt, type UserProfilesRepository as gu, type FilesRepository as gv, type ObjectRecordsRepository as gw, type ViewsRepository as gx, type WorkflowsRepository as gy, type WorkflowInstancesRepository as gz, type SingleRelationAttribute as h, type StorageUploadInput as h$, type GetRelationOptionsParams as h0, type RelationServiceOptions as h1, type ResolveIdsBatchRequest as h2, type ResolveIdsBatchResponse as h3, RelationService as h4, RecordResolverService as h5, type ResolvedRelations as h6, type FormulaResolverServiceOptions as h7, FormulaResolverService as h8, type RollupResult as h9, type StartWorkflowInput as hA, type ResumeWorkflowInput as hB, type WorkflowInstanceServiceOptions as hC, WorkflowInstanceService as hD, type CreateParticipationInput as hE, type CreateParticipationResult as hF, type AuthenticationResult as hG, WorkflowParticipationService as hH, type FieldReadOnlyResult as hI, WorkflowRelationService as hJ, type UserValidationResult as hK, type UserValidationError as hL, UserService as hM, type UserProfileServiceOptions as hN, UserProfileService as hO, AuditService as hP, buildAuditChanges as hQ, type FileServiceOptions as hR, FileService as hS, GeocodingService as hT, GlobalSearchService as hU, type PermissionServiceOptions as hV, PermissionService as hW, type CreateViewInput as hX, type UpdateViewInput as hY, ViewService as hZ, type FileContent as h_, type RollupServiceOptions as ha, RollupService as hb, type RollupSchedulerOptions as hc, RollupScheduler as hd, applyDefaultValues as he, checkPermission as hf, getPolicy as hg, buildPolicyContext as hh, checkRecordAccess as hi, checkRecordModifyOrThrow as hj, checkRecordDeleteOrThrow as hk, checkSharedObjectWriteAccess as hl, computeLabel as hm, type LabelResolver as hn, enrichWithFormulas as ho, enrichRecordsWithFormulas as hp, createContextForCreate as hq, createContextForUpdate as hr, createContextForDelete as hs, createContextForRestore as ht, recalculateParentRollups as hu, type RollupCascadeContext as hv, type CreateWorkflowInput as hw, type UpdateWorkflowInput as hx, type WorkflowServiceOptions as hy, WorkflowService as hz, type MultiRelationAttribute as i, type StorageUploadResult as i0, type SignedUrlOptions as i1, type StorageAdapter as i2, type UploadFileInput as i3, type SyncResult as i4, type SyncOptions as i5, syncNativeObjects as i6, verifyNativeObjectsSync as i7, getSyncPreview as i8, type FullSyncResult as i9, type FileListOptions as iA, type DBView as iB, type CreateDBView as iC, type UpdateDBView as iD, type UpsertDBView as iE, type DBWorkflow as iF, type CreateDBWorkflow as iG, type UpdateDBWorkflow as iH, type DBWorkflowInstance as iI, type CreateDBWorkflowInstance as iJ, type UpdateDBWorkflowInstance as iK, type DBWorkflowParticipation as iL, type CreateDBWorkflowParticipation as iM, type UpdateDBWorkflowParticipation as iN, type OperationResult as iO, type ViewSyncResult as iP, type ViewSyncOptions as iQ, syncNativeViews as iR, verifyNativeViewsSync as iS, getViewSyncPreview as iT, type FullSyncOptions as ia, syncAll as ib, DEFAULT_LABEL_FALLBACK as ic, renderLabelExpression as id, isLabelExpression as ie, extractAttributeNames as ig, enrichValuesForDisplay as ih, enrichValuesWithSelectLabels as ii, extractRelationIds as ij, type RelationLabelResolver as ik, computeLabelWithRelations as il, type DBObject as im, type CreateDBObject as io, type UpdateDBObject as ip, type UpsertDBObject as iq, type DBAttribute as ir, type CreateDBAttribute as is, type UpdateDBAttribute as it, type UpsertDBAttribute as iu, type CreateObjectRecord as iv, type ListOptions as iw, type SearchOptions as ix, type GlobalSearchOptions as iy, type GlobalSearchResultItem as iz, type RelationTarget as j, type RatingAttribute as k, type FormulaAttribute as l, type FormulaReturnType as m, type RollupAttribute as n, type RollupFunction as o, type AttributeType as p, type ObjectDefinition as q, type Field as r, type AttributeGroupField as s, type TableTab as t, type InverseTableTab as u, type ViewDefinition as v, type InstanceStatus as w, type Tab as x, type FilterState as y, type SortRule as z };
|