akanjs 3.1.2-rc.0 → 3.1.2-rc.2
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/constant/via.ts +3 -13
- package/package.json +1 -1
- package/types/constant/via.d.ts +3 -8
package/constant/via.ts
CHANGED
|
@@ -209,10 +209,6 @@ export interface ConstantMethods<Schema = any> {
|
|
|
209
209
|
set(obj: Partial<Schema>): this;
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
type DatabaseSchemaOf<Schema, HiddenKey> = {
|
|
213
|
-
[K in keyof Schema]: K extends HiddenKey ? NonNullable<Schema[K]> : Schema[K];
|
|
214
|
-
};
|
|
215
|
-
|
|
216
212
|
export interface ConstantStatics<
|
|
217
213
|
Schema = any,
|
|
218
214
|
OwnSchema = Schema,
|
|
@@ -246,7 +242,7 @@ export interface ConstantStatics<
|
|
|
246
242
|
_SecretKey: SecretKey;
|
|
247
243
|
_OwnSchema: OwnSchema;
|
|
248
244
|
_OwnFieldObj: OwnFieldObj;
|
|
249
|
-
_DatabaseSchema:
|
|
245
|
+
_DatabaseSchema: Schema;
|
|
250
246
|
_ModelType: ModelType;
|
|
251
247
|
[SERVER_VALUE]: Schema;
|
|
252
248
|
[CLIENT_VALUE]: Schema;
|
|
@@ -264,13 +260,7 @@ export interface DatabaseConstantStatics<Schema = any, FieldObj extends FieldObj
|
|
|
264
260
|
enums: Set<EnumInstance>;
|
|
265
261
|
text: TextFieldPaths;
|
|
266
262
|
cascade: CascadePaths;
|
|
267
|
-
_DatabaseSchema:
|
|
268
|
-
[K in keyof Schema]: K extends keyof FieldObj
|
|
269
|
-
? FieldObj[K]["fieldType"] extends "hidden"
|
|
270
|
-
? NonNullable<Schema[K]>
|
|
271
|
-
: Schema[K]
|
|
272
|
-
: Schema[K];
|
|
273
|
-
};
|
|
263
|
+
_DatabaseSchema: Schema;
|
|
274
264
|
}
|
|
275
265
|
|
|
276
266
|
export type ConstantModelRef<
|
|
@@ -294,7 +284,7 @@ export type DocumentConstantModelRef<
|
|
|
294
284
|
Schema = any,
|
|
295
285
|
FieldObj extends FieldObject = FieldObject,
|
|
296
286
|
ModelType extends ConstantType = ConstantType,
|
|
297
|
-
DatabaseSchema =
|
|
287
|
+
DatabaseSchema = Schema,
|
|
298
288
|
> = Cls<
|
|
299
289
|
Schema,
|
|
300
290
|
{
|
package/package.json
CHANGED
package/types/constant/via.d.ts
CHANGED
|
@@ -23,9 +23,6 @@ type ResolvedFieldObject<ResolveField extends (resolve: FieldResolver) => FieldI
|
|
|
23
23
|
export interface ConstantMethods<Schema = any> {
|
|
24
24
|
set(obj: Partial<Schema>): this;
|
|
25
25
|
}
|
|
26
|
-
type DatabaseSchemaOf<Schema, HiddenKey> = {
|
|
27
|
-
[K in keyof Schema]: K extends HiddenKey ? NonNullable<Schema[K]> : Schema[K];
|
|
28
|
-
};
|
|
29
26
|
export interface ConstantStatics<Schema = any, OwnSchema = Schema, OwnFieldObj extends FieldObject = FieldObject, OptionalKey = never, RelationKey = never, PrimitiveKey = never, ScalarKey = never, EnumKey = never, MapKey = never, HiddenKey = never, SecretKey = never, ModelType extends ConstantType = ConstantType> {
|
|
30
27
|
[FIELD_META]: FieldObject;
|
|
31
28
|
getDefault: () => DefaultOfSchema<Schema, RelationKey>;
|
|
@@ -46,7 +43,7 @@ export interface ConstantStatics<Schema = any, OwnSchema = Schema, OwnFieldObj e
|
|
|
46
43
|
_SecretKey: SecretKey;
|
|
47
44
|
_OwnSchema: OwnSchema;
|
|
48
45
|
_OwnFieldObj: OwnFieldObj;
|
|
49
|
-
_DatabaseSchema:
|
|
46
|
+
_DatabaseSchema: Schema;
|
|
50
47
|
_ModelType: ModelType;
|
|
51
48
|
[SERVER_VALUE]: Schema;
|
|
52
49
|
[CLIENT_VALUE]: Schema;
|
|
@@ -63,9 +60,7 @@ export interface DatabaseConstantStatics<Schema = any, FieldObj extends FieldObj
|
|
|
63
60
|
enums: Set<EnumInstance>;
|
|
64
61
|
text: TextFieldPaths;
|
|
65
62
|
cascade: CascadePaths;
|
|
66
|
-
_DatabaseSchema:
|
|
67
|
-
[K in keyof Schema]: K extends keyof FieldObj ? FieldObj[K]["fieldType"] extends "hidden" ? NonNullable<Schema[K]> : Schema[K] : Schema[K];
|
|
68
|
-
};
|
|
63
|
+
_DatabaseSchema: Schema;
|
|
69
64
|
}
|
|
70
65
|
export type ConstantModelRef<Schema = any, FieldObj extends FieldObject = FieldObject, ModelType extends ConstantType = ConstantType> = Cls<Schema, {
|
|
71
66
|
[FIELD_META]: FieldObj;
|
|
@@ -76,7 +71,7 @@ export type ConstantModelRef<Schema = any, FieldObj extends FieldObject = FieldO
|
|
|
76
71
|
text: TextFieldPaths;
|
|
77
72
|
cascade: CascadePaths;
|
|
78
73
|
}>;
|
|
79
|
-
export type DocumentConstantModelRef<Schema = any, FieldObj extends FieldObject = FieldObject, ModelType extends ConstantType = ConstantType, DatabaseSchema =
|
|
74
|
+
export type DocumentConstantModelRef<Schema = any, FieldObj extends FieldObject = FieldObject, ModelType extends ConstantType = ConstantType, DatabaseSchema = Schema> = Cls<Schema, {
|
|
80
75
|
[FIELD_META]: FieldObj;
|
|
81
76
|
modelType: ModelType;
|
|
82
77
|
_DatabaseSchema: DatabaseSchema;
|