@ai-matrx/associations 0.7.5 → 0.8.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.
@@ -74,8 +74,6 @@ interface EntityRegistry {
74
74
  /** Build the merge engine over the host overlay (empty overlay is legal). */
75
75
  declare function createEntityRegistry(errorSink: ErrorSink, initialOverlay?: EntityOverlayMap): EntityRegistry;
76
76
 
77
- /** True when `value` is a syntactically valid UUID string. */
78
- declare function isUuid(value: unknown): value is string;
79
77
  /** Return the first failing check, or null if all pass. Pure. */
80
78
  declare function firstError(...checks: (AssociationsRpcError | null)[]): AssociationsRpcError | null;
81
79
  interface AssociationGuards {
@@ -753,4 +751,4 @@ declare function buildCategoryHierarchy(categories: PlatformCategory[]): Categor
753
751
  */
754
752
  declare function createDefaultErrorSink(): ErrorSink;
755
753
 
756
- export { type AddAssociationArgs, type AddCommentArgs, type AssertDemandedSchemaOptions, type AssociationGuards, type AssociationHelpersApi, type AssociationWriteResult, type AssociationsServiceApi, type AssociationsStore, type CandidateRecord, type CandidatesResult, type CandidatesServiceApi, type CategoriesServiceApi, type CategoryHierarchy, type CategoryHierarchyItem, type CategoryMutationResult, type CommentMutationResult, type CommentsServiceApi, type ContainerRef, type ContentRole, type ConversationFileLink, type CoreDeps, type CreateEntityRowArgs, DEFAULT_ORG_COLUMN, DEFAULT_OWNER_COLUMN, type DemandedSchemaReport, type EdgeAttrs, type EdgeSpec, type EntityInfo, type EntityRef, type EntityRegistry, type EntityRowResult, type EntityRowsServiceApi, type FavoritesServiceApi, type ListCandidatesArgs, NON_CONTENT_SOURCE_TYPES, type PgErrorMapper, type RpcResultHelpers, SELF_TEST_MISSING_RPC, type SearchAcrossTokensArgs, type TitlesServiceApi, type UniversalCandidate, assertDemandedSchema, associationsKey, buildCategoryHierarchy, createAssociationGuards, createAssociationHelpers, createAssociationsService, createAssociationsStore, createCandidatesService, createCategoriesService, createCommentsService, createDefaultErrorSink, createEntityRegistry, createEntityRowsService, createFavoritesService, createRpcResultHelpers, createTitlesService, entityTitleCacheKey, err, firstError, isContentRole, isContentSourceEdge, isMembershipMetadata, isTransportFailure, isUuid, ok, resolveEntityToken };
754
+ export { type AddAssociationArgs, type AddCommentArgs, type AssertDemandedSchemaOptions, type AssociationGuards, type AssociationHelpersApi, type AssociationWriteResult, type AssociationsServiceApi, type AssociationsStore, type CandidateRecord, type CandidatesResult, type CandidatesServiceApi, type CategoriesServiceApi, type CategoryHierarchy, type CategoryHierarchyItem, type CategoryMutationResult, type CommentMutationResult, type CommentsServiceApi, type ContainerRef, type ContentRole, type ConversationFileLink, type CoreDeps, type CreateEntityRowArgs, DEFAULT_ORG_COLUMN, DEFAULT_OWNER_COLUMN, type DemandedSchemaReport, type EdgeAttrs, type EdgeSpec, type EntityInfo, type EntityRef, type EntityRegistry, type EntityRowResult, type EntityRowsServiceApi, type FavoritesServiceApi, type ListCandidatesArgs, NON_CONTENT_SOURCE_TYPES, type PgErrorMapper, type RpcResultHelpers, SELF_TEST_MISSING_RPC, type SearchAcrossTokensArgs, type TitlesServiceApi, type UniversalCandidate, assertDemandedSchema, associationsKey, buildCategoryHierarchy, createAssociationGuards, createAssociationHelpers, createAssociationsService, createAssociationsStore, createCandidatesService, createCategoriesService, createCommentsService, createDefaultErrorSink, createEntityRegistry, createEntityRowsService, createFavoritesService, createRpcResultHelpers, createTitlesService, entityTitleCacheKey, err, firstError, isContentRole, isContentSourceEdge, isMembershipMetadata, isTransportFailure, ok, resolveEntityToken };
@@ -74,8 +74,6 @@ interface EntityRegistry {
74
74
  /** Build the merge engine over the host overlay (empty overlay is legal). */
75
75
  declare function createEntityRegistry(errorSink: ErrorSink, initialOverlay?: EntityOverlayMap): EntityRegistry;
76
76
 
77
- /** True when `value` is a syntactically valid UUID string. */
78
- declare function isUuid(value: unknown): value is string;
79
77
  /** Return the first failing check, or null if all pass. Pure. */
80
78
  declare function firstError(...checks: (AssociationsRpcError | null)[]): AssociationsRpcError | null;
81
79
  interface AssociationGuards {
@@ -753,4 +751,4 @@ declare function buildCategoryHierarchy(categories: PlatformCategory[]): Categor
753
751
  */
754
752
  declare function createDefaultErrorSink(): ErrorSink;
755
753
 
756
- export { type AddAssociationArgs, type AddCommentArgs, type AssertDemandedSchemaOptions, type AssociationGuards, type AssociationHelpersApi, type AssociationWriteResult, type AssociationsServiceApi, type AssociationsStore, type CandidateRecord, type CandidatesResult, type CandidatesServiceApi, type CategoriesServiceApi, type CategoryHierarchy, type CategoryHierarchyItem, type CategoryMutationResult, type CommentMutationResult, type CommentsServiceApi, type ContainerRef, type ContentRole, type ConversationFileLink, type CoreDeps, type CreateEntityRowArgs, DEFAULT_ORG_COLUMN, DEFAULT_OWNER_COLUMN, type DemandedSchemaReport, type EdgeAttrs, type EdgeSpec, type EntityInfo, type EntityRef, type EntityRegistry, type EntityRowResult, type EntityRowsServiceApi, type FavoritesServiceApi, type ListCandidatesArgs, NON_CONTENT_SOURCE_TYPES, type PgErrorMapper, type RpcResultHelpers, SELF_TEST_MISSING_RPC, type SearchAcrossTokensArgs, type TitlesServiceApi, type UniversalCandidate, assertDemandedSchema, associationsKey, buildCategoryHierarchy, createAssociationGuards, createAssociationHelpers, createAssociationsService, createAssociationsStore, createCandidatesService, createCategoriesService, createCommentsService, createDefaultErrorSink, createEntityRegistry, createEntityRowsService, createFavoritesService, createRpcResultHelpers, createTitlesService, entityTitleCacheKey, err, firstError, isContentRole, isContentSourceEdge, isMembershipMetadata, isTransportFailure, isUuid, ok, resolveEntityToken };
754
+ export { type AddAssociationArgs, type AddCommentArgs, type AssertDemandedSchemaOptions, type AssociationGuards, type AssociationHelpersApi, type AssociationWriteResult, type AssociationsServiceApi, type AssociationsStore, type CandidateRecord, type CandidatesResult, type CandidatesServiceApi, type CategoriesServiceApi, type CategoryHierarchy, type CategoryHierarchyItem, type CategoryMutationResult, type CommentMutationResult, type CommentsServiceApi, type ContainerRef, type ContentRole, type ConversationFileLink, type CoreDeps, type CreateEntityRowArgs, DEFAULT_ORG_COLUMN, DEFAULT_OWNER_COLUMN, type DemandedSchemaReport, type EdgeAttrs, type EdgeSpec, type EntityInfo, type EntityRef, type EntityRegistry, type EntityRowResult, type EntityRowsServiceApi, type FavoritesServiceApi, type ListCandidatesArgs, NON_CONTENT_SOURCE_TYPES, type PgErrorMapper, type RpcResultHelpers, SELF_TEST_MISSING_RPC, type SearchAcrossTokensArgs, type TitlesServiceApi, type UniversalCandidate, assertDemandedSchema, associationsKey, buildCategoryHierarchy, createAssociationGuards, createAssociationHelpers, createAssociationsService, createAssociationsStore, createCandidatesService, createCategoriesService, createCommentsService, createDefaultErrorSink, createEntityRegistry, createEntityRowsService, createFavoritesService, createRpcResultHelpers, createTitlesService, entityTitleCacheKey, err, firstError, isContentRole, isContentSourceEdge, isMembershipMetadata, isTransportFailure, ok, resolveEntityToken };
@@ -21,6 +21,9 @@ function createDefaultErrorSink() {
21
21
  };
22
22
  }
23
23
 
24
+ // src/core/guards.ts
25
+ import { isUuidShape } from "@ai-matrx/kit/uuid";
26
+
24
27
  // src/entity-types.generated.ts
25
28
  var ENTITY_TYPE_METADATA = {
26
29
  "access_request": { token: "access_request", schema: "iam", table: "access_requests", label: "Access Request", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: "System", referencePickable: false, titleColumn: null, contentRole: "utility", referenceCategory: null },
@@ -1346,10 +1349,6 @@ function isEntityTypeToken(value) {
1346
1349
  }
1347
1350
 
1348
1351
  // src/core/guards.ts
1349
- var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
1350
- function isUuid(value) {
1351
- return typeof value === "string" && UUID_RE.test(value);
1352
- }
1353
1352
  function show(value) {
1354
1353
  if (typeof value === "string") return JSON.stringify(value);
1355
1354
  if (value === null || value === void 0) return String(value);
@@ -1384,11 +1383,11 @@ function createAssociationGuards(errorSink) {
1384
1383
  }
1385
1384
  return {
1386
1385
  checkUuid(field, value) {
1387
- return isUuid(value) ? null : invalid(field, value, "must be a UUID");
1386
+ return isUuidShape(value) ? null : invalid(field, value, "must be a UUID");
1388
1387
  },
1389
1388
  checkUuidArray(field, values) {
1390
1389
  for (let i = 0; i < values.length; i++) {
1391
- if (!isUuid(values[i]))
1390
+ if (!isUuidShape(values[i]))
1392
1391
  return invalid(`${field}[${i}]`, values[i], "must be a UUID");
1393
1392
  }
1394
1393
  return null;
@@ -3496,7 +3495,6 @@ export {
3496
3495
  isContentSourceEdge,
3497
3496
  isMembershipMetadata,
3498
3497
  isTransportFailure,
3499
- isUuid,
3500
3498
  ok,
3501
3499
  resolveEntityToken
3502
3500
  };