@fuzdev/fuz_app 0.168.0 → 0.169.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 (132) hide show
  1. package/dist/actions/CLAUDE.md +1 -1
  2. package/dist/actions/action_codegen.d.ts +9 -7
  3. package/dist/actions/action_codegen.d.ts.map +1 -1
  4. package/dist/actions/action_codegen.js +20 -15
  5. package/dist/actions/action_event_data.d.ts +16 -16
  6. package/dist/actions/heartbeat.d.ts +1 -1
  7. package/dist/auth/account_action_specs.d.ts +11 -11
  8. package/dist/auth/account_action_specs.js +1 -1
  9. package/dist/auth/account_route_schema.d.ts +18 -18
  10. package/dist/auth/account_route_schema.js +1 -1
  11. package/dist/auth/account_routes.js +1 -1
  12. package/dist/auth/account_schema.d.ts +38 -40
  13. package/dist/auth/account_schema.d.ts.map +1 -1
  14. package/dist/auth/account_schema.js +7 -8
  15. package/dist/auth/actor_lookup_action_specs.d.ts +7 -7
  16. package/dist/auth/actor_lookup_action_specs.js +1 -1
  17. package/dist/auth/actor_search_action_specs.d.ts +6 -6
  18. package/dist/auth/actor_search_action_specs.js +1 -1
  19. package/dist/auth/admin_action_specs.d.ts +166 -166
  20. package/dist/auth/admin_action_specs.js +1 -1
  21. package/dist/auth/app_settings_schema.d.ts +3 -3
  22. package/dist/auth/app_settings_schema.d.ts.map +1 -1
  23. package/dist/auth/app_settings_schema.js +1 -1
  24. package/dist/auth/audit_log_route_schema.d.ts +1 -1
  25. package/dist/auth/audit_log_route_schema.js +1 -1
  26. package/dist/auth/audit_log_schema.d.ts +61 -61
  27. package/dist/auth/audit_log_schema.d.ts.map +1 -1
  28. package/dist/auth/audit_log_schema.js +1 -1
  29. package/dist/auth/bootstrap_route_schema.d.ts +4 -4
  30. package/dist/auth/bootstrap_route_schema.js +1 -1
  31. package/dist/auth/cell_action_specs.d.ts +424 -424
  32. package/dist/auth/cell_action_specs.js +1 -1
  33. package/dist/auth/cell_audit_action_specs.d.ts +14 -14
  34. package/dist/auth/cell_audit_action_specs.js +1 -1
  35. package/dist/auth/cell_audit_metadata.d.ts +8 -8
  36. package/dist/auth/cell_audit_metadata.js +1 -1
  37. package/dist/auth/cell_field_action_specs.d.ts +55 -55
  38. package/dist/auth/cell_field_action_specs.js +1 -1
  39. package/dist/auth/cell_field_audit_metadata.d.ts +4 -4
  40. package/dist/auth/cell_field_audit_metadata.js +1 -1
  41. package/dist/auth/cell_grant_action_specs.d.ts +61 -61
  42. package/dist/auth/cell_grant_action_specs.js +1 -1
  43. package/dist/auth/cell_grant_audit_metadata.d.ts +10 -10
  44. package/dist/auth/cell_grant_audit_metadata.js +1 -1
  45. package/dist/auth/cell_item_action_specs.d.ts +76 -76
  46. package/dist/auth/cell_item_action_specs.js +1 -1
  47. package/dist/auth/cell_item_audit_metadata.d.ts +5 -5
  48. package/dist/auth/cell_item_audit_metadata.js +1 -1
  49. package/dist/auth/invite_schema.d.ts +11 -11
  50. package/dist/auth/invite_schema.d.ts.map +1 -1
  51. package/dist/auth/invite_schema.js +1 -1
  52. package/dist/auth/name_schema.js +1 -1
  53. package/dist/auth/password.js +1 -1
  54. package/dist/auth/role_grant_offer_action_specs.d.ts +182 -182
  55. package/dist/auth/role_grant_offer_action_specs.js +1 -1
  56. package/dist/auth/role_grant_offer_notifications.d.ts +107 -107
  57. package/dist/auth/role_grant_offer_notifications.d.ts.map +1 -1
  58. package/dist/auth/role_grant_offer_notifications.js +1 -1
  59. package/dist/auth/role_grant_offer_schema.d.ts +9 -9
  60. package/dist/auth/role_grant_offer_schema.d.ts.map +1 -1
  61. package/dist/auth/role_grant_offer_schema.js +1 -1
  62. package/dist/auth/self_service_role_action_specs.d.ts +2 -2
  63. package/dist/auth/self_service_role_action_specs.js +1 -1
  64. package/dist/auth/signup_route_schema.d.ts +2 -2
  65. package/dist/auth/signup_route_schema.js +1 -1
  66. package/dist/auth/token_scope.d.ts +8 -8
  67. package/dist/db/file_fact_url.d.ts +1 -1
  68. package/dist/http/CLAUDE.md +7 -7
  69. package/dist/http/auth_shape.d.ts +15 -32
  70. package/dist/http/auth_shape.d.ts.map +1 -1
  71. package/dist/http/auth_shape.js +31 -38
  72. package/dist/http/db_routes.d.ts +1 -1
  73. package/dist/http/db_routes.d.ts.map +1 -1
  74. package/dist/http/db_routes.js +1 -1
  75. package/dist/http/error_schemas.d.ts +18 -18
  76. package/dist/http/jsonrpc.d.ts +11 -11
  77. package/dist/http/schema_helpers.d.ts +2 -2
  78. package/dist/http/schema_helpers.d.ts.map +1 -1
  79. package/dist/http/schema_helpers.js +8 -7
  80. package/dist/primitive_schemas.d.ts +173 -115
  81. package/dist/primitive_schemas.d.ts.map +1 -1
  82. package/dist/primitive_schemas.js +134 -158
  83. package/dist/schema_issues.d.ts +10 -7
  84. package/dist/schema_issues.d.ts.map +1 -1
  85. package/dist/schema_issues.js +38 -8
  86. package/dist/server/serve_fact_route.js +1 -1
  87. package/dist/server/surface_route.js +1 -1
  88. package/dist/testing/CLAUDE.md +3 -3
  89. package/dist/testing/cross_backend/conformance_case.d.ts +96 -114
  90. package/dist/testing/cross_backend/conformance_case.d.ts.map +1 -1
  91. package/dist/testing/cross_backend/conformance_case.js +0 -256
  92. package/dist/testing/cross_backend/fact_serving.js +1 -1
  93. package/dist/testing/cross_backend/setup.d.ts +1 -1
  94. package/dist/testing/cross_backend/setup.d.ts.map +1 -1
  95. package/dist/testing/cross_backend/setup.js +3 -4
  96. package/dist/testing/cross_backend/testing_origin_check.d.ts +8 -8
  97. package/dist/testing/cross_backend/testing_reset_actions.d.ts +608 -201
  98. package/dist/testing/cross_backend/testing_reset_actions.d.ts.map +1 -1
  99. package/dist/testing/cross_backend/testing_reset_actions.js +46 -55
  100. package/dist/testing/cross_backend/ws_outbound_overflow.d.ts.map +1 -1
  101. package/dist/testing/cross_backend/ws_outbound_overflow.js +35 -0
  102. package/dist/testing/rpc_helpers.d.ts +1 -1
  103. package/dist/testing/rpc_helpers.d.ts.map +1 -1
  104. package/dist/testing/rpc_helpers.js +0 -1
  105. package/dist/testing/schema_generators.js +1 -13
  106. package/dist/testing/schema_introspect.d.ts +438 -78
  107. package/dist/testing/schema_introspect.d.ts.map +1 -1
  108. package/dist/testing/schema_introspect.js +26 -26
  109. package/dist/testing/transports/bootstrap.d.ts +1 -1
  110. package/dist/testing/transports/bootstrap.d.ts.map +1 -1
  111. package/dist/testing/transports/bootstrap.js +1 -1
  112. package/dist/ui/BootstrapForm.svelte +1 -2
  113. package/dist/ui/BootstrapForm.svelte.d.ts.map +1 -1
  114. package/dist/ui/SignupForm.svelte +1 -2
  115. package/dist/ui/SignupForm.svelte.d.ts.map +1 -1
  116. package/dist/ui/admin_accounts_state.svelte.d.ts +5 -5
  117. package/dist/ui/admin_accounts_state.svelte.d.ts.map +1 -1
  118. package/dist/ui/admin_invites_state.svelte.d.ts +1 -1
  119. package/dist/ui/admin_invites_state.svelte.d.ts.map +1 -1
  120. package/dist/ui/admin_sessions_state.svelte.d.ts +2 -2
  121. package/dist/ui/admin_sessions_state.svelte.d.ts.map +1 -1
  122. package/dist/ui/role_grant_offers_state.svelte.d.ts +1 -1
  123. package/dist/zod.d.ts +18 -3
  124. package/dist/zod.d.ts.map +1 -1
  125. package/dist/zod.js +26 -3
  126. package/dist/zod_schemas.d.ts +100 -0
  127. package/dist/zod_schemas.d.ts.map +1 -0
  128. package/dist/zod_schemas.js +157 -0
  129. package/package.json +5 -5
  130. package/dist/primitive_schemas_fuz.d.ts +0 -178
  131. package/dist/primitive_schemas_fuz.d.ts.map +0 -1
  132. package/dist/primitive_schemas_fuz.js +0 -149
