lucid-extension-sdk 0.0.374 → 0.0.375
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FieldConstraintDefinition } from '../../data/schemadefinition';
|
|
2
2
|
import { CollectionEnumFieldType } from './fieldtypedefinition/collectionenumfieldtype';
|
|
3
|
+
import { DeserializedMapEnumFieldType } from './fieldtypedefinition/deserializedmapenumfieldtype';
|
|
3
4
|
import { FieldTypeArray } from './fieldtypedefinition/fieldtypearray';
|
|
4
5
|
import { FieldTypeDefinition } from './fieldtypedefinition/fieldtypedefinition';
|
|
5
6
|
import { LucidFields } from './fieldtypedefinition/lucidfields';
|
|
@@ -9,7 +10,7 @@ import { SemanticKind } from './fieldtypedefinition/semantickind';
|
|
|
9
10
|
import { SerializedColorObject, SerializedLucidCurrency, SerializedLucidDateObject, SerializedLucidDictionary } from './serializedfield/serializedfields';
|
|
10
11
|
type TsTypeOf<X> = X extends ScalarFieldTypeEnum.ANY ? unknown : X extends ScalarFieldTypeEnum.NUMBER ? number : X extends ScalarFieldTypeEnum.BOOLEAN ? boolean : X extends ScalarFieldTypeEnum.STRING ? string : X extends ScalarFieldTypeEnum.COLOR ? SerializedColorObject : X extends ScalarFieldTypeEnum.DATE ? SerializedLucidDateObject : X extends ScalarFieldTypeEnum.NULL ? null : X extends ScalarFieldTypeEnum.DICTIONARY ? SerializedLucidDictionary : X extends FieldTypeArray<infer Inner> ? TsTypeOf<Inner>[] : X extends ScalarFieldTypeEnum.CURRENCY ? SerializedLucidCurrency : X extends ScalarFieldTypeEnum.DATEONLY ? SerializedLucidDateObject & {
|
|
11
12
|
isDateOnly: true;
|
|
12
|
-
} : X extends CollectionEnumFieldType ? string : X extends readonly [infer Inner, ...infer Others] ? TsTypeOf<Inner> | TsTypeOf<Others> : never;
|
|
13
|
+
} : X extends CollectionEnumFieldType ? string : X extends DeserializedMapEnumFieldType ? string : X extends readonly [infer Inner, ...infer Others] ? TsTypeOf<Inner> | TsTypeOf<Others> : never;
|
|
13
14
|
/**
|
|
14
15
|
* Specifies all the fields that this itegration will be sending to the data-sync service.
|
|
15
16
|
* Give you well typed methods to convert from `YourType[]` to `{[PrimaryKey:string]: YourType}`
|