@aeriajs/types 0.0.103 → 0.0.104
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/dist/functionSchemas.d.ts +4 -4
- package/dist/functions.d.ts +3 -5
- package/dist/property.d.ts +1 -3
- package/dist/resultSchemas.d.ts +2 -2
- package/dist/resultSchemas.js +2 -2
- package/dist/resultSchemas.mjs +2 -2
- package/dist/schema.d.ts +2 -2
- package/dist/security.d.ts +1 -1
- package/package.json +1 -1
|
@@ -25,7 +25,7 @@ export declare const insertError: () => {
|
|
|
25
25
|
};
|
|
26
26
|
readonly details: {
|
|
27
27
|
readonly type: "object";
|
|
28
|
-
readonly
|
|
28
|
+
readonly additionalProperties: true;
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
};
|
|
@@ -55,7 +55,7 @@ export declare const getError: () => {
|
|
|
55
55
|
};
|
|
56
56
|
readonly details: {
|
|
57
57
|
readonly type: "object";
|
|
58
|
-
readonly
|
|
58
|
+
readonly additionalProperties: true;
|
|
59
59
|
};
|
|
60
60
|
};
|
|
61
61
|
};
|
|
@@ -85,7 +85,7 @@ export declare const getAllError: () => {
|
|
|
85
85
|
};
|
|
86
86
|
readonly details: {
|
|
87
87
|
readonly type: "object";
|
|
88
|
-
readonly
|
|
88
|
+
readonly additionalProperties: true;
|
|
89
89
|
};
|
|
90
90
|
};
|
|
91
91
|
};
|
|
@@ -115,7 +115,7 @@ export declare const countError: () => {
|
|
|
115
115
|
};
|
|
116
116
|
readonly details: {
|
|
117
117
|
readonly type: "object";
|
|
118
|
-
readonly
|
|
118
|
+
readonly additionalProperties: true;
|
|
119
119
|
};
|
|
120
120
|
};
|
|
121
121
|
};
|
package/dist/functions.d.ts
CHANGED
|
@@ -61,9 +61,7 @@ export type InsertPayload<TDocument extends WithId<unknown>> = {
|
|
|
61
61
|
export type RemovePayload<TDocument extends WithId<unknown>> = {
|
|
62
62
|
filters: Filters<TDocument>;
|
|
63
63
|
};
|
|
64
|
-
export type RemoveAllPayload =
|
|
65
|
-
filters: (ObjectId | string)[];
|
|
66
|
-
};
|
|
64
|
+
export type RemoveAllPayload<TDocument extends WithId<unknown>> = GetPayload<TDocument>;
|
|
67
65
|
export type RemoveFilePayload = UploadAuxProps & {
|
|
68
66
|
filters: {
|
|
69
67
|
_id: ObjectId | string;
|
|
@@ -86,7 +84,7 @@ export type CollectionFunctions<TSchema extends JsonSchema = JsonSchema> = Schem
|
|
|
86
84
|
keepTempIds: true;
|
|
87
85
|
}>>) => Promise<InsertReturnType<InferredDocument>>;
|
|
88
86
|
remove: (payload: RemovePayload<InferredDocument>) => Promise<RemoveReturnType<InferredDocument>>;
|
|
89
|
-
removeAll: (payload: RemoveAllPayload) => Promise<unknown>;
|
|
87
|
+
removeAll: (payload: RemoveAllPayload<InferredDocument>) => Promise<unknown>;
|
|
90
88
|
removeFile: (payload: RemoveFilePayload) => Promise<unknown>;
|
|
91
89
|
} : never : never;
|
|
92
90
|
export type CollectionFunctionsSDK<TSchema extends JsonSchema = JsonSchema> = SchemaWithId<TSchema> extends infer InferredDocument ? InferredDocument extends WithId<unknown> ? {
|
|
@@ -97,7 +95,7 @@ export type CollectionFunctionsSDK<TSchema extends JsonSchema = JsonSchema> = Sc
|
|
|
97
95
|
keepTempIds: true;
|
|
98
96
|
}>>) => Promise<WithACErrors<InsertReturnType<InferredDocument>>>;
|
|
99
97
|
remove: (payload: RemovePayload<InferredDocument>) => Promise<WithACErrors<RemoveReturnType<InferredDocument>>>;
|
|
100
|
-
removeAll: (payload: RemoveAllPayload) => Promise<unknown>;
|
|
98
|
+
removeAll: (payload: RemoveAllPayload<InferredDocument>) => Promise<unknown>;
|
|
101
99
|
removeFile: (payload: RemoveFilePayload) => Promise<unknown>;
|
|
102
100
|
} : never : never;
|
|
103
101
|
export {};
|
package/dist/property.d.ts
CHANGED
|
@@ -57,9 +57,7 @@ export type FixedObjectProperty = {
|
|
|
57
57
|
writable?: readonly string[];
|
|
58
58
|
};
|
|
59
59
|
export type VariableObjectProperty = {
|
|
60
|
-
|
|
61
|
-
} | {
|
|
62
|
-
additionalProperties: boolean | Property;
|
|
60
|
+
additionalProperties: true | Property;
|
|
63
61
|
};
|
|
64
62
|
export type ObjectProperty = (FixedObjectProperty | VariableObjectProperty) & {
|
|
65
63
|
type: 'object';
|
package/dist/resultSchemas.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export declare const endpointErrorSchema: <const THTTPStatus extends HTTPStatus[
|
|
|
51
51
|
};
|
|
52
52
|
readonly details: {
|
|
53
53
|
readonly type: "object";
|
|
54
|
-
readonly
|
|
54
|
+
readonly additionalProperties: true;
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
57
|
};
|
|
@@ -81,7 +81,7 @@ export declare const genericEndpointErrorSchema: () => {
|
|
|
81
81
|
};
|
|
82
82
|
readonly details: {
|
|
83
83
|
readonly type: "object";
|
|
84
|
-
readonly
|
|
84
|
+
readonly additionalProperties: true;
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
87
|
};
|
package/dist/resultSchemas.js
CHANGED
|
@@ -59,7 +59,7 @@ const endpointErrorSchema = (error) => {
|
|
|
59
59
|
},
|
|
60
60
|
details: {
|
|
61
61
|
type: 'object',
|
|
62
|
-
|
|
62
|
+
additionalProperties: true,
|
|
63
63
|
},
|
|
64
64
|
},
|
|
65
65
|
},
|
|
@@ -95,7 +95,7 @@ const genericEndpointErrorSchema = () => {
|
|
|
95
95
|
},
|
|
96
96
|
details: {
|
|
97
97
|
type: 'object',
|
|
98
|
-
|
|
98
|
+
additionalProperties: true,
|
|
99
99
|
},
|
|
100
100
|
},
|
|
101
101
|
},
|
package/dist/resultSchemas.mjs
CHANGED
|
@@ -55,7 +55,7 @@ export const endpointErrorSchema = (error) => {
|
|
|
55
55
|
},
|
|
56
56
|
details: {
|
|
57
57
|
type: "object",
|
|
58
|
-
|
|
58
|
+
additionalProperties: true
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -90,7 +90,7 @@ export const genericEndpointErrorSchema = () => {
|
|
|
90
90
|
},
|
|
91
91
|
details: {
|
|
92
92
|
type: "object",
|
|
93
|
-
|
|
93
|
+
additionalProperties: true
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
}
|
package/dist/schema.d.ts
CHANGED
|
@@ -28,12 +28,12 @@ export type InferProperty<T> = T extends TestType<{
|
|
|
28
28
|
}> ? Schema<T & {
|
|
29
29
|
timestamps: false;
|
|
30
30
|
}> : T extends TestType<{
|
|
31
|
+
additionalProperties: true;
|
|
32
|
+
}> ? any : T extends TestType<{
|
|
31
33
|
additionalProperties: infer K;
|
|
32
34
|
}> ? {
|
|
33
35
|
[P: string]: InferProperty<K> | undefined;
|
|
34
36
|
} : T extends TestType<{
|
|
35
|
-
type: 'object';
|
|
36
|
-
}> ? any : T extends TestType<{
|
|
37
37
|
items: infer K;
|
|
38
38
|
}> ? InferProperty<K>[] : T extends TestType<{
|
|
39
39
|
getter: (doc: unknown) => infer K;
|
package/dist/security.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export type CollectionProps<TPayload> = {
|
|
|
40
40
|
payload: TPayload;
|
|
41
41
|
};
|
|
42
42
|
export type CollectionReadPayload = {
|
|
43
|
-
filters: Record<string, unknown
|
|
43
|
+
filters: Record<string, unknown>;
|
|
44
44
|
sort?: QuerySort<unknown>;
|
|
45
45
|
limit?: number;
|
|
46
46
|
offset?: number;
|