@pgxsinkit/contracts 0.2.7 → 0.3.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.
@@ -0,0 +1,84 @@
1
+ /**
2
+ * The change envelope carried on every Circuits table and shape stream.
3
+ *
4
+ * Restated rather than imported from `@electric-circuits/protocol`, for the reasons given on
5
+ * {@link Predicate}: this is the wire contract pgxsinkit commits to, the protocol package is alpha,
6
+ * and a published library should not put an alpha peer in its public types. The engine's serde
7
+ * definitions are authoritative; any divergence is a bug here.
8
+ */
9
+ /** A scalar cell value on the wire. */
10
+ export type StreamValue = string | number | boolean | null;
11
+ /** A row is a flat map of column name to value. */
12
+ export type StreamRow = Record<string, StreamValue>;
13
+ /**
14
+ * The engine's **complete** shape-stream vocabulary — two verbs, not four.
15
+ *
16
+ * `insert`/`update` are the *input* side: what the replication ingestor parses out of Postgres. They
17
+ * never reach a shape stream. Every row the engine emits goes out as `upsert` (`output.rs`
18
+ * `translate_output`/`agg_envelope`) and every eviction as key-only `delete`
19
+ * (`translate_output`/`delete_envelopes`) — the engine states the row's new value rather than
20
+ * claiming anything about what preceded it, because a shape row can enter a subscriber's view for
21
+ * reasons that are not a Postgres INSERT (a subquery flip, a scope grant, a backfill replay).
22
+ *
23
+ * Listing the input verbs here as if they might arrive is what produced a dead `"update"` branch in
24
+ * the translator and a comment asserting `upsert` was backfill-only. Both were wrong.
25
+ */
26
+ export type StreamOperation = "upsert" | "delete";
27
+ export interface StreamEnvelope {
28
+ /** The table name — the collection discriminator. */
29
+ type: string;
30
+ /** The stringified primary key. Composite keys are already joined by the engine. */
31
+ key: string;
32
+ /** Present for insert/update/upsert; **absent for delete**, which is key-only. */
33
+ value?: StreamRow;
34
+ headers: {
35
+ operation: StreamOperation;
36
+ txid?: string;
37
+ /** Stamped by the durable-streams server on read; never sent by a producer. */
38
+ offset?: string;
39
+ /**
40
+ * Postgres commit LSN (`"HI/LO"` hex), stamped by the engine on **live** shape envelopes.
41
+ *
42
+ * **Absent on backfill rows**, and absent in library (no-Postgres) mode. That absence is why
43
+ * ADR-0056 floors catch-up on the stream OFFSET rather than on this: a frontier that only some
44
+ * envelopes can advance is not a frontier.
45
+ */
46
+ lsn?: string;
47
+ /**
48
+ * Position of the change within its transaction, stamped by the replication ingestor on
49
+ * **table**-stream envelopes so the engine's own tailer can skip at-least-once duplicates.
50
+ * **Not present on shape streams**, which is what we read — recorded so nobody builds
51
+ * deduplication on a field that will never arrive.
52
+ */
53
+ seq?: number;
54
+ };
55
+ }
56
+ /** A delete envelope carries no row body, so an eviction discloses nothing but the key. */
57
+ export declare function isDeleteEnvelope(envelope: StreamEnvelope): boolean;
58
+ /**
59
+ * One change as the APPLIER consumes it, after an envelope has been resolved against its table.
60
+ *
61
+ * Distinct from {@link StreamEnvelope} on purpose. An envelope is the wire form — key-only on a
62
+ * delete, headers carrying transport metadata. This is what the apply path needs instead: a value
63
+ * that is always present (a delete's is its reconstructed primary key), and the transport metadata
64
+ * dropped.
65
+ *
66
+ * The operation set is {@link StreamOperation}'s, unchanged. The applier used to narrow the wire's
67
+ * four verbs down to three DML verbs; there are only two verbs to carry now, and inventing a DML
68
+ * distinction the engine never made is what the translator got wrong.
69
+ *
70
+ * `value` is `Record<string, unknown>` rather than {@link StreamRow} because the applier handles
71
+ * values the wire never carries — a `bigint` id kept as a string for precision, a JSON column
72
+ * arriving as a parsed object — and narrowing here would only push casts into the codecs.
73
+ */
74
+ export type SyncRow = Record<string, unknown>;
75
+ export type SyncOperation = StreamOperation;
76
+ export interface SyncChange<T extends SyncRow = SyncRow> {
77
+ /** The stringified primary key, as the stream named it. */
78
+ key: string;
79
+ value: T;
80
+ headers: {
81
+ operation: SyncOperation;
82
+ } & Record<string, unknown>;
83
+ }
84
+ //# sourceMappingURL=stream-envelope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stream-envelope.d.ts","sourceRoot":"","sources":["../src/stream-envelope.ts"],"names":[],"mappings":"AAAA;;;;;;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zle-orm";
2
2
  import { type AnyPgTable, type PgRole } from "drizzle-orm/pg-core";
