/** * In-place edits of an existing AxDataEntityView (pure string in / string out). * * The bridge writes a fixed list of entity properties and cannot add a datasource or a * mapped field to an entity (only to an extension), so these edits are made here. * * Element order matters: the deserializer drops a mis-ordered element silently, and an * element missing from the order table lets a new property land on the wrong side of it. * * Every edit is anchored on the file's indent unit (detectIndentUnit): an element's depth is * read from its indentation, which is what keeps an edit off a nested collection of the same * name. Shipped metadata is tab-indented; about 2% of it uses two spaces. */ /** * Top-level elements of an AxDataEntityView in serialised order, measured over the ~5,800 * shipped entities of a platform install (pairwise majority; a handful of outliers exist). */ export declare const ENTITY_TOP_LEVEL_ORDER: readonly ['Name', 'SourceCode', 'ConfigurationKey', 'CountryRegionCodes', 'DeveloperDocumentation', 'FormRef', 'IsObsolete', 'Label', 'SingularLabel', 'OperationalDomain', 'SubscriberAccessLevel', 'Tags', 'AllowArchival', 'AllowRetention', 'AllowRowVersionChangeTracking', 'AutoCreateDataverse', 'DataManagementEnabled', 'DataManagementStagingTable', 'EnableSetBasedSqlOperations', 'EntityCategory', 'IsPublic', 'IsReadOnly', 'Modules', 'PrimaryCompanyContext', 'PrimaryKey', 'PublicCollectionName', 'PublicEntityName', 'SupportsSetBasedSqlOperations', 'ValidTimeStateEnabled', 'DeleteActions', 'FieldGroups', 'Fields', 'Keys', 'Mappings', 'Ranges', 'Relations', 'StateMachines', 'ViewMetadata']; /** * The scalar properties upsertDataEntityProperty writes. Modules, OperationalDomain and * SubscriberAccessLevel are ordered above but not writable here: their values are enums or * structures this writer does not validate. */ export declare const ENTITY_SCALAR_PROPERTIES: ReadonlySet; export interface EditResult { ok: boolean; xml?: string; /** Human-readable reason when !ok, or a note when ok. */ message: string; } /** * Set (or insert, in canonical position) one scalar property of an entity. * Refuses names that are not entity scalar properties: writing an arbitrary * element would land somewhere the deserializer ignores. */ export declare function upsertDataEntityProperty(xml: string, name: string, value: string): EditResult; export interface EntityDataSourceSpec { name: string; table: string; /** Existing datasource to nest under. Default: the root datasource. */ joinSource?: string; /** InnerJoin (default, omitted from XML) | OuterJoin | ExistsJoin | NoExistsJoin. */ joinMode?: string; /** Field on the JOIN (parent) datasource. */ joinField?: string; /** Field on the NEW datasource's table. */ relatedField?: string; readOnly?: boolean; /** Default true — every shipped embedded datasource of an entity carries it. */ dynamicFields?: boolean; } /** * Add an AxQuerySimpleEmbeddedDataSource, with its join relation, under a * datasource of the entity's ViewMetadata query. * * Shape and sub-element order come from a shipped entity: * Name, DynamicFields, IsReadOnly, Table, DataSources, DerivedDataSources, * Fields, Ranges, JoinMode, Relations * On the relation, `Field` is the field of the JOIN (parent) datasource and * `RelatedField` the field of the new datasource's table * (DefaultDimension → DimensionSetEntity.RecId). */ export declare function addDataEntityDataSource(xml: string, spec: EntityDataSourceSpec): EditResult; export interface EntityMappedFieldSpec { name: string; dataField: string; dataSource: string; label?: string; accessModifier?: string; mandatory?: string; } /** Append one AxDataEntityViewMappedField to the entity's top-level . */ export declare function addDataEntityMappedField(xml: string, spec: EntityMappedFieldSpec): EditResult; //# sourceMappingURL=dataEntityViewEdit.d.ts.map