@rebasepro/client-firebase 0.2.5 → 0.4.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rebasepro/client-firebase",
3
3
  "type": "module",
4
- "version": "0.2.5",
4
+ "version": "0.4.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -14,12 +14,12 @@
14
14
  "fast-equals": "6.0.0",
15
15
  "fuse.js": "^7.3.0",
16
16
  "react-router-dom": "^7.15.1",
17
- "@rebasepro/admin": "0.2.5",
18
- "@rebasepro/core": "0.2.5",
19
- "@rebasepro/common": "0.2.5",
20
- "@rebasepro/ui": "0.2.5",
21
- "@rebasepro/utils": "0.2.5",
22
- "@rebasepro/types": "0.2.5"
17
+ "@rebasepro/admin": "0.4.0",
18
+ "@rebasepro/types": "0.4.0",
19
+ "@rebasepro/ui": "0.4.0",
20
+ "@rebasepro/utils": "0.4.0",
21
+ "@rebasepro/core": "0.4.0",
22
+ "@rebasepro/common": "0.4.0"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "firebase": "^10.12.2 || ^11.0.0 || ^12.0.0",
@@ -117,8 +117,10 @@ function normalizePropertiesEnumValues(
117
117
  );
118
118
  }
119
119
 
120
+ const propType = normalizedProperty.type ?? normalizedProperty.dataType;
121
+
120
122
  // Handle array properties with enum values in "of"
121
- if (normalizedProperty.dataType === "array" && typeof normalizedProperty.of === "object" && normalizedProperty.of !== null) {
123
+ if (propType === "array" && typeof normalizedProperty.of === "object" && normalizedProperty.of !== null) {
122
124
  const ofProp = normalizedProperty.of as Record<string, unknown>;
123
125
  if (ofProp.enum) {
124
126
  normalizedProperty.of = {
@@ -132,7 +134,7 @@ function normalizePropertiesEnumValues(
132
134
  }
133
135
 
134
136
  // Handle map properties recursively
135
- if (normalizedProperty.dataType === "map" && normalizedProperty.properties) {
137
+ if (propType === "map" && normalizedProperty.properties) {
136
138
  normalizedProperty.properties = normalizePropertiesEnumValues(
137
139
  normalizedProperty.properties as Properties,
138
140
  sortObjectFormat
@@ -253,7 +253,7 @@ export function buildRebaseSearchController(
253
253
  }
254
254
 
255
255
  try {
256
- const collection = await (typesenseClient as Record<string, Function>).collections(collectionName).retrieve();
256
+ const collection = await (typesenseClient as Record<string, (...args: any[]) => any>).collections(collectionName).retrieve();
257
257
 
258
258
  // Extract string fields from the schema
259
259
  const stringFields = (collection.fields as Array<{ type: string; name: string }>)
@@ -335,7 +335,7 @@ export function buildRebaseSearchController(
335
335
  searchParams.filter_by = parentFilter;
336
336
  }
337
337
 
338
- const result = await (typesenseClient as Record<string, Function>)
338
+ const result = await (typesenseClient as Record<string, (...args: any[]) => any>)
339
339
  .collections(collectionName)
340
340
  .documents()
341
341
  .search(searchParams);