@@ -34,57 +34,177 @@ import './assert_dev_env.js';
34
34
  *
35
35
  * @module
36
36
  */
37
- import { z } from 'zod';
37
+ import { type Infer } from '@fuzdev/fuz_schema/schema.ts';
38
38
  import type { Db } from '../db/db.js';
39
39
  /**
40
- * Per-column structural metadata. The Zod schema is the canonical source
40
+ * Per-column structural metadata. The schema is the canonical source
41
41
  * for the column shape — `SchemaSnapshot` reuses it as the cross-impl
42
42
  * `_testing_schema_snapshot` RPC action's wire validator, so the
43
43
  * introspection type and the wire contract can't drift apart.
44
44
  */
45
- export declare const ColumnSnapshot: z.ZodObject<{
46
- data_type: z.ZodString;
47
- udt_name: z.ZodString;
48
- is_nullable: z.ZodBoolean;
49
- column_default: z.ZodNullable<z.ZodString>;
50
- is_identity: z.ZodBoolean;
51
- }, z.core.$strip>;
52
- export type ColumnSnapshot = z.infer<typeof ColumnSnapshot>;
45
+ export declare const ColumnSnapshot: import("@fuzdev/fuz_schema/schema.ts").Schema<{
46
+ data_type: string;
47
+ is_nullable: boolean;
48
+ udt_name: string;
49
+ column_default: string | null;
50
+ is_identity: boolean;
51
+ }, {
52
+ data_type: string;
53
+ is_nullable: boolean;
54
+ udt_name: string;
55
+ column_default: string | null;
56
+ is_identity: boolean;
57
+ }, "strip_object", {
58
+ /** SQL standard type name from `information_schema.columns.data_type`. */
59
+ data_type: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
60
+ /** Postgres-native type name from `information_schema.columns.udt_name`. */
61
+ udt_name: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
62
+ /** `true` when the column accepts NULL. */
63
+ is_nullable: import("@fuzdev/fuz_schema/schema.ts").Schema<boolean, boolean, "boolean", undefined>;
64
+ /** Default-value expression as Postgres reports it, or `null` if none. */
65
+ column_default: import("@fuzdev/fuz_schema/schema.ts").Schema<string | null, string | null, "nullable", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>>;
66
+ /** `true` when the column was declared GENERATED ... AS IDENTITY. */
67
+ is_identity: import("@fuzdev/fuz_schema/schema.ts").Schema<boolean, boolean, "boolean", undefined>;
68
+ }>;
69
+ export type ColumnSnapshot = Infer<typeof ColumnSnapshot>;
53
70
  /** Per-table structural metadata. */
