@fuzdev/fuz_app 0.165.0 → 0.167.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.
Files changed (119) hide show
  1. package/dist/actions/CLAUDE.md +3 -3
  2. package/dist/actions/action_codegen.d.ts +10 -1
  3. package/dist/actions/action_codegen.d.ts.map +1 -1
  4. package/dist/actions/action_codegen.js +17 -8
  5. package/dist/actions/action_event_data.d.ts +1 -1
  6. package/dist/actions/action_rpc.d.ts.map +1 -1
  7. package/dist/actions/action_rpc.js +24 -15
  8. package/dist/actions/action_spec.d.ts +2 -2
  9. package/dist/actions/perform_action.d.ts +2 -1
  10. package/dist/actions/perform_action.d.ts.map +1 -1
  11. package/dist/auth/CLAUDE.md +10 -8
  12. package/dist/auth/account_action_specs.d.ts +8 -8
  13. package/dist/auth/account_route_schema.d.ts +197 -164
  14. package/dist/auth/account_route_schema.d.ts.map +1 -1
  15. package/dist/auth/account_route_schema.js +19 -17
  16. package/dist/auth/account_routes.d.ts.map +1 -1
  17. package/dist/auth/account_routes.js +285 -294
  18. package/dist/auth/admin_action_specs.d.ts +64 -64
  19. package/dist/auth/audit_log_route_schema.d.ts +16 -8
  20. package/dist/auth/audit_log_route_schema.d.ts.map +1 -1
  21. package/dist/auth/audit_log_route_schema.js +4 -3
  22. package/dist/auth/audit_log_routes.d.ts +1 -1
  23. package/dist/auth/audit_log_routes.d.ts.map +1 -1
  24. package/dist/auth/audit_log_routes.js +112 -111
  25. package/dist/auth/audit_log_schema.d.ts +22 -22
  26. package/dist/auth/bootstrap_route_schema.d.ts +46 -69
  27. package/dist/auth/bootstrap_route_schema.d.ts.map +1 -1
  28. package/dist/auth/bootstrap_route_schema.js +8 -7
  29. package/dist/auth/bootstrap_routes.d.ts.map +1 -1
  30. package/dist/auth/bootstrap_routes.js +100 -98
  31. package/dist/auth/cell_action_specs.d.ts +6092 -1092
  32. package/dist/auth/cell_action_specs.d.ts.map +1 -1
  33. package/dist/auth/cell_action_specs.js +96 -97
  34. package/dist/auth/cell_actions.d.ts.map +1 -1
  35. package/dist/auth/cell_actions.js +1 -0
  36. package/dist/auth/cell_audit_action_specs.d.ts +301 -69
  37. package/dist/auth/cell_audit_action_specs.d.ts.map +1 -1
  38. package/dist/auth/cell_audit_action_specs.js +21 -16
  39. package/dist/auth/cell_audit_actions.js +2 -2
  40. package/dist/auth/cell_audit_events.d.ts +2 -2
  41. package/dist/auth/cell_audit_events.d.ts.map +1 -1
  42. package/dist/auth/cell_audit_metadata.d.ts +93 -30
  43. package/dist/auth/cell_audit_metadata.d.ts.map +1 -1
  44. package/dist/auth/cell_audit_metadata.js +15 -14
  45. package/dist/auth/cell_authorize.d.ts +3 -3
  46. package/dist/auth/cell_authorize.js +3 -3
  47. package/dist/auth/cell_data_schema.d.ts +17 -9
  48. package/dist/auth/cell_data_schema.d.ts.map +1 -1
  49. package/dist/auth/cell_data_schema.js +9 -7
  50. package/dist/auth/cell_field_action_specs.d.ts +697 -130
  51. package/dist/auth/cell_field_action_specs.d.ts.map +1 -1
  52. package/dist/auth/cell_field_action_specs.js +25 -27
  53. package/dist/auth/cell_field_actions.d.ts.map +1 -1
  54. package/dist/auth/cell_field_actions.js +2 -0
  55. package/dist/auth/cell_field_audit_metadata.d.ts +49 -13
  56. package/dist/auth/cell_field_audit_metadata.d.ts.map +1 -1
  57. package/dist/auth/cell_field_audit_metadata.js +6 -6
  58. package/dist/auth/cell_grant_action_specs.d.ts +1044 -208
  59. package/dist/auth/cell_grant_action_specs.d.ts.map +1 -1
  60. package/dist/auth/cell_grant_action_specs.js +36 -33
  61. package/dist/auth/cell_grant_actions.js +2 -2
  62. package/dist/auth/cell_grant_audit_metadata.d.ts +188 -40
  63. package/dist/auth/cell_grant_audit_metadata.d.ts.map +1 -1
  64. package/dist/auth/cell_grant_audit_metadata.js +12 -11
  65. package/dist/auth/cell_item_action_specs.d.ts +949 -175
  66. package/dist/auth/cell_item_action_specs.d.ts.map +1 -1
  67. package/dist/auth/cell_item_action_specs.js +30 -34
  68. package/dist/auth/cell_item_actions.js +1 -1
  69. package/dist/auth/cell_item_audit_metadata.d.ts +68 -19
  70. package/dist/auth/cell_item_audit_metadata.d.ts.map +1 -1
  71. package/dist/auth/cell_item_audit_metadata.js +9 -9
  72. package/dist/auth/cell_relation_list_limit.d.ts +1 -2
  73. package/dist/auth/cell_relation_list_limit.d.ts.map +1 -1
  74. package/dist/auth/cell_relation_list_limit.js +3 -8
  75. package/dist/auth/role_grant_offer_action_specs.d.ts +4 -4
  76. package/dist/auth/signup_route_schema.d.ts +9 -4
  77. package/dist/auth/signup_route_schema.d.ts.map +1 -1
  78. package/dist/auth/signup_route_schema.js +5 -3
  79. package/dist/auth/signup_routes.d.ts.map +1 -1
  80. package/dist/auth/signup_routes.js +170 -170
  81. package/dist/db/cell_moderation.d.ts +6 -7
  82. package/dist/db/cell_moderation.d.ts.map +1 -1
  83. package/dist/db/cell_moderation.js +6 -7
  84. package/dist/http/CLAUDE.md +48 -3
  85. package/dist/http/common_routes.d.ts +1 -1
  86. package/dist/http/common_routes.d.ts.map +1 -1
  87. package/dist/http/common_routes.js +13 -11
  88. package/dist/http/db_routes.d.ts.map +1 -1
  89. package/dist/http/db_routes.js +25 -28
  90. package/dist/http/error_schemas.d.ts +5 -1
  91. package/dist/http/error_schemas.d.ts.map +1 -1
  92. package/dist/http/error_schemas.js +5 -1
  93. package/dist/http/route_result.d.ts +101 -0
  94. package/dist/http/route_result.d.ts.map +1 -0
  95. package/dist/http/route_result.js +56 -0
  96. package/dist/http/route_spec.d.ts +110 -6
  97. package/dist/http/route_spec.d.ts.map +1 -1
  98. package/dist/http/route_spec.js +82 -14
  99. package/dist/rate_limiter.d.ts +0 -9
  100. package/dist/rate_limiter.d.ts.map +1 -1
  101. package/dist/rate_limiter.js +0 -15
  102. package/dist/server/serve_fact_route.d.ts.map +1 -1
  103. package/dist/server/serve_fact_route.js +23 -21
  104. package/dist/server/surface_route.d.ts +1 -1
  105. package/dist/server/surface_route.d.ts.map +1 -1
  106. package/dist/server/surface_route.js +4 -2
  107. package/dist/testing/CLAUDE.md +5 -3
  108. package/dist/testing/adversarial_404.d.ts.map +1 -1
  109. package/dist/testing/adversarial_404.js +12 -7
  110. package/dist/testing/cross_backend/cell_crud.js +2 -2
  111. package/dist/testing/cross_backend/cell_relations.js +2 -2
  112. package/dist/testing/cross_backend/login_security.d.ts.map +1 -1
  113. package/dist/testing/cross_backend/login_security.js +3 -2
  114. package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts.map +1 -1
  115. package/dist/testing/cross_backend/rust_spine_consumer_surface.js +2 -6
  116. package/dist/testing/stubs.d.ts +14 -3
  117. package/dist/testing/stubs.d.ts.map +1 -1
  118. package/dist/testing/stubs.js +21 -6
  119. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"cell_field_action_specs.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/cell_field_action_specs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,2FAA2F;AAC3F,eAAO,MAAM,+CAA+C,EAC3D,2CAAoD,CAAC;AAItD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,QAA2B,CAAC;AAC9D,eAAO,MAAM,aAAa,yDAAiE,CAAC;AAC5F,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,2EAA2E;AAC3E,eAAO,MAAM,SAAS;;;;;kBAKpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAIlD;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;kBAO5B,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE,eAAO,MAAM,kBAAkB;;;;;;;kBAAuC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B,GAAG,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAIpE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWF,CAAC;AAEtC,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWL,CAAC;AAEtC,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYH,CAAC;AAEtC,2EAA2E;AAC3E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI9B,CAAC"}
