@stoker-platform/types 0.5.49 → 0.5.51

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/types",
3
- "version": "0.5.49",
3
+ "version": "0.5.51",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "src/main.ts",
@@ -2,6 +2,7 @@ import { Timestamp as AdminTimestamp, FieldValue } from "firebase-admin/firestor
2
2
  import { Timestamp, WhereFilterOp, WriteBatch } from "firebase/firestore"
3
3
  import { NodeUtilities, WebUtilities } from "./app"
4
4
  import { CalendarOptions } from "@fullcalendar/core"
5
+ import { SearchOptions } from "minisearch"
5
6
 
6
7
  export type StokerRole = string
7
8
  export type StokerCollection = string
@@ -719,7 +720,9 @@ export interface CollectionAdmin {
719
720
  record: string
720
721
  }
721
722
  | ((
722
- context?: "permissions" | "search-all",
723
+ context?: "permissions" | "search-all" | "relation-list",
724
+ parentCollection?: CollectionSchema,
725
+ parentRecord?: StokerRecord,
723
726
  ) => { collection: string; record: string } | Promise<{ collection: string; record: string }>)
724
727
  icon?: React.FC | (() => React.FC | Promise<React.FC>)
725
728
  duplicate?: boolean | (() => boolean | Promise<boolean>)
@@ -770,6 +773,7 @@ export interface CollectionAdmin {
770
773
  direction?: "asc" | "desc"
771
774
  }>)
772
775
  itemsPerPage?: number | (() => number | Promise<number>)
776
+ searchOptions?: SearchOptions
773
777
  list?: ListConfig | (() => ListConfig | Promise<ListConfig>)
774
778
  cards?: CardsConfig | (() => CardsConfig | Promise<CardsConfig>)
775
779
  images?: ImagesConfig | (() => ImagesConfig | Promise<ImagesConfig>)
@@ -841,6 +845,7 @@ export interface CollectionAdminCache {
841
845
  field: string
842
846
  direction?: "asc" | "desc"
843
847
  }
848
+ searchOptions?: SearchOptions
844
849
  itemsPerPage?: number
845
850
  list?: ListConfig
846
851
  cards?: CardsConfig
@@ -1127,7 +1132,6 @@ export interface CollectionSchema {
1127
1132
  enableWriteLog?: boolean
1128
1133
  preserveWriteLog?: boolean
1129
1134
  fullTextSearch?: string[]
1130
- searchOptions?: Record<string, unknown>
1131
1135
  ttl?: string
1132
1136
  indexExemption?: boolean
1133
1137
  roleSystemFields?: RoleSystemField[]