54
- export declare const TableSnapshot: z.ZodObject<{
55
- columns: z.ZodRecord<z.ZodString, z.ZodObject<{
56
- data_type: z.ZodString;
57
- udt_name: z.ZodString;
58
- is_nullable: z.ZodBoolean;
59
- column_default: z.ZodNullable<z.ZodString>;
60
- is_identity: z.ZodBoolean;
61
- }, z.core.$strip>>;
62
- indexes: z.ZodArray<z.ZodObject<{
63
- name: z.ZodString;
64
- definition: z.ZodString;
65
- }, z.core.$strip>>;
66
- constraints: z.ZodArray<z.ZodObject<{
67
- name: z.ZodString;
68
- type: z.ZodString;
69
- definition: z.ZodString;
70
- }, z.core.$strip>>;
71
- }, z.core.$strip>;
72
- export type TableSnapshot = z.infer<typeof TableSnapshot>;
71
+ export declare const TableSnapshot: import("@fuzdev/fuz_schema/schema.ts").Schema<{
72
+ columns: Record<string, {
73
+ data_type: string;
74
+ is_nullable: boolean;
75
+ udt_name: string;
76
+ column_default: string | null;
77
+ is_identity: boolean;
78
+ }>;
79
+ indexes: {
80
+ name: string;
81
+ definition: string;
82
+ }[];
83
+ constraints: {
84
+ name: string;
85
+ type: string;
86
+ definition: string;
87
+ }[];
88
+ }, {
89
+ columns: Record<string, {
90
+ data_type: string;
91
+ is_nullable: boolean;
92
+ udt_name: string;
93
+ column_default: string | null;
94
+ is_identity: boolean;
95
+ }>;
96
+ indexes: {
97
+ name: string;
98
+ definition: string;
99
+ }[];
100
+ constraints: {
101
+ name: string;
102
+ type: string;
103
+ definition: string;
104
+ }[];
105
+ }, "strip_object", {
106
+ /** Column metadata keyed by column name (sorted on serialization). */
107
+ columns: import("@fuzdev/fuz_schema/schema.ts").Schema<Record<string, {
108
+ data_type: string;
109
+ is_nullable: boolean;
110
+ udt_name: string;
111
+ column_default: string | null;
112
+ is_identity: boolean;
113
+ }>, Record<string, {
114
+ data_type: string;
115
+ is_nullable: boolean;
116
+ udt_name: string;
117
+ column_default: string | null;
118
+ is_identity: boolean;
119
+ }>, "record", import("@fuzdev/fuz_schema/schema.ts").Schema<{
120
+ data_type: string;
121
+ is_nullable: boolean;
122
+ udt_name: string;
123
+ column_default: string | null;
124
+ is_identity: boolean;
125
+ }, {
126
+ data_type: string;
127
+ is_nullable: boolean;
128
+ udt_name: string;
129
+ column_default: string | null;
130
+ is_identity: boolean;
131
+ }, "strip_object", {
132
+ /** SQL standard type name from `information_schema.columns.data_type`. */
133
+ data_type: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
134
+ /** Postgres-native type name from `information_schema.columns.udt_name`. */
135
+ udt_name: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
136
+ /** `true` when the column accepts NULL. */
137
+ is_nullable: import("@fuzdev/fuz_schema/schema.ts").Schema<boolean, boolean, "boolean", undefined>;
138
+ /** Default-value expression as Postgres reports it, or `null` if none. */
139
+ column_default: import("@fuzdev/fuz_schema/schema.ts").Schema<string | null, string | null, "nullable", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>>;
140
+ /** `true` when the column was declared GENERATED ... AS IDENTITY. */
141
+ is_identity: import("@fuzdev/fuz_schema/schema.ts").Schema<boolean, boolean, "boolean", undefined>;
142
+ }>>;
143
+ /** Index definitions as Postgres renders them via `pg_indexes.indexdef`. */
144
+ indexes: import("@fuzdev/fuz_schema/schema.ts").Schema<{
145
+ name: string;
146
+ definition: string;
147
+ }[], {
148
+ name: string;
149
+ definition: string;
150
+ }[], "array", import("@fuzdev/fuz_schema/schema.ts").Schema<{
151
+ name: string;
152
+ definition: string;
153
+ }, {
154
+ name: string;
155
+ definition: string;
156
+ }, "strip_object", {
157
+ name: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
158
+ definition: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
159
+ }>>;
160
+ /** Constraint definitions as Postgres renders them via `pg_get_constraintdef`. */
161
+ constraints: import("@fuzdev/fuz_schema/schema.ts").Schema<{
162
+ name: string;
163
+ type: string;
164
+ definition: string;
165
+ }[], {
166
+ name: string;
167
+ type: string;
168
+ definition: string;
169
+ }[], "array", import("@fuzdev/fuz_schema/schema.ts").Schema<{
170
+ name: string;
171
+ type: string;
172
+ definition: string;
173
+ }, {
174
+ name: string;
175
+ type: string;
176
+ definition: string;
177
+ }, "strip_object", {
178
+ name: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
179
+ type: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
180
+ definition: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
181
+ }>>;
182
+ }>;
183
+ export type TableSnapshot = Infer<typeof TableSnapshot>;
73
184
  /** Sequence metadata — `data_type` is `bigint` (BIGSERIAL) or `integer` (SERIAL). */