3
3
  import { type JwtClaims } from "./config";
4
+ import { type Predicate } from "./predicate";
4
5
  export type SupabaseOwnerOrAdminPredicateOptions = {
5
6
  ownerSqlColumn?: string;
6
7
  adminRoleName?: string;
@@ -18,7 +19,7 @@ export type SupabaseOwnerOrAdminNativePoliciesOptions = {
18
19
  subjectCastType?: string;
19
20
  /**
20
21
  * Path to the roles array in the claims. Defaults to {@link adminRolesClaimPath}; pass the SAME value to
21
- * {@link resolveOwnerOrAdminAccess} / {@link buildOwnerOrAdminShapeWhere} so both surfaces read one claim.
22
+ * {@link resolveOwnerOrAdminAccess} / {@link buildOwnerOrAdminShapePredicate} so both surfaces read one claim.
22
23
  */
23
24
  adminRolesClaimPath?: readonly string[];
24
25
  };
@@ -66,14 +67,11 @@ export type OwnerOrAdminAccess = {
66
67
  */
67
68
  export declare function resolveOwnerOrAdminAccess(claims: JwtClaims | null, options?: OwnerOrAdminAccessOptions): OwnerOrAdminAccess;
68
69
  /**
69
- * The Electric shape `where` for an owner-or-admin table — the read counterpart of
70
- * {@link buildSupabaseOwnerOrAdminNativePolicies}, built from the same owner column. An admin gets
71
- * `null` (no filter, every row — the policy's bypass branch); anyone else gets
72
- * {@link buildOwnershipShapeWhere}, i.e. their own rows, or the {@link DENY_ALL} sentinel when there is
73
- * no subject. Returning the sentinel *by reference* is what lets a `customWhere` built on this probe as
74
- * claims-dependent (`isClaimsDependentRowFilter`).
70
+ * The owner-or-admin **predicate** — the native-path counterpart to
71
+ * the owner-or-admin `select` policy, from the same declaration. An admin gets `null` (no filter,
72
+ * every row — the policy's bypass branch); anyone else gets {@link buildOwnershipShapePredicate}.
75
73
  */
76
- export declare function buildOwnerOrAdminShapeWhere(ownerColumn: AnyColumn, claims: JwtClaims | null, options?: OwnerOrAdminAccessOptions): SQL | null;
74
+ export declare function buildOwnerOrAdminShapePredicate(ownerColumn: AnyColumn, claims: JwtClaims | null, options?: OwnerOrAdminAccessOptions): Predicate | null;
77
75
  export type SupabaseMembershipPredicateColumns = {
78
76
  /** Column on the governed row naming its container (e.g. `workItems.workspaceId`). */
79
77
  containerColumn: AnyColumn;
@@ -109,30 +107,28 @@ export type SupabaseMembershipNativePoliciesOptions = SupabaseMembershipPredicat
109
107
  };
110
108
  export declare function buildSupabaseMembershipNativePolicies(options: SupabaseMembershipNativePoliciesOptions): import("drizzle-orm/pg-core").PgPolicy[];
111
109
  /**
112
- * The columns {@link buildMembershipShapeWhere} needs: the SELECT-relevant subset of
110
+ * The columns {@link buildMembershipShapePredicate} needs: the SELECT-relevant subset of
113
111
  * {@link SupabaseMembershipPredicateColumns}. The write-only fields (owner, manager role, subject cast,
114
112
  * write gate, policy role) are accepted but ignored, so the **same declaration object** you hand to
115
113
  * {@link buildSupabaseMembershipNativePolicies} can be handed to the read mirror verbatim.
116
114
  */
117
115
  export type SupabaseMembershipShapeColumns = Pick<SupabaseMembershipPredicateColumns, "containerColumn" | "membershipTable" | "membershipContainerColumn" | "membershipSubjectColumn"> & Partial<SupabaseMembershipNativePoliciesOptions>;
118
116
  /**
119
- * The Electric shape `where` for a membership-scoped table — the read counterpart of the `select`
120
- * policy in {@link buildSupabaseMembershipNativePolicies}: the row's container must be one the caller
121
- * is a member of. Columns are referenced **bare** via {@link c} (Electric's grammar requires plain
122
- * column refs) yet still through the real Drizzle column objects, so the reference is rename-safe; the
123
- * subject rides as a typed interpolation and becomes a bound param once `buildRowFilterShape`
124
- * serializes it (never a hand-escaped literal). The subquery is **self-contained** (uncorrelated) — it
125
- * gets its own `FROM`, so the membership table's bare column names resolve to it.
117
+ * The membership **predicate** — the read-path mirror of the membership `select` policy, from the
118
+ * same column declarations.
126
119
  *
127
- * No subject → {@link DENY_ALL} (by reference, so a `customWhere` built on it probes claims-dependent),
128
- * mirroring the policy, whose membership subquery matches nothing without a JWT sub.
120
+ * The containment becomes a first-class {@link InSubqueryPredicate} rather than SQL text, which buys
121
+ * something the text form could not: the engine maintains the inner set incrementally and **shares it
122
+ * across every shape referencing the same subquery**, so an entitlement-shaped membership costs one
123
+ * index rather than one per shape. The subquery is uncorrelated, as the engine requires — the inner
124
+ * `where` reads the membership table's own columns only.
129
125
  */
130
- export declare function buildMembershipShapeWhere(columns: SupabaseMembershipShapeColumns, claims: JwtClaims | null): SQL;
126
+ export declare function buildMembershipShapePredicate(columns: SupabaseMembershipShapeColumns, claims: JwtClaims | null): Predicate;
131
127
  /**
132
128
  * An unconditional bypass declaration: any grant whose `role` ∈ `roleValues` and whose `scope.kind` =
133
129
  * `scopeKind` (default `"platform"`) confers access to every row — e.g. a platform-scoped
134
130
  * `platform_admin`. Hand the SAME object to the policy builder and to
135
- * {@link resolveGrantScopeAccess} / {@link buildGrantScopeAccessShapeWhere}.
131
+ * {@link resolveGrantScopeAccess} / {@link buildGrantScopeAccessShapePredicate}.
136
132
  */
137
133
  export type GrantScopeBypassOptions = {
138
134
  roleValues: string[];
@@ -158,7 +154,7 @@ export type SupabaseGrantScopePredicateColumns = GrantScopeClaimOptions & {
158
154
  * `bypass.roleValues` and whose `scope.kind` = `bypass.scopeKind` (default "platform") grants all
159
155
  * rows — e.g. a platform-scoped `platform_admin`. The bypass is an **uncorrelated** EXISTS, so it
160
156
  * stays InitPlan-hoisted in both the correct and naive forms. Its read-path twin is
161
- * {@link buildGrantScopeAccessShapeWhere} (bypass → `null`, i.e. no shape filter at all).
157
+ * {@link buildGrantScopeAccessShapePredicate} (bypass → `null`, i.e. no shape filter at all).
162
158
  */
163
159
  bypass?: GrantScopeBypassOptions;
164
160
  };
@@ -179,13 +175,15 @@ export declare function buildSupabaseGrantScopeNativePolicies(options: SupabaseG
179
175
  */
180
176
  export declare function resolveGrantScopeIds(claims: JwtClaims | null, options: GrantScopeClaimOptions): string[];
181
177
  /**
182
- * The Electric shape `where` for a grant-scope table: an `IN (…)` over the resolved ids (what the
183
- * proxy injects). Takes the real Drizzle scope column — referenced bare via `c()` (Electric's grammar
184
- * requires bare columns), so the reference is rename-safe — and returns a typed fragment whose ids
185
- * are **bound params** once `buildRowFilterShape` serializes it (never hand-escaped literals). An
186
- * empty id set denies all rows ({@link DENY_ALL}), mirroring the policy returning no rows.
178
+ * The grant-scope **predicate** — the read-path mirror of the grant-scope `select` policy.
179
+ * An empty id set denies all rows ({@link DENY_ALL_PREDICATE}), mirroring the policy returning no rows.
180
+ *
181
+ * An `OR` of equalities, not an `IN`: the engine's `In` leaf takes a *subquery*, and a grant set lives
182
+ * in the JWT rather than in a table, so there is nothing to select from. This is not a workaround —
183
+ * `OR(=v…)` is exactly what the engine's own SQL parser desugars `IN (list)` to, so the two forms
184
+ * compile to the same nodes.
187
185
  */
188
- export declare function buildGrantScopeShapeWhere(scopeColumn: AnyColumn, ids: string[]): SQL;
186
+ export declare function buildGrantScopeShapePredicate(scopeColumn: AnyColumn, ids: string[]): Predicate;
189
187
  /** The full grant-scope declaration the read mirror needs: the claim options plus the optional bypass. */
190
188
  export type GrantScopeAccessOptions = GrantScopeClaimOptions & {
191
189
  /** The same {@link GrantScopeBypassOptions} handed to {@link buildSupabaseGrantScopeNativePolicies}. */
@@ -205,17 +203,15 @@ export type GrantScopeAccess = {
205
203
  * options object you gave {@link buildSupabaseGrantScopeNativePolicies} and a bypass grant cannot be
206
204
  * enforced on writes yet invisible on reads.
207
205
  *
208
- * Never throws on malformed claims (they reach a `customWhere` unverified in shape) — a wrong shape
206
+ * Never throws on malformed claims (they reach a `customPredicate` unverified in shape) — a wrong shape
209
207
  * simply confers nothing. A malformed `grantsClaimPath`/`scopeIdField` **option** is still a loud error.
210
208
  */
211
209
  export declare function resolveGrantScopeAccess(claims: JwtClaims | null, options: GrantScopeAccessOptions): GrantScopeAccess;
212
210
  /**
213
- * The Electric shape `where` for a grant-scope table, bypass included — the read counterpart of the
214
- * `select` policy in {@link buildSupabaseGrantScopeNativePolicies}, from the same declaration. A caller
215
- * holding a bypass grant gets `null` (no filter, every row — the policy's OR branch); anyone else gets
216
- * {@link buildGrantScopeShapeWhere} over their resolved ids, i.e. the {@link DENY_ALL} sentinel *by
217
- * reference* when the set is empty (which is what lets a `customWhere` built on this probe as
218
- * claims-dependent). Use {@link buildGrantScopeShapeWhere} directly only when there is no bypass to mirror.
211
+ * The grant-scope **predicate**, bypass included — the native-path counterpart to
212
+ * the grant-scope `select` policy, from the same declaration. A caller holding a bypass grant
213
+ * gets `null` (no filter, every row); anyone else gets {@link buildGrantScopeShapePredicate} over
214
+ * their resolved ids.
219
215
  */
220
- export declare function buildGrantScopeAccessShapeWhere(scopeColumn: AnyColumn, claims: JwtClaims | null, options: GrantScopeAccessOptions): SQL | null;
216
+ export declare function buildGrantScopeAccessShapePredicate(scopeColumn: AnyColumn, claims: JwtClaims | null, options: GrantScopeAccessOptions): Predicate | null;
221
217
  //# sourceMappingURL=supabase-rls.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"supabase-rls.d.ts","sourceRoot":"","sources":["../src/supabase-rls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,EAAuB,KAAK,UAAU,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAExF,OAAO,EAAyC,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AA4CjF,MAAM,MAAM,oCAAoC,GAAG;IACjD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sFAAsF;IACtF,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,yCAAyC,GAAG;IACtD,6GAA6G;IAC7G,WAAW,EAAE,SAAS,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,sFAAsF;IACtF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,8EAA8E;IAC9E,eAAe,CAAC,EAAE,MAAM,CAA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