@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.
- package/dist/actions/CLAUDE.md +1 -1
- package/dist/actions/action_codegen.d.ts +9 -7
- package/dist/actions/action_codegen.d.ts.map +1 -1
- package/dist/actions/action_codegen.js +20 -15
- package/dist/actions/action_event_data.d.ts +16 -16
- package/dist/actions/heartbeat.d.ts +1 -1
- package/dist/auth/account_action_specs.d.ts +11 -11
- package/dist/auth/account_action_specs.js +1 -1
- package/dist/auth/account_route_schema.d.ts +18 -18
- package/dist/auth/account_route_schema.js +1 -1
- package/dist/auth/account_routes.js +1 -1
- package/dist/auth/account_schema.d.ts +38 -40
- package/dist/auth/account_schema.d.ts.map +1 -1
- package/dist/auth/account_schema.js +7 -8
- package/dist/auth/actor_lookup_action_specs.d.ts +7 -7
- package/dist/auth/actor_lookup_action_specs.js +1 -1
- package/dist/auth/actor_search_action_specs.d.ts +6 -6
- package/dist/auth/actor_search_action_specs.js +1 -1
- package/dist/auth/admin_action_specs.d.ts +166 -166
- package/dist/auth/admin_action_specs.js +1 -1
- package/dist/auth/app_settings_schema.d.ts +3 -3
- package/dist/auth/app_settings_schema.d.ts.map +1 -1
- package/dist/auth/app_settings_schema.js +1 -1
- package/dist/auth/audit_log_route_schema.d.ts +1 -1
- package/dist/auth/audit_log_route_schema.js +1 -1
- package/dist/auth/audit_log_schema.d.ts +61 -61
- package/dist/auth/audit_log_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_schema.js +1 -1
- package/dist/auth/bootstrap_route_schema.d.ts +4 -4
- package/dist/auth/bootstrap_route_schema.js +1 -1
- package/dist/auth/cell_action_specs.d.ts +424 -424
- package/dist/auth/cell_action_specs.js +1 -1
- package/dist/auth/cell_audit_action_specs.d.ts +14 -14
- package/dist/auth/cell_audit_action_specs.js +1 -1
- package/dist/auth/cell_audit_metadata.d.ts +8 -8
- package/dist/auth/cell_audit_metadata.js +1 -1
- package/dist/auth/cell_field_action_specs.d.ts +55 -55
- package/dist/auth/cell_field_action_specs.js +1 -1
- package/dist/auth/cell_field_audit_metadata.d.ts +4 -4
- package/dist/auth/cell_field_audit_metadata.js +1 -1
- package/dist/auth/cell_grant_action_specs.d.ts +61 -61
- package/dist/auth/cell_grant_action_specs.js +1 -1
- package/dist/auth/cell_grant_audit_metadata.d.ts +10 -10
- package/dist/auth/cell_grant_audit_metadata.js +1 -1
- package/dist/auth/cell_item_action_specs.d.ts +76 -76
- package/dist/auth/cell_item_action_specs.js +1 -1
- package/dist/auth/cell_item_audit_metadata.d.ts +5 -5
- package/dist/auth/cell_item_audit_metadata.js +1 -1
- package/dist/auth/invite_schema.d.ts +11 -11
- package/dist/auth/invite_schema.d.ts.map +1 -1
- package/dist/auth/invite_schema.js +1 -1
- package/dist/auth/name_schema.js +1 -1
- package/dist/auth/password.js +1 -1
- package/dist/auth/role_grant_offer_action_specs.d.ts +182 -182
- package/dist/auth/role_grant_offer_action_specs.js +1 -1
- package/dist/auth/role_grant_offer_notifications.d.ts +107 -107
- package/dist/auth/role_grant_offer_notifications.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_notifications.js +1 -1
- package/dist/auth/role_grant_offer_schema.d.ts +9 -9
- package/dist/auth/role_grant_offer_schema.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_schema.js +1 -1
- package/dist/auth/self_service_role_action_specs.d.ts +2 -2
- package/dist/auth/self_service_role_action_specs.js +1 -1
- package/dist/auth/signup_route_schema.d.ts +2 -2
- package/dist/auth/signup_route_schema.js +1 -1
- package/dist/auth/token_scope.d.ts +8 -8
- package/dist/db/file_fact_url.d.ts +1 -1
- package/dist/http/CLAUDE.md +7 -7
- package/dist/http/auth_shape.d.ts +15 -32
- package/dist/http/auth_shape.d.ts.map +1 -1
- package/dist/http/auth_shape.js +31 -38
- package/dist/http/db_routes.d.ts +1 -1
- package/dist/http/db_routes.d.ts.map +1 -1
- package/dist/http/db_routes.js +1 -1
- package/dist/http/error_schemas.d.ts +18 -18
- package/dist/http/jsonrpc.d.ts +11 -11
- package/dist/http/schema_helpers.d.ts +2 -2
- package/dist/http/schema_helpers.d.ts.map +1 -1
- package/dist/http/schema_helpers.js +8 -7
- package/dist/primitive_schemas.d.ts +173 -115
- package/dist/primitive_schemas.d.ts.map +1 -1
- package/dist/primitive_schemas.js +134 -158
- package/dist/schema_issues.d.ts +10 -7
- package/dist/schema_issues.d.ts.map +1 -1
- package/dist/schema_issues.js +38 -8
- package/dist/server/serve_fact_route.js +1 -1
- package/dist/server/surface_route.js +1 -1
- package/dist/testing/CLAUDE.md +3 -3
- package/dist/testing/cross_backend/conformance_case.d.ts +96 -114
- package/dist/testing/cross_backend/conformance_case.d.ts.map +1 -1
- package/dist/testing/cross_backend/conformance_case.js +0 -256
- package/dist/testing/cross_backend/fact_serving.js +1 -1
- package/dist/testing/cross_backend/setup.d.ts +1 -1
- package/dist/testing/cross_backend/setup.d.ts.map +1 -1
- package/dist/testing/cross_backend/setup.js +3 -4
- package/dist/testing/cross_backend/testing_origin_check.d.ts +8 -8
- package/dist/testing/cross_backend/testing_reset_actions.d.ts +608 -201
- package/dist/testing/cross_backend/testing_reset_actions.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_reset_actions.js +46 -55
- package/dist/testing/cross_backend/ws_outbound_overflow.d.ts.map +1 -1
- package/dist/testing/cross_backend/ws_outbound_overflow.js +35 -0
- package/dist/testing/rpc_helpers.d.ts +1 -1
- package/dist/testing/rpc_helpers.d.ts.map +1 -1
- package/dist/testing/rpc_helpers.js +0 -1
- package/dist/testing/schema_generators.js +1 -13
- package/dist/testing/schema_introspect.d.ts +438 -78
- package/dist/testing/schema_introspect.d.ts.map +1 -1
- package/dist/testing/schema_introspect.js +26 -26
- package/dist/testing/transports/bootstrap.d.ts +1 -1
- package/dist/testing/transports/bootstrap.d.ts.map +1 -1
- package/dist/testing/transports/bootstrap.js +1 -1
- package/dist/ui/BootstrapForm.svelte +1 -2
- package/dist/ui/BootstrapForm.svelte.d.ts.map +1 -1
- package/dist/ui/SignupForm.svelte +1 -2
- package/dist/ui/SignupForm.svelte.d.ts.map +1 -1
- package/dist/ui/admin_accounts_state.svelte.d.ts +5 -5
- package/dist/ui/admin_accounts_state.svelte.d.ts.map +1 -1
- package/dist/ui/admin_invites_state.svelte.d.ts +1 -1
- package/dist/ui/admin_invites_state.svelte.d.ts.map +1 -1
- package/dist/ui/admin_sessions_state.svelte.d.ts +2 -2
- package/dist/ui/admin_sessions_state.svelte.d.ts.map +1 -1
- package/dist/ui/role_grant_offers_state.svelte.d.ts +1 -1
- package/dist/zod.d.ts +18 -3
- package/dist/zod.d.ts.map +1 -1
- package/dist/zod.js +26 -3
- package/dist/zod_schemas.d.ts +100 -0
- package/dist/zod_schemas.d.ts.map +1 -0
- package/dist/zod_schemas.js +157 -0
- package/package.json +5 -5
- package/dist/primitive_schemas_fuz.d.ts +0 -178
- package/dist/primitive_schemas_fuz.d.ts.map +0 -1
- 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 {
|
|
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
|
|
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:
|
|
46
|
-
data_type:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
column_default:
|
|
50
|
-
is_identity:
|
|
51
|
-
},
|
|
52
|
-
|
|
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:
|
|
55
|
-
columns:
|
|
56
|
-
data_type:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
column_default:
|
|
60
|
-
is_identity:
|
|
61
|
-
}
|
|
62
|
-
indexes:
|
|
63
|
-
name:
|
|
64
|
-
definition:
|
|
65
|
-
}
|
|
66
|
-
constraints:
|
|
67
|
-
name:
|
|
68
|
-
type:
|
|
69
|
-
definition:
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
|
|
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:
|
|
75
|
-
data_type:
|
|
76
|
-
},
|
|
77
|
-
|
|
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:
|
|
85
|
-
labels:
|
|
86
|
-
},
|
|
87
|
-
|
|
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:
|
|
98
|
-
tables:
|
|
99
|
-
columns:
|
|
100
|
-
data_type:
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
column_default:
|
|
104
|
-
is_identity:
|
|
105
|
-
}
|
|
106
|
-
indexes:
|
|
107
|
-
name:
|
|
108
|
-
definition:
|
|
109
|
-
}
|
|
110
|
-
constraints:
|
|
111
|
-
name:
|
|
112
|
-
type:
|
|
113
|
-
definition:
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
sequences:
|
|
117
|
-
data_type:
|
|
118
|
-
}
|
|
119
|
-
enums:
|
|
120
|
-
labels:
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
|
|
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:
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
sequence:
|
|
139
|
-
},
|
|
140
|
-
|
|
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:
|
|
147
|
-
entries:
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
sequence:
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
|
|
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,
|
|
1
|
+
{"version":3,"file":"schema_introspect.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/schema_introspect.ts"],"names":[],"mappings":"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"}
|