@anticrm/domains Package
Enumerations
Enumeration | Description |
---|---|
TitleSource | Define a title source, ShortId titles will be used to reference documents with short form. |
TxOperationKind | An update transaction, operation kind. |
Functions
Function | Description |
---|---|
txBuilder(clazz) | Construct TxOperation builder to create TxOperation to perform object update. |
Interfaces
Interface | Description |
---|---|
Application | Define an application descriptor. |
CreateTx | Perform an object creation. In case _class is mixin, object of first parent Class will be stored into storage. |
DeleteTx | Delete removed object fully from storage. |
List | |
ObjectSelector | |
ObjectTx | |
ObjectTxDetails | |
OperationProtocol | Define operations with object modifications. |
Reference | A reference object from and source to any targetsource - define a source object with class and properties. target - define a target object with class and properties. |
ShortID | Define a list of space references for this object, this is a mixin. |
Space | |
SpaceUser | Define a space user - association, it hold some extra properties. |
Title | |
TxOperation | Update operation inside update transaction, could contain changes to some of individual embedded attributes. And operations with arrays. |
UpdateTx | Perform an object update operation. In case _class is mixin, object of first parent Class will be stored into storage. |
VDoc |
Variables
Variable | Description |
---|---|
CORE_CLASS_CREATE_TX | |
CORE_CLASS_DELETE_TX | |
CORE_CLASS_OBJECT_SELECTOR | |
CORE_CLASS_OBJECT_TX | |
CORE_CLASS_OBJECTTX_DETAILS | |
CORE_CLASS_REFERENCE | |
CORE_CLASS_SPACE_USER | |
CORE_CLASS_SPACE | |
CORE_CLASS_TITLE | |
CORE_CLASS_TX_OPERATION | |
CORE_CLASS_TX | |
CORE_CLASS_UPDATE_TX | |
CORE_CLASS_VDOC | |
CORE_MIXIN_SHORTID | |
REFERENCE_DOMAIN | |
TITLE_DOMAIN | |
TX_DOMAIN |
Type Aliases
Type Alias | Description |
---|---|
FieldBuilder | |
TxBuilder | |
TxBuilderArrayOf | |
TxBuilderOf | |
TxBuilderOrOpBuilderOf |
Enumerations
TitleSource enum
Define a title source, ShortId titles will be used to reference documents with short form.
Signature:
export declare enum TitleSource
Enumeration Members
Member | Value | Description |
---|---|---|
ShortId | 1 |
|
Title | 0 |
TxOperationKind enum
An update transaction, operation kind.
Signature:
export declare enum TxOperationKind
Enumeration Members
Member | Value | Description |
---|---|---|
Pull | 2 |
|
Push | 1 |
|
Set | 0 |
Functions
txBuilder
Construct TxOperation builder to create TxOperation to perform object update.
Signature:
export declare function txBuilder<T extends Doc>(clazz: Ref<Class<T>>): TxBuilder<T>;
Parameters
Parameter | Type | Description |
---|---|---|
clazz | Ref<Class |
an object class to build operation for. |
Returns:
TxBuilder<T>
Variables
CORE_CLASS_CREATE_TX
Signature:
CORE_CLASS_CREATE_TX: Ref<Class<CreateTx>>
CORE_CLASS_DELETE_TX
Signature:
CORE_CLASS_DELETE_TX: Ref<Class<DeleteTx>>
CORE_CLASS_OBJECT_SELECTOR
Signature:
CORE_CLASS_OBJECT_SELECTOR: Ref<Class<ObjectSelector>>
CORE_CLASS_OBJECT_TX
Signature:
CORE_CLASS_OBJECT_TX: Ref<Class<ObjectTx>>
CORE_CLASS_OBJECTTX_DETAILS
Signature:
CORE_CLASS_OBJECTTX_DETAILS: Ref<Class<ObjectTxDetails>>
CORE_CLASS_REFERENCE
Signature:
CORE_CLASS_REFERENCE: Ref<Class<Reference>>
CORE_CLASS_SPACE_USER
Signature:
CORE_CLASS_SPACE_USER: Ref<Class<SpaceUser>>
CORE_CLASS_SPACE
Signature:
CORE_CLASS_SPACE: Ref<Class<Space>>
CORE_CLASS_TITLE
Signature:
CORE_CLASS_TITLE: Ref<Class<Title>>
CORE_CLASS_TX_OPERATION
Signature:
CORE_CLASS_TX_OPERATION: Ref<Class<TxOperation>>
CORE_CLASS_TX
Signature:
CORE_CLASS_TX: Ref<Class<Tx>>
CORE_CLASS_UPDATE_TX
Signature:
CORE_CLASS_UPDATE_TX: Ref<Class<UpdateTx>>
CORE_CLASS_VDOC
Signature:
CORE_CLASS_VDOC: Ref<Class<VDoc>>
CORE_MIXIN_SHORTID
Signature:
CORE_MIXIN_SHORTID: Ref<Mixin<ShortID>>
REFERENCE_DOMAIN
Signature:
REFERENCE_DOMAIN = "references"
TITLE_DOMAIN
Signature:
TITLE_DOMAIN = "title"
TX_DOMAIN
Signature:
TX_DOMAIN = "tx"
Type Aliases
FieldBuilder
Signature:
export declare type FieldBuilder<T> = {
[P in keyof T]-?: TxBuilderArrayOf<T[P]> | TxBuilderOf<T[P]>;
};
TxBuilder
Signature:
export declare type TxBuilder<T> = TxOperationBuilder<T> & FieldBuilder<T>;
TxBuilderArrayOf
Signature:
export declare type TxBuilderArrayOf<A> = A extends Array<infer T> ? TxBuilderOrOpBuilderOf<T> : never;
TxBuilderOf
Signature:
export declare type TxBuilderOf<A> = A extends Obj ? TxBuilder<A> : never;
TxBuilderOrOpBuilderOf
Signature:
export declare type TxBuilderOrOpBuilderOf<A> = A extends Obj ? TxBuilder<A> : TxOperationBuilder<A>;