74
- export declare const SequenceSnapshot: z.ZodObject<{
75
- data_type: z.ZodString;
76
- }, z.core.$strip>;
77
- export type SequenceSnapshot = z.infer<typeof SequenceSnapshot>;
185
+ export declare const SequenceSnapshot: import("@fuzdev/fuz_schema/schema.ts").Schema<{
186
+ data_type: string;
187
+ }, {
188
+ data_type: string;
189
+ }, "strip_object", {
190
+ data_type: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
191
+ }>;
192
+ export type SequenceSnapshot = Infer<typeof SequenceSnapshot>;
78
193
  /**
79
194
  * Enum-type metadata — the labels of a `CREATE TYPE ... AS ENUM`, captured in
80
195
  * `pg_enum.enumsortorder` (declaration) order. Order is significant: a Postgres
81
196
  * enum's labels are an ordered set, and reordering them is a schema change, so
82
197
  * the parity diff compares the arrays positionally.
83
198
  */
84
- export declare const EnumTypeSnapshot: z.ZodObject<{
85
- labels: z.ZodArray<z.ZodString>;
86
- }, z.core.$strip>;
87
- export type EnumTypeSnapshot = z.infer<typeof EnumTypeSnapshot>;
199
+ export declare const EnumTypeSnapshot: import("@fuzdev/fuz_schema/schema.ts").Schema<{
200
+ labels: string[];
201
+ }, {
202
+ labels: string[];
203
+ }, "strip_object", {
204
+ /** Enum labels in declared order. */
205
+ labels: import("@fuzdev/fuz_schema/schema.ts").Schema<string[], string[], "array", import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>;
206
+ }>;
207
+ export type EnumTypeSnapshot = Infer<typeof EnumTypeSnapshot>;
88
208
  /**
89
209
  * Normalized database schema snapshot for parity comparison — the single
90
210
  * source of truth for the snapshot shape across the introspection query
@@ -94,33 +214,231 @@ export type EnumTypeSnapshot = z.infer<typeof EnumTypeSnapshot>;
94
214
  * All fields are deterministically ordered on capture so structural equality
95
215
  * via `JSON.stringify` or per-key comparison yields stable results.
96
216
  */
