@firecms/schema_inference 3.0.0-canary.8 → 3.0.0-canary.80

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/LICENSE CHANGED
@@ -1,21 +1,113 @@
1
- MIT License
2
-
3
- Copyright (c) 2023 FireCMS
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ Business Source License 1.1
2
+
3
+ Parameters
4
+
5
+ Licensor: Firecms S.L.
6
+ Licensed Work: Firecms CMS packages:
7
+ cli
8
+ collection_editor
9
+ collection_editor_firebase
10
+ data_enhancement
11
+ data_import_export
12
+ editor
13
+ firecms_cloud
14
+ schema_inference
15
+ user_management
16
+
17
+ The Licensed Work is (c) 2024 Firecms S.L
18
+ Additional Use Grant: You may make use of the Licensed Work, provided that
19
+ you may not use the Licensed Work for a CMS Data Enhancement
20
+ Service.
21
+
22
+ A “CMS package” is a commercial offering that
23
+ allows third parties (other than your employees and
24
+ contractors) to access the functionality of the
25
+ Licensed Work by using software to extend the base features of
26
+ content management system controlled by such third parties.
27
+
28
+ Change Date: Four years from the date the Licensed Work is published.
29
+
30
+ Change License: MIT
31
+
32
+ For information about alternative licensing arrangements for the Software,
33
+ please visit: https://firecms.co
34
+
35
+ Notice
36
+
37
+ The Business Source License (this document, or the “License”) is not an Open
38
+ Source license. However, the Licensed Work will eventually be made available
39
+ under an Open Source License, as stated in this License.
40
+
41
+ License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
42
+ “Business Source License” is a trademark of MariaDB Corporation Ab.
43
+
44
+ -----------------------------------------------------------------------------
45
+
46
+ Business Source License 1.1
47
+
48
+ Terms
49
+
50
+ The Licensor hereby grants you the right to copy, modify, create derivative
51
+ works, redistribute, and make non-production use of the Licensed Work. The
52
+ Licensor may make an Additional Use Grant, above, permitting limited
53
+ production use.
54
+
55
+ Effective on the Change Date, or the fourth anniversary of the first publicly
56
+ available distribution of a specific version of the Licensed Work under this
57
+ License, whichever comes first, the Licensor hereby grants you rights under
58
+ the terms of the Change License, and the rights granted in the paragraph
59
+ above terminate.
60
+
61
+ If your use of the Licensed Work does not comply with the requirements
62
+ currently in effect as described in this License, you must purchase a
63
+ commercial license from the Licensor, its affiliated entities, or authorized
64
+ resellers, or you must refrain from using the Licensed Work.
65
+
66
+ All copies of the original and modified Licensed Work, and derivative works
67
+ of the Licensed Work, are subject to this License. This License applies
68
+ separately for each version of the Licensed Work and the Change Date may vary
69
+ for each version of the Licensed Work released by Licensor.
70
+
71
+ You must conspicuously display this License on each original or modified copy
72
+ of the Licensed Work. If you receive the Licensed Work in original or
73
+ modified form from a third party, the terms and conditions set forth in this
74
+ License apply to your use of that work.
75
+
76
+ Any use of the Licensed Work in violation of this License will automatically
77
+ terminate your rights under this License for the current and all other
78
+ versions of the Licensed Work.
79
+
80
+ This License does not grant you any right in any trademark or logo of
81
+ Licensor or its affiliates (provided that you may use a trademark or logo of
82
+ Licensor as expressly required by this License).
83
+
84
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
85
+ AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
86
+ EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
88
+ TITLE.
89
+
90
+ MariaDB hereby grants you permission to use this License’s text to license
91
+ your works, and to refer to it using the trademark “Business Source License”,
92
+ as long as you comply with the Covenants of Licensor below.
93
+
94
+ Covenants of Licensor
95
+
96
+ In consideration of the right to use this License’s text and the “Business
97
+ Source License” name and trademark, Licensor covenants to MariaDB, and to all
98
+ other recipients of the licensed work to be provided by Licensor:
99
+
100
+ 1. To specify as the Change License the GPL Version 2.0 or any later version,
101
+ or a license that is compatible with GPL Version 2.0 or a later version,
102
+ where “compatible” means that software provided under the Change License can
103
+ be included in a program with software provided under GPL Version 2.0 or a
104
+ later version. Licensor may specify additional Change Licenses without
105
+ limitation.
106
+
107
+ 2. To either: (a) specify an additional grant of rights to use that does not
108
+ impose any additional restriction on the right granted in this License, as
109
+ the Additional Use Grant; or (b) insert the text “None”.
110
+
111
+ 3. To specify a Change Date.
112
+
113
+ 4. Not to modify this License in any other way.
@@ -1,5 +1,6 @@
1
- import { DataType, Properties, Property } from "@firecms/core";
1
+ import { DataType, Properties, PropertiesOrBuilders, Property } from "@firecms/core";
2
2
  export type InferenceTypeBuilder = (value: any) => DataType;
