@sebspark/opensearch 2.1.0 → 3.0.0
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/index.d.ts +4 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -44,7 +44,9 @@ type MapOpenSearchTypes<T> = T extends Property ? T['type'] extends 'keyword' |
|
|
|
44
44
|
properties: Record<string, Property>;
|
|
45
45
|
} ? {
|
|
46
46
|
[K in keyof T['properties']]: MapOpenSearchTypes<T['properties'][K]>;
|
|
47
|
-
} :
|
|
47
|
+
} : T extends {
|
|
48
|
+
dynamic: 'true';
|
|
49
|
+
} ? Record<string, unknown> : never : never : T extends Record<string, Property> ? {
|
|
48
50
|
[K in keyof T]: MapOpenSearchTypes<T[K]>;
|
|
49
51
|
} : never;
|
|
50
52
|
type MapQueryProperties<T extends IndexDefinition> = T extends {
|
|
@@ -70,7 +72,7 @@ type SortOptions<T> = '_score' | '_doc' | {
|
|
|
70
72
|
type BuiltinKeys = '_id' | '_index';
|
|
71
73
|
|
|
72
74
|
type DocumentFor<T extends IndexDefinition> = {
|
|
73
|
-
[P in keyof T['body']['mappings']['properties']]
|
|
75
|
+
[P in keyof T['body']['mappings']['properties']]?: MapOpenSearchTypes<T['body']['mappings']['properties'][P]>;
|
|
74
76
|
};
|
|
75
77
|
|
|
76
78
|
type CreateOperation<T extends IndexDefinition> = Omit<WriteOperation<T>, '_id'> & {
|