97
- export declare const SchemaSnapshot: z.ZodObject<{
98
- tables: z.ZodRecord<z.ZodString, z.ZodObject<{
99
- columns: z.ZodRecord<z.ZodString, z.ZodObject<{
100
- data_type: z.ZodString;
101
- udt_name: z.ZodString;
102
- is_nullable: z.ZodBoolean;
103
- column_default: z.ZodNullable<z.ZodString>;
104
- is_identity: z.ZodBoolean;
105
- }, z.core.$strip>>;
106
- indexes: z.ZodArray<z.ZodObject<{
107
- name: z.ZodString;
108
- definition: z.ZodString;
109
- }, z.core.$strip>>;
110
- constraints: z.ZodArray<z.ZodObject<{
111
- name: z.ZodString;
112
- type: z.ZodString;
113
- definition: z.ZodString;
114
- }, z.core.$strip>>;
115
- }, z.core.$strip>>;
116
- sequences: z.ZodRecord<z.ZodString, z.ZodObject<{
117
- data_type: z.ZodString;
118
- }, z.core.$strip>>;
119
- enums: z.ZodRecord<z.ZodString, z.ZodObject<{
120
- labels: z.ZodArray<z.ZodString>;
121
- }, z.core.$strip>>;
122
- }, z.core.$strip>;
123
- export type SchemaSnapshot = z.infer<typeof SchemaSnapshot>;
217
+ export declare const SchemaSnapshot: import("@fuzdev/fuz_schema/schema.ts").Schema<{
218
+ tables: Record<string, {
219
+ columns: Record<string, {
220
+ data_type: string;
221
+ is_nullable: boolean;
222
+ udt_name: string;
223
+ column_default: string | null;
224
+ is_identity: boolean;
225
+ }>;
226
+ indexes: {
227
+ name: string;
228
+ definition: string;
229
+ }[];
230
+ constraints: {
231
+ name: string;
232
+ type: string;
233
+ definition: string;
234
+ }[];
235
+ }>;
236
+ sequences: Record<string, {
237
+ data_type: string;
238
+ }>;
239
+ enums: Record<string, {
240
+ labels: string[];
241
+ }>;
242
+ }, {
243
+ tables: Record<string, {
244
+ columns: Record<string, {
245
+ data_type: string;
246
+ is_nullable: boolean;
247
+ udt_name: string;
248
+ column_default: string | null;
249
+ is_identity: boolean;
250
+ }>;
251
+ indexes: {
252
+ name: string;
253
+ definition: string;
254
+ }[];
255
+ constraints: {
256
+ name: string;
257
+ type: string;
258
+ definition: string;
259
+ }[];
260
+ }>;
261
+ sequences: Record<string, {
262
+ data_type: string;
263
+ }>;
264
+ enums: Record<string, {
265
+ labels: string[];
266
+ }>;
267
+ }, "strip_object", {
268
+ /** Tables keyed by name. */
269
+ tables: import("@fuzdev/fuz_schema/schema.ts").Schema<Record<string, {
270
+ columns: Record<string, {
271
+ data_type: string;
272
+ is_nullable: boolean;
273
+ udt_name: string;
274
+ column_default: string | null;
275
+ is_identity: boolean;
276
+ }>;
277
+ indexes: {
278
+ name: string;
279
+ definition: string;
280
+ }[];
281
+ constraints: {
282
+ name: string;
283
+ type: string;
284
+ definition: string;
285
+ }[];
286
+ }>, Record<string, {
287
+ columns: Record<string, {
288
+ data_type: string;
289
+ is_nullable: boolean;
290
+ udt_name: string;
291
+ column_default: string | null;
292
+ is_identity: boolean;
293
+ }>;
294
+ indexes: {
295
+ name: string;
296
+ definition: string;
297
+ }[];
298
+ constraints: {
299
+ name: string;
300
+ type: string;
301
+ definition: string;
302
+ }[];
303
+ }>, "record", import("@fuzdev/fuz_schema/schema.ts").Schema<{
304
+ columns: Record<string, {
305
+ data_type: string;
306
+ is_nullable: boolean;
307
+ udt_name: string;
308
+ column_default: string | null;
309
+ is_identity: boolean;
310
+ }>;
311
+ indexes: {
312
+ name: string;
313
+ definition: string;
314
+ }[];
315
+ constraints: {
316
+ name: string;
317
+ type: string;
318
+ definition: string;
319
+ }[];
320
+ }, {
321
+ columns: Record<string, {
322
+ data_type: string;
323
+ is_nullable: boolean;
324
+ udt_name: string;
325
+ column_default: string | null;
326
+ is_identity: boolean;
327
+ }>;
328
+ indexes: {
329
+ name: string;
330
+ definition: string;
331
+ }[];
332
+ constraints: {
333
+ name: string;
334
+ type: string;
335
+ definition: string;
336
+ }[];
337
+ }, "strip_object", {
338
+ /** Column metadata keyed by column name (sorted on serialization). */
339
+ columns: import("@fuzdev/fuz_schema/schema.ts").Schema<Record<string, {
340
+ data_type: string;
341
+ is_nullable: boolean;
342
+ udt_name: string;
343
+ column_default: string | null;
344
+ is_identity: boolean;
345
+ }>, Record<string, {
346
+ data_type: string;
347
+ is_nullable: boolean;
348
+ udt_name: string;
349
+ column_default: string | null;
350
+ is_identity: boolean;
351
+ }>, "record", import("@fuzdev/fuz_schema/schema.ts").Schema<{
352
+ data_type: string;
353
+ is_nullable: boolean;
354
+ udt_name: string;
355
+ column_default: string | null;
356
+ is_identity: boolean;
357
+ }, {
358
+ data_type: string;
359
+ is_nullable: boolean;
360
+ udt_name: string;
361
+ column_default: string | null;
362
+ is_identity: boolean;
363
+ }, "strip_object", {
364
+ /** SQL standard type name from `information_schema.columns.data_type`. */
365
+ data_type: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
366
+ /** Postgres-native type name from `information_schema.columns.udt_name`. */
367
+ udt_name: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
368
+ /** `true` when the column accepts NULL. */
369
+ is_nullable: import("@fuzdev/fuz_schema/schema.ts").Schema<boolean, boolean, "boolean", undefined>;
370
+ /** Default-value expression as Postgres reports it, or `null` if none. */
371
+ column_default: import("@fuzdev/fuz_schema/schema.ts").Schema<string | null, string | null, "nullable", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>>;
372
+ /** `true` when the column was declared GENERATED ... AS IDENTITY. */
373
+ is_identity: import("@fuzdev/fuz_schema/schema.ts").Schema<boolean, boolean, "boolean", undefined>;
374
+ }>>;
375
+ /** Index definitions as Postgres renders them via `pg_indexes.indexdef`. */
376
+ indexes: import("@fuzdev/fuz_schema/schema.ts").Schema<{
377
+ name: string;
378
+ definition: string;
379
+ }[], {
380
+ name: string;
381
+ definition: string;
382
+ }[], "array", import("@fuzdev/fuz_schema/schema.ts").Schema<{
383
+ name: string;
384
+ definition: string;
385
+ }, {
386
+ name: string;
387
+ definition: string;
388
+ }, "strip_object", {
389
+ name: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
390
+ definition: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
391
+ }>>;
392
+ /** Constraint definitions as Postgres renders them via `pg_get_constraintdef`. */
393
+ constraints: import("@fuzdev/fuz_schema/schema.ts").Schema<{
394
+ name: string;
395
+ type: string;
396
+ definition: string;
397
+ }[], {
398
+ name: string;
399
+ type: string;
400
+ definition: string;
401
+ }[], "array", import("@fuzdev/fuz_schema/schema.ts").Schema<{
402
+ name: string;
403
+ type: string;
404
+ definition: string;
405
+ }, {
406
+ name: string;
407
+ type: string;
408
+ definition: string;
409
+ }, "strip_object", {
410
+ name: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
411
+ type: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
412
+ definition: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
413
+ }>>;
414
+ }>>;
415
+ /** Sequences keyed by name. */
416
+ sequences: import("@fuzdev/fuz_schema/schema.ts").Schema<Record<string, {
417
+ data_type: string;
418
+ }>, Record<string, {
419
+ data_type: string;
420
+ }>, "record", import("@fuzdev/fuz_schema/schema.ts").Schema<{
421
+ data_type: string;
422
+ }, {
423
+ data_type: string;
424
+ }, "strip_object", {
425
+ data_type: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
426
+ }>>;
427
+ /** Enum types (`CREATE TYPE ... AS ENUM`) keyed by name; labels in declared order. */
428
+ enums: import("@fuzdev/fuz_schema/schema.ts").Schema<Record<string, {
429
+ labels: string[];
430
+ }>, Record<string, {
431
+ labels: string[];
432
+ }>, "record", import("@fuzdev/fuz_schema/schema.ts").Schema<{
433
+ labels: string[];
434
+ }, {
435
+ labels: string[];
436
+ }, "strip_object", {
437
+ /** Enum labels in declared order. */
438
+ labels: import("@fuzdev/fuz_schema/schema.ts").Schema<string[], string[], "array", import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>;
439
+ }>>;
440
+ }>;
441
+ export type SchemaSnapshot = Infer<typeof SchemaSnapshot>;
124
442
  /**
125
443
  * A single `schema_version` tracker row — the migration-identity primitive.
126
444
  *
@@ -132,25 +450,67 @@ export type SchemaSnapshot = z.infer<typeof SchemaSnapshot>;
132
450
  * bootstrapped spines so a migration-name or partitioning drift — invisible
133
451
  * to the schema snapshot — is a gated fact, not a latent interop break.
134
452
  */
