@cipherstash/protect-ffi 0.25.0 → 0.27.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/README.md +60 -0
- package/dist/wasm/protect_ffi_bg.js +11 -11
- package/dist/wasm/protect_ffi_bg.wasm +0 -0
- package/dist/wasm/protect_ffi_bg.wasm.d.ts +5 -5
- package/dist/wasm/protect_ffi_inline.js +1 -1
- package/lib/eql-v3-types/Bigint.d.ts +13 -0
- package/lib/eql-v3-types/Bigint.js +2 -0
- package/lib/eql-v3-types/BigintEq.d.ts +15 -0
- package/lib/eql-v3-types/BigintEq.js +2 -0
- package/lib/eql-v3-types/BigintOrd.d.ts +15 -0
- package/lib/eql-v3-types/BigintOrd.js +2 -0
- package/lib/eql-v3-types/BigintOrdOpe.d.ts +15 -0
- package/lib/eql-v3-types/BigintOrdOpe.js +2 -0
- package/lib/eql-v3-types/BigintOrdOre.d.ts +15 -0
- package/lib/eql-v3-types/BigintOrdOre.js +2 -0
- package/lib/eql-v3-types/BloomFilter.d.ts +9 -0
- package/lib/eql-v3-types/BloomFilter.js +5 -0
- package/lib/eql-v3-types/Boolean.d.ts +13 -0
- package/lib/eql-v3-types/Boolean.js +2 -0
- package/lib/eql-v3-types/Ciphertext.d.ts +6 -0
- package/lib/eql-v3-types/Ciphertext.js +5 -0
- package/lib/eql-v3-types/Date.d.ts +13 -0
- package/lib/eql-v3-types/Date.js +2 -0
- package/lib/eql-v3-types/DateEq.d.ts +15 -0
- package/lib/eql-v3-types/DateEq.js +2 -0
- package/lib/eql-v3-types/DateOrd.d.ts +15 -0
- package/lib/eql-v3-types/DateOrd.js +2 -0
- package/lib/eql-v3-types/DateOrdOpe.d.ts +15 -0
- package/lib/eql-v3-types/DateOrdOpe.js +2 -0
- package/lib/eql-v3-types/DateOrdOre.d.ts +15 -0
- package/lib/eql-v3-types/DateOrdOre.js +2 -0
- package/lib/eql-v3-types/Double.d.ts +13 -0
- package/lib/eql-v3-types/Double.js +2 -0
- package/lib/eql-v3-types/DoubleEq.d.ts +15 -0
- package/lib/eql-v3-types/DoubleEq.js +2 -0
- package/lib/eql-v3-types/DoubleOrd.d.ts +15 -0
- package/lib/eql-v3-types/DoubleOrd.js +2 -0
- package/lib/eql-v3-types/DoubleOrdOpe.d.ts +15 -0
- package/lib/eql-v3-types/DoubleOrdOpe.js +2 -0
- package/lib/eql-v3-types/DoubleOrdOre.d.ts +15 -0
- package/lib/eql-v3-types/DoubleOrdOre.js +2 -0
- package/lib/eql-v3-types/Hmac256.d.ts +5 -0
- package/lib/eql-v3-types/Hmac256.js +5 -0
- package/lib/eql-v3-types/Identifier.d.ts +15 -0
- package/lib/eql-v3-types/Identifier.js +5 -0
- package/lib/eql-v3-types/Integer.d.ts +13 -0
- package/lib/eql-v3-types/Integer.js +2 -0
- package/lib/eql-v3-types/IntegerEq.d.ts +15 -0
- package/lib/eql-v3-types/IntegerEq.js +2 -0
- package/lib/eql-v3-types/IntegerOrd.d.ts +15 -0
- package/lib/eql-v3-types/IntegerOrd.js +2 -0
- package/lib/eql-v3-types/IntegerOrdOpe.d.ts +15 -0
- package/lib/eql-v3-types/IntegerOrdOpe.js +2 -0
- package/lib/eql-v3-types/IntegerOrdOre.d.ts +15 -0
- package/lib/eql-v3-types/IntegerOrdOre.js +2 -0
- package/lib/eql-v3-types/Numeric.d.ts +13 -0
- package/lib/eql-v3-types/Numeric.js +2 -0
- package/lib/eql-v3-types/NumericEq.d.ts +15 -0
- package/lib/eql-v3-types/NumericEq.js +2 -0
- package/lib/eql-v3-types/NumericOrd.d.ts +15 -0
- package/lib/eql-v3-types/NumericOrd.js +2 -0
- package/lib/eql-v3-types/NumericOrdOpe.d.ts +15 -0
- package/lib/eql-v3-types/NumericOrdOpe.js +2 -0
- package/lib/eql-v3-types/NumericOrdOre.d.ts +15 -0
- package/lib/eql-v3-types/NumericOrdOre.js +2 -0
- package/lib/eql-v3-types/OpeCllw.d.ts +9 -0
- package/lib/eql-v3-types/OpeCllw.js +5 -0
- package/lib/eql-v3-types/OreBlock256.d.ts +9 -0
- package/lib/eql-v3-types/OreBlock256.js +5 -0
- package/lib/eql-v3-types/OreCllw.d.ts +7 -0
- package/lib/eql-v3-types/OreCllw.js +5 -0
- package/lib/eql-v3-types/Real.d.ts +13 -0
- package/lib/eql-v3-types/Real.js +2 -0
- package/lib/eql-v3-types/RealEq.d.ts +15 -0
- package/lib/eql-v3-types/RealEq.js +2 -0
- package/lib/eql-v3-types/RealOrd.d.ts +15 -0
- package/lib/eql-v3-types/RealOrd.js +2 -0
- package/lib/eql-v3-types/RealOrdOpe.d.ts +15 -0
- package/lib/eql-v3-types/RealOrdOpe.js +2 -0
- package/lib/eql-v3-types/RealOrdOre.d.ts +15 -0
- package/lib/eql-v3-types/RealOrdOre.js +2 -0
- package/lib/eql-v3-types/SchemaVersion.d.ts +10 -0
- package/lib/eql-v3-types/SchemaVersion.js +5 -0
- package/lib/eql-v3-types/Selector.d.ts +5 -0
- package/lib/eql-v3-types/Selector.js +5 -0
- package/lib/eql-v3-types/Smallint.d.ts +13 -0
- package/lib/eql-v3-types/Smallint.js +2 -0
- package/lib/eql-v3-types/SmallintEq.d.ts +15 -0
- package/lib/eql-v3-types/SmallintEq.js +2 -0
- package/lib/eql-v3-types/SmallintOrd.d.ts +15 -0
- package/lib/eql-v3-types/SmallintOrd.js +2 -0
- package/lib/eql-v3-types/SmallintOrdOpe.d.ts +15 -0
- package/lib/eql-v3-types/SmallintOrdOpe.js +2 -0
- package/lib/eql-v3-types/SmallintOrdOre.d.ts +15 -0
- package/lib/eql-v3-types/SmallintOrdOre.js +2 -0
- package/lib/eql-v3-types/SteVecDocument.d.ts +15 -0
- package/lib/eql-v3-types/SteVecDocument.js +2 -0
- package/lib/eql-v3-types/SteVecEntry.d.ts +19 -0
- package/lib/eql-v3-types/SteVecEntry.js +2 -0
- package/lib/eql-v3-types/SteVecForm.d.ts +18 -0
- package/lib/eql-v3-types/SteVecForm.js +5 -0
- package/lib/eql-v3-types/SteVecQuery.d.ts +7 -0
- package/lib/eql-v3-types/SteVecQuery.js +2 -0
- package/lib/eql-v3-types/SteVecQueryEntry.d.ts +15 -0
- package/lib/eql-v3-types/SteVecQueryEntry.js +2 -0
- package/lib/eql-v3-types/SteVecTerm.d.ts +11 -0
- package/lib/eql-v3-types/SteVecTerm.js +2 -0
- package/lib/eql-v3-types/Text.d.ts +13 -0
- package/lib/eql-v3-types/Text.js +2 -0
- package/lib/eql-v3-types/TextEq.d.ts +15 -0
- package/lib/eql-v3-types/TextEq.js +2 -0
- package/lib/eql-v3-types/TextMatch.d.ts +15 -0
- package/lib/eql-v3-types/TextMatch.js +2 -0
- package/lib/eql-v3-types/TextOrd.d.ts +17 -0
- package/lib/eql-v3-types/TextOrd.js +2 -0
- package/lib/eql-v3-types/TextOrdOpe.d.ts +17 -0
- package/lib/eql-v3-types/TextOrdOpe.js +2 -0
- package/lib/eql-v3-types/TextOrdOre.d.ts +17 -0
- package/lib/eql-v3-types/TextOrdOre.js +2 -0
- package/lib/eql-v3-types/TextSearch.d.ts +19 -0
- package/lib/eql-v3-types/TextSearch.js +2 -0
- package/lib/eql-v3-types/Timestamp.d.ts +13 -0
- package/lib/eql-v3-types/Timestamp.js +2 -0
- package/lib/eql-v3-types/TimestampEq.d.ts +15 -0
- package/lib/eql-v3-types/TimestampEq.js +2 -0
- package/lib/eql-v3-types/TimestampOrd.d.ts +15 -0
- package/lib/eql-v3-types/TimestampOrd.js +2 -0
- package/lib/eql-v3-types/TimestampOrdOpe.d.ts +15 -0
- package/lib/eql-v3-types/TimestampOrdOpe.js +2 -0
- package/lib/eql-v3-types/TimestampOrdOre.d.ts +15 -0
- package/lib/eql-v3-types/TimestampOrdOre.js +2 -0
- package/lib/eql-v3.d.ts +90 -0
- package/lib/eql-v3.js +6 -0
- package/lib/errors.d.ts +14 -0
- package/lib/errors.js +77 -0
- package/lib/index.cjs +32 -59
- package/lib/index.d.cts +63 -24
- package/lib/normalizeEncryptConfig.d.ts +1 -1
- package/package.json +17 -9
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLLW-ORE ordered term — the `oc` wire key of a SteVec entry. Backs entry
|
|
3
|
+
* ordering (`<` `<=` `>` `>=`) and equality on ordered leaves. SQL-side
|
|
4
|
+
* constructor: `eql_v3.ore_cllw`. A SteVec entry carries exactly one of `hm`
|
|
5
|
+
* (equality) XOR `oc` (ordering) — enforced by the SQL domain CHECK.
|
|
6
|
+
*/
|
|
7
|
+
export type OreCllw = string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// @generated — vendored from eql-bindings bindings/v3 (encrypt-query-language).
|
|
3
|
+
// Do not hand-edit. Refresh with scripts/sync-eql-v3-types.sh.
|
|
4
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Ciphertext } from "./Ciphertext";
|
|
2
|
+
import type { Identifier } from "./Identifier";
|
|
3
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
|
+
/**
|
|
5
|
+
* `eql_v3.real` — storage-only domain.
|
|
6
|
+
*
|
|
7
|
+
* Operators: none. Required keys: `v` `i` `c`.
|
|
8
|
+
*/
|
|
9
|
+
export type Real = {
|
|
10
|
+
v: SchemaVersion;
|
|
11
|
+
i: Identifier;
|
|
12
|
+
c: Ciphertext;
|
|
13
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Ciphertext } from "./Ciphertext";
|
|
2
|
+
import type { Hmac256 } from "./Hmac256";
|
|
3
|
+
import type { Identifier } from "./Identifier";
|
|
4
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
|
+
/**
|
|
6
|
+
* `eql_v3.real_eq` — equality domain.
|
|
7
|
+
*
|
|
8
|
+
* Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`.
|
|
9
|
+
*/
|
|
10
|
+
export type RealEq = {
|
|
11
|
+
v: SchemaVersion;
|
|
12
|
+
i: Identifier;
|
|
13
|
+
c: Ciphertext;
|
|
14
|
+
hm: Hmac256;
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Ciphertext } from "./Ciphertext";
|
|
2
|
+
import type { Identifier } from "./Identifier";
|
|
3
|
+
import type { OreBlock256 } from "./OreBlock256";
|
|
4
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
|
+
/**
|
|
6
|
+
* `eql_v3.real_ord` — ordering domain.
|
|
7
|
+
*
|
|
8
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.
|
|
9
|
+
*/
|
|
10
|
+
export type RealOrd = {
|
|
11
|
+
v: SchemaVersion;
|
|
12
|
+
i: Identifier;
|
|
13
|
+
c: Ciphertext;
|
|
14
|
+
ob: OreBlock256;
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Ciphertext } from "./Ciphertext";
|
|
2
|
+
import type { Identifier } from "./Identifier";
|
|
3
|
+
import type { OpeCllw } from "./OpeCllw";
|
|
4
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
|
+
/**
|
|
6
|
+
* `eql_v3.real_ord_ope` — ordering domain.
|
|
7
|
+
*
|
|
8
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`.
|
|
9
|
+
*/
|
|
10
|
+
export type RealOrdOpe = {
|
|
11
|
+
v: SchemaVersion;
|
|
12
|
+
i: Identifier;
|
|
13
|
+
c: Ciphertext;
|
|
14
|
+
op: OpeCllw;
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Ciphertext } from "./Ciphertext";
|
|
2
|
+
import type { Identifier } from "./Identifier";
|
|
3
|
+
import type { OreBlock256 } from "./OreBlock256";
|
|
4
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
|
+
/**
|
|
6
|
+
* `eql_v3.real_ord_ore` — ordering domain.
|
|
7
|
+
*
|
|
8
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.
|
|
9
|
+
*/
|
|
10
|
+
export type RealOrdOre = {
|
|
11
|
+
v: SchemaVersion;
|
|
12
|
+
i: Identifier;
|
|
13
|
+
c: Ciphertext;
|
|
14
|
+
ob: OreBlock256;
|
|
15
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The envelope version field (`v`) — always exactly [`EQL_SCHEMA_VERSION`]
|
|
3
|
+
* on the wire.
|
|
4
|
+
*
|
|
5
|
+
* Deserialization rejects any other value: the Rust analogue of the domain
|
|
6
|
+
* CHECK's `VALUE->>'v' = '3'`, so a wrong-version payload fails at the type
|
|
7
|
+
* boundary instead of at INSERT. The inner value is private; the only
|
|
8
|
+
* constructible instance is the current version.
|
|
9
|
+
*/
|
|
10
|
+
export type SchemaVersion = 3;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// @generated — vendored from eql-bindings bindings/v3 (encrypt-query-language).
|
|
3
|
+
// Do not hand-edit. Refresh with scripts/sync-eql-v3-types.sh.
|
|
4
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// @generated — vendored from eql-bindings bindings/v3 (encrypt-query-language).
|
|
3
|
+
// Do not hand-edit. Refresh with scripts/sync-eql-v3-types.sh.
|
|
4
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Ciphertext } from "./Ciphertext";
|
|
2
|
+
import type { Identifier } from "./Identifier";
|
|
3
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
|
+
/**
|
|
5
|
+
* `eql_v3.smallint` — storage-only domain.
|
|
6
|
+
*
|
|
7
|
+
* Operators: none. Required keys: `v` `i` `c`.
|
|
8
|
+
*/
|
|
9
|
+
export type Smallint = {
|
|
10
|
+
v: SchemaVersion;
|
|
11
|
+
i: Identifier;
|
|
12
|
+
c: Ciphertext;
|
|
13
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Ciphertext } from "./Ciphertext";
|
|
2
|
+
import type { Hmac256 } from "./Hmac256";
|
|
3
|
+
import type { Identifier } from "./Identifier";
|
|
4
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
|
+
/**
|
|
6
|
+
* `eql_v3.smallint_eq` — equality domain.
|
|
7
|
+
*
|
|
8
|
+
* Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`.
|
|
9
|
+
*/
|
|
10
|
+
export type SmallintEq = {
|
|
11
|
+
v: SchemaVersion;
|
|
12
|
+
i: Identifier;
|
|
13
|
+
c: Ciphertext;
|
|
14
|
+
hm: Hmac256;
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Ciphertext } from "./Ciphertext";
|
|
2
|
+
import type { Identifier } from "./Identifier";
|
|
3
|
+
import type { OreBlock256 } from "./OreBlock256";
|
|
4
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
|
+
/**
|
|
6
|
+
* `eql_v3.smallint_ord` — ordering domain.
|
|
7
|
+
*
|
|
8
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.
|
|
9
|
+
*/
|
|
10
|
+
export type SmallintOrd = {
|
|
11
|
+
v: SchemaVersion;
|
|
12
|
+
i: Identifier;
|
|
13
|
+
c: Ciphertext;
|
|
14
|
+
ob: OreBlock256;
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Ciphertext } from "./Ciphertext";
|
|
2
|
+
import type { Identifier } from "./Identifier";
|
|
3
|
+
import type { OpeCllw } from "./OpeCllw";
|
|
4
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
|
+
/**
|
|
6
|
+
* `eql_v3.smallint_ord_ope` — ordering domain.
|
|
7
|
+
*
|
|
8
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`.
|
|
9
|
+
*/
|
|
10
|
+
export type SmallintOrdOpe = {
|
|
11
|
+
v: SchemaVersion;
|
|
12
|
+
i: Identifier;
|
|
13
|
+
c: Ciphertext;
|
|
14
|
+
op: OpeCllw;
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Ciphertext } from "./Ciphertext";
|
|
2
|
+
import type { Identifier } from "./Identifier";
|
|
3
|
+
import type { OreBlock256 } from "./OreBlock256";
|
|
4
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
|
+
/**
|
|
6
|
+
* `eql_v3.smallint_ord_ore` — ordering domain.
|
|
7
|
+
*
|
|
8
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.
|
|
9
|
+
*/
|
|
10
|
+
export type SmallintOrdOre = {
|
|
11
|
+
v: SchemaVersion;
|
|
12
|
+
i: Identifier;
|
|
13
|
+
c: Ciphertext;
|
|
14
|
+
ob: OreBlock256;
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Identifier } from "./Identifier";
|
|
2
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
3
|
+
import type { SteVecEntry } from "./SteVecEntry";
|
|
4
|
+
import type { SteVecForm } from "./SteVecForm";
|
|
5
|
+
/**
|
|
6
|
+
* `eql_v3.json` — a SteVec encrypted-JSONB document (`{v, k, i, sv:[entry]}`,
|
|
7
|
+
* no root ciphertext). Strict. `k` is the `"sv"` form discriminator (see
|
|
8
|
+
* [`SteVecForm`]) — carried on the real wire, so the strict struct models it.
|
|
9
|
+
*/
|
|
10
|
+
export type SteVecDocument = {
|
|
11
|
+
v: SchemaVersion;
|
|
12
|
+
k: SteVecForm;
|
|
13
|
+
i: Identifier;
|
|
14
|
+
sv: Array<SteVecEntry>;
|
|
15
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Ciphertext } from "./Ciphertext";
|
|
2
|
+
import type { Hmac256 } from "./Hmac256";
|
|
3
|
+
import type { OreCllw } from "./OreCllw";
|
|
4
|
+
import type { Selector } from "./Selector";
|
|
5
|
+
/**
|
|
6
|
+
* `eql_v3.jsonb_entry` — one sv element (returned by `->`). Carries a selector
|
|
7
|
+
* `s`, ciphertext `c`, optional array-membership marker `a`, and exactly one of
|
|
8
|
+
* `hm` XOR `oc`. LAX (flatten precludes `deny_unknown_fields`): tolerates the
|
|
9
|
+
* root `i`/`v` merged in by `->`. XOR of the term is enforced by the SQL CHECK.
|
|
10
|
+
*/
|
|
11
|
+
export type SteVecEntry = {
|
|
12
|
+
s: Selector;
|
|
13
|
+
c: Ciphertext;
|
|
14
|
+
a?: boolean | null;
|
|
15
|
+
} & ({
|
|
16
|
+
hm: Hmac256;
|
|
17
|
+
} | {
|
|
18
|
+
oc: OreCllw;
|
|
19
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `k` envelope key — the EQL payload **form discriminator**, always the
|
|
3
|
+
* literal `"sv"` for an encrypted-JSONB document.
|
|
4
|
+
*
|
|
5
|
+
* `k` distinguishes the payload forms in the canonical wire contract (`"ct"` =
|
|
6
|
+
* scalar ciphertext, `"sv"` = STE-vec). `eql_v3` itself does not consume `k`
|
|
7
|
+
* (the typed domain + the structural `c`-vs-`sv` shape already discriminate,
|
|
8
|
+
* and no `eql_v3` SQL reads it), but the canonical `SteVecPayload`
|
|
9
|
+
* (`eql-payload-v2.3.schema.json`, `required: [v,k,i,sv]`) mandates it and
|
|
10
|
+
* cipherstash-client emits it on every SteVec document — so the strict document
|
|
11
|
+
* struct must model it or it rejects the real wire.
|
|
12
|
+
*
|
|
13
|
+
* Pinned exactly like [`SchemaVersion`] pins `v`: deserialization rejects any
|
|
14
|
+
* value other than `"sv"`, so a scalar (`k:"ct"`) payload cannot be read back
|
|
15
|
+
* as a document. The inner value is private; the only constructible instance is
|
|
16
|
+
* [`SteVecForm::SV`].
|
|
17
|
+
*/
|
|
18
|
+
export type SteVecForm = "sv";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// @generated — vendored from eql-bindings bindings/v3 (encrypt-query-language).
|
|
3
|
+
// Do not hand-edit. Refresh with scripts/sync-eql-v3-types.sh.
|
|
4
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Hmac256 } from "./Hmac256";
|
|
2
|
+
import type { OreCllw } from "./OreCllw";
|
|
3
|
+
import type { Selector } from "./Selector";
|
|
4
|
+
/**
|
|
5
|
+
* One element of a SteVec containment needle: a selector plus one term, and
|
|
6
|
+
* (per the SQL CHECK) no ciphertext. LAX for the same flatten reason as
|
|
7
|
+
* `SteVecEntry`; the "no `c`" contract is enforced by `is_valid_ste_vec_query_payload`.
|
|
8
|
+
*/
|
|
9
|
+
export type SteVecQueryEntry = {
|
|
10
|
+
s: Selector;
|
|
11
|
+
} & ({
|
|
12
|
+
hm: Hmac256;
|
|
13
|
+
} | {
|
|
14
|
+
oc: OreCllw;
|
|
15
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Hmac256 } from "./Hmac256";
|
|
2
|
+
import type { OreCllw } from "./OreCllw";
|
|
3
|
+
/**
|
|
4
|
+
* The per-entry deterministic term: exactly one of `hm` (HMAC equality) or `oc`
|
|
5
|
+
* (CLLW-ORE ordering). Untagged — a document mixes both across its `sv` array.
|
|
6
|
+
*/
|
|
7
|
+
export type SteVecTerm = {
|
|
8
|
+
hm: Hmac256;
|
|
9
|
+
} | {
|
|
10
|
+
oc: OreCllw;
|
|
11
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Ciphertext } from "./Ciphertext";
|
|
2
|
+
import type { Identifier } from "./Identifier";
|
|
3
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
|
+
/**
|
|
5
|
+
* `eql_v3.text` — storage-only domain.
|
|
6
|
+
*
|
|
7
|
+
* Operators: none. Required keys: `v` `i` `c`.
|
|
8
|
+
*/
|
|
9
|
+
export type Text = {
|
|
10
|
+
v: SchemaVersion;
|
|
11
|
+
i: Identifier;
|
|
12
|
+
c: Ciphertext;
|
|
13
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Ciphertext } from "./Ciphertext";
|
|
2
|
+
import type { Hmac256 } from "./Hmac256";
|
|
3
|
+
import type { Identifier } from "./Identifier";
|
|
4
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
|
+
/**
|
|
6
|
+
* `eql_v3.text_eq` — equality domain.
|
|
7
|
+
*
|
|
8
|
+
* Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`.
|
|
9
|
+
*/
|
|
10
|
+
export type TextEq = {
|
|
11
|
+
v: SchemaVersion;
|
|
12
|
+
i: Identifier;
|
|
13
|
+
c: Ciphertext;
|
|
14
|
+
hm: Hmac256;
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { BloomFilter } from "./BloomFilter";
|
|
2
|
+
import type { Ciphertext } from "./Ciphertext";
|
|
3
|
+
import type { Identifier } from "./Identifier";
|
|
4
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
|
+
/**
|
|
6
|
+
* `eql_v3.text_match` — match domain.
|
|
7
|
+
*
|
|
8
|
+
* Operators: `@>` `<@`. Required keys: `v` `i` `c` `bf`.
|
|
9
|
+
*/
|
|
10
|
+
export type TextMatch = {
|
|
11
|
+
v: SchemaVersion;
|
|
12
|
+
i: Identifier;
|
|
13
|
+
c: Ciphertext;
|
|
14
|
+
bf: BloomFilter;
|
|
15
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Ciphertext } from "./Ciphertext";
|
|
2
|
+
import type { Hmac256 } from "./Hmac256";
|
|
3
|
+
import type { Identifier } from "./Identifier";
|
|
4
|
+
import type { OreBlock256 } from "./OreBlock256";
|
|
5
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
6
|
+
/**
|
|
7
|
+
* `eql_v3.text_ord` — ordering domain.
|
|
8
|
+
*
|
|
9
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `hm` `ob`.
|
|
10
|
+
*/
|
|
11
|
+
export type TextOrd = {
|
|
12
|
+
v: SchemaVersion;
|
|
13
|
+
i: Identifier;
|
|
14
|
+
c: Ciphertext;
|
|
15
|
+
hm: Hmac256;
|
|
16
|
+
ob: OreBlock256;
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Ciphertext } from "./Ciphertext";
|
|
2
|
+
import type { Hmac256 } from "./Hmac256";
|
|
3
|
+
import type { Identifier } from "./Identifier";
|
|
4
|
+
import type { OpeCllw } from "./OpeCllw";
|
|
5
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
6
|
+
/**
|
|
7
|
+
* `eql_v3.text_ord_ope` — ordering domain.
|
|
8
|
+
*
|
|
9
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `hm` `op`.
|
|
10
|
+
*/
|
|
11
|
+
export type TextOrdOpe = {
|
|
12
|
+
v: SchemaVersion;
|
|
13
|
+
i: Identifier;
|
|
14
|
+
c: Ciphertext;
|
|
15
|
+
hm: Hmac256;
|
|
16
|
+
op: OpeCllw;
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Ciphertext } from "./Ciphertext";
|
|
2
|
+
import type { Hmac256 } from "./Hmac256";
|
|
3
|
+
import type { Identifier } from "./Identifier";
|
|
4
|
+
import type { OreBlock256 } from "./OreBlock256";
|
|
5
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
6
|
+
/**
|
|
7
|
+
* `eql_v3.text_ord_ore` — ordering domain.
|
|
8
|
+
*
|
|
9
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `hm` `ob`.
|
|
10
|
+
*/
|
|
11
|
+
export type TextOrdOre = {
|
|
12
|
+
v: SchemaVersion;
|
|
13
|
+
i: Identifier;
|
|
14
|
+
c: Ciphertext;
|
|
15
|
+
hm: Hmac256;
|
|
16
|
+
ob: OreBlock256;
|
|
17
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { BloomFilter } from "./BloomFilter";
|
|
2
|
+
import type { Ciphertext } from "./Ciphertext";
|
|
3
|
+
import type { Hmac256 } from "./Hmac256";
|
|
4
|
+
import type { Identifier } from "./Identifier";
|
|
5
|
+
import type { OreBlock256 } from "./OreBlock256";
|
|
6
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
7
|
+
/**
|
|
8
|
+
* `eql_v3.text_search` — search domain.
|
|
9
|
+
*
|
|
10
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=` `@>` `<@`. Required keys: `v` `i` `c` `hm` `ob` `bf`.
|
|
11
|
+
*/
|
|
12
|
+
export type TextSearch = {
|
|
13
|
+
v: SchemaVersion;
|
|
14
|
+
i: Identifier;
|
|
15
|
+
c: Ciphertext;
|
|
16
|
+
hm: Hmac256;
|
|
17
|
+
ob: OreBlock256;
|
|
18
|
+
bf: BloomFilter;
|
|
19
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Ciphertext } from "./Ciphertext";
|
|
2
|
+
import type { Identifier } from "./Identifier";
|
|
3
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
4
|
+
/**
|
|
5
|
+
* `eql_v3.timestamp` — storage-only domain.
|
|
6
|
+
*
|
|
7
|
+
* Operators: none. Required keys: `v` `i` `c`.
|
|
8
|
+
*/
|
|
9
|
+
export type Timestamp = {
|
|
10
|
+
v: SchemaVersion;
|
|
11
|
+
i: Identifier;
|
|
12
|
+
c: Ciphertext;
|
|
13
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Ciphertext } from "./Ciphertext";
|
|
2
|
+
import type { Hmac256 } from "./Hmac256";
|
|
3
|
+
import type { Identifier } from "./Identifier";
|
|
4
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
|
+
/**
|
|
6
|
+
* `eql_v3.timestamp_eq` — equality domain.
|
|
7
|
+
*
|
|
8
|
+
* Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`.
|
|
9
|
+
*/
|
|
10
|
+
export type TimestampEq = {
|
|
11
|
+
v: SchemaVersion;
|
|
12
|
+
i: Identifier;
|
|
13
|
+
c: Ciphertext;
|
|
14
|
+
hm: Hmac256;
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Ciphertext } from "./Ciphertext";
|
|
2
|
+
import type { Identifier } from "./Identifier";
|
|
3
|
+
import type { OreBlock256 } from "./OreBlock256";
|
|
4
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
|
+
/**
|
|
6
|
+
* `eql_v3.timestamp_ord` — ordering domain.
|
|
7
|
+
*
|
|
8
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.
|
|
9
|
+
*/
|
|
10
|
+
export type TimestampOrd = {
|
|
11
|
+
v: SchemaVersion;
|
|
12
|
+
i: Identifier;
|
|
13
|
+
c: Ciphertext;
|
|
14
|
+
ob: OreBlock256;
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Ciphertext } from "./Ciphertext";
|
|
2
|
+
import type { Identifier } from "./Identifier";
|
|
3
|
+
import type { OpeCllw } from "./OpeCllw";
|
|
4
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
|
+
/**
|
|
6
|
+
* `eql_v3.timestamp_ord_ope` — ordering domain.
|
|
7
|
+
*
|
|
8
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`.
|
|
9
|
+
*/
|
|
10
|
+
export type TimestampOrdOpe = {
|
|
11
|
+
v: SchemaVersion;
|
|
12
|
+
i: Identifier;
|
|
13
|
+
c: Ciphertext;
|
|
14
|
+
op: OpeCllw;
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Ciphertext } from "./Ciphertext";
|
|
2
|
+
import type { Identifier } from "./Identifier";
|
|
3
|
+
import type { OreBlock256 } from "./OreBlock256";
|
|
4
|
+
import type { SchemaVersion } from "./SchemaVersion";
|
|
5
|
+
/**
|
|
6
|
+
* `eql_v3.timestamp_ord_ore` — ordering domain.
|
|
7
|
+
*
|
|
8
|
+
* Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.
|
|
9
|
+
*/
|
|
10
|
+
export type TimestampOrdOre = {
|
|
11
|
+
v: SchemaVersion;
|
|
12
|
+
i: Identifier;
|
|
13
|
+
c: Ciphertext;
|
|
14
|
+
ob: OreBlock256;
|
|
15
|
+
};
|