@stndrds/schema 0.1.0-alpha.57 → 0.1.0-alpha.59
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-DPRLHGPO.js → chunk-DCTLP3ZD.js} +1144 -962
- package/dist/chunk-NEVERCM3.js +41 -0
- package/dist/{chunk-YVUSATKC.mjs → chunk-O7FGYLYG.mjs} +1017 -835
- package/dist/chunk-SV4BCGQU.mjs +617 -0
- package/dist/chunk-U4AB53AM.js +617 -0
- package/dist/chunk-V2RPPE2Y.mjs +41 -0
- package/dist/index.d.mts +223 -30
- package/dist/index.d.ts +223 -30
- package/dist/index.js +39 -93
- package/dist/index.mjs +112 -166
- package/dist/{runtime-BqJdmg_4.d.mts → runtime-BRkoIwsC.d.ts} +274 -1658
- package/dist/{runtime-BqJdmg_4.d.ts → runtime-Chz-bTNq.d.mts} +274 -1658
- package/dist/runtime.d.mts +3 -1
- package/dist/runtime.d.ts +3 -1
- package/dist/runtime.js +6 -2
- package/dist/runtime.mjs +5 -1
- package/dist/utils.d.mts +154 -0
- package/dist/utils.d.ts +154 -0
- package/dist/utils.js +19 -0
- package/dist/utils.mjs +19 -0
- package/dist/validation/validators.d.mts +4 -0
- package/dist/validation/validators.d.ts +4 -0
- package/dist/validation/validators.js +121 -0
- package/dist/validation/validators.mjs +121 -0
- package/dist/validators-BIAmz0CD.d.mts +1631 -0
- package/dist/validators-BPIB7Miq.d.ts +1631 -0
- package/package.json +12 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ae as Timestamps, A as Attribute, H as AttributeType, a3 as Location, a4 as LocationGranularity, q as StatusAttribute, r as SelectAttribute, s as MultiselectAttribute, a1 as Phone, a2 as Currency, z as FormulaAttribute, E as RollupAttribute, ah as CompletionStatus, af as SharingMode, ai as ObjectRecord, I as ObjectDefinition, V as FeatureFlagsRepository, b8 as ValidationResult, a6 as RelationAttribute, h as PropertySchema, B as FormulaReturnType } from './validators-BPIB7Miq.js';
|
|
2
|
+
import { IconName, MimeType, ColorId, CountryIso3 } from '@stndrds/constants';
|
|
3
|
+
import { Uuid, TenantId, UserId } from './utils.js';
|
|
2
4
|
import { JWTPayload } from 'jose';
|
|
3
|
-
import { z } from 'zod';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* OCR Adapter Interface for extracting text from documents.
|
|
@@ -579,711 +580,6 @@ interface CreateAIMessageInput {
|
|
|
579
580
|
attachmentIds?: string[];
|
|
580
581
|
}
|
|
581
582
|
|
|
582
|
-
/**
|
|
583
|
-
* Brand symbol for nominal typing.
|
|
584
|
-
* This ensures type-safety by making IDs non-interchangeable.
|
|
585
|
-
*/
|
|
586
|
-
declare const __brand: unique symbol;
|
|
587
|
-
/**
|
|
588
|
-
* Creates a branded type from a base type.
|
|
589
|
-
* Branded types are structurally identical but nominally different.
|
|
590
|
-
*/
|
|
591
|
-
type Brand<T, B> = T & {
|
|
592
|
-
readonly [__brand]: B;
|
|
593
|
-
};
|
|
594
|
-
/**
|
|
595
|
-
* UUID string type for all identifiers
|
|
596
|
-
*/
|
|
597
|
-
type Uuid = string;
|
|
598
|
-
/**
|
|
599
|
-
* Tenant identifier for multi-tenant isolation.
|
|
600
|
-
* Branded type to prevent accidental mixing with other string IDs.
|
|
601
|
-
*
|
|
602
|
-
* @example
|
|
603
|
-
* ```typescript
|
|
604
|
-
* const tenantId: TenantId = asTenantId('tenant-123');
|
|
605
|
-
* const userId: UserId = asUserId('user-456');
|
|
606
|
-
*
|
|
607
|
-
* // Type error: cannot assign UserId to TenantId
|
|
608
|
-
* const wrong: TenantId = userId;
|
|
609
|
-
* ```
|
|
610
|
-
*/
|
|
611
|
-
type TenantId = Brand<string, "TenantId">;
|
|
612
|
-
/**
|
|
613
|
-
* User identifier for audit trails and permissions.
|
|
614
|
-
* Branded type to prevent accidental mixing with other string IDs.
|
|
615
|
-
*/
|
|
616
|
-
type UserId = Brand<string, "UserId">;
|
|
617
|
-
/**
|
|
618
|
-
* Convert a string to a TenantId.
|
|
619
|
-
* Use this when receiving tenant IDs from external sources (JWT, headers).
|
|
620
|
-
*
|
|
621
|
-
* @param id - The string to convert
|
|
622
|
-
* @returns A branded TenantId
|
|
623
|
-
*
|
|
624
|
-
* @example
|
|
625
|
-
* ```typescript
|
|
626
|
-
* const tenantId = asTenantId(request.headers['x-tenant-id']);
|
|
627
|
-
* ```
|
|
628
|
-
*/
|
|
629
|
-
declare function asTenantId(id: string): TenantId;
|
|
630
|
-
/**
|
|
631
|
-
* Convert a string to a UserId.
|
|
632
|
-
* Use this when receiving user IDs from external sources (JWT, auth).
|
|
633
|
-
*
|
|
634
|
-
* @param id - The string to convert
|
|
635
|
-
* @returns A branded UserId
|
|
636
|
-
*
|
|
637
|
-
* @example
|
|
638
|
-
* ```typescript
|
|
639
|
-
* const userId = asUserId(jwtPayload.sub);
|
|
640
|
-
* ```
|
|
641
|
-
*/
|
|
642
|
-
declare function asUserId(id: string): UserId;
|
|
643
|
-
/**
|
|
644
|
-
* Generate a unique UUID v4
|
|
645
|
-
* Uses crypto.randomUUID() when available (Node.js 19+, modern browsers)
|
|
646
|
-
* Falls back to a manual implementation for older environments
|
|
647
|
-
*
|
|
648
|
-
* @returns A UUID v4 string
|
|
649
|
-
*
|
|
650
|
-
* @example
|
|
651
|
-
* ```typescript
|
|
652
|
-
* const id = generateId();
|
|
653
|
-
* // "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
|
|
654
|
-
* ```
|
|
655
|
-
*/
|
|
656
|
-
declare function generateId(): Uuid;
|
|
657
|
-
/**
|
|
658
|
-
* Generate a prefixed ID for better debugging and readability
|
|
659
|
-
*
|
|
660
|
-
* @param prefix - Prefix for the ID (e.g., "obj", "attr", "rec")
|
|
661
|
-
* @returns A prefixed UUID string
|
|
662
|
-
*
|
|
663
|
-
* @example
|
|
664
|
-
* ```typescript
|
|
665
|
-
* const objectId = generatePrefixedId("obj");
|
|
666
|
-
* // "obj_a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
|
|
667
|
-
*
|
|
668
|
-
* const attrId = generatePrefixedId("attr");
|
|
669
|
-
* // "attr_a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
|
|
670
|
-
* ```
|
|
671
|
-
*/
|
|
672
|
-
declare function generatePrefixedId(prefix: string): Uuid;
|
|
673
|
-
/**
|
|
674
|
-
* Convert a string to a valid kebab-case slug.
|
|
675
|
-
* Removes accents, special chars, and normalizes spaces.
|
|
676
|
-
*
|
|
677
|
-
* @param input - The string to slugify
|
|
678
|
-
* @returns A kebab-case slug matching pattern ^[a-z][a-z0-9-]*$
|
|
679
|
-
*
|
|
680
|
-
* @example
|
|
681
|
-
* ```typescript
|
|
682
|
-
* slugify("Contrat de Vente");
|
|
683
|
-
* // "contrat-de-vente"
|
|
684
|
-
*
|
|
685
|
-
* slugify("Éléphant café");
|
|
686
|
-
* // "elephant-cafe"
|
|
687
|
-
*
|
|
688
|
-
* slugify(" Multiple Spaces ");
|
|
689
|
-
* // "multiple-spaces"
|
|
690
|
-
* ```
|
|
691
|
-
*/
|
|
692
|
-
declare function slugify(input: string): string;
|
|
693
|
-
/**
|
|
694
|
-
* Generate a unique template name from a label.
|
|
695
|
-
* Format: {slugified-label}-{8-char-suffix}
|
|
696
|
-
* Matches DB constraint: ^[a-z][a-z0-9_-]*$
|
|
697
|
-
*
|
|
698
|
-
* @param label - The label to generate a name from
|
|
699
|
-
* @returns A unique kebab-case name
|
|
700
|
-
*
|
|
701
|
-
* @example
|
|
702
|
-
* ```typescript
|
|
703
|
-
* generateTemplateName("Contrat de Vente");
|
|
704
|
-
* // "contrat-de-vente-a1b2c3d4"
|
|
705
|
-
*
|
|
706
|
-
* generateTemplateName("");
|
|
707
|
-
* // "template-a1b2c3d4"
|
|
708
|
-
* ```
|
|
709
|
-
*/
|
|
710
|
-
declare function generateTemplateName(label: string): string;
|
|
711
|
-
|
|
712
|
-
/**
|
|
713
|
-
* Feature flag levels (resolution priority: user > tenant > global).
|
|
714
|
-
*
|
|
715
|
-
* - `global`: Applies to all tenants and users
|
|
716
|
-
* - `tenant`: Applies to a specific tenant
|
|
717
|
-
* - `user`: Applies to a specific user within a tenant
|
|
718
|
-
*/
|
|
719
|
-
type FlagLevel = "global" | "tenant" | "user";
|
|
720
|
-
/**
|
|
721
|
-
* Flag value types supported by the system.
|
|
722
|
-
*/
|
|
723
|
-
type FlagValueType = "boolean" | "string" | "number" | "json";
|
|
724
|
-
/**
|
|
725
|
-
* Definition of a feature flag.
|
|
726
|
-
* Created using the flag builders (booleanFlag, stringFlag, etc.)
|
|
727
|
-
*/
|
|
728
|
-
interface FeatureFlagDefinition<T = unknown> {
|
|
729
|
-
/** Unique identifier for the flag (kebab-case) */
|
|
730
|
-
name: string;
|
|
731
|
-
/** Human-readable label */
|
|
732
|
-
label: string;
|
|
733
|
-
/** Optional description */
|
|
734
|
-
description?: string;
|
|
735
|
-
/** Type of the flag value */
|
|
736
|
-
valueType: FlagValueType;
|
|
737
|
-
/** Default value when no override exists */
|
|
738
|
-
defaultValue: T;
|
|
739
|
-
/** Levels at which this flag can be overridden */
|
|
740
|
-
allowedLevels: FlagLevel[];
|
|
741
|
-
/** Grouping category for UI */
|
|
742
|
-
category?: string;
|
|
743
|
-
/** System flag - cannot be modified via API */
|
|
744
|
-
system?: boolean;
|
|
745
|
-
}
|
|
746
|
-
/**
|
|
747
|
-
* Stored override for a feature flag.
|
|
748
|
-
* Represents a row in the feature_flag_overrides table.
|
|
749
|
-
*/
|
|
750
|
-
interface FlagOverride<T = unknown> {
|
|
751
|
-
/** Name of the flag being overridden */
|
|
752
|
-
flagName: string;
|
|
753
|
-
/** Level of the override */
|
|
754
|
-
level: FlagLevel;
|
|
755
|
-
/** Target ID (tenantId for tenant-level, userId for user-level) */
|
|
756
|
-
targetId?: string;
|
|
757
|
-
/** Override value */
|
|
758
|
-
value: T;
|
|
759
|
-
/** Optional expiration date */
|
|
760
|
-
expiresAt?: Date;
|
|
761
|
-
/** Who created this override */
|
|
762
|
-
createdBy?: string;
|
|
763
|
-
/** When the override was created */
|
|
764
|
-
createdAt: Date;
|
|
765
|
-
/** When the override was last updated */
|
|
766
|
-
updatedAt: Date;
|
|
767
|
-
}
|
|
768
|
-
/**
|
|
769
|
-
* Resolved flag value with source information.
|
|
770
|
-
* Result of flag resolution including where the value came from.
|
|
771
|
-
*/
|
|
772
|
-
interface ResolvedFlag<T = unknown> {
|
|
773
|
-
/** Flag name */
|
|
774
|
-
name: string;
|
|
775
|
-
/** Resolved value */
|
|
776
|
-
value: T;
|
|
777
|
-
/** Where the value came from */
|
|
778
|
-
source: FlagLevel | "default";
|
|
779
|
-
/** ID of the source (tenantId or userId) if not default */
|
|
780
|
-
sourceId?: string;
|
|
781
|
-
}
|
|
782
|
-
/**
|
|
783
|
-
* Feature gate configuration for conditional attribute visibility.
|
|
784
|
-
* Used with the `.featureGate()` builder method.
|
|
785
|
-
*/
|
|
786
|
-
interface FeatureGate {
|
|
787
|
-
/** Name of the flag to check */
|
|
788
|
-
flag: string;
|
|
789
|
-
/**
|
|
790
|
-
* Expected value for the gate to pass.
|
|
791
|
-
* For boolean flags, defaults to `true`.
|
|
792
|
-
* For other types, compares with strict equality.
|
|
793
|
-
*/
|
|
794
|
-
expectedValue?: unknown;
|
|
795
|
-
/**
|
|
796
|
-
* Behavior when the gate fails.
|
|
797
|
-
* - `hide`: Attribute is completely hidden (default)
|
|
798
|
-
* - `show`: Attribute is shown regardless (no gating)
|
|
799
|
-
* - `disable`: Attribute is visible but read-only
|
|
800
|
-
*/
|
|
801
|
-
fallback?: "hide" | "show" | "disable";
|
|
802
|
-
}
|
|
803
|
-
/**
|
|
804
|
-
* Repository interface for feature flag overrides storage.
|
|
805
|
-
* Added to DatabaseAdapter as an optional repository.
|
|
806
|
-
*
|
|
807
|
-
* If not provided, only static defaults from module config are used.
|
|
808
|
-
*/
|
|
809
|
-
interface FeatureFlagsRepository {
|
|
810
|
-
/**
|
|
811
|
-
* Get all overrides matching the criteria.
|
|
812
|
-
* Returns overrides from the database (global, tenant, or user level).
|
|
813
|
-
*/
|
|
814
|
-
getOverrides(options: {
|
|
815
|
-
/** Filter by level */
|
|
816
|
-
level?: FlagLevel;
|
|
817
|
-
/** Filter by target ID (tenantId or userId) */
|
|
818
|
-
targetId?: string;
|
|
819
|
-
}): Promise<FlagOverride[]>;
|
|
820
|
-
/**
|
|
821
|
-
* Create or update an override.
|
|
822
|
-
* Uses upsert semantics based on (flagName, level, targetId).
|
|
823
|
-
*/
|
|
824
|
-
setOverride(override: Omit<FlagOverride, "createdAt" | "updatedAt">): Promise<FlagOverride>;
|
|
825
|
-
/**
|
|
826
|
-
* Delete an override.
|
|
827
|
-
*/
|
|
828
|
-
deleteOverride(flagName: string, level: FlagLevel, targetId?: string): Promise<void>;
|
|
829
|
-
}
|
|
830
|
-
/**
|
|
831
|
-
* Static flag default value for module configuration.
|
|
832
|
-
*/
|
|
833
|
-
interface StaticFlagDefault {
|
|
834
|
-
/** Flag name */
|
|
835
|
-
name: string;
|
|
836
|
-
/** Default value */
|
|
837
|
-
value: unknown;
|
|
838
|
-
}
|
|
839
|
-
/**
|
|
840
|
-
* Feature flags configuration for SchemaModule.
|
|
841
|
-
*/
|
|
842
|
-
interface FeatureFlagsConfig {
|
|
843
|
-
/**
|
|
844
|
-
* Static default values for flags.
|
|
845
|
-
* These are always applied and used when no database override exists.
|
|
846
|
-
*
|
|
847
|
-
* @example
|
|
848
|
-
* ```typescript
|
|
849
|
-
* featureFlags: {
|
|
850
|
-
* defaults: [
|
|
851
|
-
* { name: "architect-mode", value: false },
|
|
852
|
-
* { name: "ai-chat", value: false },
|
|
853
|
-
* { name: "tier", value: "free" },
|
|
854
|
-
* ],
|
|
855
|
-
* }
|
|
856
|
-
* ```
|
|
857
|
-
*/
|
|
858
|
-
defaults?: StaticFlagDefault[];
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
type AttributeType = "text" | "textarea" | "richtext" | "number" | "checkbox" | "date" | "phone" | "currency" | "status" | "location" | "select" | "multiselect" | "file" | "user" | "relation" | "rating" | "formula" | "rollup" | "document";
|
|
862
|
-
/**
|
|
863
|
-
* Status group categorization
|
|
864
|
-
*/
|
|
865
|
-
type StatusGroup = "idle" | "in_progress" | "finished";
|
|
866
|
-
/**
|
|
867
|
-
* Unified option type for select-like fields
|
|
868
|
-
*/
|
|
869
|
-
interface Option {
|
|
870
|
-
id: string;
|
|
871
|
-
label: string;
|
|
872
|
-
value: string;
|
|
873
|
-
color?: ColorId;
|
|
874
|
-
icon?: IconName;
|
|
875
|
-
description?: string;
|
|
876
|
-
group?: StatusGroup;
|
|
877
|
-
}
|
|
878
|
-
/**
|
|
879
|
-
* Attribute grouping for UI organization
|
|
880
|
-
*/
|
|
881
|
-
interface AttributeGroup {
|
|
882
|
-
id: string;
|
|
883
|
-
label: string;
|
|
884
|
-
description?: string;
|
|
885
|
-
attributeIds: string[];
|
|
886
|
-
collapsible?: boolean;
|
|
887
|
-
collapsed?: boolean;
|
|
888
|
-
order?: number;
|
|
889
|
-
}
|
|
890
|
-
interface BaseAttribute<DefaultValueType = unknown> {
|
|
891
|
-
id: Uuid;
|
|
892
|
-
name: string;
|
|
893
|
-
label: string;
|
|
894
|
-
type: AttributeType;
|
|
895
|
-
required: boolean;
|
|
896
|
-
disabled?: boolean;
|
|
897
|
-
placeholder?: string;
|
|
898
|
-
description?: string;
|
|
899
|
-
defaultValue?: DefaultValueType;
|
|
900
|
-
icon?: IconName;
|
|
901
|
-
order?: number;
|
|
902
|
-
hidden?: boolean;
|
|
903
|
-
archived?: boolean;
|
|
904
|
-
deprecated?: boolean;
|
|
905
|
-
system?: boolean;
|
|
906
|
-
/**
|
|
907
|
-
* Feature gate to conditionally show/hide/disable this attribute.
|
|
908
|
-
* When the flag condition is not met, the attribute behavior depends on `fallback`:
|
|
909
|
-
* - "hide" (default): Attribute is completely hidden
|
|
910
|
-
* - "disable": Attribute is visible but read-only
|
|
911
|
-
* - "show": No gating (useful for overriding parent settings)
|
|
912
|
-
*/
|
|
913
|
-
featureGate?: FeatureGate;
|
|
914
|
-
metadata?: Record<string, unknown>;
|
|
915
|
-
}
|
|
916
|
-
interface TextAttribute extends BaseAttribute<string> {
|
|
917
|
-
type: "text";
|
|
918
|
-
minLength?: number;
|
|
919
|
-
maxLength?: number;
|
|
920
|
-
pattern?: string;
|
|
921
|
-
}
|
|
922
|
-
type NumberUnit = "integer" | "decimal" | "percentage";
|
|
923
|
-
interface NumberAttribute extends BaseAttribute<number> {
|
|
924
|
-
type: "number";
|
|
925
|
-
min?: number;
|
|
926
|
-
max?: number;
|
|
927
|
-
unit?: NumberUnit;
|
|
928
|
-
decimals?: number;
|
|
929
|
-
}
|
|
930
|
-
interface CheckboxAttribute extends BaseAttribute<boolean> {
|
|
931
|
-
type: "checkbox";
|
|
932
|
-
}
|
|
933
|
-
type DateFormat = "short" | "long" | "full" | "relative";
|
|
934
|
-
type DateValue = string | "today";
|
|
935
|
-
interface DateAttribute extends BaseAttribute<string> {
|
|
936
|
-
type: "date";
|
|
937
|
-
dateFormat?: DateFormat;
|
|
938
|
-
minDate?: DateValue;
|
|
939
|
-
maxDate?: DateValue;
|
|
940
|
-
}
|
|
941
|
-
interface Phone {
|
|
942
|
-
countryCode: CountryIso3;
|
|
943
|
-
phoneNumber: string;
|
|
944
|
-
}
|
|
945
|
-
interface PhoneAttribute extends BaseAttribute<Phone> {
|
|
946
|
-
type: "phone";
|
|
947
|
-
defaultCountryCode?: CountryIso3;
|
|
948
|
-
}
|
|
949
|
-
interface Currency {
|
|
950
|
-
code: CurrencyCode;
|
|
951
|
-
value: number;
|
|
952
|
-
}
|
|
953
|
-
interface CurrencyAttribute extends BaseAttribute<Currency> {
|
|
954
|
-
type: "currency";
|
|
955
|
-
defaultCurrency?: CurrencyCode;
|
|
956
|
-
allowedCurrencies?: CurrencyCode[];
|
|
957
|
-
}
|
|
958
|
-
/**
|
|
959
|
-
* StatusAttribute - For workflow states with semantic grouping (idle/in_progress/finished)
|
|
960
|
-
* Use this for: Task status, Order status, Project phases, Process states
|
|
961
|
-
* Use SelectAttribute for: Categories, Types, simple choices without workflow
|
|
962
|
-
*/
|
|
963
|
-
interface StatusAttribute extends BaseAttribute<string> {
|
|
964
|
-
type: "status";
|
|
965
|
-
options: Option[];
|
|
966
|
-
}
|
|
967
|
-
interface Location {
|
|
968
|
-
address?: string;
|
|
969
|
-
address2?: string;
|
|
970
|
-
city?: string;
|
|
971
|
-
state?: string;
|
|
972
|
-
postalCode?: string;
|
|
973
|
-
country?: CountryIso3;
|
|
974
|
-
latitude?: number;
|
|
975
|
-
longitude?: number;
|
|
976
|
-
}
|
|
977
|
-
type LocationGranularity = "full" | "address" | "city" | "state" | "country" | "coordinates";
|
|
978
|
-
interface LocationAttribute extends BaseAttribute<Location> {
|
|
979
|
-
type: "location";
|
|
980
|
-
granularity: LocationGranularity;
|
|
981
|
-
enableAutocomplete?: boolean;
|
|
982
|
-
enableMap?: boolean;
|
|
983
|
-
defaultCountry?: CountryIso3;
|
|
984
|
-
allowedCountries?: CountryIso3[];
|
|
985
|
-
displayFormat?: "single_line" | "multi_line" | "compact";
|
|
986
|
-
}
|
|
987
|
-
/**
|
|
988
|
-
* SelectAttribute - For simple single-choice selection
|
|
989
|
-
* Use this for: Categories, Document types, Departments, Priorities
|
|
990
|
-
* Options can be grouped (e.g., countries by continent) but no workflow logic
|
|
991
|
-
*/
|
|
992
|
-
interface SelectAttribute extends BaseAttribute<string> {
|
|
993
|
-
type: "select";
|
|
994
|
-
options: Option[];
|
|
995
|
-
}
|
|
996
|
-
interface MultiselectAttribute extends BaseAttribute<string[]> {
|
|
997
|
-
type: "multiselect";
|
|
998
|
-
options: Option[];
|
|
999
|
-
}
|
|
1000
|
-
interface FileAttribute extends BaseAttribute<string> {
|
|
1001
|
-
type: "file";
|
|
1002
|
-
maxFiles?: number;
|
|
1003
|
-
maxSize?: number;
|
|
1004
|
-
allowedTypes?: MimeType[] | readonly MimeType[];
|
|
1005
|
-
multiple?: boolean;
|
|
1006
|
-
}
|
|
1007
|
-
interface UserAttribute extends BaseAttribute<string> {
|
|
1008
|
-
type: "user";
|
|
1009
|
-
allowedRoles?: string[];
|
|
1010
|
-
multiple?: boolean;
|
|
1011
|
-
}
|
|
1012
|
-
/**
|
|
1013
|
-
* Wildcard marker for universal relations (can link to any object)
|
|
1014
|
-
* Use with `.toAny()` builder method
|
|
1015
|
-
*/
|
|
1016
|
-
declare const RELATION_TARGET_ANY: "*";
|
|
1017
|
-
/**
|
|
1018
|
-
* Target object for a relation - defines which objects can be linked
|
|
1019
|
-
*/
|
|
1020
|
-
interface RelationTarget {
|
|
1021
|
-
/** Object name (e.g., "companies", "contacts") or "*" for any object */
|
|
1022
|
-
object: string;
|
|
1023
|
-
/**
|
|
1024
|
-
* Display template for the label using mustache-like syntax
|
|
1025
|
-
* @example "{name}" or "{firstName} {lastName} — {email}"
|
|
1026
|
-
*/
|
|
1027
|
-
displayTemplate?: string;
|
|
1028
|
-
/**
|
|
1029
|
-
* Optional filter to restrict available records
|
|
1030
|
-
* @example { status: "active" }
|
|
1031
|
-
*/
|
|
1032
|
-
filter?: Record<string, unknown>;
|
|
1033
|
-
}
|
|
1034
|
-
/**
|
|
1035
|
-
* Base properties shared by both single and multi relation attributes
|
|
1036
|
-
*
|
|
1037
|
-
* Note: Deletion behavior is always "restrict" - if a record is referenced
|
|
1038
|
-
* by other records, it cannot be deleted until those references are removed.
|
|
1039
|
-
* This is enforced by RecordService.deleteRecord() which throws
|
|
1040
|
-
* RecordReferencedError when attempting to delete a referenced record.
|
|
1041
|
-
*/
|
|
1042
|
-
interface RelationAttributeBase extends Omit<BaseAttribute<unknown>, "defaultValue"> {
|
|
1043
|
-
type: "relation";
|
|
1044
|
-
/** Target objects that can be linked */
|
|
1045
|
-
targets: RelationTarget[];
|
|
1046
|
-
}
|
|
1047
|
-
/**
|
|
1048
|
-
* Single relation attribute (one-to-one or many-to-one)
|
|
1049
|
-
* Stores a single record ID or null
|
|
1050
|
-
*/
|
|
1051
|
-
interface SingleRelationAttribute extends RelationAttributeBase {
|
|
1052
|
-
cardinality: "one";
|
|
1053
|
-
defaultValue?: string | null;
|
|
1054
|
-
}
|
|
1055
|
-
/**
|
|
1056
|
-
* Multi relation attribute (one-to-many or many-to-many)
|
|
1057
|
-
* Stores an array of record IDs
|
|
1058
|
-
*/
|
|
1059
|
-
interface MultiRelationAttribute extends RelationAttributeBase {
|
|
1060
|
-
cardinality: "many";
|
|
1061
|
-
defaultValue?: string[];
|
|
1062
|
-
/** Minimum number of relations required */
|
|
1063
|
-
minItems?: number;
|
|
1064
|
-
/** Maximum number of relations allowed */
|
|
1065
|
-
maxItems?: number;
|
|
1066
|
-
}
|
|
1067
|
-
/**
|
|
1068
|
-
* RelationAttribute links to other objects/records
|
|
1069
|
-
* Discriminated union by cardinality for type-safe value handling
|
|
1070
|
-
*
|
|
1071
|
-
* @example Single relation (many-to-one)
|
|
1072
|
-
* ```typescript
|
|
1073
|
-
* relation({ name: "company", label: "Company" })
|
|
1074
|
-
* .to("companies")
|
|
1075
|
-
* .required()
|
|
1076
|
-
* // → Value: "rec-uuid-123" | null
|
|
1077
|
-
* ```
|
|
1078
|
-
*
|
|
1079
|
-
* @example Multi relation (many-to-many)
|
|
1080
|
-
* ```typescript
|
|
1081
|
-
* relation({ name: "contacts", label: "Contacts" })
|
|
1082
|
-
* .to("contacts", { displayTemplate: "{firstName} {lastName}" })
|
|
1083
|
-
* .many()
|
|
1084
|
-
* .maxItems(5)
|
|
1085
|
-
* // → Value: ["rec-1", "rec-2", ...]
|
|
1086
|
-
* ```
|
|
1087
|
-
*
|
|
1088
|
-
* @example Polymorphic relation (multiple target objects)
|
|
1089
|
-
* ```typescript
|
|
1090
|
-
* relation({ name: "linked", label: "Linked Items" })
|
|
1091
|
-
* .to("companies")
|
|
1092
|
-
* .to("contacts")
|
|
1093
|
-
* .to("deals")
|
|
1094
|
-
* .many()
|
|
1095
|
-
* // → Can link to records from any of these objects
|
|
1096
|
-
* ```
|
|
1097
|
-
*/
|
|
1098
|
-
type RelationAttribute = SingleRelationAttribute | MultiRelationAttribute;
|
|
1099
|
-
/**
|
|
1100
|
-
* Check if a relation attribute is universal (can link to any object)
|
|
1101
|
-
* Universal relations have `targets: [{ object: "*" }]`
|
|
1102
|
-
*/
|
|
1103
|
-
declare function isUniversalRelation(attr: RelationAttribute): boolean;
|
|
1104
|
-
interface TextAreaAttribute extends BaseAttribute<string> {
|
|
1105
|
-
type: "textarea";
|
|
1106
|
-
}
|
|
1107
|
-
/**
|
|
1108
|
-
* Available features for richtext editor
|
|
1109
|
-
*/
|
|
1110
|
-
type RichtextFeature = "headings" | "bold" | "italic" | "lists" | "links" | "images" | "codeBlocks" | "tables";
|
|
1111
|
-
/**
|
|
1112
|
-
* RichtextAttribute - Rich text content using semantic markdown
|
|
1113
|
-
*
|
|
1114
|
-
* Stores content as semantic markdown string (with directives like :::callout).
|
|
1115
|
-
* Parsed at runtime to Tiptap JSON for editing.
|
|
1116
|
-
* Use this for: Notes, articles, descriptions, long-form content.
|
|
1117
|
-
*
|
|
1118
|
-
* @example
|
|
1119
|
-
* ```typescript
|
|
1120
|
-
* richtext({ name: "content", label: "Content" })
|
|
1121
|
-
* .features(["headings", "bold", "italic", "lists", "links"])
|
|
1122
|
-
* .required()
|
|
1123
|
-
* ```
|
|
1124
|
-
*/
|
|
1125
|
-
interface RichtextAttribute extends BaseAttribute<string> {
|
|
1126
|
-
type: "richtext";
|
|
1127
|
-
/** Enabled features. If undefined, all features are enabled. */
|
|
1128
|
-
features?: RichtextFeature[];
|
|
1129
|
-
}
|
|
1130
|
-
interface RatingAttribute extends BaseAttribute<number> {
|
|
1131
|
-
type: "rating";
|
|
1132
|
-
max?: number;
|
|
1133
|
-
iconType?: "star" | "heart" | "thumbs" | "number";
|
|
1134
|
-
}
|
|
1135
|
-
/**
|
|
1136
|
-
* Return type for formula expressions
|
|
1137
|
-
*/
|
|
1138
|
-
type FormulaReturnType = "text" | "number" | "boolean" | "date";
|
|
1139
|
-
/**
|
|
1140
|
-
* FormulaAttribute - Computed value based on other attributes
|
|
1141
|
-
*
|
|
1142
|
-
* Formulas are calculated at read-time and are always read-only.
|
|
1143
|
-
* Users cannot directly edit formula values.
|
|
1144
|
-
*
|
|
1145
|
-
* @example Simple calculation
|
|
1146
|
-
* ```typescript
|
|
1147
|
-
* formula({ name: "total", label: "Total" })
|
|
1148
|
-
* .expression("price * quantity")
|
|
1149
|
-
* .returns("number")
|
|
1150
|
-
* .decimals(2)
|
|
1151
|
-
* ```
|
|
1152
|
-
*
|
|
1153
|
-
* @example With functions
|
|
1154
|
-
* ```typescript
|
|
1155
|
-
* formula({ name: "fullName", label: "Full Name" })
|
|
1156
|
-
* .expression("CONCAT(firstName, ' ', lastName)")
|
|
1157
|
-
* .returns("text")
|
|
1158
|
-
* ```
|
|
1159
|
-
*/
|
|
1160
|
-
interface FormulaAttribute extends Omit<BaseAttribute<never>, "defaultValue" | "required"> {
|
|
1161
|
-
type: "formula";
|
|
1162
|
-
/** Expression to evaluate (e.g., "price * quantity") */
|
|
1163
|
-
expression: string;
|
|
1164
|
-
/** Expected return type for formatting */
|
|
1165
|
-
returnType: FormulaReturnType;
|
|
1166
|
-
/** Decimal places for number results */
|
|
1167
|
-
decimals?: number;
|
|
1168
|
-
/** Whether to allow relation references in the expression (e.g., "company.name") */
|
|
1169
|
-
allowRelations?: boolean;
|
|
1170
|
-
/** Formula is always not required (read-only) */
|
|
1171
|
-
required: false;
|
|
1172
|
-
}
|
|
1173
|
-
/**
|
|
1174
|
-
* Aggregation functions for rollup attributes
|
|
1175
|
-
*
|
|
1176
|
-
* Categories:
|
|
1177
|
-
* - Numeric (sum, avg): Only for number, currency, rating types
|
|
1178
|
-
* - Date (earliest, latest): Only for date type
|
|
1179
|
-
* - Count (count, countValues, countUniqueValues, countEmpty): Universal
|
|
1180
|
-
* - Percent (percentEmpty, percentNotEmpty): Universal
|
|
1181
|
-
* - Lookup (original): Returns all values as array, rendered as target type
|
|
1182
|
-
*/
|
|
1183
|
-
type RollupFunction = "sum" | "avg" | "earliest" | "latest" | "count" | "countValues" | "countUniqueValues" | "countEmpty" | "percentEmpty" | "percentNotEmpty" | "original";
|
|
1184
|
-
/**
|
|
1185
|
-
* RollupAttribute - Aggregates values from related records
|
|
1186
|
-
*
|
|
1187
|
-
* Rollups are calculated and stored (denormalized) for performance.
|
|
1188
|
-
* They are automatically recalculated when related records change.
|
|
1189
|
-
* Users cannot directly edit rollup values.
|
|
1190
|
-
*
|
|
1191
|
-
* @example Sum of related amounts
|
|
1192
|
-
* ```typescript
|
|
1193
|
-
* rollup({ name: "totalOrders", label: "Total Orders" })
|
|
1194
|
-
* .from("orders") // relation attribute name
|
|
1195
|
-
* .aggregate("amount") // target attribute to sum
|
|
1196
|
-
* .using("sum")
|
|
1197
|
-
* .decimals(2)
|
|
1198
|
-
* ```
|
|
1199
|
-
*
|
|
1200
|
-
* @example Count of related records
|
|
1201
|
-
* ```typescript
|
|
1202
|
-
* rollup({ name: "orderCount", label: "Number of Orders" })
|
|
1203
|
-
* .from("orders")
|
|
1204
|
-
* .using("count")
|
|
1205
|
-
* ```
|
|
1206
|
-
*/
|
|
1207
|
-
interface RollupAttribute extends Omit<BaseAttribute<never>, "defaultValue" | "required"> {
|
|
1208
|
-
type: "rollup";
|
|
1209
|
-
/** Name of the relation attribute on this object */
|
|
1210
|
-
relationAttribute: string;
|
|
1211
|
-
/**
|
|
1212
|
-
* Dot notation path for multi-level traversal (Phase 4+)
|
|
1213
|
-
* @example "orders.items" - traverse through orders to items
|
|
1214
|
-
*/
|
|
1215
|
-
relationPath?: string;
|
|
1216
|
-
/** Attribute name on the target object to aggregate */
|
|
1217
|
-
targetAttribute: string;
|
|
1218
|
-
/** Aggregation function to apply */
|
|
1219
|
-
function: RollupFunction;
|
|
1220
|
-
/** Decimal places for numeric results */
|
|
1221
|
-
decimals?: number;
|
|
1222
|
-
/** Rollup is always not required (read-only) */
|
|
1223
|
-
required: false;
|
|
1224
|
-
/**
|
|
1225
|
-
* Cached type of the target attribute for display purposes
|
|
1226
|
-
* Used when function="original" to render values as the target type
|
|
1227
|
-
*/
|
|
1228
|
-
targetAttributeType?: AttributeType;
|
|
1229
|
-
/**
|
|
1230
|
-
* Cached options from target attribute (for select/status/multiselect display)
|
|
1231
|
-
* Required when function="original" and target is a select-like type
|
|
1232
|
-
*/
|
|
1233
|
-
targetAttributeOptions?: Option[];
|
|
1234
|
-
}
|
|
1235
|
-
/**
|
|
1236
|
-
* DocumentAttribute - References one or multiple documents with templates.
|
|
1237
|
-
*
|
|
1238
|
-
* Unlike FileAttribute which stores raw file references, DocumentAttribute
|
|
1239
|
-
* provides structured document handling with templates, multi-file support,
|
|
1240
|
-
* and automatic processing (OCR, signature, identity verification).
|
|
1241
|
-
*
|
|
1242
|
-
* @example Single document with template choice
|
|
1243
|
-
* ```typescript
|
|
1244
|
-
* document({ name: "identityDocument", label: "Pièce d'identité" })
|
|
1245
|
-
* .templates(["french_id_card", "passport"])
|
|
1246
|
-
* .autoProcess()
|
|
1247
|
-
* .required()
|
|
1248
|
-
* ```
|
|
1249
|
-
*
|
|
1250
|
-
* @example Multiple documents with fixed template
|
|
1251
|
-
* ```typescript
|
|
1252
|
-
* document({ name: "contracts", label: "Contrats" })
|
|
1253
|
-
* .template("signable_contract")
|
|
1254
|
-
* .multiple()
|
|
1255
|
-
* .maxDocuments(10)
|
|
1256
|
-
* ```
|
|
1257
|
-
*/
|
|
1258
|
-
interface DocumentAttribute extends BaseAttribute<string | string[]> {
|
|
1259
|
-
type: "document";
|
|
1260
|
-
/**
|
|
1261
|
-
* Single template ID (strict mode).
|
|
1262
|
-
* If set, only documents using this template can be attached.
|
|
1263
|
-
*/
|
|
1264
|
-
templateId?: string;
|
|
1265
|
-
/**
|
|
1266
|
-
* Multiple allowed template IDs.
|
|
1267
|
-
* User can choose which template to use when uploading.
|
|
1268
|
-
*/
|
|
1269
|
-
allowedTemplates?: string[];
|
|
1270
|
-
/**
|
|
1271
|
-
* Allow multiple documents.
|
|
1272
|
-
* If true, value is string[] (document IDs).
|
|
1273
|
-
* If false/undefined, value is string (single document ID).
|
|
1274
|
-
*/
|
|
1275
|
-
multiple?: boolean;
|
|
1276
|
-
/**
|
|
1277
|
-
* Maximum number of documents when multiple: true.
|
|
1278
|
-
*/
|
|
1279
|
-
maxDocuments?: number;
|
|
1280
|
-
/**
|
|
1281
|
-
* Automatically trigger processing (OCR, verification) on upload.
|
|
1282
|
-
*/
|
|
1283
|
-
autoProcess?: boolean;
|
|
1284
|
-
}
|
|
1285
|
-
type Attribute = TextAttribute | TextAreaAttribute | RichtextAttribute | NumberAttribute | CheckboxAttribute | DateAttribute | PhoneAttribute | CurrencyAttribute | StatusAttribute | LocationAttribute | SelectAttribute | MultiselectAttribute | FileAttribute | UserAttribute | RelationAttribute | RatingAttribute | FormulaAttribute | RollupAttribute | DocumentAttribute;
|
|
1286
|
-
|
|
1287
583
|
/**
|
|
1288
584
|
* Type of resource that can be audited
|
|
1289
585
|
*/
|
|
@@ -1530,199 +826,19 @@ interface PendingDocumentRequest {
|
|
|
1530
826
|
id: string;
|
|
1531
827
|
/** Template ID to use for generation */
|
|
1532
828
|
templateId: string;
|
|
1533
|
-
/** Custom filename (supports variable interpolation) */
|
|
1534
|
-
filename?: string;
|
|
1535
|
-
/** Slot IDs of records to attach the generated document to */
|
|
1536
|
-
targetSlotIds?: string[];
|
|
1537
|
-
/** Request status */
|
|
1538
|
-
status: "pending" | "processing" | "completed" | "failed";
|
|
1539
|
-
/** Error message if failed */
|
|
1540
|
-
error?: string;
|
|
1541
|
-
/** Generated document URL (when completed) */
|
|
1542
|
-
url?: string;
|
|
1543
|
-
/** File size in bytes (when completed) */
|
|
1544
|
-
size?: number;
|
|
1545
|
-
}
|
|
1546
|
-
/**
|
|
1547
|
-
* Check if a template source is PDF type
|
|
1548
|
-
*/
|
|
1549
|
-
declare function isPdfTemplateSource(source: TemplateSource): source is Extract<TemplateSource, {
|
|
1550
|
-
type: "pdf";
|
|
1551
|
-
}>;
|
|
1552
|
-
/**
|
|
1553
|
-
* Check if a template source is DOCX type
|
|
1554
|
-
*/
|
|
1555
|
-
declare function isDocxTemplateSource(source: TemplateSource): source is Extract<TemplateSource, {
|
|
1556
|
-
type: "docx";
|
|
1557
|
-
}>;
|
|
1558
|
-
|
|
1559
|
-
/**
|
|
1560
|
-
* Timestamps for tracking creation and updates
|
|
1561
|
-
*/
|
|
1562
|
-
interface Timestamps {
|
|
1563
|
-
createdAt: Date;
|
|
1564
|
-
updatedAt: Date;
|
|
1565
|
-
}
|
|
1566
|
-
/**
|
|
1567
|
-
* Sharing mode for multi-tenant object access.
|
|
1568
|
-
*
|
|
1569
|
-
* - `private`: Object is only visible to its owner tenant (default)
|
|
1570
|
-
* - `shared`: Object is readable by all tenants, but only writable by the owner tenant
|
|
1571
|
-
*
|
|
1572
|
-
* Records inherit the sharing mode of their parent object.
|
|
1573
|
-
*/
|
|
1574
|
-
type SharingMode = "private" | "shared";
|
|
1575
|
-
/**
|
|
1576
|
-
* Object definition - Represents a database table/entity
|
|
1577
|
-
*/
|
|
1578
|
-
interface ObjectDefinition {
|
|
1579
|
-
id?: Uuid;
|
|
1580
|
-
name: string;
|
|
1581
|
-
label: string;
|
|
1582
|
-
pluralLabel?: string;
|
|
1583
|
-
description?: string;
|
|
1584
|
-
icon?: IconName;
|
|
1585
|
-
/**
|
|
1586
|
-
* Template expression used to compute the object's display label.
|
|
1587
|
-
* Supports variable interpolation and pipes for formatting.
|
|
1588
|
-
*
|
|
1589
|
-
* @example
|
|
1590
|
-
* ```typescript
|
|
1591
|
-
* // Simple attribute reference
|
|
1592
|
-
* labelExpression: "{{ name }}"
|
|
1593
|
-
*
|
|
1594
|
-
* // Multiple attributes
|
|
1595
|
-
* labelExpression: "{{ firstName }} {{ lastName }}"
|
|
1596
|
-
*
|
|
1597
|
-
* // With pipes for formatting
|
|
1598
|
-
* labelExpression: "{{ code | UPPER }} - {{ name | capitalize }}"
|
|
1599
|
-
* ```
|
|
1600
|
-
*
|
|
1601
|
-
* Available pipes: UPPER, LOWER, capitalize, trim
|
|
1602
|
-
*/
|
|
1603
|
-
labelExpression: string;
|
|
1604
|
-
attributes: Attribute[];
|
|
1605
|
-
system?: boolean;
|
|
1606
|
-
/**
|
|
1607
|
-
* Sharing mode for multi-tenant access.
|
|
1608
|
-
* - `private`: Only visible to the owner tenant (default)
|
|
1609
|
-
* - `shared`: Readable by all tenants, writable only by the owner
|
|
1610
|
-
*
|
|
1611
|
-
* Records inherit the sharing mode of their parent object.
|
|
1612
|
-
* @default "private"
|
|
1613
|
-
*/
|
|
1614
|
-
sharingMode?: SharingMode;
|
|
1615
|
-
metadata?: Record<string, unknown>;
|
|
1616
|
-
}
|
|
1617
|
-
/**
|
|
1618
|
-
* Links an attribute to an object
|
|
1619
|
-
*/
|
|
1620
|
-
interface ObjectAttribute {
|
|
1621
|
-
objectId: Uuid;
|
|
1622
|
-
attributeId: Uuid;
|
|
1623
|
-
order?: number;
|
|
1624
|
-
required?: boolean;
|
|
1625
|
-
}
|
|
1626
|
-
/**
|
|
1627
|
-
* Completion status of a record based on data completeness.
|
|
1628
|
-
*
|
|
1629
|
-
* - `draft`: Record is missing one or more required attribute values.
|
|
1630
|
-
* Can be saved but is considered incomplete.
|
|
1631
|
-
* - `complete`: All required attribute values are present and valid.
|
|
1632
|
-
* Record is ready for use.
|
|
1633
|
-
*
|
|
1634
|
-
* This is different from workflow status (e.g., "pending", "approved").
|
|
1635
|
-
* Completion status is computed dynamically based on the object schema.
|
|
1636
|
-
*/
|
|
1637
|
-
type CompletionStatus = "draft" | "complete";
|
|
1638
|
-
/**
|
|
1639
|
-
* Record - Instance of an Object (a row in the database)
|
|
1640
|
-
*/
|
|
1641
|
-
interface ObjectRecord extends Timestamps {
|
|
1642
|
-
id: Uuid;
|
|
1643
|
-
objectId: Uuid;
|
|
1644
|
-
/**
|
|
1645
|
-
* Display label computed from the object's labelExpression.
|
|
1646
|
-
* Computed dynamically based on record values.
|
|
1647
|
-
*
|
|
1648
|
-
* @example "John Doe" (from "{{ firstName }} {{ lastName }}")
|
|
1649
|
-
*/
|
|
1650
|
-
label: string;
|
|
1651
|
-
/**
|
|
1652
|
-
* Completion status of the record.
|
|
1653
|
-
* - `draft`: Missing required values, record is incomplete
|
|
1654
|
-
* - `complete`: All required values present and valid
|
|
1655
|
-
*
|
|
1656
|
-
* Computed dynamically based on the object's schema.
|
|
1657
|
-
*/
|
|
1658
|
-
completionStatus: CompletionStatus;
|
|
1659
|
-
values: Record<string, unknown>;
|
|
1660
|
-
/**
|
|
1661
|
-
* Custom metadata for the record.
|
|
1662
|
-
* Use this for UI/UX state, feature flags, or any application-specific data.
|
|
1663
|
-
* Unlike system fields (id, createdAt, updatedAt), metadata can be updated.
|
|
1664
|
-
*/
|
|
1665
|
-
metadata?: Record<string, unknown>;
|
|
1666
|
-
/**
|
|
1667
|
-
* Soft delete timestamp.
|
|
1668
|
-
* If set, the record is considered deleted but can be restored.
|
|
1669
|
-
* Queries exclude soft-deleted records by default.
|
|
1670
|
-
*/
|
|
1671
|
-
deletedAt?: Date | null;
|
|
1672
|
-
/**
|
|
1673
|
-
* User ID who created this record.
|
|
1674
|
-
* Automatically set by RecordService when userId is configured.
|
|
1675
|
-
* Optional for backward compatibility with existing records.
|
|
1676
|
-
*/
|
|
1677
|
-
createdBy?: string;
|
|
1678
|
-
/**
|
|
1679
|
-
* User ID who last updated this record.
|
|
1680
|
-
* Automatically set by RecordService when userId is configured.
|
|
1681
|
-
* Optional for backward compatibility with existing records.
|
|
1682
|
-
*/
|
|
1683
|
-
lastUpdatedBy?: string;
|
|
1684
|
-
}
|
|
1685
|
-
/**
|
|
1686
|
-
* System-managed field names on ObjectRecord.
|
|
1687
|
-
* These are stored as SQL columns (not in JSONB `values`).
|
|
1688
|
-
*
|
|
1689
|
-
* Use this in adapters to determine if a filter/sort attribute is a table column
|
|
1690
|
-
* vs. a JSONB value field.
|
|
1691
|
-
*
|
|
1692
|
-
* @example
|
|
1693
|
-
* ```typescript
|
|
1694
|
-
* if (SYSTEM_FIELD_NAMES.includes(filter.attribute)) {
|
|
1695
|
-
* // Filter on SQL column (e.g., WHERE created_at > ...)
|
|
1696
|
-
* } else {
|
|
1697
|
-
* // Filter on JSONB field (e.g., WHERE values->>'name' = ...)
|
|
1698
|
-
* }
|
|
1699
|
-
* ```
|
|
1700
|
-
*/
|
|
1701
|
-
declare const SYSTEM_FIELD_NAMES: readonly ["id", "createdAt", "updatedAt", "createdBy", "lastUpdatedBy"];
|
|
1702
|
-
/**
|
|
1703
|
-
* Type for system field names
|
|
1704
|
-
*/
|
|
1705
|
-
type SystemFieldName = (typeof SYSTEM_FIELD_NAMES)[number];
|
|
1706
|
-
/**
|
|
1707
|
-
* Reserved attribute names that cannot be used for custom attributes.
|
|
1708
|
-
* These names conflict with ObjectRecord properties.
|
|
1709
|
-
*
|
|
1710
|
-
* Includes:
|
|
1711
|
-
* - System fields (id, createdAt, updatedAt, createdBy, lastUpdatedBy)
|
|
1712
|
-
* - Other ObjectRecord properties (objectId, label, completionStatus, values, metadata, deletedAt)
|
|
1713
|
-
*
|
|
1714
|
-
* @example
|
|
1715
|
-
* ```typescript
|
|
1716
|
-
* if (RESERVED_ATTRIBUTE_NAMES.includes(attributeName)) {
|
|
1717
|
-
* throw new Error(`"${attributeName}" is a reserved name`);
|
|
1718
|
-
* }
|
|
1719
|
-
* ```
|
|
1720
|
-
*/
|
|
1721
|
-
declare const RESERVED_ATTRIBUTE_NAMES: readonly ["id", "createdAt", "updatedAt", "createdBy", "lastUpdatedBy", "objectId", "label", "completionStatus", "values", "metadata", "deletedAt"];
|
|
1722
|
-
/**
|
|
1723
|
-
* Type for reserved attribute names
|
|
1724
|
-
*/
|
|
1725
|
-
type ReservedAttributeName = (typeof RESERVED_ATTRIBUTE_NAMES)[number];
|
|
829
|
+
/** Custom filename (supports variable interpolation) */
|
|
830
|
+
filename?: string;
|
|
831
|
+
/** Slot IDs of records to attach the generated document to */
|
|
832
|
+
targetSlotIds?: string[];
|
|
833
|
+
/** Request status */
|
|
834
|
+
status: "pending" | "processing" | "completed" | "failed";
|
|
835
|
+
/** Error message if failed */
|
|
836
|
+
error?: string;
|
|
837
|
+
/** Generated document URL (when completed) */
|
|
838
|
+
url?: string;
|
|
839
|
+
/** File size in bytes (when completed) */
|
|
840
|
+
size?: number;
|
|
841
|
+
}
|
|
1726
842
|
|
|
1727
843
|
/**
|
|
1728
844
|
* DocumentTemplate defines the structure and processing rules for a document type.
|
|
@@ -2234,19 +1350,6 @@ interface AdvancedFilterState {
|
|
|
2234
1350
|
/** List of filter groups */
|
|
2235
1351
|
groups: FilterGroup[];
|
|
2236
1352
|
}
|
|
2237
|
-
/**
|
|
2238
|
-
* Type guard to check if a filter state is advanced
|
|
2239
|
-
*/
|
|
2240
|
-
declare function isAdvancedFilterState(state: FilterState | AdvancedFilterState): state is AdvancedFilterState;
|
|
2241
|
-
/**
|
|
2242
|
-
* Convert simple filter state to advanced filter state
|
|
2243
|
-
*/
|
|
2244
|
-
declare function toAdvancedFilterState(state: FilterState): AdvancedFilterState;
|
|
2245
|
-
/**
|
|
2246
|
-
* Convert advanced filter state to simple filter state (flattens groups)
|
|
2247
|
-
* Note: This loses group structure - use with caution
|
|
2248
|
-
*/
|
|
2249
|
-
declare function toSimpleFilterState(state: AdvancedFilterState): FilterState;
|
|
2250
1353
|
/** Sort direction */
|
|
2251
1354
|
type SortDirection = "asc" | "desc";
|
|
2252
1355
|
/** A single sort rule */
|
|
@@ -3205,10 +2308,6 @@ declare function getContextValue(context: WorkflowExecutionContext, path: string
|
|
|
3205
2308
|
* ```
|
|
3206
2309
|
*/
|
|
3207
2310
|
declare function setContextValue(context: WorkflowExecutionContext, path: string, value: unknown): void;
|
|
3208
|
-
/**
|
|
3209
|
-
* Merge form data into slot record
|
|
3210
|
-
*/
|
|
3211
|
-
declare function mergeFormToSlot(context: WorkflowExecutionContext, nodeId: string, slotId: string): void;
|
|
3212
2311
|
|
|
3213
2312
|
/**
|
|
3214
2313
|
* All supported comparison operators for condition rules
|
|
@@ -3305,14 +2404,6 @@ declare function or(...rules: Array<ConditionRule | ConditionGroup>): ConditionG
|
|
|
3305
2404
|
* Create an "in" condition (value in array)
|
|
3306
2405
|
*/
|
|
3307
2406
|
declare function inValues(field: string, values: unknown[]): ConditionRule;
|
|
3308
|
-
/**
|
|
3309
|
-
* Create an isEmpty condition
|
|
3310
|
-
*/
|
|
3311
|
-
declare function isEmpty(field: string): ConditionRule;
|
|
3312
|
-
/**
|
|
3313
|
-
* Create an isNotEmpty condition
|
|
3314
|
-
*/
|
|
3315
|
-
declare function isNotEmpty(field: string): ConditionRule;
|
|
3316
2407
|
|
|
3317
2408
|
/**
|
|
3318
2409
|
* Base properties shared by all workflow nodes
|
|
@@ -4749,6 +3840,12 @@ interface ListOptions {
|
|
|
4749
3840
|
* @default false
|
|
4750
3841
|
*/
|
|
4751
3842
|
includeDeleted?: boolean;
|
|
3843
|
+
/**
|
|
3844
|
+
* Include related records in results.
|
|
3845
|
+
* For qualified relations (with properties), returns format: Array<{ id, props }>
|
|
3846
|
+
* For normal relations (without properties), returns legacy format: string[]
|
|
3847
|
+
*/
|
|
3848
|
+
include?: string[];
|
|
4752
3849
|
}
|
|
4753
3850
|
/**
|
|
4754
3851
|
* Search options for full-text search
|
|
@@ -5563,737 +4660,6 @@ declare class ViewRegistry {
|
|
|
5563
4660
|
*/
|
|
5564
4661
|
declare const viewRegistry: ViewRegistry;
|
|
5565
4662
|
|
|
5566
|
-
/**
|
|
5567
|
-
* Validation messages for Zod validators.
|
|
5568
|
-
* All functions receive the full Attribute to access label, type, etc.
|
|
5569
|
-
* Can be customized for i18n support.
|
|
5570
|
-
*/
|
|
5571
|
-
interface ValidationMessages {
|
|
5572
|
-
required: (attr: Attribute) => string;
|
|
5573
|
-
invalidType: (attr: Attribute, expected: string) => string;
|
|
5574
|
-
minLength: (attr: Attribute, min: number) => string;
|
|
5575
|
-
maxLength: (attr: Attribute, max: number) => string;
|
|
5576
|
-
invalidPattern: (attr: Attribute) => string;
|
|
5577
|
-
minValue: (attr: Attribute, min: number) => string;
|
|
5578
|
-
maxValue: (attr: Attribute, max: number) => string;
|
|
5579
|
-
mustBeInteger: (attr: Attribute) => string;
|
|
5580
|
-
invalidDate: (attr: Attribute) => string;
|
|
5581
|
-
invalidOption: (attr: Attribute, options: string[]) => string;
|
|
5582
|
-
invalidId: (attr: Attribute) => string;
|
|
5583
|
-
minItems: (attr: Attribute, min: number) => string;
|
|
5584
|
-
maxItems: (attr: Attribute, max: number) => string;
|
|
5585
|
-
invalidRichtext: (attr: Attribute) => string;
|
|
5586
|
-
invalidPhone: (attr: Attribute) => string;
|
|
5587
|
-
invalidCurrency: (attr: Attribute) => string;
|
|
5588
|
-
invalidLocation: (attr: Attribute) => string;
|
|
5589
|
-
}
|
|
5590
|
-
declare const DEFAULT_VALIDATION_MESSAGES: ValidationMessages;
|
|
5591
|
-
/**
|
|
5592
|
-
* Text attribute config schema
|
|
5593
|
-
*/
|
|
5594
|
-
declare const textConfigSchema: z.ZodObject<{
|
|
5595
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
5596
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
5597
|
-
description: z.ZodOptional<z.ZodString>;
|
|
5598
|
-
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
5599
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
5600
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5601
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
5602
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
5603
|
-
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
5604
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5605
|
-
minLength: z.ZodOptional<z.ZodNumber>;
|
|
5606
|
-
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
5607
|
-
pattern: z.ZodOptional<z.ZodString>;
|
|
5608
|
-
}, z.core.$strip>;
|
|
5609
|
-
/**
|
|
5610
|
-
* Textarea attribute config schema
|
|
5611
|
-
*/
|
|
5612
|
-
declare const textareaConfigSchema: z.ZodObject<{
|
|
5613
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
5614
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
5615
|
-
description: z.ZodOptional<z.ZodString>;
|
|
5616
|
-
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
5617
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
5618
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5619
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
5620
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
5621
|
-
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
5622
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5623
|
-
}, z.core.$strip>;
|
|
5624
|
-
/**
|
|
5625
|
-
* Richtext attribute config schema
|
|
5626
|
-
*/
|
|
5627
|
-
declare const richtextConfigSchema: z.ZodObject<{
|
|
5628
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
5629
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
5630
|
-
description: z.ZodOptional<z.ZodString>;
|
|
5631
|
-
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
5632
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
5633
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5634
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
5635
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
5636
|
-
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
5637
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5638
|
-
features: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
5639
|
-
headings: "headings";
|
|
5640
|
-
bold: "bold";
|
|
5641
|
-
italic: "italic";
|
|
5642
|
-
lists: "lists";
|
|
5643
|
-
links: "links";
|
|
5644
|
-
images: "images";
|
|
5645
|
-
codeBlocks: "codeBlocks";
|
|
5646
|
-
tables: "tables";
|
|
5647
|
-
}>>>;
|
|
5648
|
-
}, z.core.$strip>;
|
|
5649
|
-
/**
|
|
5650
|
-
* Number attribute config schema
|
|
5651
|
-
*/
|
|
5652
|
-
declare const numberConfigSchema: z.ZodObject<{
|
|
5653
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
5654
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
5655
|
-
description: z.ZodOptional<z.ZodString>;
|
|
5656
|
-
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
5657
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
5658
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5659
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
5660
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
5661
|
-
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
5662
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5663
|
-
min: z.ZodOptional<z.ZodNumber>;
|
|
5664
|
-
max: z.ZodOptional<z.ZodNumber>;
|
|
5665
|
-
unit: z.ZodOptional<z.ZodEnum<{
|
|
5666
|
-
percentage: "percentage";
|
|
5667
|
-
integer: "integer";
|
|
5668
|
-
decimal: "decimal";
|
|
5669
|
-
}>>;
|
|
5670
|
-
decimals: z.ZodOptional<z.ZodNumber>;
|
|
5671
|
-
}, z.core.$strip>;
|
|
5672
|
-
/**
|
|
5673
|
-
* Checkbox attribute config schema
|
|
5674
|
-
*/
|
|
5675
|
-
declare const checkboxConfigSchema: z.ZodObject<{
|
|
5676
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
5677
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
5678
|
-
description: z.ZodOptional<z.ZodString>;
|
|
5679
|
-
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
5680
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
5681
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5682
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
5683
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
5684
|
-
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
5685
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5686
|
-
}, z.core.$strip>;
|
|
5687
|
-
/**
|
|
5688
|
-
* Date attribute config schema
|
|
5689
|
-
*/
|
|
5690
|
-
declare const dateConfigSchema: z.ZodObject<{
|
|
5691
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
5692
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
5693
|
-
description: z.ZodOptional<z.ZodString>;
|
|
5694
|
-
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
5695
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
5696
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5697
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
5698
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
5699
|
-
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
5700
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5701
|
-
dateFormat: z.ZodOptional<z.ZodEnum<{
|
|
5702
|
-
short: "short";
|
|
5703
|
-
long: "long";
|
|
5704
|
-
full: "full";
|
|
5705
|
-
relative: "relative";
|
|
5706
|
-
}>>;
|
|
5707
|
-
minDate: z.ZodOptional<z.ZodString>;
|
|
5708
|
-
maxDate: z.ZodOptional<z.ZodString>;
|
|
5709
|
-
}, z.core.$strip>;
|
|
5710
|
-
/**
|
|
5711
|
-
* Phone attribute config schema
|
|
5712
|
-
*/
|
|
5713
|
-
declare const phoneConfigSchema: z.ZodObject<{
|
|
5714
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
5715
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
5716
|
-
description: z.ZodOptional<z.ZodString>;
|
|
5717
|
-
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
5718
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
5719
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5720
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
5721
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
5722
|
-
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
5723
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5724
|
-
defaultCountryCode: z.ZodOptional<z.ZodString>;
|
|
5725
|
-
}, z.core.$strip>;
|
|
5726
|
-
/**
|
|
5727
|
-
* Currency attribute config schema
|
|
5728
|
-
*/
|
|
5729
|
-
declare const currencyConfigSchema: z.ZodObject<{
|
|
5730
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
5731
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
5732
|
-
description: z.ZodOptional<z.ZodString>;
|
|
5733
|
-
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
5734
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
5735
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5736
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
5737
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
5738
|
-
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
5739
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5740
|
-
defaultCurrency: z.ZodOptional<z.ZodString>;
|
|
5741
|
-
allowedCurrencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5742
|
-
}, z.core.$strip>;
|
|
5743
|
-
/**
|
|
5744
|
-
* Status attribute config schema
|
|
5745
|
-
*/
|
|
5746
|
-
declare const statusConfigSchema: z.ZodObject<{
|
|
5747
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
5748
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
5749
|
-
description: z.ZodOptional<z.ZodString>;
|
|
5750
|
-
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
5751
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
5752
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5753
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
5754
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
5755
|
-
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
5756
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5757
|
-
options: z.ZodArray<z.ZodObject<{
|
|
5758
|
-
id: z.ZodString;
|
|
5759
|
-
label: z.ZodString;
|
|
5760
|
-
value: z.ZodString;
|
|
5761
|
-
color: z.ZodOptional<z.ZodString>;
|
|
5762
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
5763
|
-
description: z.ZodOptional<z.ZodString>;
|
|
5764
|
-
group: z.ZodOptional<z.ZodEnum<{
|
|
5765
|
-
in_progress: "in_progress";
|
|
5766
|
-
idle: "idle";
|
|
5767
|
-
finished: "finished";
|
|
5768
|
-
}>>;
|
|
5769
|
-
}, z.core.$strip>>;
|
|
5770
|
-
}, z.core.$strip>;
|
|
5771
|
-
/**
|
|
5772
|
-
* Location attribute config schema
|
|
5773
|
-
*/
|
|
5774
|
-
declare const locationConfigSchema: z.ZodObject<{
|
|
5775
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
5776
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
5777
|
-
description: z.ZodOptional<z.ZodString>;
|
|
5778
|
-
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
5779
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
5780
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5781
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
5782
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
5783
|
-
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
5784
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5785
|
-
granularity: z.ZodEnum<{
|
|
5786
|
-
full: "full";
|
|
5787
|
-
address: "address";
|
|
5788
|
-
city: "city";
|
|
5789
|
-
state: "state";
|
|
5790
|
-
country: "country";
|
|
5791
|
-
coordinates: "coordinates";
|
|
5792
|
-
}>;
|
|
5793
|
-
enableAutocomplete: z.ZodOptional<z.ZodBoolean>;
|
|
5794
|
-
enableMap: z.ZodOptional<z.ZodBoolean>;
|
|
5795
|
-
defaultCountry: z.ZodOptional<z.ZodString>;
|
|
5796
|
-
allowedCountries: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5797
|
-
displayFormat: z.ZodOptional<z.ZodEnum<{
|
|
5798
|
-
single_line: "single_line";
|
|
5799
|
-
multi_line: "multi_line";
|
|
5800
|
-
compact: "compact";
|
|
5801
|
-
}>>;
|
|
5802
|
-
}, z.core.$strip>;
|
|
5803
|
-
/**
|
|
5804
|
-
* Select attribute config schema
|
|
5805
|
-
*/
|
|
5806
|
-
declare const selectConfigSchema: z.ZodObject<{
|
|
5807
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
5808
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
5809
|
-
description: z.ZodOptional<z.ZodString>;
|
|
5810
|
-
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
5811
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
5812
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5813
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
5814
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
5815
|
-
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
5816
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5817
|
-
options: z.ZodArray<z.ZodObject<{
|
|
5818
|
-
id: z.ZodString;
|
|
5819
|
-
label: z.ZodString;
|
|
5820
|
-
value: z.ZodString;
|
|
5821
|
-
color: z.ZodOptional<z.ZodString>;
|
|
5822
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
5823
|
-
description: z.ZodOptional<z.ZodString>;
|
|
5824
|
-
group: z.ZodOptional<z.ZodEnum<{
|
|
5825
|
-
in_progress: "in_progress";
|
|
5826
|
-
idle: "idle";
|
|
5827
|
-
finished: "finished";
|
|
5828
|
-
}>>;
|
|
5829
|
-
}, z.core.$strip>>;
|
|
5830
|
-
}, z.core.$strip>;
|
|
5831
|
-
/**
|
|
5832
|
-
* Multiselect attribute config schema
|
|
5833
|
-
*/
|
|
5834
|
-
declare const multiselectConfigSchema: z.ZodObject<{
|
|
5835
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
5836
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
5837
|
-
description: z.ZodOptional<z.ZodString>;
|
|
5838
|
-
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
5839
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
5840
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5841
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
5842
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
5843
|
-
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
5844
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5845
|
-
options: z.ZodArray<z.ZodObject<{
|
|
5846
|
-
id: z.ZodString;
|
|
5847
|
-
label: z.ZodString;
|
|
5848
|
-
value: z.ZodString;
|
|
5849
|
-
color: z.ZodOptional<z.ZodString>;
|
|
5850
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
5851
|
-
description: z.ZodOptional<z.ZodString>;
|
|
5852
|
-
group: z.ZodOptional<z.ZodEnum<{
|
|
5853
|
-
in_progress: "in_progress";
|
|
5854
|
-
idle: "idle";
|
|
5855
|
-
finished: "finished";
|
|
5856
|
-
}>>;
|
|
5857
|
-
}, z.core.$strip>>;
|
|
5858
|
-
}, z.core.$strip>;
|
|
5859
|
-
/**
|
|
5860
|
-
* File attribute config schema
|
|
5861
|
-
*/
|
|
5862
|
-
declare const fileConfigSchema: z.ZodObject<{
|
|
5863
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
5864
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
5865
|
-
description: z.ZodOptional<z.ZodString>;
|
|
5866
|
-
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
5867
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
5868
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5869
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
5870
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
5871
|
-
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
5872
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5873
|
-
maxFiles: z.ZodOptional<z.ZodNumber>;
|
|
5874
|
-
maxSize: z.ZodOptional<z.ZodNumber>;
|
|
5875
|
-
allowedTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5876
|
-
multiple: z.ZodOptional<z.ZodBoolean>;
|
|
5877
|
-
}, z.core.$strip>;
|
|
5878
|
-
/**
|
|
5879
|
-
* User attribute config schema
|
|
5880
|
-
*/
|
|
5881
|
-
declare const userConfigSchema: z.ZodObject<{
|
|
5882
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
5883
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
5884
|
-
description: z.ZodOptional<z.ZodString>;
|
|
5885
|
-
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
5886
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
5887
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5888
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
5889
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
5890
|
-
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
5891
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5892
|
-
allowedRoles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5893
|
-
multiple: z.ZodOptional<z.ZodBoolean>;
|
|
5894
|
-
}, z.core.$strip>;
|
|
5895
|
-
/**
|
|
5896
|
-
* Relation attribute config schema
|
|
5897
|
-
*/
|
|
5898
|
-
declare const relationConfigSchema: z.ZodObject<{
|
|
5899
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
5900
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
5901
|
-
description: z.ZodOptional<z.ZodString>;
|
|
5902
|
-
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
5903
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
5904
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5905
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
5906
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
5907
|
-
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
5908
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5909
|
-
targets: z.ZodArray<z.ZodObject<{
|
|
5910
|
-
object: z.ZodString;
|
|
5911
|
-
displayTemplate: z.ZodOptional<z.ZodString>;
|
|
5912
|
-
filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5913
|
-
}, z.core.$strip>>;
|
|
5914
|
-
cardinality: z.ZodEnum<{
|
|
5915
|
-
one: "one";
|
|
5916
|
-
many: "many";
|
|
5917
|
-
}>;
|
|
5918
|
-
minItems: z.ZodOptional<z.ZodNumber>;
|
|
5919
|
-
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
5920
|
-
}, z.core.$strip>;
|
|
5921
|
-
/**
|
|
5922
|
-
* Rating attribute config schema
|
|
5923
|
-
*/
|
|
5924
|
-
declare const ratingConfigSchema: z.ZodObject<{
|
|
5925
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
5926
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
5927
|
-
description: z.ZodOptional<z.ZodString>;
|
|
5928
|
-
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
5929
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
5930
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5931
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
5932
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
5933
|
-
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
5934
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5935
|
-
max: z.ZodOptional<z.ZodNumber>;
|
|
5936
|
-
iconType: z.ZodOptional<z.ZodEnum<{
|
|
5937
|
-
number: "number";
|
|
5938
|
-
heart: "heart";
|
|
5939
|
-
star: "star";
|
|
5940
|
-
thumbs: "thumbs";
|
|
5941
|
-
}>>;
|
|
5942
|
-
}, z.core.$strip>;
|
|
5943
|
-
/**
|
|
5944
|
-
* Formula attribute config schema
|
|
5945
|
-
*/
|
|
5946
|
-
declare const formulaConfigSchema: z.ZodObject<{
|
|
5947
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
5948
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
5949
|
-
description: z.ZodOptional<z.ZodString>;
|
|
5950
|
-
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
5951
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
5952
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5953
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
5954
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
5955
|
-
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
5956
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5957
|
-
expression: z.ZodString;
|
|
5958
|
-
returnType: z.ZodEnum<{
|
|
5959
|
-
number: "number";
|
|
5960
|
-
boolean: "boolean";
|
|
5961
|
-
text: "text";
|
|
5962
|
-
date: "date";
|
|
5963
|
-
}>;
|
|
5964
|
-
decimals: z.ZodOptional<z.ZodNumber>;
|
|
5965
|
-
allowRelations: z.ZodOptional<z.ZodBoolean>;
|
|
5966
|
-
}, z.core.$strip>;
|
|
5967
|
-
/**
|
|
5968
|
-
* Rollup attribute config schema
|
|
5969
|
-
*/
|
|
5970
|
-
declare const rollupConfigSchema: z.ZodObject<{
|
|
5971
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
5972
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
5973
|
-
description: z.ZodOptional<z.ZodString>;
|
|
5974
|
-
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
5975
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
5976
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
5977
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
5978
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
5979
|
-
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
5980
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5981
|
-
relationAttribute: z.ZodOptional<z.ZodString>;
|
|
5982
|
-
relationPath: z.ZodOptional<z.ZodString>;
|
|
5983
|
-
targetAttribute: z.ZodString;
|
|
5984
|
-
function: z.ZodEnum<{
|
|
5985
|
-
sum: "sum";
|
|
5986
|
-
avg: "avg";
|
|
5987
|
-
earliest: "earliest";
|
|
5988
|
-
latest: "latest";
|
|
5989
|
-
count: "count";
|
|
5990
|
-
countValues: "countValues";
|
|
5991
|
-
countUniqueValues: "countUniqueValues";
|
|
5992
|
-
countEmpty: "countEmpty";
|
|
5993
|
-
percentEmpty: "percentEmpty";
|
|
5994
|
-
percentNotEmpty: "percentNotEmpty";
|
|
5995
|
-
original: "original";
|
|
5996
|
-
}>;
|
|
5997
|
-
decimals: z.ZodOptional<z.ZodNumber>;
|
|
5998
|
-
targetAttributeType: z.ZodOptional<z.ZodString>;
|
|
5999
|
-
targetAttributeOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
6000
|
-
id: z.ZodString;
|
|
6001
|
-
label: z.ZodString;
|
|
6002
|
-
value: z.ZodString;
|
|
6003
|
-
color: z.ZodOptional<z.ZodString>;
|
|
6004
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
6005
|
-
description: z.ZodOptional<z.ZodString>;
|
|
6006
|
-
group: z.ZodOptional<z.ZodEnum<{
|
|
6007
|
-
in_progress: "in_progress";
|
|
6008
|
-
idle: "idle";
|
|
6009
|
-
finished: "finished";
|
|
6010
|
-
}>>;
|
|
6011
|
-
}, z.core.$strip>>>;
|
|
6012
|
-
}, z.core.$strip>;
|
|
6013
|
-
/**
|
|
6014
|
-
* Document attribute config schema
|
|
6015
|
-
*/
|
|
6016
|
-
declare const documentConfigSchema: z.ZodObject<{
|
|
6017
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
6018
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
6019
|
-
description: z.ZodOptional<z.ZodString>;
|
|
6020
|
-
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
6021
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
6022
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
6023
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
6024
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
6025
|
-
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
6026
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
6027
|
-
templateId: z.ZodOptional<z.ZodString>;
|
|
6028
|
-
allowedTemplates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6029
|
-
multiple: z.ZodOptional<z.ZodBoolean>;
|
|
6030
|
-
maxDocuments: z.ZodOptional<z.ZodNumber>;
|
|
6031
|
-
autoProcess: z.ZodOptional<z.ZodBoolean>;
|
|
6032
|
-
}, z.core.$strip>;
|
|
6033
|
-
/**
|
|
6034
|
-
* Map of attribute type to config schema
|
|
6035
|
-
*/
|
|
6036
|
-
declare const attributeConfigSchemas: Record<AttributeType, z.ZodObject<z.ZodRawShape>>;
|
|
6037
|
-
/**
|
|
6038
|
-
* Get the config schema for a specific attribute type
|
|
6039
|
-
*/
|
|
6040
|
-
declare function getAttributeConfigSchema(type: AttributeType): z.ZodObject<z.ZodRawShape>;
|
|
6041
|
-
/**
|
|
6042
|
-
* Validate attribute config for a specific type
|
|
6043
|
-
* Returns the validated config with only allowed properties
|
|
6044
|
-
*/
|
|
6045
|
-
declare function validateAttributeConfig(type: AttributeType, config: Record<string, unknown>): {
|
|
6046
|
-
success: true;
|
|
6047
|
-
data: Record<string, unknown>;
|
|
6048
|
-
} | {
|
|
6049
|
-
success: false;
|
|
6050
|
-
errors: string[];
|
|
6051
|
-
};
|
|
6052
|
-
/**
|
|
6053
|
-
* Validate and strip unknown properties from attribute config
|
|
6054
|
-
* This ensures only allowed properties are stored in the database
|
|
6055
|
-
*/
|
|
6056
|
-
declare function parseAttributeConfig(type: AttributeType, config: Record<string, unknown>): Record<string, unknown>;
|
|
6057
|
-
/**
|
|
6058
|
-
* Safely parse attribute config, returning undefined for invalid configs
|
|
6059
|
-
*/
|
|
6060
|
-
declare function safeParseAttributeConfig(type: AttributeType, config: Record<string, unknown>): Record<string, unknown> | undefined;
|
|
6061
|
-
/**
|
|
6062
|
-
* Create a Zod schema for a text attribute
|
|
6063
|
-
*/
|
|
6064
|
-
declare function createTextValidator(attr: TextAttribute, messages?: ValidationMessages): z.ZodString;
|
|
6065
|
-
/**
|
|
6066
|
-
* Create a Zod schema for a number attribute
|
|
6067
|
-
*/
|
|
6068
|
-
declare function createNumberValidator(attr: NumberAttribute, messages?: ValidationMessages): z.ZodNumber;
|
|
6069
|
-
/**
|
|
6070
|
-
* Create a Zod schema for a checkbox attribute
|
|
6071
|
-
*/
|
|
6072
|
-
declare function createCheckboxValidator(_attr: CheckboxAttribute, _messages?: ValidationMessages): z.ZodBoolean;
|
|
6073
|
-
/**
|
|
6074
|
-
* Create a Zod schema for a date attribute
|
|
6075
|
-
*/
|
|
6076
|
-
declare function createDateValidator(attr: DateAttribute, messages?: ValidationMessages): z.ZodTypeAny;
|
|
6077
|
-
/**
|
|
6078
|
-
* Create a Zod schema for a phone attribute
|
|
6079
|
-
*/
|
|
6080
|
-
declare function createPhoneValidator(attr: PhoneAttribute, messages?: ValidationMessages): z.ZodType<{
|
|
6081
|
-
countryCode: string;
|
|
6082
|
-
phoneNumber: string;
|
|
6083
|
-
}>;
|
|
6084
|
-
/**
|
|
6085
|
-
* Create a Zod schema for a currency attribute
|
|
6086
|
-
*/
|
|
6087
|
-
declare function createCurrencyValidator(attr: CurrencyAttribute, messages?: ValidationMessages): z.ZodType<{
|
|
6088
|
-
code: string;
|
|
6089
|
-
value: number;
|
|
6090
|
-
}>;
|
|
6091
|
-
/**
|
|
6092
|
-
* Create a Zod schema for a status attribute
|
|
6093
|
-
*/
|
|
6094
|
-
declare function createStatusValidator(attr: StatusAttribute, messages?: ValidationMessages): z.ZodEnum<Readonly<Record<string, string>>>;
|
|
6095
|
-
/**
|
|
6096
|
-
* Create a Zod schema for a select attribute
|
|
6097
|
-
*/
|
|
6098
|
-
declare function createSelectValidator(attr: SelectAttribute, messages?: ValidationMessages): z.ZodEnum<Readonly<Record<string, string>>>;
|
|
6099
|
-
/**
|
|
6100
|
-
* Create a Zod schema for a multiselect attribute
|
|
6101
|
-
*/
|
|
6102
|
-
declare function createMultiselectValidator(attr: MultiselectAttribute, messages?: ValidationMessages): z.ZodArray<z.ZodEnum<Readonly<Record<string, string>>>>;
|
|
6103
|
-
/**
|
|
6104
|
-
* Create a Zod schema for a location attribute
|
|
6105
|
-
*/
|
|
6106
|
-
type LocationShape = {
|
|
6107
|
-
address?: string;
|
|
6108
|
-
address2?: string;
|
|
6109
|
-
city?: string;
|
|
6110
|
-
state?: string;
|
|
6111
|
-
postalCode?: string;
|
|
6112
|
-
country?: string;
|
|
6113
|
-
latitude?: number;
|
|
6114
|
-
longitude?: number;
|
|
6115
|
-
};
|
|
6116
|
-
declare function createLocationValidator(attr: LocationAttribute, messages?: ValidationMessages): z.ZodType<LocationShape>;
|
|
6117
|
-
/**
|
|
6118
|
-
* Create a Zod schema for a file attribute
|
|
6119
|
-
* Supports both single file (UUID) and multiple files (array of UUIDs)
|
|
6120
|
-
*/
|
|
6121
|
-
declare function createFileValidator(attr: FileAttribute, messages?: ValidationMessages): z.ZodTypeAny;
|
|
6122
|
-
/**
|
|
6123
|
-
* Create a Zod schema for a user attribute
|
|
6124
|
-
* Supports both single user (UUID) and multiple users (array of UUIDs)
|
|
6125
|
-
*/
|
|
6126
|
-
declare function createUserValidator(attr: UserAttribute, messages?: ValidationMessages): z.ZodTypeAny;
|
|
6127
|
-
/**
|
|
6128
|
-
* Create a Zod schema for a single relation attribute (cardinality: "one")
|
|
6129
|
-
*/
|
|
6130
|
-
declare function createSingleRelationValidator(attr: SingleRelationAttribute, messages?: ValidationMessages): z.ZodUnion<[z.ZodUUID, z.ZodNull]>;
|
|
6131
|
-
/**
|
|
6132
|
-
* Create a Zod schema for a multi relation attribute (cardinality: "many")
|
|
6133
|
-
*/
|
|
6134
|
-
declare function createMultiRelationValidator(attr: MultiRelationAttribute, messages?: ValidationMessages): z.ZodArray<z.ZodUUID>;
|
|
6135
|
-
/**
|
|
6136
|
-
* Create a Zod schema for a relation attribute
|
|
6137
|
-
* Dispatches to single or multi validator based on cardinality
|
|
6138
|
-
*/
|
|
6139
|
-
declare function createRelationValidator(attr: RelationAttribute, messages?: ValidationMessages): z.ZodUnion<[z.ZodUUID, z.ZodNull]> | z.ZodArray<z.ZodUUID>;
|
|
6140
|
-
/**
|
|
6141
|
-
* Create a Zod schema for a rating attribute
|
|
6142
|
-
*/
|
|
6143
|
-
declare function createRatingValidator(attr: RatingAttribute, messages?: ValidationMessages): z.ZodNumber;
|
|
6144
|
-
/**
|
|
6145
|
-
* Create a Zod schema for a formula attribute.
|
|
6146
|
-
* Formula attributes are read-only (computed at runtime).
|
|
6147
|
-
* They accept any value during validation but are ignored during record creation/update.
|
|
6148
|
-
*/
|
|
6149
|
-
declare function createFormulaValidator(_attr: FormulaAttribute, _messages?: ValidationMessages): z.ZodUnknown;
|
|
6150
|
-
/**
|
|
6151
|
-
* Create a Zod schema for a rollup attribute.
|
|
6152
|
-
* Rollup attributes are read-only (computed from related records).
|
|
6153
|
-
* They accept any value during validation but are ignored during record creation/update.
|
|
6154
|
-
*/
|
|
6155
|
-
declare function createRollupValidator(_attr: RollupAttribute, _messages?: ValidationMessages): z.ZodUnknown;
|
|
6156
|
-
/**
|
|
6157
|
-
* Create a Zod schema for a textarea attribute.
|
|
6158
|
-
* Validates that the value is a string.
|
|
6159
|
-
*/
|
|
6160
|
-
declare function createTextAreaValidator(_attr: TextAreaAttribute, _messages?: ValidationMessages): z.ZodString;
|
|
6161
|
-
/**
|
|
6162
|
-
* Create a Zod schema for a richtext attribute.
|
|
6163
|
-
* Validates semantic markdown content as a string.
|
|
6164
|
-
*
|
|
6165
|
-
* @example Valid richtext content (semantic markdown)
|
|
6166
|
-
* ```typescript
|
|
6167
|
-
* `# Heading
|
|
6168
|
-
*
|
|
6169
|
-
* Some paragraph text.
|
|
6170
|
-
*
|
|
6171
|
-
* :::callout{variant="info"}
|
|
6172
|
-
* This is a callout block
|
|
6173
|
-
* :::
|
|
6174
|
-
* `
|
|
6175
|
-
* ```
|
|
6176
|
-
*/
|
|
6177
|
-
declare function createRichtextValidator(attr: RichtextAttribute, messages?: ValidationMessages): z.ZodTypeAny;
|
|
6178
|
-
/**
|
|
6179
|
-
* Create a Zod schema for any attribute type.
|
|
6180
|
-
* Returns a strict validator that does NOT handle optional fields.
|
|
6181
|
-
* Use createFormAttributeValidator for form validation with optional support.
|
|
6182
|
-
*
|
|
6183
|
-
* @param attr - The attribute to create a validator for
|
|
6184
|
-
* @param messages - Custom validation messages for i18n support
|
|
6185
|
-
*/
|
|
6186
|
-
declare function createAttributeValidator(attr: Attribute, messages?: ValidationMessages): z.ZodTypeAny;
|
|
6187
|
-
/**
|
|
6188
|
-
* Create a Zod schema for form validation.
|
|
6189
|
-
* - Normalizes empty values (empty strings, empty objects) to null for optional fields
|
|
6190
|
-
* - Accepts custom messages for i18n support
|
|
6191
|
-
*
|
|
6192
|
-
* Use this in UI forms where optional fields may have null/undefined values.
|
|
6193
|
-
*
|
|
6194
|
-
* @param attr - The attribute to create a validator for
|
|
6195
|
-
* @param messages - Custom validation messages for i18n support
|
|
6196
|
-
*/
|
|
6197
|
-
declare function createFormAttributeValidator(attr: Attribute, messages?: ValidationMessages): z.ZodTypeAny;
|
|
6198
|
-
/**
|
|
6199
|
-
* Create a Zod schema for an entire object
|
|
6200
|
-
*
|
|
6201
|
-
* Uses passthrough mode to allow computed fields (formula, rollup) that may be
|
|
6202
|
-
* present in record data but are not part of the mutable schema.
|
|
6203
|
-
*/
|
|
6204
|
-
declare function createObjectValidator(objectDef: ObjectDefinition): z.ZodType<Record<string, unknown>>;
|
|
6205
|
-
/**
|
|
6206
|
-
* Validation result
|
|
6207
|
-
*/
|
|
6208
|
-
interface ValidationResult {
|
|
6209
|
-
success: boolean;
|
|
6210
|
-
data?: Record<string, unknown>;
|
|
6211
|
-
errors?: Array<{
|
|
6212
|
-
path: string[];
|
|
6213
|
-
message: string;
|
|
6214
|
-
}>;
|
|
6215
|
-
}
|
|
6216
|
-
/**
|
|
6217
|
-
* Validate data against an attribute schema
|
|
6218
|
-
*/
|
|
6219
|
-
declare function validateAttribute(attr: Attribute, value: unknown): ValidationResult;
|
|
6220
|
-
/**
|
|
6221
|
-
* Validate data against an object schema
|
|
6222
|
-
*/
|
|
6223
|
-
declare function validateObject(objectDef: ObjectDefinition, data: Record<string, unknown>): ValidationResult;
|
|
6224
|
-
/**
|
|
6225
|
-
* Validate and throw if invalid
|
|
6226
|
-
*/
|
|
6227
|
-
declare function validateObjectOrThrow(objectDef: ObjectDefinition, data: Record<string, unknown>): Record<string, unknown>;
|
|
6228
|
-
/**
|
|
6229
|
-
* Create a Zod schema for draft validation.
|
|
6230
|
-
* All attributes become optional, but provided values are still validated.
|
|
6231
|
-
*
|
|
6232
|
-
* Uses passthrough mode to allow computed fields (formula, rollup) that may be
|
|
6233
|
-
* present in record data but are not part of the mutable schema.
|
|
6234
|
-
*/
|
|
6235
|
-
declare function createDraftValidator(objectDef: ObjectDefinition): z.ZodType<Record<string, unknown>>;
|
|
6236
|
-
/**
|
|
6237
|
-
* Validate data in draft mode.
|
|
6238
|
-
* - All attributes are treated as optional (no required validation)
|
|
6239
|
-
* - Provided values are still validated for format/type correctness
|
|
6240
|
-
*
|
|
6241
|
-
* Use this when creating records that may be incomplete (drafts).
|
|
6242
|
-
*
|
|
6243
|
-
* @example
|
|
6244
|
-
* ```typescript
|
|
6245
|
-
* const result = validateDraft(PRODUCT, { name: "Draft" });
|
|
6246
|
-
* // → success even if "price" is required but missing
|
|
6247
|
-
*
|
|
6248
|
-
* const result2 = validateDraft(PRODUCT, { price: -10 });
|
|
6249
|
-
* // → fails because price must be >= 0 (format validation still applies)
|
|
6250
|
-
* ```
|
|
6251
|
-
*/
|
|
6252
|
-
declare function validateDraft(objectDef: ObjectDefinition, data: Record<string, unknown>): ValidationResult;
|
|
6253
|
-
/**
|
|
6254
|
-
* Validate draft data and throw if format validation fails.
|
|
6255
|
-
*/
|
|
6256
|
-
declare function validateDraftOrThrow(objectDef: ObjectDefinition, data: Record<string, unknown>): Record<string, unknown>;
|
|
6257
|
-
/**
|
|
6258
|
-
* Get the list of required attributes that are missing values.
|
|
6259
|
-
*
|
|
6260
|
-
* @example
|
|
6261
|
-
* ```typescript
|
|
6262
|
-
* const missing = getMissingRequiredAttributes(PRODUCT, { name: "Test" });
|
|
6263
|
-
* // → [priceAttribute, statusAttribute] if price and status are required but missing
|
|
6264
|
-
* ```
|
|
6265
|
-
*/
|
|
6266
|
-
declare function getMissingRequiredAttributes(objectDef: ObjectDefinition, data: Record<string, unknown>): Attribute[];
|
|
6267
|
-
/**
|
|
6268
|
-
* Check if a record is complete (all required attributes have valid values).
|
|
6269
|
-
*
|
|
6270
|
-
* @returns `true` if all required values are present and valid, `false` otherwise
|
|
6271
|
-
*/
|
|
6272
|
-
declare function isRecordComplete(objectDef: ObjectDefinition, data: Record<string, unknown>): boolean;
|
|
6273
|
-
/**
|
|
6274
|
-
* Compute the completion status of a record based on its data.
|
|
6275
|
-
*
|
|
6276
|
-
* - `"complete"`: All required values are present and valid
|
|
6277
|
-
* - `"draft"`: One or more required values are missing or invalid
|
|
6278
|
-
*
|
|
6279
|
-
* This function is used to dynamically determine the status when
|
|
6280
|
-
* creating or updating records.
|
|
6281
|
-
*
|
|
6282
|
-
* @example
|
|
6283
|
-
* ```typescript
|
|
6284
|
-
* const status = computeRecordStatus(PRODUCT, {
|
|
6285
|
-
* name: "Nike Air Max",
|
|
6286
|
-
* price: 129.99,
|
|
6287
|
-
* status: "active"
|
|
6288
|
-
* });
|
|
6289
|
-
* // → "complete"
|
|
6290
|
-
*
|
|
6291
|
-
* const status2 = computeRecordStatus(PRODUCT, { name: "Draft Product" });
|
|
6292
|
-
* // → "draft" (missing required fields)
|
|
6293
|
-
* ```
|
|
6294
|
-
*/
|
|
6295
|
-
declare function computeRecordStatus(objectDef: ObjectDefinition, data: Record<string, unknown>): CompletionStatus;
|
|
6296
|
-
|
|
6297
4663
|
/**
|
|
6298
4664
|
* Cache Adapter - Agnostic caching interface for @stndrds/schema
|
|
6299
4665
|
*
|
|
@@ -7327,6 +5693,110 @@ interface AIUsageMetricsRepository {
|
|
|
7327
5693
|
}>;
|
|
7328
5694
|
}
|
|
7329
5695
|
|
|
5696
|
+
/**
|
|
5697
|
+
* Represents a relation attribute row in the database
|
|
5698
|
+
*/
|
|
5699
|
+
interface RelationAttributeRow {
|
|
5700
|
+
id: Uuid;
|
|
5701
|
+
tenantId: Uuid;
|
|
5702
|
+
fromObject: string;
|
|
5703
|
+
fromId: Uuid;
|
|
5704
|
+
fromAttribute: string;
|
|
5705
|
+
toId: Uuid;
|
|
5706
|
+
properties: Record<string, unknown>;
|
|
5707
|
+
createdAt: Date;
|
|
5708
|
+
updatedAt: Date;
|
|
5709
|
+
createdBy: Uuid | null;
|
|
5710
|
+
updatedBy: Uuid | null;
|
|
5711
|
+
}
|
|
5712
|
+
/**
|
|
5713
|
+
* Input for creating/updating a relation attribute
|
|
5714
|
+
*/
|
|
5715
|
+
interface RelationAttributeInput {
|
|
5716
|
+
fromObject: string;
|
|
5717
|
+
fromId: Uuid;
|
|
5718
|
+
fromAttribute: string;
|
|
5719
|
+
toId: Uuid;
|
|
5720
|
+
properties?: Record<string, unknown>;
|
|
5721
|
+
createdBy?: Uuid;
|
|
5722
|
+
updatedBy?: Uuid;
|
|
5723
|
+
}
|
|
5724
|
+
/**
|
|
5725
|
+
* Repository for relation_attributes table.
|
|
5726
|
+
*
|
|
5727
|
+
* Manages properties of qualified relations without requiring intermediate objects.
|
|
5728
|
+
* All operations are automatically scoped to the current tenant from execution context.
|
|
5729
|
+
*
|
|
5730
|
+
* @example
|
|
5731
|
+
* ```typescript
|
|
5732
|
+
* // Upsert relation properties
|
|
5733
|
+
* await relationAttributes.upsertBatch([
|
|
5734
|
+
* {
|
|
5735
|
+
* fromObject: "contacts",
|
|
5736
|
+
* fromId: contactId,
|
|
5737
|
+
* fromAttribute: "companies",
|
|
5738
|
+
* toId: companyId,
|
|
5739
|
+
* properties: { role: "CEO", shares: 1000, percentage: 25 }
|
|
5740
|
+
* }
|
|
5741
|
+
* ]);
|
|
5742
|
+
*
|
|
5743
|
+
* // Find relations by source
|
|
5744
|
+
* const relations = await relationAttributes.findBySource(
|
|
5745
|
+
* "contacts",
|
|
5746
|
+
* contactId,
|
|
5747
|
+
* "companies"
|
|
5748
|
+
* );
|
|
5749
|
+
* ```
|
|
5750
|
+
*/
|
|
5751
|
+
interface RelationAttributesRepository {
|
|
5752
|
+
/**
|
|
5753
|
+
* Upsert (insert or update) a batch of relation attributes.
|
|
5754
|
+
* Uses UNIQUE constraint (tenant_id, from_object, from_id, from_attribute, to_id)
|
|
5755
|
+
* to determine if record exists.
|
|
5756
|
+
*
|
|
5757
|
+
* Automatically sets tenant_id from execution context.
|
|
5758
|
+
*
|
|
5759
|
+
* @param items - Array of relation attributes to upsert
|
|
5760
|
+
* @returns Created/updated relation attribute rows
|
|
5761
|
+
*/
|
|
5762
|
+
upsertBatch(items: RelationAttributeInput[]): Promise<RelationAttributeRow[]>;
|
|
5763
|
+
/**
|
|
5764
|
+
* Find all relation attributes for a specific source.
|
|
5765
|
+
* Automatically filtered by current tenant context.
|
|
5766
|
+
*
|
|
5767
|
+
* @param fromObject - Source object name (e.g., "contacts")
|
|
5768
|
+
* @param fromId - Source record ID
|
|
5769
|
+
* @param fromAttribute - Source attribute name (e.g., "companies")
|
|
5770
|
+
* @returns All relation attributes matching the source
|
|
5771
|
+
*/
|
|
5772
|
+
findBySource(fromObject: string, fromId: Uuid, fromAttribute: string): Promise<RelationAttributeRow[]>;
|
|
5773
|
+
/**
|
|
5774
|
+
* Find all relation attributes targeting a specific record.
|
|
5775
|
+
* Useful for reverse lookups.
|
|
5776
|
+
* Automatically filtered by current tenant context.
|
|
5777
|
+
*
|
|
5778
|
+
* @param toId - Target record ID
|
|
5779
|
+
* @returns All relation attributes targeting this record
|
|
5780
|
+
*/
|
|
5781
|
+
findByTarget(toId: Uuid): Promise<RelationAttributeRow[]>;
|
|
5782
|
+
/**
|
|
5783
|
+
* Delete all relation attributes for a specific source.
|
|
5784
|
+
* Automatically filtered by current tenant context.
|
|
5785
|
+
*
|
|
5786
|
+
* @param fromObject - Source object name
|
|
5787
|
+
* @param fromId - Source record ID
|
|
5788
|
+
* @param fromAttribute - Source attribute name
|
|
5789
|
+
*/
|
|
5790
|
+
deleteBySource(fromObject: string, fromId: Uuid, fromAttribute: string): Promise<void>;
|
|
5791
|
+
/**
|
|
5792
|
+
* Delete all relation attributes targeting a specific record.
|
|
5793
|
+
* Automatically filtered by current tenant context.
|
|
5794
|
+
*
|
|
5795
|
+
* @param toId - Target record ID
|
|
5796
|
+
*/
|
|
5797
|
+
deleteByTarget(toId: Uuid): Promise<void>;
|
|
5798
|
+
}
|
|
5799
|
+
|
|
7330
5800
|
/**
|
|
7331
5801
|
* File content type - supports various formats
|
|
7332
5802
|
* Use Uint8Array for cross-platform compatibility
|
|
@@ -7582,6 +6052,7 @@ interface DatabaseAdapter {
|
|
|
7582
6052
|
documentSlots?: DocumentSlotsRepository;
|
|
7583
6053
|
documentJobs?: DocumentJobsRepository;
|
|
7584
6054
|
documentGenerationTemplates?: DocumentGenerationTemplatesRepository;
|
|
6055
|
+
relationAttributes?: RelationAttributesRepository;
|
|
7585
6056
|
featureFlags?: FeatureFlagsRepository;
|
|
7586
6057
|
transaction<T>(callback: (adapter: DatabaseAdapter) => Promise<T>): Promise<T>;
|
|
7587
6058
|
}
|
|
@@ -9030,6 +7501,22 @@ declare class RecordQueryService extends BaseService {
|
|
|
9030
7501
|
* Internal search query execution
|
|
9031
7502
|
*/
|
|
9032
7503
|
private executeSearchQuery;
|
|
7504
|
+
/**
|
|
7505
|
+
* Include relation properties in records.
|
|
7506
|
+
*
|
|
7507
|
+
* For each requested relation attribute:
|
|
7508
|
+
* - If attribute has properties → Fetch from relation_attributes and return hybrid format
|
|
7509
|
+
* - If attribute has NO properties → Return legacy format (string[] or string)
|
|
7510
|
+
*
|
|
7511
|
+
* Uses batch loading to avoid N+1 queries.
|
|
7512
|
+
*
|
|
7513
|
+
* @param records - Records to enrich with relation properties
|
|
7514
|
+
* @param schema - Object schema
|
|
7515
|
+
* @param includes - Array of relation attribute names to include
|
|
7516
|
+
* @returns Records enriched with relation properties in hybrid format
|
|
7517
|
+
* @private
|
|
7518
|
+
*/
|
|
7519
|
+
private includeRelationsWithProperties;
|
|
9033
7520
|
}
|
|
9034
7521
|
|
|
9035
7522
|
/**
|
|
@@ -9075,6 +7562,7 @@ declare class RecordService extends BaseService {
|
|
|
9075
7562
|
private queryService;
|
|
9076
7563
|
private recordResolver;
|
|
9077
7564
|
private relationService;
|
|
7565
|
+
private relationPropertiesService;
|
|
9078
7566
|
private userService;
|
|
9079
7567
|
private rollupService;
|
|
9080
7568
|
private hookRegistry;
|
|
@@ -9803,6 +8291,133 @@ declare class RelationService extends BaseService {
|
|
|
9803
8291
|
private fetchAttributeById;
|
|
9804
8292
|
}
|
|
9805
8293
|
|
|
8294
|
+
/**
|
|
8295
|
+
* Normalized relation value format (internal representation)
|
|
8296
|
+
*/
|
|
8297
|
+
interface NormalizedRelationItem {
|
|
8298
|
+
id: Uuid;
|
|
8299
|
+
props?: Record<string, unknown>;
|
|
8300
|
+
}
|
|
8301
|
+
/**
|
|
8302
|
+
* Hybrid relation value format (API input)
|
|
8303
|
+
*
|
|
8304
|
+
* Supports both:
|
|
8305
|
+
* - Legacy: string[] (backward compatible, no properties)
|
|
8306
|
+
* - New: Array<{ id, props }> (with properties)
|
|
8307
|
+
*/
|
|
8308
|
+
type MultiRelationValue = string[] | NormalizedRelationItem[];
|
|
8309
|
+
/**
|
|
8310
|
+
* Hybrid single relation value format (API input)
|
|
8311
|
+
*
|
|
8312
|
+
* Supports both:
|
|
8313
|
+
* - Legacy: string | null (backward compatible, no properties)
|
|
8314
|
+
* - New: { id, props } | null (with properties)
|
|
8315
|
+
*/
|
|
8316
|
+
type SingleRelationValue = string | NormalizedRelationItem | null;
|
|
8317
|
+
/**
|
|
8318
|
+
* Union type for all hybrid relation value formats
|
|
8319
|
+
*/
|
|
8320
|
+
type HybridRelationValue = MultiRelationValue | SingleRelationValue;
|
|
8321
|
+
/**
|
|
8322
|
+
* Service for managing properties of qualified relations.
|
|
8323
|
+
*
|
|
8324
|
+
* Handles sync (upsert/delete) and validation of relation properties
|
|
8325
|
+
* stored in the relation_attributes table.
|
|
8326
|
+
*
|
|
8327
|
+
* Supports hybrid format for backward compatibility:
|
|
8328
|
+
* - Legacy: string[] or string (no properties)
|
|
8329
|
+
* - New: Array<{ id, props }> or { id, props } (with properties)
|
|
8330
|
+
*
|
|
8331
|
+
* @example
|
|
8332
|
+
* ```typescript
|
|
8333
|
+
* // Create record with qualified relation (new format)
|
|
8334
|
+
* await recordService.createRecord(objectId, {
|
|
8335
|
+
* companies: [
|
|
8336
|
+
* { id: "company-1", props: { role: "CEO", shares: 1000 } },
|
|
8337
|
+
* { id: "company-2", props: { role: "CTO", shares: 500 } }
|
|
8338
|
+
* ]
|
|
8339
|
+
* });
|
|
8340
|
+
*
|
|
8341
|
+
* // Update with legacy format (still supported)
|
|
8342
|
+
* await recordService.updateRecord(recordId, {
|
|
8343
|
+
* companies: ["company-1", "company-3"]
|
|
8344
|
+
* });
|
|
8345
|
+
* ```
|
|
8346
|
+
*/
|
|
8347
|
+
declare class RelationPropertiesService extends BaseService {
|
|
8348
|
+
constructor(adapter: DatabaseAdapter);
|
|
8349
|
+
/**
|
|
8350
|
+
* Normalize relation values for storage in object_records table.
|
|
8351
|
+
*
|
|
8352
|
+
* Extracts IDs from hybrid format ({ id, props }) and returns legacy format (string[] or string).
|
|
8353
|
+
* This ensures object_records.values only contains IDs, while properties are in relation_attributes.
|
|
8354
|
+
*
|
|
8355
|
+
* @param schema - Object schema
|
|
8356
|
+
* @param data - Record data with hybrid relation values
|
|
8357
|
+
* @returns Data with relation values normalized to ID-only format
|
|
8358
|
+
*/
|
|
8359
|
+
normalizeRelationValuesForStorage(schema: ObjectDefinition, data: Record<string, unknown>): Record<string, unknown>;
|
|
8360
|
+
/**
|
|
8361
|
+
* Synchronize relation properties for a given attribute.
|
|
8362
|
+
*
|
|
8363
|
+
* Handles:
|
|
8364
|
+
* - Format normalization (legacy → new)
|
|
8365
|
+
* - Validation of properties
|
|
8366
|
+
* - Upsert for present IDs
|
|
8367
|
+
* - Delete for absent IDs
|
|
8368
|
+
*
|
|
8369
|
+
* @param schema - Object schema
|
|
8370
|
+
* @param recordId - Source record ID
|
|
8371
|
+
* @param attributeName - Relation attribute name
|
|
8372
|
+
* @param relationValue - Relation value (hybrid format)
|
|
8373
|
+
* @param adapter - Database adapter
|
|
8374
|
+
*/
|
|
8375
|
+
syncRelationProperties(schema: ObjectDefinition, recordId: Uuid, attributeName: string, relationValue: HybridRelationValue, adapter: DatabaseAdapter): Promise<void>;
|
|
8376
|
+
/**
|
|
8377
|
+
* Validate relation properties against PropertySchema.
|
|
8378
|
+
*
|
|
8379
|
+
* Uses Zod for runtime validation based on PropertyDefinition types.
|
|
8380
|
+
*
|
|
8381
|
+
* @param propertySchema - Schema defining allowed properties
|
|
8382
|
+
* @param properties - Properties to validate
|
|
8383
|
+
* @throws {z.ZodError} if validation fails
|
|
8384
|
+
*/
|
|
8385
|
+
validateProperties(propertySchema: PropertySchema, properties: Record<string, unknown>): void;
|
|
8386
|
+
/**
|
|
8387
|
+
* Normalize relation value to unified internal format.
|
|
8388
|
+
*
|
|
8389
|
+
* Converts:
|
|
8390
|
+
* - string[] → Array<{ id, props?: undefined }>
|
|
8391
|
+
* - string → [{ id, props?: undefined }]
|
|
8392
|
+
* - null → []
|
|
8393
|
+
* - Array<{ id, props }> → Array<{ id, props }> (passthrough)
|
|
8394
|
+
* - { id, props } → [{ id, props }] (single to array)
|
|
8395
|
+
*
|
|
8396
|
+
* @param value - Relation value in hybrid format
|
|
8397
|
+
* @returns Normalized array of relation items
|
|
8398
|
+
* @private
|
|
8399
|
+
*/
|
|
8400
|
+
private normalizeRelationValue;
|
|
8401
|
+
/**
|
|
8402
|
+
* Build Zod schema from PropertySchema definition.
|
|
8403
|
+
*
|
|
8404
|
+
* Dynamically generates validation schema based on PropertyDefinition types.
|
|
8405
|
+
*
|
|
8406
|
+
* @param propertySchema - PropertySchema with definitions
|
|
8407
|
+
* @returns Zod schema for validation
|
|
8408
|
+
* @private
|
|
8409
|
+
*/
|
|
8410
|
+
private buildZodSchema;
|
|
8411
|
+
/**
|
|
8412
|
+
* Build Zod schema for a single property field.
|
|
8413
|
+
*
|
|
8414
|
+
* @param def - PropertyDefinition
|
|
8415
|
+
* @returns Zod schema for the field
|
|
8416
|
+
* @private
|
|
8417
|
+
*/
|
|
8418
|
+
private buildFieldSchema;
|
|
8419
|
+
}
|
|
8420
|
+
|
|
9806
8421
|
/**
|
|
9807
8422
|
* Resolved relation values for a record
|
|
9808
8423
|
* Maps relation attribute name to the resolved record's values
|
|
@@ -11485,6 +10100,7 @@ interface MockStores {
|
|
|
11485
10100
|
aiMessages: Map<Uuid, AIMessage>;
|
|
11486
10101
|
aiUserMemory: Map<string, AIUserMemory>;
|
|
11487
10102
|
aiUsageMetrics: Map<string, AIUsageMetrics>;
|
|
10103
|
+
relationAttributes: Map<Uuid, RelationAttributeRow>;
|
|
11488
10104
|
}
|
|
11489
10105
|
|
|
11490
10106
|
/**
|
|
@@ -12759,7 +11375,7 @@ declare class WorkflowInvitationService extends BaseService {
|
|
|
12759
11375
|
}
|
|
12760
11376
|
|
|
12761
11377
|
/**
|
|
12762
|
-
* Result of checking if a field is read-only
|
|
11378
|
+
* Result of checking if a field is read-only (internal use only)
|
|
12763
11379
|
*/
|
|
12764
11380
|
interface FieldReadOnlyResult {
|
|
12765
11381
|
/** Whether the field is read-only */
|
|
@@ -13964,4 +12580,4 @@ interface FullSyncOptions extends SyncOptions, ViewSyncOptions {
|
|
|
13964
12580
|
*/
|
|
13965
12581
|
declare function syncAll(adapter: DatabaseAdapter, objectRegistry: typeof registry, nativeViewRegistry: typeof viewRegistry, options?: FullSyncOptions): Promise<FullSyncResult>;
|
|
13966
12582
|
|
|
13967
|
-
export { type FlowRow as $, type Attribute as A, type Tab as B, type CheckboxAttribute as C, type DateAttribute as D, type FilterState as E, type FeatureGate as F, type Group as G, type SortRule as H, type InferAttributeValue as I, type DirectTableTab as J, type ListViewDefinition as K, type LocationAttribute as L, type MultiselectAttribute as M, type NumberAttribute as N, type ObjectAction as O, type PhoneAttribute as P, type WorkflowConfig as Q, type RichtextAttribute as R, type SystemResource as S, type TextAttribute as T, type UserAttribute as U, type SlotMode as V, type WorkflowTheme as W, type ConditionGroup as X, type ConditionRule as Y, type WorkflowNode as Z, type WorkflowDefinition as _, type DocumentAttribute as a, type DateValue as a$, type FlagValueType as a0, type FeatureFlagDefinition as a1, type FlagLevel as a2, type FeatureFlagsRepository as a3, type StaticFlagDefault as a4, type ResolvedFlag as a5, type ViewType as a6, type ViewDefinition as a7, type DocumentTemplate as a8, type OcrAdapter as a9, type ThinkingPartData as aA, type ReasoningPartData as aB, type AIChatMessagePart as aC, type AIChatMessage as aD, type AIQuestionType as aE, type AIQuestionOption as aF, type AIQuestion as aG, type AIQuestionAnswer as aH, type AIBatchQuestionOption as aI, type AIBatchQuestion as aJ, type AIBatchQuestionAnswer as aK, type AITodoStatus as aL, type AITodoItem as aM, type AITodoList as aN, type AIMessageAttachment as aO, type AIConversation as aP, type AIMessage as aQ, type AIToolCallRecord as aR, type AIUserMemory as aS, type AIUsageMetrics as aT, type AIProviderMetrics as aU, type CreateAIMessageInput as aV, type StatusGroup as aW, type AttributeGroup as aX, type BaseAttribute as aY, type NumberUnit as aZ, type DateFormat as a_, type OcrInput as aa, type OcrOptions as ab, type OcrResult as ac, type OcrPage as ad, type OcrTextBlock as ae, type BoundingBox as af, type SignatureAdapter as ag, type CreateSignatureInput as ah, type SignerRequest as ai, type SignaturePosition as aj, type SignatureRequestResult as ak, type SignatureStatusResult as al, type SignerStatus as am, type SignatureStatus as an, type IdentityVerificationAdapter as ao, type VerifyInput as ap, type VerificationResult as aq, type DocumentData as ar, type VerificationCheck as as, type AIMessageRole as at, type AIThinkingLevel as au, type AIToolCallStatus as av, type AIToolCall as aw, type AIChatMessagePartType as ax, type TextPartData as ay, type ToolPartData as az, type SystemAction as b, type FilterValue as b$, type Phone as b0, type Currency as b1, type Location as b2, type LocationGranularity as b3, RELATION_TARGET_ANY as b4, type RelationAttribute as b5, isUniversalRelation as b6, type AuditResourceType as b7, type AuditAction as b8, type AuditActorType as b9, type UpdateDocument as bA, type CreateDocumentTemplate as bB, type UpdateDocumentTemplate as bC, type CreateDocumentSlot as bD, type UpdateDocumentSlot as bE, type CreateProcessingJob as bF, type UpdateProcessingJob as bG, type DocumentListOptions as bH, type DocumentTemplateListOptions as bI, type FlagOverride as bJ, type FeatureFlagsConfig as bK, type StorageProvider as bL, type FileVisibility as bM, type File as bN, type CreateFile as bO, type UpdateFile as bP, type TextFilterOperator as bQ, type NumberFilterOperator as bR, type CheckboxFilterOperator as bS, type DateFilterOperator as bT, type SelectFilterOperator as bU, type MultiselectFilterOperator as bV, type RelationFilterOperator as bW, type FilterOperator as bX, type RelativeDateValue as bY, type CurrencyFilterValue as bZ, type PhoneFilterValue as b_, type AuditChange as ba, type AuditLogEntry as bb, type CreateAuditLogInput as bc, type AuditListOptions as bd, type AuditServiceOptions as be, type VariableMapping as bf, type PdfTemplateField as bg, type TemplateSource as bh, type DocumentGenerationTemplate as bi, type CreateDocumentGenerationTemplate as bj, type UpdateDocumentGenerationTemplate as bk, type PendingDocumentRequest as bl, isPdfTemplateSource as bm, isDocxTemplateSource as bn, type DocumentSlotDefinition as bo, type DocumentAutoProcessing as bp, type ExtractionMapping as bq, type ExtractionField as br, type Document as bs, type DocumentStatus as bt, type DocumentSlot as bu, type SlotStatus as bv, type ProcessingJob as bw, type ProcessingJobType as bx, type ProcessingJobStatus as by, type CreateDocument as bz, type TextAreaAttribute as c, type Permission as c$, type FilterRule as c0, type ExtendedFilterRule as c1, type FilterCombinator as c2, type FilterGroup as c3, type AdvancedFilterState as c4, isAdvancedFilterState as c5, toAdvancedFilterState as c6, toSimpleFilterState as c7, type SortDirection as c8, type QueryState as c9, type InferRecordInput as cA, type InferRecordUpdate as cB, type CustomAttributeValue as cC, type WithCustomAttributes as cD, type RecordMetadata as cE, type SystemFields as cF, type ExtractRecord as cG, type ExtractRecordStrict as cH, type ExtractRecordInput as cI, type ExtractRecordInputStrict as cJ, type ExtractRecordUpdate as cK, type ExtractRecordUpdateStrict as cL, type ExtractAttributes as cM, type TypedObjectRecord as cN, type ExtractObjectRecord as cO, type ExtractObjectRecordWithCustom as cP, RESERVED_ATTRIBUTE_NAMES as cQ, SYSTEM_FIELD_NAMES as cR, type ReservedAttributeName as cS, type SystemFieldName as cT, type Timestamps as cU, type SharingMode as cV, type ObjectAttribute as cW, type CompletionStatus as cX, type ObjectRecord as cY, type PermissionScope as cZ, type Role as c_, OPERATORS_BY_TYPE as ca, type NoValueOperator as cb, NO_VALUE_OPERATORS as cc, isNoValueOperator as cd, type FlowSlot as ce, type FlowRowField as cf, type FlowPage as cg, type FlowRelation as ch, type FlowStatus as ci, type FlowDefinition as cj, isFlowDefinition as ck, isFlowPublished as cl, isSystemFlow as cm, type GeocodingSuggestion as cn, type GeocodingAutocompleteParams as co, type ReverseGeocodingParams as cp, type GeocodingParams as cq, type GeocodingAdapter as cr, NoopGeocodingAdapter as cs, type AttributeSchema as ct, type InferRecordFromSchema as cu, type InferRecordWithRequirements as cv, type TypedAttribute as cw, type AttributeMap as cx, type AddAttribute as cy, type InferRecord as cz, type RichtextFeature as d, isDocumentNode as d$, type UserRoleAssignment as d0, type EffectivePermissions as d1, type ObjectPermissions as d2, type SystemPermissions as d3, type CreateRoleInput as d4, type UpdateRoleInput as d5, type CreatePermissionInput as d6, type AssignRoleInput as d7, type PolicyContext as d8, type RecordPolicy as d9, type GalleryViewDefinition as dA, type ConfigOverrides as dB, type ViewOverlay as dC, isDetailView as dD, isListView as dE, isCalendarView as dF, isTimelineView as dG, isGalleryView as dH, isFormTab as dI, isTableTab as dJ, isDirectTableTab as dK, isInverseTableTab as dL, isCustomTab as dM, isActivityTab as dN, isNotesTab as dO, isFlowsTab as dP, isDocumentsTab as dQ, type ConditionNode as dR, type DocumentNode as dS, type EndNode as dT, type FormFieldRef as dU, type FormNode as dV, type StartNode as dW, type WorkflowNodeType as dX, getNodeOutputs as dY, isAdvancedFormNode as dZ, isConditionNode as d_, PolicyViolationError as da, type UserRole as db, type UserStatus as dc, type UserProfile as dd, type CreateUserProfile as de, type UpdateUserProfile as df, type InviteUserInput as dg, type TabType as dh, type FormTab as di, type CustomTab as dj, type ActivityTab as dk, type NotesTab as dl, type FlowsTab as dm, type DocumentsTab as dn, type ListViewLayout as dp, type ViewLayout as dq, type ViewTab as dr, type DetailViewConfig as ds, type ListViewConfig as dt, type CalendarViewConfig as du, type TimelineViewConfig as dv, type GalleryViewConfig as dw, type ViewConfig as dx, type CalendarViewDefinition as dy, type TimelineViewDefinition as dz, type CurrencyAttribute as e, type TenantId as e$, isEndNode as e0, isFormNode as e1, isSimpleFormNode as e2, isStartNode as e3, type ConditionOperator as e4, and as e5, eq as e6, inValues as e7, isConditionGroup as e8, isConditionRule as e9, isInvitationValid as eA, type CreateGrantInput as eB, type WorkflowAccessGrant as eC, canAccessNode as eD, isGrantExpired as eE, isGrantRevoked as eF, isGrantValid as eG, isTokenRevoked as eH, type GeneratedDocument as eI, type WorkflowExecutionContext as eJ, createEmptyContext as eK, getContextValue as eL, mergeFormToSlot as eM, setContextValue as eN, type FormContextResponse as eO, type FormFieldContext as eP, type FormFieldRow as eQ, type FormNodeInfo as eR, type ReadOnlyReason as eS, type WorkflowAccessMode as eT, type ThemeColors as eU, type ThemeLogo as eV, type ThemeTypography as eW, DEFAULT_THEME as eX, generateCssVariables as eY, mergeWithDefaults as eZ, type Uuid as e_, isEmpty as ea, isNotEmpty as eb, neq as ec, or as ed, type CanvasViewport as ee, type NodePosition as ef, type WorkflowLayout as eg, type WorkflowSlot as eh, type WorkflowStatus as ei, isSystemWorkflow as ej, isWorkflowDefinition as ek, isWorkflowPublished as el, type PendingAction as em, type WorkflowError as en, type WorkflowInstance as eo, type WorkflowTransition as ep, canResumeInstance as eq, createStartTransition as er, isInstanceTerminal as es, isInstanceWaiting as et, type CreateInvitationInput as eu, type CreateInvitationResult as ev, type InvitationStatus as ew, type WorkflowInvitation as ex, isInvitationAccepted as ey, isInvitationExpired as ez, type Option as f, validateDraft as f$, type UserId as f0, asTenantId as f1, asUserId as f2, generateId as f3, generatePrefixedId as f4, slugify as f5, generateTemplateName as f6, registry as f7, viewRegistry as f8, type ValidationMessages as f9, createNumberValidator as fA, createCheckboxValidator as fB, createDateValidator as fC, createPhoneValidator as fD, createCurrencyValidator as fE, createStatusValidator as fF, createSelectValidator as fG, createMultiselectValidator as fH, createLocationValidator as fI, createFileValidator as fJ, createUserValidator as fK, createSingleRelationValidator as fL, createMultiRelationValidator as fM, createRelationValidator as fN, createRatingValidator as fO, createFormulaValidator as fP, createRollupValidator as fQ, createTextAreaValidator as fR, createRichtextValidator as fS, createAttributeValidator as fT, createFormAttributeValidator as fU, createObjectValidator as fV, type ValidationResult as fW, validateAttribute as fX, validateObject as fY, validateObjectOrThrow as fZ, createDraftValidator as f_, DEFAULT_VALIDATION_MESSAGES as fa, textConfigSchema as fb, textareaConfigSchema as fc, richtextConfigSchema as fd, numberConfigSchema as fe, checkboxConfigSchema as ff, dateConfigSchema as fg, phoneConfigSchema as fh, currencyConfigSchema as fi, statusConfigSchema as fj, locationConfigSchema as fk, selectConfigSchema as fl, multiselectConfigSchema as fm, fileConfigSchema as fn, userConfigSchema as fo, relationConfigSchema as fp, ratingConfigSchema as fq, formulaConfigSchema as fr, rollupConfigSchema as fs, documentConfigSchema as ft, attributeConfigSchemas as fu, getAttributeConfigSchema as fv, validateAttributeConfig as fw, parseAttributeConfig as fx, safeParseAttributeConfig as fy, createTextValidator as fz, type StatusAttribute as g, hasContext as g$, validateDraftOrThrow as g0, getMissingRequiredAttributes as g1, isRecordComplete as g2, computeRecordStatus as g3, type ViewOverlaysRepository as g4, type DatabaseAdapter as g5, WorkflowJwtService as g6, type JwtVerificationResult as g7, type MagicLinkPayload as g8, type WorkflowAccessPayload as g9, type QueryBuilderOptions as gA, type EvaluationResult as gB, type EvaluationTrace as gC, evaluateCondition as gD, evaluate as gE, evaluateWithTrace as gF, TenantContextError as gG, FeatureFlagsContextError as gH, getFeatureFlags as gI, getFeatureValue as gJ, hasFeatureFlagsContext as gK, isFeatureEnabled as gL, runWithFeatureFlags as gM, tryGetFeatureValue as gN, withFeatureFlags as gO, type FeatureFlagsContext as gP, addSchemaToContext as gQ, getSchemaByNameFromContext as gR, getSchemaContext as gS, getSchemaFromContext as gT, hasSchemaContext as gU, runWithMergedSchemaContext as gV, runWithSchemaContext as gW, type SchemaContext as gX, getContext as gY, getTenantId as gZ, getUserId as g_, type WorkflowJwtConfig as ga, type WorkflowJwtPayload as gb, type CacheKeyType as gc, hashOptions as gd, type CacheAdapter as ge, type CacheOptions as gf, cacheKeys as gg, cacheTtl as gh, defaultTtl as gi, NoopCacheAdapter as gj, type FetchResult as gk, type FormattedRecord as gl, type GroupedFetchResult as gm, type InsertOptions as gn, type QueryBuilderState as go, type RegistryMap as gp, type RegistryObjectNames as gq, type ShortcutOperator as gr, createDefaultState as gs, formatRecord as gt, formatRecords as gu, QueryMultipleResultsError as gv, QueryNoResultError as gw, SHORTCUT_TO_FILTER_OPERATOR as gx, createQueryBuilder as gy, QueryBuilder as gz, type SelectAttribute as h, notesPolicy as h$, runWithContext as h0, withTenantContext as h1, type TenantContext as h2, createDefaultExecutorRegistry as h3, getDefaultExecutorRegistry as h4, type ExecutorCompleteResult as h5, type ExecutorContext as h6, type ExecutorErrorResult as h7, type ExecutorResult as h8, type ExecutorSuccessResult as h9, getRelationPath as hA, getTargetAttributeName as hB, InvalidPathError as hC, MaxDepthExceededError as hD, parsePath as hE, pathHasManyCardinality as hF, validatePath as hG, type PathCardinality as hH, type PathSegment as hI, type PathSegmentType as hJ, type SchemaResolver as hK, resolveMultiplePaths as hL, resolveSingleValue as hM, traversePath as hN, type TraversalOptions as hO, type TraversalResult as hP, type AttributeChange as hQ, type HookContext as hR, type HookDefinition as hS, type HookHandler as hT, type HookType as hU, NoopHookRegistry as hV, type HookRegistry as hW, createMockAdapter as hX, type MockStores as hY, defaultPolicyRegistry as hZ, PolicyRegistry as h_, type ExecutorWaitResult as ha, type NodeExecutor as hb, complete as hc, error as hd, ExecutorRegistry as he, success as hf, wait as hg, ConditionExecutor as hh, DocumentExecutor as hi, EndExecutor as hj, FormExecutor as hk, StartExecutor as hl, evaluateFormula as hm, evaluateFormulaAttribute as hn, evaluateFormulaAttributeWithRelations as ho, evaluateFormulaWithRelations as hp, evaluateFormulaWithResult as hq, extractFormulaVariables as hr, extractRelationNames as hs, extractRelationReferences as ht, flattenRelationsForEval as hu, formatFormulaResult as hv, hasRelationReferences as hw, validateFormulaExpression as hx, type FormulaResult as hy, getPathDepth as hz, type FileAttribute as i, checkRecordDeleteOrThrow as i$, type AIConversationsRepository as i0, type AIUsageMetricsRepository as i1, type AIUserMemoryRepository as i2, type AttributesRepository as i3, type AuditRepository as i4, type DocumentGenerationTemplateListOptions as i5, type DocumentGenerationTemplatesRepository as i6, type DocumentJobsRepository as i7, type DocumentSlotsRepository as i8, type DocumentsRepository as i9, type SearchQueryOptions as iA, type QueryResult as iB, RecordQueryService as iC, type RelationValidationResult as iD, type RelationValidationError as iE, type RelationOption as iF, type RelationOptionsResponse as iG, type GetRelationOptionsParams as iH, type RelationServiceOptions as iI, type ResolveIdsBatchRequest as iJ, type ResolveIdsBatchResponse as iK, RelationService as iL, RecordResolverService as iM, type ResolvedRelations as iN, type FormulaResolverServiceOptions as iO, FormulaResolverService as iP, type RollupResult as iQ, type RollupServiceOptions as iR, RollupService as iS, type RollupSchedulerOptions as iT, RollupScheduler as iU, applyDefaultValues as iV, checkPermission as iW, getPolicy as iX, buildPolicyContext as iY, checkRecordAccess as iZ, checkRecordModifyOrThrow as i_, type DocumentTemplatesRepository as ia, type FilesRepository as ib, type ObjectRecordsRepository as ic, type ObjectsRepository as id, type PermissionsRepository as ie, type UserProfilesRepository as ig, type ViewsRepository as ih, type WorkflowAccessGrantsRepository as ii, type WorkflowInstancesRepository as ij, type WorkflowInvitationsRepository as ik, type WorkflowsRepository as il, BaseService as im, BaseRepository as io, type SchemaContextAware as ip, SchemaContextAwareRepository as iq, type CreateCustomObjectInput as ir, type AddAttributeInput as is, type UpdateObjectInput as it, type ObjectSchemaServiceOptions as iu, ObjectSchemaService as iv, type RecordServiceOptions as iw, RecordService as ix, type RecordQueryServiceOptions as iy, type QueryOptions as iz, type SingleRelationAttribute as j, GlobalSearchService as j$, checkSharedObjectWriteAccess as j0, computeLabel as j1, type LabelResolver as j2, enrichWithFormulas as j3, enrichRecordsWithFormulas as j4, createContextForCreate as j5, createContextForUpdate as j6, createContextForDelete as j7, createContextForRestore as j8, recalculateParentRollups as j9, type UserValidationResult as jA, type UserValidationError as jB, UserService as jC, type UserProfileServiceOptions as jD, UserProfileService as jE, AuditService as jF, buildAuditChanges as jG, DocumentGenerationTemplateNotFoundError as jH, DocumentGenerationNotConfiguredError as jI, DocumentGenerationService as jJ, type DocumentProcessingConfig as jK, DocumentProcessingService as jL, type RenderDocumentInput as jM, type DocumentRendererOptions as jN, type RenderDocumentResult as jO, DocumentRenderError as jP, StorageDownloadNotSupportedError as jQ, DocumentRendererService as jR, DocumentTemplateService as jS, type RecordDocumentsResult as jT, type CreateRecordDocumentInput as jU, type CreateRecordDocumentResult as jV, type DocumentServiceOptions as jW, DocumentService as jX, type FileServiceOptions as jY, FileService as jZ, GeocodingService as j_, type RollupCascadeContext as ja, type DocumentProcessingHookOptions as jb, DocumentProcessingHook as jc, GrantNotFoundError as jd, GrantExpiredError as je, GrantRevokedError as jf, TokenRevokedError as jg, type GrantServiceConfig as jh, type CreateGrantResult as ji, WorkflowAccessGrantService as jj, type StartWorkflowInput as jk, type ResumeWorkflowInput as jl, type WorkflowInstanceServiceOptions as jm, WorkflowInstanceService as jn, type InvitationServiceConfig as jo, InvitationNotFoundError as jp, InvitationExpiredError as jq, InvitationAlreadyAcceptedError as jr, InvitationRevokedError as js, WorkflowInvitationService as jt, type FieldReadOnlyResult as ju, WorkflowRelationService as jv, type CreateWorkflowInput as jw, type UpdateWorkflowInput as jx, type WorkflowServiceOptions as jy, WorkflowService as jz, type MultiRelationAttribute as k, type OperationResult as k$, type PermissionServiceOptions as k0, PermissionService as k1, type CreateViewInput as k2, type UpdateViewInput as k3, type GetViewsOptions as k4, type GetViewOptions as k5, ViewService as k6, type FileContent as k7, type StorageUploadInput as k8, type StorageUploadResult as k9, type UpdateDBAttribute as kA, type UpsertDBAttribute as kB, type CreateObjectRecord as kC, type ListOptions as kD, type SearchOptions as kE, type GlobalSearchOptions as kF, type GlobalSearchResultItem as kG, type FileListOptions as kH, type DBView as kI, type CreateDBView as kJ, type UpdateDBView as kK, type UpsertDBView as kL, type DBViewOverlay as kM, type CreateDBViewOverlay as kN, type UpdateDBViewOverlay as kO, type DBWorkflow as kP, type CreateDBWorkflow as kQ, type UpdateDBWorkflow as kR, type DBWorkflowInstance as kS, type CreateDBWorkflowInstance as kT, type UpdateDBWorkflowInstance as kU, type DBWorkflowInvitation as kV, type CreateDBWorkflowInvitation as kW, type UpdateDBWorkflowInvitation as kX, type DBWorkflowAccessGrant as kY, type CreateDBWorkflowAccessGrant as kZ, type UpdateDBWorkflowAccessGrant as k_, type SignedUrlOptions as ka, type StorageAdapter as kb, type UploadFileInput as kc, type SyncResult as kd, type SyncOptions as ke, syncNativeObjects as kf, verifyNativeObjectsSync as kg, getSyncPreview as kh, type FullSyncResult as ki, type FullSyncOptions as kj, syncAll as kk, DEFAULT_LABEL_FALLBACK as kl, renderLabelExpression as km, isLabelExpression as kn, extractAttributeNames as ko, enrichValuesForDisplay as kp, enrichValuesWithSelectLabels as kq, extractRelationIds as kr, type RelationLabelResolver as ks, computeLabelWithRelations as kt, type DBObject as ku, type CreateDBObject as kv, type UpdateDBObject as kw, type UpsertDBObject as kx, type DBAttribute as ky, type CreateDBAttribute as kz, type RelationTarget as l, type ViewSyncResult as l0, type ViewSyncLogger as l1, type ViewSyncOptions as l2, seedRegistryViews as l3, syncNativeViews as l4, verifyRegistryViewsSeeded as l5, verifyNativeViewsSync as l6, getViewSeedPreview as l7, getViewSyncPreview as l8, type RatingAttribute as m, type FormulaAttribute as n, type FormulaReturnType as o, type RollupAttribute as p, type RollupFunction as q, type AttributeType as r, type ObjectDefinition as s, type Field as t, type AttributeGroupField as u, type TableTab as v, type DetailViewLayout as w, type InverseTableTab as x, type DetailViewDefinition as y, type InstanceStatus as z };
|
|
12583
|
+
export { type TextPartData as $, type AttributeGroupField as A, type BoundingBox as B, type ConditionGroup as C, type DetailViewLayout as D, type SignatureRequestResult as E, type Field as F, type Group as G, type SignatureStatusResult as H, type InferAttributeValue as I, type SignerStatus as J, type SignatureStatus as K, type ListViewDefinition as L, type IdentityVerificationAdapter as M, type VerifyInput as N, type ObjectAction as O, type VerificationResult as P, type DocumentData as Q, type VerificationCheck as R, type SystemResource as S, type TableTab as T, type AIMessageRole as U, type ViewType as V, type WorkflowTheme as W, type AIThinkingLevel as X, type AIToolCallStatus as Y, type AIToolCall as Z, type AIChatMessagePartType as _, type SystemAction as a, type UpdateFile as a$, type ToolPartData as a0, type ThinkingPartData as a1, type ReasoningPartData as a2, type AIChatMessagePart as a3, type AIChatMessage as a4, type AIQuestionType as a5, type AIQuestionOption as a6, type AIQuestion as a7, type AIQuestionAnswer as a8, type AIBatchQuestionOption as a9, type UpdateDocumentGenerationTemplate as aA, type PendingDocumentRequest as aB, type DocumentSlotDefinition as aC, type DocumentAutoProcessing as aD, type ExtractionMapping as aE, type ExtractionField as aF, type Document as aG, type DocumentStatus as aH, type DocumentSlot as aI, type SlotStatus as aJ, type ProcessingJob as aK, type ProcessingJobType as aL, type ProcessingJobStatus as aM, type CreateDocument as aN, type UpdateDocument as aO, type CreateDocumentTemplate as aP, type UpdateDocumentTemplate as aQ, type CreateDocumentSlot as aR, type UpdateDocumentSlot as aS, type CreateProcessingJob as aT, type UpdateProcessingJob as aU, type DocumentListOptions as aV, type DocumentTemplateListOptions as aW, type StorageProvider as aX, type FileVisibility as aY, type File as aZ, type CreateFile as a_, type AIBatchQuestion as aa, type AIBatchQuestionAnswer as ab, type AITodoStatus as ac, type AITodoItem as ad, type AITodoList as ae, type AIMessageAttachment as af, type AIConversation as ag, type AIMessage as ah, type AIToolCallRecord as ai, type AIUserMemory as aj, type AIUsageMetrics as ak, type AIProviderMetrics as al, type CreateAIMessageInput as am, type AuditResourceType as an, type AuditAction as ao, type AuditActorType as ap, type AuditChange as aq, type AuditLogEntry as ar, type CreateAuditLogInput as as, type AuditListOptions as at, type AuditServiceOptions as au, type VariableMapping as av, type PdfTemplateField as aw, type TemplateSource as ax, type DocumentGenerationTemplate as ay, type CreateDocumentGenerationTemplate as az, type InverseTableTab as b, type Permission as b$, type TextFilterOperator as b0, type NumberFilterOperator as b1, type CheckboxFilterOperator as b2, type DateFilterOperator as b3, type SelectFilterOperator as b4, type MultiselectFilterOperator as b5, type RelationFilterOperator as b6, type FilterOperator as b7, type RelativeDateValue as b8, type CurrencyFilterValue as b9, type GeocodingAdapter as bA, NoopGeocodingAdapter as bB, type AttributeSchema as bC, type InferRecordFromSchema as bD, type InferRecordWithRequirements as bE, type TypedAttribute as bF, type AttributeMap as bG, type AddAttribute as bH, type InferRecord as bI, type InferRecordInput as bJ, type InferRecordUpdate as bK, type CustomAttributeValue as bL, type WithCustomAttributes as bM, type RecordMetadata as bN, type SystemFields as bO, type ExtractRecord as bP, type ExtractRecordStrict as bQ, type ExtractRecordInput as bR, type ExtractRecordInputStrict as bS, type ExtractRecordUpdate as bT, type ExtractRecordUpdateStrict as bU, type ExtractAttributes as bV, type TypedObjectRecord as bW, type ExtractObjectRecord as bX, type ExtractObjectRecordWithCustom as bY, type PermissionScope as bZ, type Role as b_, type PhoneFilterValue as ba, type FilterValue as bb, type FilterRule as bc, type ExtendedFilterRule as bd, type FilterCombinator as be, type FilterGroup as bf, type AdvancedFilterState as bg, type SortDirection as bh, type QueryState as bi, OPERATORS_BY_TYPE as bj, type NoValueOperator as bk, NO_VALUE_OPERATORS as bl, isNoValueOperator as bm, type FlowSlot as bn, type FlowRowField as bo, type FlowPage as bp, type FlowRelation as bq, type FlowStatus as br, type FlowDefinition as bs, isFlowDefinition as bt, isFlowPublished as bu, isSystemFlow as bv, type GeocodingSuggestion as bw, type GeocodingAutocompleteParams as bx, type ReverseGeocodingParams as by, type GeocodingParams as bz, type DetailViewDefinition as c, isEndNode 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 ConfigOverrides as cA, type ViewOverlay as cB, isDetailView as cC, isListView as cD, isCalendarView as cE, isTimelineView as cF, isGalleryView as cG, isFormTab as cH, isTableTab as cI, isDirectTableTab as cJ, isInverseTableTab as cK, isCustomTab as cL, isActivityTab as cM, isNotesTab as cN, isFlowsTab as cO, isDocumentsTab as cP, type ConditionNode as cQ, type DocumentNode as cR, type EndNode as cS, type FormFieldRef as cT, type FormNode as cU, type StartNode as cV, type WorkflowNodeType as cW, getNodeOutputs as cX, isAdvancedFormNode as cY, isConditionNode as cZ, isDocumentNode 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, type DocumentsTab as cn, type ListViewLayout as co, type ViewLayout as cp, type ViewTab as cq, type DetailViewConfig as cr, type ListViewConfig as cs, type CalendarViewConfig as ct, type TimelineViewConfig as cu, type GalleryViewConfig as cv, type ViewConfig as cw, type CalendarViewDefinition as cx, type TimelineViewDefinition as cy, type GalleryViewDefinition as cz, type InstanceStatus as d, type RelationAttributeRow as d$, isFormNode as d0, isSimpleFormNode as d1, isStartNode as d2, type ConditionOperator as d3, and as d4, eq as d5, inValues as d6, isConditionGroup as d7, isConditionRule as d8, neq as d9, type WorkflowAccessGrant as dA, canAccessNode as dB, isGrantExpired as dC, isGrantRevoked as dD, isGrantValid as dE, isTokenRevoked as dF, type GeneratedDocument as dG, type WorkflowExecutionContext as dH, createEmptyContext as dI, getContextValue as dJ, setContextValue as dK, type FormContextResponse as dL, type FormFieldContext as dM, type FormFieldRow as dN, type FormNodeInfo as dO, type ReadOnlyReason as dP, type WorkflowAccessMode as dQ, type ThemeColors as dR, type ThemeLogo as dS, type ThemeTypography as dT, DEFAULT_THEME as dU, generateCssVariables as dV, mergeWithDefaults as dW, registry as dX, viewRegistry as dY, type ViewOverlaysRepository as dZ, type RelationAttributeInput as d_, or as da, type CanvasViewport as db, type NodePosition as dc, type WorkflowLayout as dd, type WorkflowSlot as de, type WorkflowStatus as df, isSystemWorkflow as dg, isWorkflowDefinition as dh, isWorkflowPublished as di, type PendingAction as dj, type WorkflowError as dk, type WorkflowInstance as dl, type WorkflowTransition as dm, canResumeInstance as dn, createStartTransition as dp, isInstanceTerminal as dq, isInstanceWaiting as dr, type CreateInvitationInput as ds, type CreateInvitationResult as dt, type InvitationStatus as du, type WorkflowInvitation as dv, isInvitationAccepted as dw, isInvitationExpired as dx, isInvitationValid as dy, type CreateGrantInput as dz, type Tab as e, createDefaultExecutorRegistry as e$, type RelationAttributesRepository as e0, type DatabaseAdapter as e1, WorkflowJwtService as e2, type JwtVerificationResult as e3, type MagicLinkPayload as e4, type WorkflowAccessPayload as e5, type WorkflowJwtConfig as e6, type WorkflowJwtPayload as e7, type CacheKeyType as e8, hashOptions as e9, evaluate as eA, evaluateWithTrace as eB, TenantContextError as eC, FeatureFlagsContextError as eD, getFeatureFlags as eE, getFeatureValue as eF, hasFeatureFlagsContext as eG, isFeatureEnabled as eH, runWithFeatureFlags as eI, tryGetFeatureValue as eJ, withFeatureFlags as eK, type FeatureFlagsContext as eL, addSchemaToContext as eM, getSchemaByNameFromContext as eN, getSchemaContext as eO, getSchemaFromContext as eP, hasSchemaContext as eQ, runWithMergedSchemaContext as eR, runWithSchemaContext as eS, type SchemaContext as eT, getContext as eU, getTenantId as eV, getUserId as eW, hasContext as eX, runWithContext as eY, withTenantContext as eZ, type TenantContext as e_, type CacheAdapter as ea, type CacheOptions as eb, cacheKeys as ec, cacheTtl as ed, defaultTtl as ee, NoopCacheAdapter as ef, type FetchResult as eg, type FormattedRecord as eh, type GroupedFetchResult as ei, type InsertOptions as ej, type QueryBuilderState as ek, type RegistryMap as el, type RegistryObjectNames as em, type ShortcutOperator as en, createDefaultState as eo, formatRecord as ep, formatRecords as eq, QueryMultipleResultsError as er, QueryNoResultError as es, SHORTCUT_TO_FILTER_OPERATOR as et, createQueryBuilder as eu, QueryBuilder as ev, type QueryBuilderOptions as ew, type EvaluationResult as ex, type EvaluationTrace as ey, evaluateCondition as ez, type FilterState as f, type AttributesRepository as f$, getDefaultExecutorRegistry as f0, type ExecutorCompleteResult as f1, type ExecutorContext as f2, type ExecutorErrorResult as f3, type ExecutorResult as f4, type ExecutorSuccessResult as f5, type ExecutorWaitResult as f6, type NodeExecutor as f7, complete as f8, error as f9, parsePath as fA, pathHasManyCardinality as fB, validatePath as fC, type PathCardinality as fD, type PathSegment as fE, type PathSegmentType as fF, type SchemaResolver as fG, resolveMultiplePaths as fH, resolveSingleValue as fI, traversePath as fJ, type TraversalOptions as fK, type TraversalResult as fL, type AttributeChange as fM, type HookContext as fN, type HookDefinition as fO, type HookHandler as fP, type HookType as fQ, NoopHookRegistry as fR, type HookRegistry as fS, createMockAdapter as fT, type MockStores as fU, defaultPolicyRegistry as fV, PolicyRegistry as fW, notesPolicy as fX, type AIConversationsRepository as fY, type AIUsageMetricsRepository as fZ, type AIUserMemoryRepository as f_, ExecutorRegistry as fa, success as fb, wait as fc, ConditionExecutor as fd, DocumentExecutor as fe, EndExecutor as ff, FormExecutor as fg, StartExecutor as fh, evaluateFormula as fi, evaluateFormulaAttribute as fj, evaluateFormulaAttributeWithRelations as fk, evaluateFormulaWithRelations as fl, evaluateFormulaWithResult as fm, extractFormulaVariables as fn, extractRelationNames as fo, extractRelationReferences as fp, flattenRelationsForEval as fq, formatFormulaResult as fr, hasRelationReferences as fs, validateFormulaExpression as ft, type FormulaResult as fu, getPathDepth as fv, getRelationPath as fw, getTargetAttributeName as fx, InvalidPathError as fy, MaxDepthExceededError as fz, type SortRule as g, computeLabel as g$, type AuditRepository as g0, type DocumentGenerationTemplateListOptions as g1, type DocumentGenerationTemplatesRepository as g2, type DocumentJobsRepository as g3, type DocumentSlotsRepository as g4, type DocumentsRepository as g5, type DocumentTemplatesRepository as g6, type FilesRepository as g7, type ObjectRecordsRepository as g8, type ObjectsRepository as g9, type RelationOptionsResponse as gA, type GetRelationOptionsParams as gB, type RelationServiceOptions as gC, type ResolveIdsBatchRequest as gD, type ResolveIdsBatchResponse as gE, RelationService as gF, type MultiRelationValue as gG, type SingleRelationValue as gH, type HybridRelationValue as gI, RelationPropertiesService as gJ, RecordResolverService as gK, type ResolvedRelations as gL, type FormulaResolverServiceOptions as gM, FormulaResolverService as gN, type RollupResult as gO, type RollupServiceOptions as gP, RollupService as gQ, type RollupSchedulerOptions as gR, RollupScheduler as gS, applyDefaultValues as gT, checkPermission as gU, getPolicy as gV, buildPolicyContext as gW, checkRecordAccess as gX, checkRecordModifyOrThrow as gY, checkRecordDeleteOrThrow as gZ, checkSharedObjectWriteAccess as g_, type PermissionsRepository as ga, type UserProfilesRepository as gb, type ViewsRepository as gc, type WorkflowAccessGrantsRepository as gd, type WorkflowInstancesRepository as ge, type WorkflowInvitationsRepository as gf, type WorkflowsRepository as gg, BaseService as gh, BaseRepository as gi, type SchemaContextAware as gj, SchemaContextAwareRepository as gk, type CreateCustomObjectInput as gl, type AddAttributeInput as gm, type UpdateObjectInput as gn, type ObjectSchemaServiceOptions as go, ObjectSchemaService as gp, type RecordServiceOptions as gq, RecordService as gr, type RecordQueryServiceOptions as gs, type QueryOptions as gt, type SearchQueryOptions as gu, type QueryResult as gv, RecordQueryService as gw, type RelationValidationResult as gx, type RelationValidationError as gy, type RelationOption as gz, type DirectTableTab as h, type CreateViewInput as h$, type LabelResolver as h0, enrichWithFormulas as h1, enrichRecordsWithFormulas as h2, createContextForCreate as h3, createContextForUpdate as h4, createContextForDelete as h5, createContextForRestore as h6, recalculateParentRollups as h7, type RollupCascadeContext as h8, type DocumentProcessingHookOptions as h9, type UserProfileServiceOptions as hA, UserProfileService as hB, AuditService as hC, buildAuditChanges as hD, DocumentGenerationTemplateNotFoundError as hE, DocumentGenerationNotConfiguredError as hF, DocumentGenerationService as hG, type DocumentProcessingConfig as hH, DocumentProcessingService as hI, type RenderDocumentInput as hJ, type DocumentRendererOptions as hK, type RenderDocumentResult as hL, DocumentRenderError as hM, StorageDownloadNotSupportedError as hN, DocumentRendererService as hO, DocumentTemplateService as hP, type RecordDocumentsResult as hQ, type CreateRecordDocumentInput as hR, type CreateRecordDocumentResult as hS, type DocumentServiceOptions as hT, DocumentService as hU, type FileServiceOptions as hV, FileService as hW, GeocodingService as hX, GlobalSearchService as hY, type PermissionServiceOptions as hZ, PermissionService as h_, DocumentProcessingHook as ha, GrantNotFoundError as hb, GrantExpiredError as hc, GrantRevokedError as hd, TokenRevokedError as he, type GrantServiceConfig as hf, type CreateGrantResult as hg, WorkflowAccessGrantService as hh, type StartWorkflowInput as hi, type ResumeWorkflowInput as hj, type WorkflowInstanceServiceOptions as hk, WorkflowInstanceService as hl, type InvitationServiceConfig as hm, InvitationNotFoundError as hn, InvitationExpiredError as ho, InvitationAlreadyAcceptedError as hp, InvitationRevokedError as hq, WorkflowInvitationService as hr, WorkflowRelationService as hs, type CreateWorkflowInput as ht, type UpdateWorkflowInput as hu, type WorkflowServiceOptions as hv, WorkflowService as hw, type UserValidationResult as hx, type UserValidationError as hy, UserService as hz, type WorkflowConfig as i, type ViewSyncResult as i$, type UpdateViewInput as i0, type GetViewsOptions as i1, type GetViewOptions as i2, ViewService as i3, type FileContent as i4, type StorageUploadInput as i5, type StorageUploadResult as i6, type SignedUrlOptions as i7, type StorageAdapter as i8, type UploadFileInput as i9, type UpsertDBAttribute as iA, type CreateObjectRecord as iB, type ListOptions as iC, type SearchOptions as iD, type GlobalSearchOptions as iE, type GlobalSearchResultItem as iF, type FileListOptions as iG, type DBView as iH, type CreateDBView as iI, type UpdateDBView as iJ, type UpsertDBView as iK, type DBViewOverlay as iL, type CreateDBViewOverlay as iM, type UpdateDBViewOverlay as iN, type DBWorkflow as iO, type CreateDBWorkflow as iP, type UpdateDBWorkflow as iQ, type DBWorkflowInstance as iR, type CreateDBWorkflowInstance as iS, type UpdateDBWorkflowInstance as iT, type DBWorkflowInvitation as iU, type CreateDBWorkflowInvitation as iV, type UpdateDBWorkflowInvitation as iW, type DBWorkflowAccessGrant as iX, type CreateDBWorkflowAccessGrant as iY, type UpdateDBWorkflowAccessGrant as iZ, type OperationResult as i_, type SyncResult as ia, type SyncOptions as ib, syncNativeObjects as ic, verifyNativeObjectsSync as id, getSyncPreview as ie, type FullSyncResult as ig, type FullSyncOptions as ih, syncAll as ii, DEFAULT_LABEL_FALLBACK as ij, renderLabelExpression as ik, isLabelExpression as il, extractAttributeNames as im, enrichValuesForDisplay as io, enrichValuesWithSelectLabels as ip, extractRelationIds as iq, type RelationLabelResolver as ir, computeLabelWithRelations as is, type DBObject as it, type CreateDBObject as iu, type UpdateDBObject as iv, type UpsertDBObject as iw, type DBAttribute as ix, type CreateDBAttribute as iy, type UpdateDBAttribute as iz, type SlotMode as j, type ViewSyncLogger as j0, type ViewSyncOptions as j1, seedRegistryViews as j2, syncNativeViews as j3, verifyRegistryViewsSeeded as j4, verifyNativeViewsSync as j5, getViewSeedPreview as j6, getViewSyncPreview as j7, type ConditionRule as k, type WorkflowNode as l, type WorkflowDefinition as m, type FlowRow as n, type ViewDefinition as o, type DocumentTemplate as p, type OcrAdapter as q, type OcrInput as r, type OcrOptions as s, type OcrResult as t, type OcrPage as u, type OcrTextBlock as v, type SignatureAdapter as w, type CreateSignatureInput as x, type SignerRequest as y, type SignaturePosition as z };
|