135
- export declare const MigrationTrackerEntry: z.ZodObject<{
136
- namespace: z.ZodString;
137
- name: z.ZodString;
138
- sequence: z.ZodNumber;
139
- }, z.core.$strip>;
140
- export type MigrationTrackerEntry = z.infer<typeof MigrationTrackerEntry>;
453
+ export declare const MigrationTrackerEntry: import("@fuzdev/fuz_schema/schema.ts").Schema<{
454
+ name: string;
455
+ namespace: string;
456
+ sequence: number;
457
+ }, {
458
+ name: string;
459
+ namespace: string;
460
+ sequence: number;
461
+ }, "strip_object", {
462
+ /** Migration namespace (e.g. `fuz_auth`, `fuz_cell`). */
463
+ namespace: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
464
+ /** Migration name within the namespace (e.g. `full_cell_schema`). */
465
+ name: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
466
+ /** Per-namespace apply order, starting at 0. */
467
+ sequence: import("@fuzdev/fuz_schema/schema.ts").PipeSchema<number, import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>>;
468
+ }>;
469
+ export type MigrationTrackerEntry = Infer<typeof MigrationTrackerEntry>;
141
470
  /**
142
471
  * The full `schema_version` tracker as a deterministically-ordered list,
143
472
  * wrapped in an object so it round-trips cleanly as a JSON-RPC result.
144
473
  * Sorted by `(namespace, sequence)` on capture.
145
474
  */
