lucid-extension-sdk 0.0.229 → 0.0.230
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/core/checks.d.ts +1 -1
- package/core/data/fieldtypedefinition/basefieldtypedefinition.js +1 -1
- package/core/data/fieldtypedefinition/collectionenumfieldtype.d.ts +1 -1
- package/core/data/fieldtypedefinition/collectionenumfieldtype.js +1 -1
- package/core/data/fieldtypedefinition/fieldtypearray.d.ts +1 -1
- package/core/data/fieldtypedefinition/fieldtypearray.js +2 -2
- package/core/data/fieldtypedefinition/literalfieldtype.d.ts +1 -1
- package/core/data/fieldtypedefinition/literalfieldtype.js +1 -1
- package/core/data/fieldtypedefinition/ndimensionalfieldtypearray.d.ts +1 -1
- package/core/data/fieldtypedefinition/ndimensionalfieldtypearray.js +2 -2
- package/core/jsonserializable.d.ts +1 -1
- package/package.json +1 -1
package/core/checks.d.ts
CHANGED
|
@@ -134,7 +134,7 @@ export declare function isEmptyOrNullishObject(val: unknown): val is {};
|
|
|
134
134
|
export declare function isAny(val: unknown): val is any;
|
|
135
135
|
export declare function isUnknown(val: unknown): val is unknown;
|
|
136
136
|
export declare function isPromise(val: unknown): val is Promise<unknown>;
|
|
137
|
-
export declare function isLiteral<T extends string | number | symbol |
|
|
137
|
+
export declare function isLiteral<T extends string | number | symbol | boolean>(t: T): (x: unknown) => x is T;
|
|
138
138
|
type AbstractConstructor<T> = Function & {
|
|
139
139
|
prototype: T;
|
|
140
140
|
};
|
|
@@ -24,7 +24,7 @@ function serializeBaseFieldTypeDefinition(baseFieldType) {
|
|
|
24
24
|
baseFieldType instanceof fieldtypearray_1.FieldTypeArray ||
|
|
25
25
|
baseFieldType instanceof ndimensionalfieldtypearray_1.NDimensionalFieldTypeArray ||
|
|
26
26
|
baseFieldType instanceof collectionenumfieldtype_1.CollectionEnumFieldType) {
|
|
27
|
-
return baseFieldType.
|
|
27
|
+
return baseFieldType.toJSON();
|
|
28
28
|
}
|
|
29
29
|
return baseFieldType;
|
|
30
30
|
}
|
|
@@ -22,7 +22,7 @@ export declare class CollectionEnumFieldType {
|
|
|
22
22
|
*/
|
|
23
23
|
static readonly PRIMARY_KEY = CollectionEnumFieldNames.Id;
|
|
24
24
|
constructor(collectionId: string);
|
|
25
|
-
|
|
25
|
+
toJSON(): SerializedCollectionEnumFieldType;
|
|
26
26
|
}
|
|
27
27
|
export declare const isCollectionEnumFieldType: (fieldType: FieldTypeDefinition) => fieldType is CollectionEnumFieldType;
|
|
28
28
|
export type SerializedCollectionEnumFieldType = {
|
|
@@ -7,7 +7,7 @@ export declare abstract class BaseFieldTypeArray<Type> {
|
|
|
7
7
|
protected abstract serializeType(t: Type): SerializedFieldTypeArraySubTypes;
|
|
8
8
|
getInnerTypes(): Type[];
|
|
9
9
|
getInnerNonArrayTypes(): Exclude<Type, BaseFieldTypeArray<Type>>[];
|
|
10
|
-
|
|
10
|
+
toJSON(): SerializedFieldTypeArray;
|
|
11
11
|
}
|
|
12
12
|
export type FieldTypeArraySubTypes = ScalarFieldTypeEnum | CollectionEnumFieldType | LiteralFieldType | FieldTypeArray<any>;
|
|
13
13
|
export type SerializedFieldTypeArraySubTypes = ScalarFieldTypeEnum | SerializedLiteralFieldType | SerializedFieldTypeArray | SerializedCollectionEnumFieldType;
|
|
@@ -15,7 +15,7 @@ class BaseFieldTypeArray {
|
|
|
15
15
|
getInnerNonArrayTypes() {
|
|
16
16
|
return this.validTypesArray.filter((innerType) => !(innerType instanceof BaseFieldTypeArray));
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
toJSON() {
|
|
19
19
|
return {
|
|
20
20
|
'ND': false,
|
|
21
21
|
'validTypes': this.validTypesArray.map((t) => this.serializeType(t)),
|
|
@@ -25,7 +25,7 @@ class BaseFieldTypeArray {
|
|
|
25
25
|
exports.BaseFieldTypeArray = BaseFieldTypeArray;
|
|
26
26
|
class FieldTypeArray extends BaseFieldTypeArray {
|
|
27
27
|
serializeType(t) {
|
|
28
|
-
return (0, scalarfieldtype_1.isScalarFieldTypeEnum)(t) ? t : t.
|
|
28
|
+
return (0, scalarfieldtype_1.isScalarFieldTypeEnum)(t) ? t : t.toJSON();
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
exports.FieldTypeArray = FieldTypeArray;
|
|
@@ -6,7 +6,7 @@ export declare class LiteralFieldType {
|
|
|
6
6
|
constructor(literal: boolean | number | string);
|
|
7
7
|
getLiteral(): string | number | boolean;
|
|
8
8
|
getScalarFieldType(): ScalarFieldTypeEnum;
|
|
9
|
-
|
|
9
|
+
toJSON(): SerializedLiteralFieldType;
|
|
10
10
|
}
|
|
11
11
|
export declare function isLiteralFieldType(fieldType: any): fieldType is LiteralFieldType;
|
|
12
12
|
export type SerializedLiteralFieldType = string;
|
|
@@ -25,7 +25,7 @@ class LiteralFieldType {
|
|
|
25
25
|
getScalarFieldType() {
|
|
26
26
|
return this.scalarFieldType;
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
toJSON() {
|
|
29
29
|
if (this.scalarFieldType === scalarfieldtype_1.ScalarFieldTypeEnum.STRING) {
|
|
30
30
|
return LiteralFieldType.literalStringPrefix + this.literal;
|
|
31
31
|
}
|
|
@@ -5,7 +5,7 @@ export declare class NDimensionalFieldTypeArray {
|
|
|
5
5
|
constructor(validTypesArray: (ScalarFieldTypeEnum | LiteralFieldType)[]);
|
|
6
6
|
getInnerTypes(): (ScalarFieldTypeEnum | LiteralFieldType | this)[];
|
|
7
7
|
getInnerNonArrayTypes(): (ScalarFieldTypeEnum | LiteralFieldType)[];
|
|
8
|
-
|
|
8
|
+
toJSON(): SerializedNDimensionalFieldTypeArray;
|
|
9
9
|
}
|
|
10
10
|
export declare function isValidTypeForNDimensionalFieldTypeArray(fieldType: any): fieldType is ScalarFieldTypeEnum | LiteralFieldType;
|
|
11
11
|
export declare function isNDimensionalFieldTypeArray(fieldType: any): fieldType is NDimensionalFieldTypeArray;
|
|
@@ -14,10 +14,10 @@ class NDimensionalFieldTypeArray {
|
|
|
14
14
|
getInnerNonArrayTypes() {
|
|
15
15
|
return this.validTypesArray.filter((innerType) => (0, scalarfieldtype_1.isScalarFieldTypeEnum)(innerType) || (0, literalfieldtype_1.isLiteralFieldType)(innerType));
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
toJSON() {
|
|
18
18
|
return {
|
|
19
19
|
'ND': true,
|
|
20
|
-
'validTypes': this.validTypesArray.map((t) => ((0, scalarfieldtype_1.isScalarFieldTypeEnum)(t) ? t : t.
|
|
20
|
+
'validTypes': this.validTypesArray.map((t) => ((0, scalarfieldtype_1.isScalarFieldTypeEnum)(t) ? t : t.toJSON())),
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
}
|