@gonvex/protocol 0.5.2-staging.13 → 0.5.2-staging.15

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 (2) hide show
  1. package/dist/index.d.ts +23 -1
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -149,13 +149,19 @@ export type LiveQueryPlan = {
149
149
  };
150
150
  export type FilterOperator = "contains" | "notContains" | "equals" | "notEquals" | "startsWith" | "endsWith" | "empty" | "notEmpty" | "oneOf" | "lessThan" | "lessThanOrEqual" | "greaterThan" | "greaterThanOrEqual" | "inRange";
151
151
  export type LiveExpression = {
152
- operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "contains" | "containsInsensitive" | "range" | "and" | "or" | "not" | "server";
152
+ operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "contains" | "containsInsensitive" | "range" | "and" | "or" | "not" | "server" | "inRelation" | "arrayContains";
153
153
  column?: string;
154
154
  value?: LiveValue;
155
155
  valueTo?: LiveValue;
156
156
  children?: LiveExpression[];
157
+ relation?: {
158
+ table: string;
159
+ column: string;
160
+ where?: LiveExpression;
161
+ };
157
162
  };
158
163
  export type LiveValue = {
164
+ context?: "account.id" | "member.id" | "tenant.id";
159
165
  argument?: string;
160
166
  literal?: JsonValue;
161
167
  };
@@ -386,6 +392,18 @@ export type ClientMessage = {
386
392
  trace?: MessageTrace;
387
393
  device?: BrowserTelemetryInfo;
388
394
  };
395
+ /**
396
+ * Machine-readable disposition of a failed Reducer call.
397
+ *
398
+ * - `rejected`: the Reducer refused the intent (application throw, validation,
399
+ * permission, conflict). Retrying the same call cannot succeed.
400
+ * - `transient`: infrastructure failed and the transaction rolled back. The
401
+ * same idempotency key may be retried.
402
+ * - `update_required`: the client's Reducer artifact or contract is stale.
403
+ * - `unauthenticated`: the connection has no usable tenant session. Keep the
404
+ * intent, re-authenticate, and retry.
405
+ */
406
+ export type ReducerErrorClass = "rejected" | "transient" | "update_required" | "unauthenticated";
389
407
  export type ServerMessage = {
390
408
  type: "query.batch";
391
409
  messages: ServerMessage[];
@@ -580,6 +598,10 @@ export type ServerMessage = {
580
598
  path?: string;
581
599
  error: string;
582
600
  trace?: MessageTrace;
601
+ /** Absent from runtimes before 0.5.2-staging.15; treat absence as a legacy rejection. */
602
+ class?: ReducerErrorClass;
603
+ /** True when the same call (same idempotency key) may succeed later. */
604
+ retryable?: boolean;
583
605
  } | {
584
606
  type: "action.result";
585
607
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gonvex/protocol",
3
- "version": "0.5.2-staging.13",
3
+ "version": "0.5.2-staging.15",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"