146
- export declare const MigrationTracker: z.ZodObject<{
147
- entries: z.ZodArray<z.ZodObject<{
148
- namespace: z.ZodString;
149
- name: z.ZodString;
150
- sequence: z.ZodNumber;
151
- }, z.core.$strip>>;
152
- }, z.core.$strip>;
153
- export type MigrationTracker = z.infer<typeof MigrationTracker>;
475
+ export declare const MigrationTracker: import("@fuzdev/fuz_schema/schema.ts").Schema<{
476
+ entries: {
477
+ name: string;
478
+ namespace: string;
479
+ sequence: number;
480
+ }[];
481
+ }, {
482
+ entries: {
483
+ name: string;
484
+ namespace: string;
485
+ sequence: number;
486
+ }[];
487
+ }, "strip_object", {
488
+ entries: import("@fuzdev/fuz_schema/schema.ts").Schema<{
489
+ name: string;
490
+ namespace: string;
491
+ sequence: number;
492
+ }[], {
493
+ name: string;
494
+ namespace: string;
495
+ sequence: number;
496
+ }[], "array", import("@fuzdev/fuz_schema/schema.ts").Schema<{
497
+ name: string;
498
+ namespace: string;
499
+ sequence: number;
500
+ }, {
501
+ name: string;
502
+ namespace: string;
503
+ sequence: number;
504
+ }, "strip_object", {
505
+ /** Migration namespace (e.g. `fuz_auth`, `fuz_cell`). */
506
+ namespace: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
507
+ /** Migration name within the namespace (e.g. `full_cell_schema`). */
508
+ name: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
509
+ /** Per-namespace apply order, starting at 0. */
510
+ sequence: import("@fuzdev/fuz_schema/schema.ts").PipeSchema<number, import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>>;
511
+ }>>;
512
+ }>;
513
+ export type MigrationTracker = Infer<typeof MigrationTracker>;
154
514
  /**
155
515
  * Read every `schema_version` row into a deterministic `MigrationTracker`.
156
516
  *
@@ -1 +1 @@
1
- {"version":3,"file":"schema_introspect.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/schema_introspect.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEtC;;;;;GAKG;AACH,eAAO,MAAM,cAAc;;;;;;iBAWzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,qCAAqC;AACrC,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;iBAOxB,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,qFAAqF;AACrF,eAAO,MAAM,gBAAgB;;iBAE3B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;iBAG3B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;iBAOzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB;;;;iBAOhC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E;;;;GAIG;AACH,eAAO,MAAM,gBA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