Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
+2
-1
@@ -9,12 +9,13 @@ export const crmContactsIndex: SearchIndexSchema = {
|
||||
name: "crm-contacts",
|
||||
primaryKey: "id",
|
||||
searchableAttributes: ["firstName", "lastName", "email", "company", "jobTitle", "tags"],
|
||||
filterableAttributes: ["tenantId", "status", "ownerId", "tags"],
|
||||
filterableAttributes: ["tenantId", "entityType", "status", "ownerId", "tags"],
|
||||
sortableAttributes: ["createdAt", "updatedAt", "lastInteractionAt"],
|
||||
rankingRules: ["words", "typo", "proximity", "attribute", "sort", "exactness"],
|
||||
allowedDocumentFields: [
|
||||
"id",
|
||||
"tenantId",
|
||||
"entityType",
|
||||
"firstName",
|
||||
"lastName",
|
||||
"email",
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
import type { SearchIndexSchema } from "./types.js";
|
||||
|
||||
/**
|
||||
* Entity (table-definition) search. Powers the entity picker in row
|
||||
* editors. The schema is small because entity definitions are low
|
||||
* cardinality and rarely change.
|
||||
*/
|
||||
export const entitiesIndex: SearchIndexSchema = {
|
||||
name: "entities",
|
||||
primaryKey: "id",
|
||||
searchableAttributes: ["name", "title", "titlePlural"],
|
||||
filterableAttributes: ["tenantId", "type"],
|
||||
sortableAttributes: ["name", "createdAt", "updatedAt"],
|
||||
rankingRules: ["words", "typo", "proximity", "attribute", "sort", "exactness"],
|
||||
allowedDocumentFields: ["id", "tenantId", "name", "title", "titlePlural", "type", "createdAt", "updatedAt"],
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
import type { SearchIndexSchema } from "./types.js";
|
||||
|
||||
/**
|
||||
* HR employee directory (AK-P17a). Only non-sensitive display fields are indexed
|
||||
* so people can find a colleague by name/position/team. Emergency contacts,
|
||||
* personnel documents and ALL password-safe data are NEVER indexed. The
|
||||
* estate-wide `hivegrid-` Meili prefix (infra STANDARDS §4) is applied at the
|
||||
* runtime adapter layer, so the schema name here stays unprefixed.
|
||||
*/
|
||||
export const hrDirectoryIndex: SearchIndexSchema = {
|
||||
name: "hr-directory",
|
||||
primaryKey: "id",
|
||||
searchableAttributes: ["name", "position", "team", "email"],
|
||||
filterableAttributes: ["tenantId", "team", "locationId"],
|
||||
sortableAttributes: ["name", "team"],
|
||||
rankingRules: ["words", "typo", "proximity", "attribute", "sort", "exactness"],
|
||||
allowedDocumentFields: ["id", "tenantId", "userId", "name", "email", "position", "team", "locationId"],
|
||||
};
|
||||
@@ -0,0 +1,16 @@
|
||||
import type { SearchIndexSchema } from "./types.js";
|
||||
|
||||
/**
|
||||
* HR locations (AK-P17a). Searchable by name/city/address so admins can find a
|
||||
* site quickly. The estate-wide `hivegrid-` Meili prefix (infra STANDARDS §4) is
|
||||
* applied at the runtime adapter layer, so the schema name here stays unprefixed.
|
||||
*/
|
||||
export const hrLocationsIndex: SearchIndexSchema = {
|
||||
name: "hr-locations",
|
||||
primaryKey: "id",
|
||||
searchableAttributes: ["name", "city", "addressLine1", "postalCode"],
|
||||
filterableAttributes: ["tenantId", "isDefault", "archived"],
|
||||
sortableAttributes: ["name"],
|
||||
rankingRules: ["words", "typo", "proximity", "attribute", "sort", "exactness"],
|
||||
allowedDocumentFields: ["id", "tenantId", "name", "addressLine1", "postalCode", "city", "country", "isDefault", "archived"],
|
||||
};
|
||||
@@ -1,17 +1,19 @@
|
||||
import { crmContactsIndex } from "./crm-contacts.js";
|
||||
import { entitiesIndex } from "./entities.js";
|
||||
import { filesIndex } from "./files.js";
|
||||
import { hrDirectoryIndex } from "./hr-directory.js";
|
||||
import { hrLocationsIndex } from "./hr-locations.js";
|
||||
import { kbArticlesIndex } from "./kb-articles.js";
|
||||
import { rowsIndex } from "./rows.js";
|
||||
import { projectsIndex } from "./projects.js";
|
||||
import { tasksIndex } from "./tasks.js";
|
||||
import type { SearchIndexSchema } from "./types.js";
|
||||
import { usersIndex } from "./users.js";
|
||||
|
||||
export { crmContactsIndex } from "./crm-contacts.js";
|
||||
export { entitiesIndex } from "./entities.js";
|
||||
export { filesIndex } from "./files.js";
|
||||
export { hrDirectoryIndex } from "./hr-directory.js";
|
||||
export { hrLocationsIndex } from "./hr-locations.js";
|
||||
export { kbArticlesIndex } from "./kb-articles.js";
|
||||
export { rowsIndex } from "./rows.js";
|
||||
export { projectsIndex } from "./projects.js";
|
||||
export { tasksIndex } from "./tasks.js";
|
||||
export { usersIndex } from "./users.js";
|
||||
export type { SearchIndexSchema } from "./types.js";
|
||||
@@ -25,11 +27,12 @@ export type { SearchIndexSchema } from "./types.js";
|
||||
export const ALL_SEARCH_INDEXES: readonly SearchIndexSchema[] = [
|
||||
kbArticlesIndex,
|
||||
crmContactsIndex,
|
||||
rowsIndex,
|
||||
entitiesIndex,
|
||||
usersIndex,
|
||||
projectsIndex,
|
||||
filesIndex,
|
||||
tasksIndex,
|
||||
hrDirectoryIndex,
|
||||
hrLocationsIndex,
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -37,7 +40,7 @@ export const ALL_SEARCH_INDEXES: readonly SearchIndexSchema[] = [
|
||||
* pager. Keep this list in sync with apps/worker/src/jobs/search-indexer-
|
||||
* bulk-pagers.ts so the CLI cannot enqueue jobs the worker cannot run.
|
||||
*/
|
||||
export const BULK_REINDEX_SUPPORTED_INDEX_NAMES = [kbArticlesIndex.name, crmContactsIndex.name, rowsIndex.name, usersIndex.name] as const;
|
||||
export const BULK_REINDEX_SUPPORTED_INDEX_NAMES = [kbArticlesIndex.name, crmContactsIndex.name, usersIndex.name, projectsIndex.name] as const;
|
||||
|
||||
export const BULK_REINDEX_SUPPORTED_INDEXES: readonly SearchIndexSchema[] = ALL_SEARCH_INDEXES.filter((schema) =>
|
||||
(BULK_REINDEX_SUPPORTED_INDEX_NAMES as readonly string[]).includes(schema.name)
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
import type { SearchIndexSchema } from "./types.js";
|
||||
|
||||
export const projectsIndex: SearchIndexSchema = {
|
||||
name: "projects",
|
||||
primaryKey: "id",
|
||||
searchableAttributes: ["projectNumber", "name", "description", "type", "source"],
|
||||
filterableAttributes: ["tenantId", "pipelineId", "stageId", "ownerId", "projectLeadId", "archived"],
|
||||
sortableAttributes: ["createdAt", "updatedAt", "deadline", "potentialValue", "orderVolume"],
|
||||
rankingRules: ["words", "typo", "proximity", "attribute", "sort", "exactness"],
|
||||
allowedDocumentFields: [
|
||||
"id",
|
||||
"tenantId",
|
||||
"projectNumber",
|
||||
"name",
|
||||
"description",
|
||||
"type",
|
||||
"source",
|
||||
"pipelineId",
|
||||
"stageId",
|
||||
"ownerId",
|
||||
"projectLeadId",
|
||||
"archived",
|
||||
"createdAt",
|
||||
"updatedAt",
|
||||
"deadline",
|
||||
"potentialValue",
|
||||
"orderVolume",
|
||||
],
|
||||
};
|
||||
@@ -1,27 +0,0 @@
|
||||
import type { SearchIndexSchema } from "./types.js";
|
||||
|
||||
/**
|
||||
* Generic row search inside the rows-engine. Used by the table-search
|
||||
* widget; the indexer flattens the row payload into a `searchable` text
|
||||
* blob (caller responsibility) and a normalized `properties` JSON for
|
||||
* facets.
|
||||
*/
|
||||
export const rowsIndex: SearchIndexSchema = {
|
||||
name: "rows",
|
||||
primaryKey: "id",
|
||||
searchableAttributes: ["searchable", "folio", "entityName"],
|
||||
filterableAttributes: ["tenantId", "entityId", "entityName", "createdById"],
|
||||
sortableAttributes: ["createdAt", "updatedAt", "folio"],
|
||||
rankingRules: ["words", "typo", "proximity", "attribute", "sort", "exactness"],
|
||||
allowedDocumentFields: [
|
||||
"id",
|
||||
"tenantId",
|
||||
"entityId",
|
||||
"entityName",
|
||||
"folio",
|
||||
"searchable",
|
||||
"createdById",
|
||||
"createdAt",
|
||||
"updatedAt",
|
||||
],
|
||||
};
|
||||
+3
-3
@@ -7,9 +7,9 @@ import {
|
||||
BULK_REINDEX_SUPPORTED_INDEX_NAMES,
|
||||
crmContactsIndex,
|
||||
usersIndex,
|
||||
projectsIndex,
|
||||
getSearchIndexSchema,
|
||||
kbArticlesIndex,
|
||||
rowsIndex,
|
||||
} from "./index.js";
|
||||
|
||||
describe("search index catalog", () => {
|
||||
@@ -40,8 +40,8 @@ describe("search index catalog", () => {
|
||||
expect([...BULK_REINDEX_SUPPORTED_INDEX_NAMES]).toEqual([
|
||||
kbArticlesIndex.name,
|
||||
crmContactsIndex.name,
|
||||
rowsIndex.name,
|
||||
usersIndex.name,
|
||||
projectsIndex.name,
|
||||
]);
|
||||
expect(BULK_REINDEX_SUPPORTED_INDEXES.map((schema) => schema.name)).toEqual([
|
||||
...BULK_REINDEX_SUPPORTED_INDEX_NAMES,
|
||||
@@ -56,7 +56,7 @@ describe("search index catalog", () => {
|
||||
|
||||
it("keeps operator docs explicit about the current bulk-reindex scope", () => {
|
||||
const featureDocs = readRepoFile("docs/features/search.md");
|
||||
expect(featureDocs).toContain("`kb-articles`, `crm-contacts`, `rows`, and `users`");
|
||||
expect(featureDocs).toContain("`kb-articles`, `crm-contacts`, `users`, and `projects`");
|
||||
expect(featureDocs).toMatch(/Entities still require\s+a dedicated bulk pager/);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user