3
3
  export declare function buildEntityPropertiesFromData(data: object[], getType: InferenceTypeBuilder): Promise<Properties>;
4
4
  export declare function buildPropertyFromData(data: any[], property: Property, getType: InferenceTypeBuilder): Property;
5
- export declare function buildPropertiesOrder(properties: Properties<any>): string[];
5
+ export declare function buildPropertiesOrder(properties: PropertiesOrBuilders, propertiesOrder?: string[], priorityKeys?: string[]): string[];
6
+ export declare function inferTypeFromValue(value: any): DataType;
package/dist/index.es.js CHANGED
@@ -1,28 +1,27 @@
1
- import { unslugify as b, resolveEnumValues as T, mergeDeep as j } from "@firecms/core";
2
- import { DocumentReference as P } from "firebase/firestore";
3
- function y(r) {
4
- if (!r)
5
- return;
6
- function e(i) {
7
- return typeof i == "string" ? i : i instanceof P ? i.path : void 0;
1
+ import { unslugify as O, resolveEnumValues as T, mergeDeep as j } from "@firecms/core";
2
+ import { DocumentReference as C } from "@firebase/firestore";
3
+ function b(r) {
4
+ if (!r) return;
5
+ function e(n) {
6
+ return typeof n == "string" ? n : n instanceof C ? n.path : void 0;
8
7
  }
9
- const s = r.values.map((i) => e(i)).filter((i) => !!i).find((i) => i.includes("/"));
8
+ const s = r.values.map((n) => e(n)).filter((n) => !!n).find((n) => n.includes("/"));
10
9
  if (!s)
11
10
  return;
12
- const n = s.substr(0, s.lastIndexOf("/"));
13
- return r.values.filter((i) => {
14
- const a = e(i);
15
- return a ? a.startsWith(n) : !1;
16
- }).length > r.values.length / 3 * 2 ? n : void 0;
11
+ const i = s.substr(0, s.lastIndexOf("/"));
12
+ return r.values.filter((n) => {
13
+ const a = e(n);
14
+ return a ? a.startsWith(i) : !1;
15
+ }).length > r.values.length / 3 * 2 ? i : void 0;
17
16
  }
18
17
  function d(r) {
19
18
  if (!Array.isArray(r))
20
19
  return [];
21
- const e = r.map((t) => typeof t == "string" ? { id: t, label: b(t) } : null).filter(Boolean);
20
+ const e = r.map((t) => typeof t == "string" ? { id: t, label: O(t) } : null).filter(Boolean);
22
21
  return e.sort((t, s) => t.label.localeCompare(s.label)), e;
23
22
  }
24
- const I = [".jpg", ".png", ".webp", ".gif"], S = [".mp3", ".ogg", ".opus", ".aac"], M = [".avi", ".mp4"], x = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
25
- function C({
23
+ const P = [".jpg", ".jpeg", ".png", ".webp", ".gif", ".avif"], S = [".mp3", ".ogg", ".opus", ".aac"], I = [".avi", ".mp4"], M = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
24
+ function w({
26
25
  totalDocsCount: r,
27
26
  valuesResult: e
28
27
  }) {
@@ -30,20 +29,20 @@ function C({
30
29
  dataType: "string"
31
30
  };
32
31
  if (e) {
33
- const s = e.values.length, n = Array.from(e.valuesCount.keys()).length, o = {}, i = e.values.filter((f) => typeof f == "string" && f.toString().startsWith("http")).length > r / 3 * 2;
34
- i && (o.url = !0);
35
- const a = e.values.filter((f) => typeof f == "string" && x.test(f)).length > r / 3 * 2;
32
+ const s = e.values.length, i = Array.from(e.valuesCount.keys()).length, o = {}, n = e.values.filter((f) => typeof f == "string" && f.toString().startsWith("http")).length > r / 3 * 2;
33
+ n && (o.url = !0);
34
+ const a = e.values.filter((f) => typeof f == "string" && M.test(f)).length > r / 3 * 2;
36
35
  a && (o.email = !0);
37
36
  const c = e.values.filter((f) => typeof f == "string" && f.length === 28 && !f.includes(" ")).length > r / 3 * 2;
38
- if (c && (o.readOnly = !0), !a && !i && !c && !i && n < s / 3) {
37
+ if (c && (o.readOnly = !0), !a && !n && !c && !n && i < s / 3) {
39
38
  const f = d(Array.from(e.valuesCount.keys()));
40
39
  Object.keys(f).length > 1 && (o.enumValues = f);
41
40
  }
42
- if (!a && !i && !c && !i && !o.enumValues) {
43
- const f = F(e, r);
41
+ if (!a && !n && !c && !n && !o.enumValues) {
42
+ const f = z(e, r);
44
43
  f && (o.storage = {
45
44
  acceptedFiles: [f],
46
- storagePath: y(e) ?? "/"
45
+ storagePath: b(e) ?? "/"
47
46
  });
48
47
  }
49
48
  Object.keys(o).length > 0 && (t = {
@@ -54,11 +53,11 @@ function C({
54
53
  }
55
54
  return t;
56
55
  }
57
- function F(r, e) {
58
- const t = r.values.filter((i) => typeof i == "string" && I.some((a) => i.toString().endsWith(a))).length > e / 3 * 2, s = r.values.filter((i) => typeof i == "string" && S.some((a) => i.toString().endsWith(a))).length > e / 3 * 2, n = r.values.filter((i) => typeof i == "string" && M.some((a) => i.toString().endsWith(a))).length > e / 3 * 2;
59
- return t ? "image/*" : s ? "audio/*" : n ? "video/*" : !1;
56
+ function z(r, e) {
57
+ const t = r.values.filter((n) => typeof n == "string" && P.some((a) => n.toString().endsWith(a))).length > e / 3 * 2, s = r.values.filter((n) => typeof n == "string" && S.some((a) => n.toString().endsWith(a))).length > e / 3 * 2, i = r.values.filter((n) => typeof n == "string" && I.some((a) => n.toString().endsWith(a))).length > e / 3 * 2;
58
+ return t ? "image/*" : s ? "audio/*" : i ? "video/*" : !1;
60
59
  }
61
- function V({
60
+ function F({
62
61
  totalDocsCount: r,
63
62
  valuesResult: e
64
63
  }) {
@@ -76,169 +75,208 @@ function _({
76
75
  }) {
77
76
  return {
78
77
  dataType: "reference",
79
- path: y(e) ?? "!!!FIX_ME!!!",
78
+ path: b(e) ?? "!!!FIX_ME!!!",
80
79
  editable: !0
81
80
  };
82
81
  }
83
82
  async function k(r, e) {
84
83
  const t = {}, s = {};
85
- return r && r.forEach((n) => {
86
- n && Object.entries(n).forEach(([o, i]) => {
87
- E(t, o, i, e), p(s, o, i, e);
84
+ return r && r.forEach((i) => {
85
+ i && Object.entries(i).forEach(([o, n]) => {
86
+ u(t, o, n, e), m(s, o, n, e);
88
87
  });
89
- }), O(r.length, t, s);
88
+ }), A(r.length, t, s);
90
89
  }
91
- function w(r, e, t) {
92
- const s = {}, n = {};
90
+ function L(r, e, t) {
91
+ const s = {}, i = {};
93
92
  r && r.forEach((a) => {
94
- l(e.dataType, s, a, t), p(n, "inferred_prop", a, t);
93
+ p(e.dataType, s, a, t), m(i, "inferred_prop", a, t);
95
94
  });
96
95
  const o = "enumValues" in e ? T(e.enumValues) : void 0;
97
96
  if (o) {
98
- const a = d(Array.from(n.inferred_prop.valuesCount.keys()));
97
+ const a = d(Array.from(i.inferred_prop.valuesCount.keys()));
99
98
  return {
100
99
  ...e,
101
100
  enumValues: [...a, ...o]
102
101
  };
103
102
  }
104
- const i = g("inferred_prop", r.length, e.dataType, s, n.inferred_prop);
105
- return j(i, e);
103
+ const n = y(
104
+ "inferred_prop",
105
+ r.length,
106
+ e.dataType,
107
+ s,
108
+ i.inferred_prop
109
+ );
110
+ return j(n, e);
106
111
  }
107
- function U(r) {
108
- function e(s) {
109
- const n = s.toLowerCase();
110
- return n === "title" || n === "name" ? 3 : n.includes("title") || n.includes("name") ? 2 : n.includes("image") || n.includes("picture") ? 1 : 0;
112
+ function U(r, e, t) {
113
+ const s = (t ?? []).map((n) => n.toLowerCase());
114
+ function i(n) {
115
+ const a = n.toLowerCase();
116
+ return s.includes(a) ? 4 : a === "title" || a === "name" ? 3 : a.includes("title") || a.includes("name") ? 2 : a.includes("image") || a.includes("picture") ? 1 : 0;
111
117
  }
112
- const t = Object.keys(r);
113
- return t.sort(), t.sort((s, n) => e(n) - e(s)), t;
118
+ const o = e ?? Object.keys(r);
119
+ return o.sort(), o.sort((n, a) => i(a) - i(n)), o;
114
120
  }
115
- function l(r, e, t, s) {
121
+ function p(r, e, t, s) {
116
122
  if (r === "map") {
117
123
  if (t) {
118
- let n = e[r];
119
- n || (n = {}, e[r] = n), Object.entries(t).forEach(([o, i]) => {
120
- E(n, o, i, s);
124
+ let i = e[r];
125
+ i || (i = {}, e[r] = i), Object.entries(t).forEach(([o, n]) => {
126
+ u(i, o, n, s);
121
127
  });
122
128
  }
123
129
  } else if (r === "array") {
124
- let n = e[r];
125
- if (n || (n = {}, e[r] = n), t && Array.isArray(t) && t.length > 0) {
126
- const o = z(t, s);
127
- n[o] ? n[o]++ : n[o] = 1;
130
+ let i = e[r];
131
+ if (i || (i = {}, e[r] = i), t && Array.isArray(t) && t.length > 0) {
132
+ const o = x(t, s);
133
+ if (o === "map") {
134
+ let n = i[o];
135
+ n || (n = {}), t.forEach((a) => {
136
+ Object.entries(a).forEach(
137
+ ([c, f]) => u(n, c, f, s)
138
+ );
139
+ }), i[o] = n;
140
+ } else
141
+ i[o] ? i[o]++ : i[o] = 1;
128
142
  }
129
143
  } else
130
144
  e[r] ? e[r]++ : e[r] = 1;
131
145
  }
132
- function E(r, e, t, s) {
133
- let n = r[e];
134
- if (n || (n = {}, r[e] = n), t != null) {
146
+ function u(r, e, t, s) {
147
+ let i = r[e];
148
+ if (i || (i = {}, r[e] = i), t != null) {
135
149
  const o = s(t);
136
- l(o, n, t, s);
150
+ p(o, i, t, s);
137
151
  }
138
152
  }
139
- function p(r, e, t, s) {
140
- const n = s(t);
153
+ function m(r, e, t, s) {
154
+ const i = s(t);
141
155
  let o = r[e];
142
156
  if (o || (o = {
143
157
  values: [],
144
158
  valuesCount: /* @__PURE__ */ new Map()
145
- }, r[e] = o), n === "map") {
146
- let i = o.map;
147
- i || (i = {}, o.map = i), t && Object.entries(t).forEach(([a, c]) => p(i, a, c, s));
148
- } else
149
- n === "array" ? Array.isArray(t) && t.forEach((i) => {
150
- o.values.push(i), o.valuesCount.set(i, (o.valuesCount.get(i) ?? 0) + 1);
151
- }) : t && (o.values.push(t), o.valuesCount.set(t, (o.valuesCount.get(t) ?? 0) + 1));
159
+ }, r[e] = o), i === "map") {
160
+ let n = o.map;
161
+ n || (n = {}, o.map = n), t && Object.entries(t).forEach(
162
+ ([a, c]) => m(n, a, c, s)
163
+ );
164
+ } else i === "array" ? Array.isArray(t) && t.forEach((n) => {
165
+ o.values.push(n), o.valuesCount.set(n, (o.valuesCount.get(n) ?? 0) + 1);
166
+ }) : t && (o.values.push(t), o.valuesCount.set(t, (o.valuesCount.get(t) ?? 0) + 1));
152
167
  }
153
- function m(r) {
168
+ function h(r) {
154
169
  let e = 0;
155
170
  return Object.entries(r).forEach(([t, s]) => {
156
- let n = 0;
157
- t === "map" ? n = A(s) : t === "array" ? n = m(s) : n = s, n > e && (e = n);
171
+ let i = 0;
172
+ t === "map" ? i = E(s) : t === "array" ? i = h(s) : i = s, i > e && (e = i);
158
173
  }), e;
159
174
  }
160
- function A(r) {
161
- return Object.entries(r).map(([e, t]) => m(t)).reduce((e, t) => Math.max(e, t), 0);
175
+ function E(r) {
176
+ return Object.entries(r).map(([e, t]) => h(t)).reduce((e, t) => Math.max(e, t), 0);
162
177
  }
163
- function h(r) {
178
+ function g(r) {
164
179
  let e = -1, t = "string";
165
- return Object.entries(r).forEach(([s, n]) => {
180
+ return Object.entries(r).forEach(([s, i]) => {
166
181
  let o;
167
- s === "map" ? o = A(n) : s === "array" ? o = m(n) : o = n, o > e && (e = o, t = s);
182
+ s === "map" ? o = E(i) : s === "array" ? o = h(i) : o = i, o > e && (e = o, t = s);
168
183
  }), t;
169
184
  }
170
- function g(r, e, t, s, n) {
185
+ function y(r, e, t, s, i) {
171
186
  let o;
172
- r && (o = b(r));
173
- let i;
187
+ r && (o = Z(r.toLowerCase()));
188
+ let n;
174
189
  if (t === "map") {
175
- W(s) && (i = {
190
+ V(s) && (n = {
176
191
  dataType: "map",
177
192
  name: o,
178
193
  keyValue: !0,
179
194
  properties: {}
180
195
  });
181
- const c = O(e, s.map, n ? n.mapValues : void 0);
182
- i = {
196
+ const c = A(
197
+ e,
198
+ s.map,
199
+ i ? i.mapValues : void 0
200
+ );
201
+ n = {
183
202
  dataType: "map",
184
203
  name: o,
185
204
  properties: c
186
205
  };
187
206
  } else if (t === "array") {
188
- const a = s.array, c = h(a), f = g(r, e, c, a, n);
189
- i = {
207
+ const a = s.array, c = g(a), f = y(
208
+ r,
209
+ e,
210
+ c,
211
+ a,
212
+ i
213
+ );
214
+ n = {
190
215
  dataType: "array",
191
216
  name: o,
192
217
  of: f
193
218
  };
194
219
  }
195
- if (!i) {
220
+ if (!n) {
196
221
  const a = {
197
222
  name: r,
198
223
  totalDocsCount: e,
199
- valuesResult: n
224
+ valuesResult: i
200
225
  };
201
- t === "string" ? i = C(a) : t === "reference" ? i = _(a) : i = {
226
+ t === "string" ? n = w(a) : t === "reference" ? n = _(a) : n = {
202
227
  dataType: t
203
- }, o && (i.name = o);
204
- const c = V(a);
205
- c && (i.validation = c);
228
+ }, o && (n.name = o);
229
+ const c = F(a);
230
+ c && (n.validation = c);
206
231
  }
207
232
  return {
208
- ...i,
233
+ ...n,
209
234
  editable: !0
210
235
  };
211
236
  }
212
- function O(r, e, t) {
237
+ function A(r, e, t) {
213
238
  const s = {};
214
- return Object.entries(e).forEach(([n, o]) => {
215
- const i = h(o);
216
- s[n] = g(n, r, i, o, t ? t[n] : void 0);
239
+ return Object.entries(e).forEach(([i, o]) => {
240
+ const n = g(o);
241
+ s[i] = y(
242
+ i,
243
+ r,
244
+ n,
245
+ o,
246
+ t ? t[i] : void 0
247
+ );
217
248
  }), s;
218
249
  }
219
- function u(r) {
250
+ function l(r) {
220
251
  let e = 0;
221
252
  return Object.entries(r).forEach(([t, s]) => {
222
- typeof s == "object" ? e = Math.max(e, u(s)) : e = Math.max(e, s);
253
+ typeof s == "object" ? e = Math.max(e, l(s)) : e = Math.max(e, s);
223
254
  }), e;
224
255
  }
225
- function z(r, e) {
256
+ function x(r, e) {
226
257
  let t = {};
227
258
  return r.forEach((s) => {
228
- l(e(s), t, s, e);
229
- }), h(t);
259
+ p(e(s), t, s, e);
260
+ }), g(t);
230
261
  }
231
- function W(r) {
232
- const e = u(r);
262
+ function V(r) {
263
+ const e = l(r);
233
264
  let t = 0;
234
- return Object.entries(r.map ?? {}).forEach(([s, n]) => {
235
- u(n) < e / 3 && t++;
265
+ return Object.entries(r.map ?? {}).forEach(([s, i]) => {
266
+ l(i) < e / 3 && t++;
236
267
  }), t / Object.entries(r.map ?? {}).length > 0.5;
237
268
  }
269
+ function Z(r) {
270
+ return r.replace(/[_\-]+/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").toLowerCase().split(" ").map((i) => i.charAt(0).toUpperCase() + i.slice(1)).join(" ");
271
+ }
272
+ function X(r) {
273
+ return typeof r == "string" ? "string" : typeof r == "number" ? "number" : typeof r == "boolean" ? "boolean" : Array.isArray(r) ? "array" : typeof r == "object" ? "map" : "string";
274
+ }
238
275
  export {
239
276
  k as buildEntityPropertiesFromData,
240
277
  U as buildPropertiesOrder,
241
- w as buildPropertyFromData,
242
- d as extractEnumFromValues
278
+ L as buildPropertyFromData,
279
+ d as extractEnumFromValues,
280
+ X as inferTypeFromValue
243
281
  };
244
282
  //# sourceMappingURL=index.es.js.map