@@ -10,9 +10,9 @@
10
10
  *
11
11
  * @module
12
12
  */
13
- import { z } from 'zod';
14
- import { Uuid } from '../primitive_schemas.js';
15
- import { ActingActor } from '../http/auth_shape.js';
13
+ import { meta } from '@fuzdev/fuz_schema/meta.ts';
14
+ import { array, boolean, brand, literal, object, optional, pipe, regex, string } from '@fuzdev/fuz_schema/schema.ts';
15
+ import { ActingActor, Timestamp, Uuid } from '../primitive_schemas_fuz.js';
16
16
  import { CellRelationListLimit } from './cell_relation_list_limit.js';
17
17
  // -- Error reasons ----------------------------------------------------------
18
18
  /** Error reason — `cell_field_list` got neither or both of `source_id` and `target_id`. */
@@ -24,41 +24,41 @@ export const ERROR_CELL_FIELD_LIST_REQUIRES_SOURCE_OR_TARGET = 'cell_field_list_
24
24
  * trailing, 64-char cap. No reserved names yet.
25
25
  */
26
26
  export const CELL_FIELD_NAME_REGEX = /^[a-z][a-z0-9_]{0,63}$/;
27
- export const CellFieldName = z.string().regex(CELL_FIELD_NAME_REGEX).brand('CellFieldName');
27
+ export const CellFieldName = brand(pipe(string, regex(CELL_FIELD_NAME_REGEX)), 'CellFieldName');
28
28
  /** Wire-format for a `cell_field` row. ISO `created_at`, branded UUIDs. */
