@cipherstash/protect-ffi 0.27.0 → 0.29.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/LICENSE.md +1 -1
- package/README.md +106 -34
- package/dist/wasm/protect_ffi.d.ts +10 -3
- package/dist/wasm/protect_ffi_bg.js +63 -14
- package/dist/wasm/protect_ffi_bg.wasm +0 -0
- package/dist/wasm/protect_ffi_bg.wasm.d.ts +11 -11
- package/dist/wasm/protect_ffi_inline.js +1 -1
- package/lib/bigintWire.d.ts +56 -0
- package/lib/bigintWire.js +83 -0
- package/lib/eql-v3-types/Bigint.d.ts +1 -1
- package/lib/eql-v3-types/BigintEq.d.ts +1 -1
- package/lib/eql-v3-types/BigintEqQuery.d.ts +13 -0
- package/lib/eql-v3-types/BigintEqQuery.js +2 -0
- package/lib/eql-v3-types/BigintOrd.d.ts +4 -4
- package/lib/eql-v3-types/BigintOrdOpe.d.ts +1 -1
- package/lib/eql-v3-types/BigintOrdOpeQuery.d.ts +13 -0
- package/lib/eql-v3-types/BigintOrdOpeQuery.js +2 -0
- package/lib/eql-v3-types/BigintOrdOre.d.ts +1 -1
- package/lib/eql-v3-types/BigintOrdOreQuery.d.ts +13 -0
- package/lib/eql-v3-types/BigintOrdOreQuery.js +2 -0
- package/lib/eql-v3-types/BigintOrdQuery.d.ts +13 -0
- package/lib/eql-v3-types/BigintOrdQuery.js +2 -0
- package/lib/eql-v3-types/Boolean.d.ts +1 -1
- package/lib/eql-v3-types/Date.d.ts +1 -1
- package/lib/eql-v3-types/DateEq.d.ts +1 -1
- package/lib/eql-v3-types/DateEqQuery.d.ts +13 -0
- package/lib/eql-v3-types/DateEqQuery.js +2 -0
- package/lib/eql-v3-types/DateOrd.d.ts +4 -4
- package/lib/eql-v3-types/DateOrdOpe.d.ts +1 -1
- package/lib/eql-v3-types/DateOrdOpeQuery.d.ts +13 -0
- package/lib/eql-v3-types/DateOrdOpeQuery.js +2 -0
- package/lib/eql-v3-types/DateOrdOre.d.ts +1 -1
- package/lib/eql-v3-types/DateOrdOreQuery.d.ts +13 -0
- package/lib/eql-v3-types/DateOrdOreQuery.js +2 -0
- package/lib/eql-v3-types/DateOrdQuery.d.ts +13 -0
- package/lib/eql-v3-types/DateOrdQuery.js +2 -0
- package/lib/eql-v3-types/Double.d.ts +1 -1
- package/lib/eql-v3-types/DoubleEq.d.ts +1 -1
- package/lib/eql-v3-types/DoubleEqQuery.d.ts +13 -0
- package/lib/eql-v3-types/DoubleEqQuery.js +2 -0
- package/lib/eql-v3-types/DoubleOrd.d.ts +4 -4
- package/lib/eql-v3-types/DoubleOrdOpe.d.ts +1 -1
- package/lib/eql-v3-types/DoubleOrdOpeQuery.d.ts +13 -0
- package/lib/eql-v3-types/DoubleOrdOpeQuery.js +2 -0
- package/lib/eql-v3-types/DoubleOrdOre.d.ts +1 -1
- package/lib/eql-v3-types/DoubleOrdOreQuery.d.ts +13 -0
- package/lib/eql-v3-types/DoubleOrdOreQuery.js +2 -0
- package/lib/eql-v3-types/DoubleOrdQuery.d.ts +13 -0
- package/lib/eql-v3-types/DoubleOrdQuery.js +2 -0
- package/lib/eql-v3-types/Integer.d.ts +1 -1
- package/lib/eql-v3-types/IntegerEq.d.ts +1 -1
- package/lib/eql-v3-types/IntegerEqQuery.d.ts +13 -0
- package/lib/eql-v3-types/IntegerEqQuery.js +2 -0
- package/lib/eql-v3-types/IntegerOrd.d.ts +4 -4
- package/lib/eql-v3-types/IntegerOrdOpe.d.ts +1 -1
- package/lib/eql-v3-types/IntegerOrdOpeQuery.d.ts +13 -0
- package/lib/eql-v3-types/IntegerOrdOpeQuery.js +2 -0
- package/lib/eql-v3-types/IntegerOrdOre.d.ts +1 -1
- package/lib/eql-v3-types/IntegerOrdOreQuery.d.ts +13 -0
- package/lib/eql-v3-types/IntegerOrdOreQuery.js +2 -0
- package/lib/eql-v3-types/IntegerOrdQuery.d.ts +13 -0
- package/lib/eql-v3-types/IntegerOrdQuery.js +2 -0
- package/lib/eql-v3-types/Numeric.d.ts +1 -1
- package/lib/eql-v3-types/NumericEq.d.ts +1 -1
- package/lib/eql-v3-types/NumericEqQuery.d.ts +13 -0
- package/lib/eql-v3-types/NumericEqQuery.js +2 -0
- package/lib/eql-v3-types/NumericOrd.d.ts +4 -4
- package/lib/eql-v3-types/NumericOrdOpe.d.ts +1 -1
- package/lib/eql-v3-types/NumericOrdOpeQuery.d.ts +13 -0
- package/lib/eql-v3-types/NumericOrdOpeQuery.js +2 -0
- package/lib/eql-v3-types/NumericOrdOre.d.ts +1 -1
- package/lib/eql-v3-types/NumericOrdOreQuery.d.ts +13 -0
- package/lib/eql-v3-types/NumericOrdOreQuery.js +2 -0
- package/lib/eql-v3-types/NumericOrdQuery.d.ts +13 -0
- package/lib/eql-v3-types/NumericOrdQuery.js +2 -0
- package/lib/eql-v3-types/OpeCllw.d.ts +9 -6
- package/lib/eql-v3-types/OreBlock256.d.ts +4 -4
- package/lib/eql-v3-types/Real.d.ts +1 -1
- package/lib/eql-v3-types/RealEq.d.ts +1 -1
- package/lib/eql-v3-types/RealEqQuery.d.ts +13 -0
- package/lib/eql-v3-types/RealEqQuery.js +2 -0
- package/lib/eql-v3-types/RealOrd.d.ts +4 -4
- package/lib/eql-v3-types/RealOrdOpe.d.ts +1 -1
- package/lib/eql-v3-types/RealOrdOpeQuery.d.ts +13 -0
- package/lib/eql-v3-types/RealOrdOpeQuery.js +2 -0
- package/lib/eql-v3-types/RealOrdOre.d.ts +1 -1
- package/lib/eql-v3-types/RealOrdOreQuery.d.ts +13 -0
- package/lib/eql-v3-types/RealOrdOreQuery.js +2 -0
- package/lib/eql-v3-types/RealOrdQuery.d.ts +13 -0
- package/lib/eql-v3-types/RealOrdQuery.js +2 -0
- package/lib/eql-v3-types/Selector.d.ts +1 -1
- package/lib/eql-v3-types/Smallint.d.ts +1 -1
- package/lib/eql-v3-types/SmallintEq.d.ts +1 -1
- package/lib/eql-v3-types/SmallintEqQuery.d.ts +13 -0
- package/lib/eql-v3-types/SmallintEqQuery.js +2 -0
- package/lib/eql-v3-types/SmallintOrd.d.ts +4 -4
- package/lib/eql-v3-types/SmallintOrdOpe.d.ts +1 -1
- package/lib/eql-v3-types/SmallintOrdOpeQuery.d.ts +13 -0
- package/lib/eql-v3-types/SmallintOrdOpeQuery.js +2 -0
- package/lib/eql-v3-types/SmallintOrdOre.d.ts +1 -1
- package/lib/eql-v3-types/SmallintOrdOreQuery.d.ts +13 -0
- package/lib/eql-v3-types/SmallintOrdOreQuery.js +2 -0
- package/lib/eql-v3-types/SmallintOrdQuery.d.ts +13 -0
- package/lib/eql-v3-types/SmallintOrdQuery.js +2 -0
- package/lib/eql-v3-types/SteVecDocument.d.ts +1 -1
- package/lib/eql-v3-types/SteVecEntry.d.ts +4 -4
- package/lib/eql-v3-types/SteVecQuery.d.ts +1 -1
- package/lib/eql-v3-types/SteVecQueryEntry.d.ts +2 -2
- package/lib/eql-v3-types/SteVecTerm.d.ts +4 -4
- package/lib/eql-v3-types/Text.d.ts +1 -1
- package/lib/eql-v3-types/TextEq.d.ts +1 -1
- package/lib/eql-v3-types/TextEqQuery.d.ts +13 -0
- package/lib/eql-v3-types/TextEqQuery.js +2 -0
- package/lib/eql-v3-types/TextMatch.d.ts +1 -1
- package/lib/eql-v3-types/TextMatchQuery.d.ts +13 -0
- package/lib/eql-v3-types/TextMatchQuery.js +2 -0
- package/lib/eql-v3-types/TextOrd.d.ts +4 -4
- package/lib/eql-v3-types/TextOrdOpe.d.ts +1 -1
- package/lib/eql-v3-types/TextOrdOpeQuery.d.ts +15 -0
- package/lib/eql-v3-types/TextOrdOpeQuery.js +2 -0
- package/lib/eql-v3-types/TextOrdOre.d.ts +1 -1
- package/lib/eql-v3-types/TextOrdOreQuery.d.ts +15 -0
- package/lib/eql-v3-types/TextOrdOreQuery.js +2 -0
- package/lib/eql-v3-types/TextOrdQuery.d.ts +15 -0
- package/lib/eql-v3-types/TextOrdQuery.js +2 -0
- package/lib/eql-v3-types/TextSearch.d.ts +4 -4
- package/lib/eql-v3-types/TextSearchOre.d.ts +19 -0
- package/lib/eql-v3-types/TextSearchOre.js +2 -0
- package/lib/eql-v3-types/TextSearchOreQuery.d.ts +17 -0
- package/lib/eql-v3-types/TextSearchOreQuery.js +2 -0
- package/lib/eql-v3-types/TextSearchQuery.d.ts +17 -0
- package/lib/eql-v3-types/TextSearchQuery.js +2 -0
- package/lib/eql-v3-types/Timestamp.d.ts +1 -1
- package/lib/eql-v3-types/TimestampEq.d.ts +1 -1
- package/lib/eql-v3-types/TimestampEqQuery.d.ts +13 -0
- package/lib/eql-v3-types/TimestampEqQuery.js +2 -0
- package/lib/eql-v3-types/TimestampOrd.d.ts +4 -4
- package/lib/eql-v3-types/TimestampOrdOpe.d.ts +1 -1
- package/lib/eql-v3-types/TimestampOrdOpeQuery.d.ts +13 -0
- package/lib/eql-v3-types/TimestampOrdOpeQuery.js +2 -0
- package/lib/eql-v3-types/TimestampOrdOre.d.ts +1 -1
- package/lib/eql-v3-types/TimestampOrdOreQuery.d.ts +13 -0
- package/lib/eql-v3-types/TimestampOrdOreQuery.js +2 -0
- package/lib/eql-v3-types/TimestampOrdQuery.d.ts +13 -0
- package/lib/eql-v3-types/TimestampOrdQuery.js +2 -0
- package/lib/eql-v3.d.ts +63 -7
- package/lib/errors.d.ts +1 -1
- package/lib/errors.js +0 -4
- package/lib/index.cjs +23 -11
- package/lib/index.d.cts +91 -25
- package/lib/normalizeEncryptConfig.d.ts +2 -1
- package/lib/normalizeEncryptConfig.js +2 -1
- package/package.json +11 -11
- package/lib/eql-v3-types/OreCllw.d.ts +0 -7
- package/lib/eql-v3-types/OreCllw.js +0 -5
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Identifier } from "./Identifier";
|
|
2
|
+
import type { OpeCllw } from "./OpeCllw";
|
|
3
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
|
+
/**
|
|
5
|
+
* `eql_v3.query_integer_ord_ope` — ordering domain query operand.
|
|
6
|
+
*
|
|
7
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`.
|
|
8
|
+
*/
|
|
9
|
+
export type IntegerOrdOpeQuery = {
|
|
10
|
+
v: SchemaVersion;
|
|
11
|
+
i: Identifier;
|
|
12
|
+
op: OpeCllw;
|
|
13
|
+
};
|
|
@@ -3,7 +3,7 @@ import type { Identifier } from "./Identifier";
|
|
|
3
3
|
import type { OreBlock256 } from "./OreBlock256";
|
|
4
4
|
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
5
|
/**
|
|
6
|
-
* `
|
|
6
|
+
* `public.eql_v3_integer_ord_ore` — ordering domain.
|
|
7
7
|
*
|
|
8
8
|
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.
|
|
9
9
|
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Identifier } from "./Identifier";
|
|
2
|
+
import type { OreBlock256 } from "./OreBlock256";
|
|
3
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
|
+
/**
|
|
5
|
+
* `eql_v3.query_integer_ord_ore` — ordering domain query operand.
|
|
6
|
+
*
|
|
7
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`.
|
|
8
|
+
*/
|
|
9
|
+
export type IntegerOrdOreQuery = {
|
|
10
|
+
v: SchemaVersion;
|
|
11
|
+
i: Identifier;
|
|
12
|
+
ob: OreBlock256;
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Identifier } from "./Identifier";
|
|
2
|
+
import type { OpeCllw } from "./OpeCllw";
|
|
3
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
|
+
/**
|
|
5
|
+
* `eql_v3.query_integer_ord` — ordering domain query operand.
|
|
6
|
+
*
|
|
7
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`.
|
|
8
|
+
*/
|
|
9
|
+
export type IntegerOrdQuery = {
|
|
10
|
+
v: SchemaVersion;
|
|
11
|
+
i: Identifier;
|
|
12
|
+
op: OpeCllw;
|
|
13
|
+
};
|
|
@@ -2,7 +2,7 @@ import type { Ciphertext } from "./Ciphertext";
|
|
|
2
2
|
import type { Identifier } from "./Identifier";
|
|
3
3
|
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
4
|
/**
|
|
5
|
-
* `
|
|
5
|
+
* `public.eql_v3_numeric` — storage-only domain.
|
|
6
6
|
*
|
|
7
7
|
* Operators: none. Required keys: `v` `i` `c`.
|
|
8
8
|
*/
|
|
@@ -3,7 +3,7 @@ import type { Hmac256 } from "./Hmac256";
|
|
|
3
3
|
import type { Identifier } from "./Identifier";
|
|
4
4
|
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
5
|
/**
|
|
6
|
-
* `
|
|
6
|
+
* `public.eql_v3_numeric_eq` — equality domain.
|
|
7
7
|
*
|
|
8
8
|
* Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`.
|
|
9
9
|
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Hmac256 } from "./Hmac256";
|
|
2
|
+
import type { Identifier } from "./Identifier";
|
|
3
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
|
+
/**
|
|
5
|
+
* `eql_v3.query_numeric_eq` — equality domain query operand.
|
|
6
|
+
*
|
|
7
|
+
* Operators: `=` `<>`. Required keys: `v` `i` `hm`.
|
|
8
|
+
*/
|
|
9
|
+
export type NumericEqQuery = {
|
|
10
|
+
v: SchemaVersion;
|
|
11
|
+
i: Identifier;
|
|
12
|
+
hm: Hmac256;
|
|
13
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { Ciphertext } from "./Ciphertext";
|
|
2
2
|
import type { Identifier } from "./Identifier";
|
|
3
|
-
import type {
|
|
3
|
+
import type { OpeCllw } from "./OpeCllw";
|
|
4
4
|
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
5
|
/**
|
|
6
|
-
* `
|
|
6
|
+
* `public.eql_v3_numeric_ord` — ordering domain.
|
|
7
7
|
*
|
|
8
|
-
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `
|
|
8
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`.
|
|
9
9
|
*/
|
|
10
10
|
export type NumericOrd = {
|
|
11
11
|
v: SchemaVersion;
|
|
12
12
|
i: Identifier;
|
|
13
13
|
c: Ciphertext;
|
|
14
|
-
|
|
14
|
+
op: OpeCllw;
|
|
15
15
|
};
|
|
@@ -3,7 +3,7 @@ import type { Identifier } from "./Identifier";
|
|
|
3
3
|
import type { OpeCllw } from "./OpeCllw";
|
|
4
4
|
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
5
|
/**
|
|
6
|
-
* `
|
|
6
|
+
* `public.eql_v3_numeric_ord_ope` — ordering domain.
|
|
7
7
|
*
|
|
8
8
|
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`.
|
|
9
9
|
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Identifier } from "./Identifier";
|
|
2
|
+
import type { OpeCllw } from "./OpeCllw";
|
|
3
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
|
+
/**
|
|
5
|
+
* `eql_v3.query_numeric_ord_ope` — ordering domain query operand.
|
|
6
|
+
*
|
|
7
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`.
|
|
8
|
+
*/
|
|
9
|
+
export type NumericOrdOpeQuery = {
|
|
10
|
+
v: SchemaVersion;
|
|
11
|
+
i: Identifier;
|
|
12
|
+
op: OpeCllw;
|
|
13
|
+
};
|
|
@@ -3,7 +3,7 @@ import type { Identifier } from "./Identifier";
|
|
|
3
3
|
import type { OreBlock256 } from "./OreBlock256";
|
|
4
4
|
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
5
|
/**
|
|
6
|
-
* `
|
|
6
|
+
* `public.eql_v3_numeric_ord_ore` — ordering domain.
|
|
7
7
|
*
|
|
8
8
|
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.
|
|
9
9
|
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Identifier } from "./Identifier";
|
|
2
|
+
import type { OreBlock256 } from "./OreBlock256";
|
|
3
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
|
+
/**
|
|
5
|
+
* `eql_v3.query_numeric_ord_ore` — ordering domain query operand.
|
|
6
|
+
*
|
|
7
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`.
|
|
8
|
+
*/
|
|
9
|
+
export type NumericOrdOreQuery = {
|
|
10
|
+
v: SchemaVersion;
|
|
11
|
+
i: Identifier;
|
|
12
|
+
ob: OreBlock256;
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Identifier } from "./Identifier";
|
|
2
|
+
import type { OpeCllw } from "./OpeCllw";
|
|
3
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
|
+
/**
|
|
5
|
+
* `eql_v3.query_numeric_ord` — ordering domain query operand.
|
|
6
|
+
*
|
|
7
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`.
|
|
8
|
+
*/
|
|
9
|
+
export type NumericOrdQuery = {
|
|
10
|
+
v: SchemaVersion;
|
|
11
|
+
i: Identifier;
|
|
12
|
+
op: OpeCllw;
|
|
13
|
+
};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* CLLW-OPE order term — the `op` wire key. Backs the scalar `
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* (
|
|
6
|
-
*
|
|
7
|
-
*
|
|
2
|
+
* CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord` (the
|
|
3
|
+
* default ordering domain), `_ord_ope`, and `text_search` domains, their
|
|
4
|
+
* `query_` operands (`=` `<>` `<` `<=` `>` `>=`), and the ordered entries
|
|
5
|
+
* of a SteVec document (exactly one of `hm` (equality) XOR `op` (ordering)
|
|
6
|
+
* per entry — enforced by the SQL domain CHECK): a hex-encoded CLLW OPE
|
|
7
|
+
* ciphertext, sortable via native bytea comparison after hex-decode —
|
|
8
|
+
* unlike `ob` (block-ORE) it needs no custom comparator. Extracted by
|
|
9
|
+
* `eql_v3.ord_term` (scalar domains and the `public.jsonb_entry` overload
|
|
10
|
+
* alike); SQL-side constructor: `eql_v3_internal.ope_cllw`.
|
|
8
11
|
*/
|
|
9
12
|
export type OpeCllw = string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Block-ORE order term — the `ob` wire key. Backs the `
|
|
3
|
-
*
|
|
2
|
+
* Block-ORE order term — the `ob` wire key. Backs the `_ord_ore` domains and
|
|
3
|
+
* `text_search_ore` (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's
|
|
4
4
|
* domain, so it serves equality too. The block count is width-agnostic on the
|
|
5
5
|
* wire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the
|
|
6
|
-
* array just carries more block strings.
|
|
7
|
-
* `eql_v3_internal.ore_block_256`.
|
|
6
|
+
* array just carries more block strings. Extracted by `eql_v3.ord_term_ore`;
|
|
7
|
+
* SQL-side constructor: `eql_v3_internal.ore_block_256`.
|
|
8
8
|
*/
|
|
9
9
|
export type OreBlock256 = Array<string>;
|
|
@@ -2,7 +2,7 @@ import type { Ciphertext } from "./Ciphertext";
|
|
|
2
2
|
import type { Identifier } from "./Identifier";
|
|
3
3
|
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
4
|
/**
|
|
5
|
-
* `
|
|
5
|
+
* `public.eql_v3_real` — storage-only domain.
|
|
6
6
|
*
|
|
7
7
|
* Operators: none. Required keys: `v` `i` `c`.
|
|
8
8
|
*/
|
|
@@ -3,7 +3,7 @@ import type { Hmac256 } from "./Hmac256";
|
|
|
3
3
|
import type { Identifier } from "./Identifier";
|
|
4
4
|
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
5
|
/**
|
|
6
|
-
* `
|
|
6
|
+
* `public.eql_v3_real_eq` — equality domain.
|
|
7
7
|
*
|
|
8
8
|
* Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`.
|
|
9
9
|
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Hmac256 } from "./Hmac256";
|
|
2
|
+
import type { Identifier } from "./Identifier";
|
|
3
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
|
+
/**
|
|
5
|
+
* `eql_v3.query_real_eq` — equality domain query operand.
|
|
6
|
+
*
|
|
7
|
+
* Operators: `=` `<>`. Required keys: `v` `i` `hm`.
|
|
8
|
+
*/
|
|
9
|
+
export type RealEqQuery = {
|
|
10
|
+
v: SchemaVersion;
|
|
11
|
+
i: Identifier;
|
|
12
|
+
hm: Hmac256;
|
|
13
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { Ciphertext } from "./Ciphertext";
|
|
2
2
|
import type { Identifier } from "./Identifier";
|
|
3
|
-
import type {
|
|
3
|
+
import type { OpeCllw } from "./OpeCllw";
|
|
4
4
|
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
5
|
/**
|
|
6
|
-
* `
|
|
6
|
+
* `public.eql_v3_real_ord` — ordering domain.
|
|
7
7
|
*
|
|
8
|
-
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `
|
|
8
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`.
|
|
9
9
|
*/
|
|
10
10
|
export type RealOrd = {
|
|
11
11
|
v: SchemaVersion;
|
|
12
12
|
i: Identifier;
|
|
13
13
|
c: Ciphertext;
|
|
14
|
-
|
|
14
|
+
op: OpeCllw;
|
|
15
15
|
};
|
|
@@ -3,7 +3,7 @@ import type { Identifier } from "./Identifier";
|
|
|
3
3
|
import type { OpeCllw } from "./OpeCllw";
|
|
4
4
|
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
5
|
/**
|
|
6
|
-
* `
|
|
6
|
+
* `public.eql_v3_real_ord_ope` — ordering domain.
|
|
7
7
|
*
|
|
8
8
|
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`.
|
|
9
9
|
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Identifier } from "./Identifier";
|
|
2
|
+
import type { OpeCllw } from "./OpeCllw";
|
|
3
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
|
+
/**
|
|
5
|
+
* `eql_v3.query_real_ord_ope` — ordering domain query operand.
|
|
6
|
+
*
|
|
7
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`.
|
|
8
|
+
*/
|
|
9
|
+
export type RealOrdOpeQuery = {
|
|
10
|
+
v: SchemaVersion;
|
|
11
|
+
i: Identifier;
|
|
12
|
+
op: OpeCllw;
|
|
13
|
+
};
|
|
@@ -3,7 +3,7 @@ import type { Identifier } from "./Identifier";
|
|
|
3
3
|
import type { OreBlock256 } from "./OreBlock256";
|
|
4
4
|
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
5
|
/**
|
|
6
|
-
* `
|
|
6
|
+
* `public.eql_v3_real_ord_ore` — ordering domain.
|
|
7
7
|
*
|
|
8
8
|
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.
|
|
9
9
|
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Identifier } from "./Identifier";
|
|
2
|
+
import type { OreBlock256 } from "./OreBlock256";
|
|
3
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
|
+
/**
|
|
5
|
+
* `eql_v3.query_real_ord_ore` — ordering domain query operand.
|
|
6
|
+
*
|
|
7
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`.
|
|
8
|
+
*/
|
|
9
|
+
export type RealOrdOreQuery = {
|
|
10
|
+
v: SchemaVersion;
|
|
11
|
+
i: Identifier;
|
|
12
|
+
ob: OreBlock256;
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Identifier } from "./Identifier";
|
|
2
|
+
import type { OpeCllw } from "./OpeCllw";
|
|
3
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
|
+
/**
|
|
5
|
+
* `eql_v3.query_real_ord` — ordering domain query operand.
|
|
6
|
+
*
|
|
7
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`.
|
|
8
|
+
*/
|
|
9
|
+
export type RealOrdQuery = {
|
|
10
|
+
v: SchemaVersion;
|
|
11
|
+
i: Identifier;
|
|
12
|
+
op: OpeCllw;
|
|
13
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A SteVec selector — the `s` wire key. Addresses a JSON path leaf within an
|
|
3
|
-
* encrypted document (`
|
|
3
|
+
* encrypted document (`public.eql_v3_json`); present on every entry and query element.
|
|
4
4
|
*/
|
|
5
5
|
export type Selector = string;
|
|
@@ -2,7 +2,7 @@ import type { Ciphertext } from "./Ciphertext";
|
|
|
2
2
|
import type { Identifier } from "./Identifier";
|
|
3
3
|
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
4
|
/**
|
|
5
|
-
* `
|
|
5
|
+
* `public.eql_v3_smallint` — storage-only domain.
|
|
6
6
|
*
|
|
7
7
|
* Operators: none. Required keys: `v` `i` `c`.
|
|
8
8
|
*/
|
|
@@ -3,7 +3,7 @@ import type { Hmac256 } from "./Hmac256";
|
|
|
3
3
|
import type { Identifier } from "./Identifier";
|
|
4
4
|
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
5
|
/**
|
|
6
|
-
* `
|
|
6
|
+
* `public.eql_v3_smallint_eq` — equality domain.
|
|
7
7
|
*
|
|
8
8
|
* Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`.
|
|
9
9
|
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Hmac256 } from "./Hmac256";
|
|
2
|
+
import type { Identifier } from "./Identifier";
|
|
3
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
|
+
/**
|
|
5
|
+
* `eql_v3.query_smallint_eq` — equality domain query operand.
|
|
6
|
+
*
|
|
7
|
+
* Operators: `=` `<>`. Required keys: `v` `i` `hm`.
|
|
8
|
+
*/
|
|
9
|
+
export type SmallintEqQuery = {
|
|
10
|
+
v: SchemaVersion;
|
|
11
|
+
i: Identifier;
|
|
12
|
+
hm: Hmac256;
|
|
13
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { Ciphertext } from "./Ciphertext";
|
|
2
2
|
import type { Identifier } from "./Identifier";
|
|
3
|
-
import type {
|
|
3
|
+
import type { OpeCllw } from "./OpeCllw";
|
|
4
4
|
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
5
|
/**
|
|
6
|
-
* `
|
|
6
|
+
* `public.eql_v3_smallint_ord` — ordering domain.
|
|
7
7
|
*
|
|
8
|
-
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `
|
|
8
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`.
|
|
9
9
|
*/
|
|
10
10
|
export type SmallintOrd = {
|
|
11
11
|
v: SchemaVersion;
|
|
12
12
|
i: Identifier;
|
|
13
13
|
c: Ciphertext;
|
|
14
|
-
|
|
14
|
+
op: OpeCllw;
|
|
15
15
|
};
|
|
@@ -3,7 +3,7 @@ import type { Identifier } from "./Identifier";
|
|
|
3
3
|
import type { OpeCllw } from "./OpeCllw";
|
|
4
4
|
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
5
|
/**
|
|
6
|
-
* `
|
|
6
|
+
* `public.eql_v3_smallint_ord_ope` — ordering domain.
|
|
7
7
|
*
|
|
8
8
|
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`.
|
|
9
9
|
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Identifier } from "./Identifier";
|
|
2
|
+
import type { OpeCllw } from "./OpeCllw";
|
|
3
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
|
+
/**
|
|
5
|
+
* `eql_v3.query_smallint_ord_ope` — ordering domain query operand.
|
|
6
|
+
*
|
|
7
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`.
|
|
8
|
+
*/
|
|
9
|
+
export type SmallintOrdOpeQuery = {
|
|
10
|
+
v: SchemaVersion;
|
|
11
|
+
i: Identifier;
|
|
12
|
+
op: OpeCllw;
|
|
13
|
+
};
|
|
@@ -3,7 +3,7 @@ import type { Identifier } from "./Identifier";
|
|
|
3
3
|
import type { OreBlock256 } from "./OreBlock256";
|
|
4
4
|
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
5
|
/**
|
|
6
|
-
* `
|
|
6
|
+
* `public.eql_v3_smallint_ord_ore` — ordering domain.
|
|
7
7
|
*
|
|
8
8
|
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.
|
|
9
9
|
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Identifier } from "./Identifier";
|
|
2
|
+
import type { OreBlock256 } from "./OreBlock256";
|
|
3
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
|
+
/**
|
|
5
|
+
* `eql_v3.query_smallint_ord_ore` — ordering domain query operand.
|
|
6
|
+
*
|
|
7
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`.
|
|
8
|
+
*/
|
|
9
|
+
export type SmallintOrdOreQuery = {
|
|
10
|
+
v: SchemaVersion;
|
|
11
|
+
i: Identifier;
|
|
12
|
+
ob: OreBlock256;
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Identifier } from "./Identifier";
|
|
2
|
+
import type { OpeCllw } from "./OpeCllw";
|
|
3
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
|
+
/**
|
|
5
|
+
* `eql_v3.query_smallint_ord` — ordering domain query operand.
|
|
6
|
+
*
|
|
7
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`.
|
|
8
|
+
*/
|
|
9
|
+
export type SmallintOrdQuery = {
|
|
10
|
+
v: SchemaVersion;
|
|
11
|
+
i: Identifier;
|
|
12
|
+
op: OpeCllw;
|
|
13
|
+
};
|
|
@@ -3,7 +3,7 @@ import type { SchemaVersion } from "./SchemaVersion";
|
|
|
3
3
|
import type { SteVecEntry } from "./SteVecEntry";
|
|
4
4
|
import type { SteVecForm } from "./SteVecForm";
|
|
5
5
|
/**
|
|
6
|
-
* `
|
|
6
|
+
* `public.eql_v3_json` — a SteVec encrypted-JSONB document (`{v, k, i, sv:[entry]}`,
|
|
7
7
|
* no root ciphertext). Strict. `k` is the `"sv"` form discriminator (see
|
|
8
8
|
* [`SteVecForm`]) — carried on the real wire, so the strict struct models it.
|
|
9
9
|
*/
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Ciphertext } from "./Ciphertext";
|
|
2
2
|
import type { Hmac256 } from "./Hmac256";
|
|
3
|
-
import type {
|
|
3
|
+
import type { OpeCllw } from "./OpeCllw";
|
|
4
4
|
import type { Selector } from "./Selector";
|
|
5
5
|
/**
|
|
6
|
-
* `
|
|
6
|
+
* `public.eql_v3_jsonb_entry` — one sv element (returned by `->`). Carries a selector
|
|
7
7
|
* `s`, ciphertext `c`, optional array-membership marker `a`, and exactly one of
|
|
8
|
-
* `hm` XOR `
|
|
8
|
+
* `hm` XOR `op`. LAX (flatten precludes `deny_unknown_fields`): tolerates the
|
|
9
9
|
* root `i`/`v` merged in by `->`. XOR of the term is enforced by the SQL CHECK.
|
|
10
10
|
*/
|
|
11
11
|
export type SteVecEntry = {
|
|
@@ -15,5 +15,5 @@ export type SteVecEntry = {
|
|
|
15
15
|
} & ({
|
|
16
16
|
hm: Hmac256;
|
|
17
17
|
} | {
|
|
18
|
-
|
|
18
|
+
op: OpeCllw;
|
|
19
19
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SteVecQueryEntry } from "./SteVecQueryEntry";
|
|
2
2
|
/**
|
|
3
|
-
* `eql_v3.
|
|
3
|
+
* `eql_v3.query_jsonb` — a containment needle (`{sv:[query-entry]}`). Strict.
|
|
4
4
|
*/
|
|
5
5
|
export type SteVecQuery = {
|
|
6
6
|
sv: Array<SteVecQueryEntry>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Hmac256 } from "./Hmac256";
|
|
2
|
-
import type {
|
|
2
|
+
import type { OpeCllw } from "./OpeCllw";
|
|
3
3
|
import type { Selector } from "./Selector";
|
|
4
4
|
/**
|
|
5
5
|
* One element of a SteVec containment needle: a selector plus one term, and
|
|
@@ -11,5 +11,5 @@ export type SteVecQueryEntry = {
|
|
|
11
11
|
} & ({
|
|
12
12
|
hm: Hmac256;
|
|
13
13
|
} | {
|
|
14
|
-
|
|
14
|
+
op: OpeCllw;
|
|
15
15
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Hmac256 } from "./Hmac256";
|
|
2
|
-
import type {
|
|
2
|
+
import type { OpeCllw } from "./OpeCllw";
|
|
3
3
|
/**
|
|
4
|
-
* The per-entry deterministic term: exactly one of `hm` (HMAC equality) or `
|
|
5
|
-
* (CLLW-
|
|
4
|
+
* The per-entry deterministic term: exactly one of `hm` (HMAC equality) or `op`
|
|
5
|
+
* (CLLW-OPE ordering). Untagged — a document mixes both across its `sv` array.
|
|
6
6
|
*/
|
|
7
7
|
export type SteVecTerm = {
|
|
8
8
|
hm: Hmac256;
|
|
9
9
|
} | {
|
|
10
|
-
|
|
10
|
+
op: OpeCllw;
|
|
11
11
|
};
|
|
@@ -2,7 +2,7 @@ import type { Ciphertext } from "./Ciphertext";
|
|
|
2
2
|
import type { Identifier } from "./Identifier";
|
|
3
3
|
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
4
|
/**
|
|
5
|
-
* `
|
|
5
|
+
* `public.eql_v3_text` — storage-only domain.
|
|
6
6
|
*
|
|
7
7
|
* Operators: none. Required keys: `v` `i` `c`.
|
|
8
8
|
*/
|
|
@@ -3,7 +3,7 @@ import type { Hmac256 } from "./Hmac256";
|
|
|
3
3
|
import type { Identifier } from "./Identifier";
|
|
4
4
|
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
5
|
/**
|
|
6
|
-
* `
|
|
6
|
+
* `public.eql_v3_text_eq` — equality domain.
|
|
7
7
|
*
|
|
8
8
|
* Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`.
|
|
9
9
|
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Hmac256 } from "./Hmac256";
|
|
2
|
+
import type { Identifier } from "./Identifier";
|
|
3
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
|
+
/**
|
|
5
|
+
* `eql_v3.query_text_eq` — equality domain query operand.
|
|
6
|
+
*
|
|
7
|
+
* Operators: `=` `<>`. Required keys: `v` `i` `hm`.
|
|
8
|
+
*/
|
|
9
|
+
export type TextEqQuery = {
|
|
10
|
+
v: SchemaVersion;
|
|
11
|
+
i: Identifier;
|
|
12
|
+
hm: Hmac256;
|
|
13
|
+
};
|