29
- export const FieldJson = z.strictObject({
29
+ export const FieldJson = object({
30
30
  source_id: Uuid,
31
- name: z.string(),
31
+ name: CellFieldName,
32
32
  target_id: Uuid,
33
- created_at: z.string()
33
+ created_at: Timestamp
34
34
  });
35
35
  // -- cell_field_set ---------------------------------------------------------
36
36
  /**
37
37
  * Input for `cell_field_set`. UPSERT on `(source_id, name)` — re-issuing
38
38
  * the same input updates `target_id` and bumps `created_at`.
39
39
  */
40
- export const CellFieldSetInput = z.strictObject({
41
- source_id: Uuid.meta({ description: 'Cell whose field to set.' }),
42
- name: CellFieldName.meta({
40
+ export const CellFieldSetInput = object({
41
+ source_id: meta(Uuid, { description: 'Cell whose field to set.' }),
42
+ name: meta(CellFieldName, {
43
43
  description: 'Field name. snake_case identifier; max 64 chars.'
44
44
  }),
45
- target_id: Uuid.meta({ description: 'Cell the field points at.' }),
45
+ target_id: meta(Uuid, { description: 'Cell the field points at.' }),
46
46
  acting: ActingActor
47
47
  });
48
- export const CellFieldSetOutput = z.strictObject({ field: FieldJson });
48
+ export const CellFieldSetOutput = object({ field: FieldJson });
49
49
  // -- cell_field_delete ------------------------------------------------------
50
50
  /**
51
51
  * Input for `cell_field_delete`. Idempotent: a successful response is
52
52
  * returned even when no row matched.
53
53
  */
54
- export const CellFieldDeleteInput = z.strictObject({
55
- source_id: Uuid.meta({ description: 'Cell whose field to delete.' }),
56
- name: CellFieldName.meta({ description: 'Field name to delete.' }),
54
+ export const CellFieldDeleteInput = object({
55
+ source_id: meta(Uuid, { description: 'Cell whose field to delete.' }),
56
+ name: meta(CellFieldName, { description: 'Field name to delete.' }),
57
57
  acting: ActingActor
58
58
  });
59
- export const CellFieldDeleteOutput = z.strictObject({
60
- ok: z.literal(true),
61
- deleted: z.boolean()
59
+ export const CellFieldDeleteOutput = object({
60
+ ok: literal(true),
61
+ deleted: boolean
62
62
  });
63
63
  // -- cell_field_list --------------------------------------------------------
64
64
  /**
@@ -74,23 +74,21 @@ export const CellFieldDeleteOutput = z.strictObject({
74
74
  * `name_after` (return rows whose `name > name_after` lex); the reverse
75
75
  * listing has no cursor, oldest field first.
76
76
  */
77
- export const CellFieldListInput = z
78
- .strictObject({
79
- source_id: Uuid.optional().meta({
77
+ export const CellFieldListInput = meta(object({
78
+ source_id: meta(optional(Uuid), {
80
79
  description: 'List forward fields whose source is this cell.'
81
80
  }),
82
- target_id: Uuid.optional().meta({
81
+ target_id: meta(optional(Uuid), {
83
82
  description: 'List reverse upfields whose target is this cell.'
84
83
  }),
85
- name_after: CellFieldName.optional().meta({
84
+ name_after: meta(optional(CellFieldName), {
86
85
  description: 'Cursor for forward pagination — return rows whose name > this lex. Forward only.'
87
86
  }),
88
87
  limit: CellRelationListLimit,
89
88
  acting: ActingActor
90
- })
91
- .meta({ empty_input_handler_guarded: true });
92
- export const CellFieldListOutput = z.strictObject({
93
- fields: z.array(FieldJson)
89
+ }), { empty_input_handler_guarded: true });
90
+ export const CellFieldListOutput = object({
91
+ fields: array(FieldJson)
94
92
  });
95
93
  // -- Action specs -----------------------------------------------------------
96
94
  export const cell_field_set_action_spec = {
@@ -1 +1 @@
1
- {"version":3,"file":"cell_field_actions.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/cell_field_actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAIN,KAAK,SAAS,EACd,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,EAUN,KAAK,SAAS,EAEd,MAAM,8BAA8B,CAAC;AAQtC,OAAO,EAKN,KAAK,YAAY,EACjB,MAAM,6BAA6B,CAAC;AAMrC,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAEpD,eAAO,MAAM,aAAa,GAAI,KAAK,YAAY,KAAG,SAKhD,CAAC;AAEH,mDAAmD;AACnD,eAAO,MAAM,yBAAyB,GAAI,MAAM,mBAAmB,KAAG,KAAK,CAAC,SAAS,CA4FpF,CAAC"}
1
+ {"version":3,"file":"cell_field_actions.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/cell_field_actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAIN,KAAK,SAAS,EACd,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,EAWN,KAAK,SAAS,EAEd,MAAM,8BAA8B,CAAC;AAQtC,OAAO,EAKN,KAAK,YAAY,EACjB,MAAM,6BAA6B,CAAC;AAMrC,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAEpD,eAAO,MAAM,aAAa,GAAI,KAAK,YAAY,KAAG,SAOhD,CAAC;AAEH,mDAAmD;AACnD,eAAO,MAAM,yBAAyB,GAAI,MAAM,mBAAmB,KAAG,KAAK,CAAC,SAAS,CA4FpF,CAAC"}
@@ -34,6 +34,8 @@ import { CELL_RELATION_LIST_LIMIT_DEFAULT } from './cell_relation_list_limit.js'
34
34
  import { query_cell_field_set, query_cell_field_delete, query_cell_field_list_for_source, query_cell_field_list_for_target } from '../db/cell_field_queries.js';
35
35
  export const to_field_json = (row) => ({
36
36
  source_id: row.source_id,
37
+ // `cell_field.name` is a DB-shape string, written only through
38
+ // `cell_field_set`'s `CellFieldName`; brand it at the wire boundary
37
39
  name: row.name,
38
40
  target_id: row.target_id,
39
41
  created_at: row.created_at
@@ -7,24 +7,60 @@
7
7
  *
8
8
  * @module
9
9
  */
10
- import { z } from 'zod';
10
+ import { type Infer } from '@fuzdev/fuz_schema/schema.ts';
11
11
  /**
12
12
  * Metadata envelope for `cell_field_set`. Emitted on every successful
13
13
  * create OR update path (UPSERT on `(source_id, name)`); the audit
14
14
  * reader correlates create-vs-update via repeated `(source_id, name)`
15
15
  * if needed.
16
16
  */
17
- export declare const CellFieldSetAuditMetadata: z.ZodObject<{
18
- source_id: z.ZodUUID & z.ZodType<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string, z.core.$ZodTypeInternals<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string>>;
19
- name: z.ZodString;
20
- target_id: z.ZodUUID & z.ZodType<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string, z.core.$ZodTypeInternals<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string>>;
21
- }, z.core.$loose>;
22
- export type CellFieldSetAuditMetadata = z.infer<typeof CellFieldSetAuditMetadata>;
17
+ export declare const CellFieldSetAuditMetadata: import("@fuzdev/fuz_schema/schema.ts").Schema<{
18
+ name: string;
19
+ source_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
20
+ target_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
21
+ } & Record<string, unknown>, {
22
+ name: string;
23
+ source_id: string;
24
+ target_id: string;
25
+ } & Record<string, unknown>, "loose_object", {
26
+ source_id: import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">, string, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case">)[]> & {
27
+ readonly '~types'?: {
28
+ readonly input: string;
29
+ readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
30
+ } | undefined;
31
+ };
32
+ name: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
33
+ target_id: import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">, string, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case">)[]> & {
34
+ readonly '~types'?: {
35
+ readonly input: string;
36
+ readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
37
+ } | undefined;
38
+ };
39
+ }>;
40
+ export type CellFieldSetAuditMetadata = Infer<typeof CellFieldSetAuditMetadata>;
23
41
  /** Metadata envelope for `cell_field_delete`. */
24
- export declare const CellFieldDeleteAuditMetadata: z.ZodObject<{
25
- source_id: z.ZodUUID & z.ZodType<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string, z.core.$ZodTypeInternals<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string>>;
26
- name: z.ZodString;
27
- target_id: z.ZodUUID & z.ZodType<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string, z.core.$ZodTypeInternals<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string>>;
28
- }, z.core.$loose>;
29
- export type CellFieldDeleteAuditMetadata = z.infer<typeof CellFieldDeleteAuditMetadata>;
42
+ export declare const CellFieldDeleteAuditMetadata: import("@fuzdev/fuz_schema/schema.ts").Schema<{
43
+ name: string;
44
+ source_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
45
+ target_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
46
+ } & Record<string, unknown>, {
47
+ name: string;
48
+ source_id: string;
49
+ target_id: string;
50
+ } & Record<string, unknown>, "loose_object", {
51
+ source_id: import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">, string, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case">)[]> & {
52
+ readonly '~types'?: {
53
+ readonly input: string;
54
+ readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
55
+ } | undefined;
56
+ };
57
+ name: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
58
+ target_id: import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">, string, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case">)[]> & {
59
+ readonly '~types'?: {
60
+ readonly input: string;
61
+ readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
62
+ } | undefined;
63
+ };
64
+ }>;
65
+ export type CellFieldDeleteAuditMetadata = Infer<typeof CellFieldDeleteAuditMetadata>;
30
66
  //# sourceMappingURL=cell_field_audit_metadata.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cell_field_audit_metadata.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/cell_field_audit_metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB;;;;iBAIpC,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAElF,iDAAiD;AACjD,eAAO,MAAM,4BAA4B;;;;iBAIvC,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
1
+ {"version":3,"file":"cell_field_audit_metadata.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/cell_field_audit_metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAwB,KAAK,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAIhF;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;EAIpC,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAEhF,iDAAiD;AACjD,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;EAIvC,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
@@ -7,22 +7,22 @@
7
7
  *
8
8
  * @module
9
9
  */
10
- import { z } from 'zod';
11
- import { Uuid } from '../primitive_schemas.js';
10
+ import { loose_object, string } from '@fuzdev/fuz_schema/schema.ts';
11
+ import { Uuid } from '../primitive_schemas_fuz.js';
12
12
  /**
13
13
  * Metadata envelope for `cell_field_set`. Emitted on every successful
14
14
  * create OR update path (UPSERT on `(source_id, name)`); the audit
15
15
  * reader correlates create-vs-update via repeated `(source_id, name)`
16
16
  * if needed.
17
17
  */
18
- export const CellFieldSetAuditMetadata = z.looseObject({
18
+ export const CellFieldSetAuditMetadata = loose_object({
19
19
  source_id: Uuid,
20
- name: z.string(),
20
+ name: string,
21
21
  target_id: Uuid
22
22
  });
23
23
  /** Metadata envelope for `cell_field_delete`. */
24
- export const CellFieldDeleteAuditMetadata = z.looseObject({
24
+ export const CellFieldDeleteAuditMetadata = loose_object({
25
25
  source_id: Uuid,
26
- name: z.string(),
26
+ name: string,
27
27
  target_id: Uuid
28
28
  });