@cipherstash/protect-ffi 0.26.0 → 0.28.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.
Files changed (142) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +130 -14
  3. package/dist/wasm/protect_ffi_bg.js +53 -11
  4. package/dist/wasm/protect_ffi_bg.wasm +0 -0
  5. package/dist/wasm/protect_ffi_bg.wasm.d.ts +7 -7
  6. package/dist/wasm/protect_ffi_inline.js +1 -1
  7. package/lib/bigintWire.d.ts +56 -0
  8. package/lib/bigintWire.js +83 -0
  9. package/lib/eql-v3-types/Bigint.d.ts +13 -0
  10. package/lib/eql-v3-types/Bigint.js +2 -0
  11. package/lib/eql-v3-types/BigintEq.d.ts +15 -0
  12. package/lib/eql-v3-types/BigintEq.js +2 -0
  13. package/lib/eql-v3-types/BigintOrd.d.ts +15 -0
  14. package/lib/eql-v3-types/BigintOrd.js +2 -0
  15. package/lib/eql-v3-types/BigintOrdOpe.d.ts +15 -0
  16. package/lib/eql-v3-types/BigintOrdOpe.js +2 -0
  17. package/lib/eql-v3-types/BigintOrdOre.d.ts +15 -0
  18. package/lib/eql-v3-types/BigintOrdOre.js +2 -0
  19. package/lib/eql-v3-types/BloomFilter.d.ts +9 -0
  20. package/lib/eql-v3-types/BloomFilter.js +5 -0
  21. package/lib/eql-v3-types/Boolean.d.ts +13 -0
  22. package/lib/eql-v3-types/Boolean.js +2 -0
  23. package/lib/eql-v3-types/Ciphertext.d.ts +6 -0
  24. package/lib/eql-v3-types/Ciphertext.js +5 -0
  25. package/lib/eql-v3-types/Date.d.ts +13 -0
  26. package/lib/eql-v3-types/Date.js +2 -0
  27. package/lib/eql-v3-types/DateEq.d.ts +15 -0
  28. package/lib/eql-v3-types/DateEq.js +2 -0
  29. package/lib/eql-v3-types/DateOrd.d.ts +15 -0
  30. package/lib/eql-v3-types/DateOrd.js +2 -0
  31. package/lib/eql-v3-types/DateOrdOpe.d.ts +15 -0
  32. package/lib/eql-v3-types/DateOrdOpe.js +2 -0
  33. package/lib/eql-v3-types/DateOrdOre.d.ts +15 -0
  34. package/lib/eql-v3-types/DateOrdOre.js +2 -0
  35. package/lib/eql-v3-types/Double.d.ts +13 -0
  36. package/lib/eql-v3-types/Double.js +2 -0
  37. package/lib/eql-v3-types/DoubleEq.d.ts +15 -0
  38. package/lib/eql-v3-types/DoubleEq.js +2 -0
  39. package/lib/eql-v3-types/DoubleOrd.d.ts +15 -0
  40. package/lib/eql-v3-types/DoubleOrd.js +2 -0
  41. package/lib/eql-v3-types/DoubleOrdOpe.d.ts +15 -0
  42. package/lib/eql-v3-types/DoubleOrdOpe.js +2 -0
  43. package/lib/eql-v3-types/DoubleOrdOre.d.ts +15 -0
  44. package/lib/eql-v3-types/DoubleOrdOre.js +2 -0
  45. package/lib/eql-v3-types/Hmac256.d.ts +5 -0
  46. package/lib/eql-v3-types/Hmac256.js +5 -0
  47. package/lib/eql-v3-types/Identifier.d.ts +15 -0
  48. package/lib/eql-v3-types/Identifier.js +5 -0
  49. package/lib/eql-v3-types/Integer.d.ts +13 -0
  50. package/lib/eql-v3-types/Integer.js +2 -0
  51. package/lib/eql-v3-types/IntegerEq.d.ts +15 -0
  52. package/lib/eql-v3-types/IntegerEq.js +2 -0
  53. package/lib/eql-v3-types/IntegerOrd.d.ts +15 -0
  54. package/lib/eql-v3-types/IntegerOrd.js +2 -0
  55. package/lib/eql-v3-types/IntegerOrdOpe.d.ts +15 -0
  56. package/lib/eql-v3-types/IntegerOrdOpe.js +2 -0
  57. package/lib/eql-v3-types/IntegerOrdOre.d.ts +15 -0
  58. package/lib/eql-v3-types/IntegerOrdOre.js +2 -0
  59. package/lib/eql-v3-types/Numeric.d.ts +13 -0
  60. package/lib/eql-v3-types/Numeric.js +2 -0
  61. package/lib/eql-v3-types/NumericEq.d.ts +15 -0
  62. package/lib/eql-v3-types/NumericEq.js +2 -0
  63. package/lib/eql-v3-types/NumericOrd.d.ts +15 -0
  64. package/lib/eql-v3-types/NumericOrd.js +2 -0
  65. package/lib/eql-v3-types/NumericOrdOpe.d.ts +15 -0
  66. package/lib/eql-v3-types/NumericOrdOpe.js +2 -0
  67. package/lib/eql-v3-types/NumericOrdOre.d.ts +15 -0
  68. package/lib/eql-v3-types/NumericOrdOre.js +2 -0
  69. package/lib/eql-v3-types/OpeCllw.d.ts +9 -0
  70. package/lib/eql-v3-types/OpeCllw.js +5 -0
  71. package/lib/eql-v3-types/OreBlock256.d.ts +9 -0
  72. package/lib/eql-v3-types/OreBlock256.js +5 -0
  73. package/lib/eql-v3-types/OreCllw.d.ts +7 -0
  74. package/lib/eql-v3-types/OreCllw.js +5 -0
  75. package/lib/eql-v3-types/Real.d.ts +13 -0
  76. package/lib/eql-v3-types/Real.js +2 -0
  77. package/lib/eql-v3-types/RealEq.d.ts +15 -0
  78. package/lib/eql-v3-types/RealEq.js +2 -0
  79. package/lib/eql-v3-types/RealOrd.d.ts +15 -0
  80. package/lib/eql-v3-types/RealOrd.js +2 -0
  81. package/lib/eql-v3-types/RealOrdOpe.d.ts +15 -0
  82. package/lib/eql-v3-types/RealOrdOpe.js +2 -0
  83. package/lib/eql-v3-types/RealOrdOre.d.ts +15 -0
  84. package/lib/eql-v3-types/RealOrdOre.js +2 -0
  85. package/lib/eql-v3-types/SchemaVersion.d.ts +10 -0
  86. package/lib/eql-v3-types/SchemaVersion.js +5 -0
  87. package/lib/eql-v3-types/Selector.d.ts +5 -0
  88. package/lib/eql-v3-types/Selector.js +5 -0
  89. package/lib/eql-v3-types/Smallint.d.ts +13 -0
  90. package/lib/eql-v3-types/Smallint.js +2 -0
  91. package/lib/eql-v3-types/SmallintEq.d.ts +15 -0
  92. package/lib/eql-v3-types/SmallintEq.js +2 -0
  93. package/lib/eql-v3-types/SmallintOrd.d.ts +15 -0
  94. package/lib/eql-v3-types/SmallintOrd.js +2 -0
  95. package/lib/eql-v3-types/SmallintOrdOpe.d.ts +15 -0
  96. package/lib/eql-v3-types/SmallintOrdOpe.js +2 -0
  97. package/lib/eql-v3-types/SmallintOrdOre.d.ts +15 -0
  98. package/lib/eql-v3-types/SmallintOrdOre.js +2 -0
  99. package/lib/eql-v3-types/SteVecDocument.d.ts +15 -0
  100. package/lib/eql-v3-types/SteVecDocument.js +2 -0
  101. package/lib/eql-v3-types/SteVecEntry.d.ts +19 -0
  102. package/lib/eql-v3-types/SteVecEntry.js +2 -0
  103. package/lib/eql-v3-types/SteVecForm.d.ts +18 -0
  104. package/lib/eql-v3-types/SteVecForm.js +5 -0
  105. package/lib/eql-v3-types/SteVecQuery.d.ts +7 -0
  106. package/lib/eql-v3-types/SteVecQuery.js +2 -0
  107. package/lib/eql-v3-types/SteVecQueryEntry.d.ts +15 -0
  108. package/lib/eql-v3-types/SteVecQueryEntry.js +2 -0
  109. package/lib/eql-v3-types/SteVecTerm.d.ts +11 -0
  110. package/lib/eql-v3-types/SteVecTerm.js +2 -0
  111. package/lib/eql-v3-types/Text.d.ts +13 -0
  112. package/lib/eql-v3-types/Text.js +2 -0
  113. package/lib/eql-v3-types/TextEq.d.ts +15 -0
  114. package/lib/eql-v3-types/TextEq.js +2 -0
  115. package/lib/eql-v3-types/TextMatch.d.ts +15 -0
  116. package/lib/eql-v3-types/TextMatch.js +2 -0
  117. package/lib/eql-v3-types/TextOrd.d.ts +17 -0
  118. package/lib/eql-v3-types/TextOrd.js +2 -0
  119. package/lib/eql-v3-types/TextOrdOpe.d.ts +17 -0
  120. package/lib/eql-v3-types/TextOrdOpe.js +2 -0
  121. package/lib/eql-v3-types/TextOrdOre.d.ts +17 -0
  122. package/lib/eql-v3-types/TextOrdOre.js +2 -0
  123. package/lib/eql-v3-types/TextSearch.d.ts +19 -0
  124. package/lib/eql-v3-types/TextSearch.js +2 -0
  125. package/lib/eql-v3-types/Timestamp.d.ts +13 -0
  126. package/lib/eql-v3-types/Timestamp.js +2 -0
  127. package/lib/eql-v3-types/TimestampEq.d.ts +15 -0
  128. package/lib/eql-v3-types/TimestampEq.js +2 -0
  129. package/lib/eql-v3-types/TimestampOrd.d.ts +15 -0
  130. package/lib/eql-v3-types/TimestampOrd.js +2 -0
  131. package/lib/eql-v3-types/TimestampOrdOpe.d.ts +15 -0
  132. package/lib/eql-v3-types/TimestampOrdOpe.js +2 -0
  133. package/lib/eql-v3-types/TimestampOrdOre.d.ts +15 -0
  134. package/lib/eql-v3-types/TimestampOrdOre.js +2 -0
  135. package/lib/eql-v3.d.ts +90 -0
  136. package/lib/eql-v3.js +6 -0
  137. package/lib/errors.d.ts +14 -0
  138. package/lib/errors.js +77 -0
  139. package/lib/index.cjs +43 -63
  140. package/lib/index.d.cts +86 -25
  141. package/lib/normalizeEncryptConfig.d.ts +1 -1
  142. package/package.json +12 -12
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Internal wire encoding for JS `bigint` plaintexts crossing the Neon
3
+ * boundary.
4
+ *
5
+ * The native addon extracts every options object with neon's `Json`
6
+ * extractor, which runs `JSON.stringify` on the JS side — and
7
+ * `JSON.stringify` throws a `TypeError` on any `bigint`. So `bigint`
8
+ * plaintexts are bounds-checked against i64 here (with a clear
9
+ * `RangeError`) and encoded into the tagged single-key map
10
+ * `{"__protect_ffi_bigint__": "<decimal string>"}`, which the Rust side
11
+ * deserializes into `JsPlaintext::BigInt`. The value is a decimal string,
12
+ * not a number: an i64-magnitude number literal would already have lost
13
+ * precision beyond 2^53.
14
+ *
15
+ * The wasm build performs the equivalent encoding in Rust
16
+ * (`encode_plaintext` in `crates/protect-ffi/src/wasm.rs`) because
17
+ * wasm consumers call the wasm-bindgen exports directly, without this
18
+ * wrapper.
19
+ *
20
+ * The decrypt direction needs no decoding: the native addon constructs a
21
+ * real JS `bigint` (`JsBigInt::from_i64` on Neon, `js_sys::BigInt` on
22
+ * wasm).
23
+ */
24
+ /** Must match `BIGINT_WIRE_KEY` in `crates/protect-ffi/src/js_plaintext.rs`. */
25
+ export declare const BIGINT_WIRE_KEY = "__protect_ffi_bigint__";
26
+ /** Smallest value an encrypted bigint column can store (i64::MIN). */
27
+ export declare const BIGINT_MIN: bigint;
28
+ /** Largest value an encrypted bigint column can store (i64::MAX). */
29
+ export declare const BIGINT_MAX: bigint;
30
+ /** The tagged wire form a `bigint` plaintext crosses the boundary in. */
31
+ export type BigIntWire = {
32
+ [K in typeof BIGINT_WIRE_KEY]: string;
33
+ };
34
+ /**
35
+ * Encode a `bigint` plaintext into its tagged wire form, throwing a
36
+ * `RangeError` (naming the i64 bounds and the offending direction) when
37
+ * the value does not fit a signed 64-bit integer. Non-`bigint` values pass
38
+ * through untouched. The error deliberately does not echo the value: it is
39
+ * plaintext being encrypted.
40
+ */
41
+ export declare function encodeBigIntPlaintext<T>(plaintext: T | bigint): T | BigIntWire;
42
+ /**
43
+ * Return `opts` with a `bigint` `plaintext` replaced by its tagged wire
44
+ * form. When the plaintext is not a `bigint`, the original object is
45
+ * returned unchanged (no clone).
46
+ */
47
+ export declare function withEncodedPlaintext<T extends {
48
+ plaintext: unknown;
49
+ }>(opts: T): T;
50
+ /**
51
+ * Bulk variant of {@link withEncodedPlaintext}: returns the original array
52
+ * (no clone) when no payload carries a `bigint` plaintext.
53
+ */
54
+ export declare function withEncodedPlaintexts<T extends {
55
+ plaintext: unknown;
56
+ }>(payloads: T[]): T[];
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ /**
3
+ * Internal wire encoding for JS `bigint` plaintexts crossing the Neon
4
+ * boundary.
5
+ *
6
+ * The native addon extracts every options object with neon's `Json`
7
+ * extractor, which runs `JSON.stringify` on the JS side — and
8
+ * `JSON.stringify` throws a `TypeError` on any `bigint`. So `bigint`
9
+ * plaintexts are bounds-checked against i64 here (with a clear
10
+ * `RangeError`) and encoded into the tagged single-key map
11
+ * `{"__protect_ffi_bigint__": "<decimal string>"}`, which the Rust side
12
+ * deserializes into `JsPlaintext::BigInt`. The value is a decimal string,
13
+ * not a number: an i64-magnitude number literal would already have lost
14
+ * precision beyond 2^53.
15
+ *
16
+ * The wasm build performs the equivalent encoding in Rust
17
+ * (`encode_plaintext` in `crates/protect-ffi/src/wasm.rs`) because
18
+ * wasm consumers call the wasm-bindgen exports directly, without this
19
+ * wrapper.
20
+ *
21
+ * The decrypt direction needs no decoding: the native addon constructs a
22
+ * real JS `bigint` (`JsBigInt::from_i64` on Neon, `js_sys::BigInt` on
23
+ * wasm).
24
+ */
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.BIGINT_MAX = exports.BIGINT_MIN = exports.BIGINT_WIRE_KEY = void 0;
27
+ exports.encodeBigIntPlaintext = encodeBigIntPlaintext;
28
+ exports.withEncodedPlaintext = withEncodedPlaintext;
29
+ exports.withEncodedPlaintexts = withEncodedPlaintexts;
30
+ /** Must match `BIGINT_WIRE_KEY` in `crates/protect-ffi/src/js_plaintext.rs`. */
31
+ exports.BIGINT_WIRE_KEY = '__protect_ffi_bigint__';
32
+ /** Smallest value an encrypted bigint column can store (i64::MIN). */
33
+ exports.BIGINT_MIN = -(2n ** 63n);
34
+ /** Largest value an encrypted bigint column can store (i64::MAX). */
35
+ exports.BIGINT_MAX = 2n ** 63n - 1n;
36
+ const I64_BOUNDS_SUFFIX = 'encrypted bigint values must fit in a signed 64-bit integer ' +
37
+ '(-9223372036854775808 to 9223372036854775807)';
38
+ /**
39
+ * Encode a `bigint` plaintext into its tagged wire form, throwing a
40
+ * `RangeError` (naming the i64 bounds and the offending direction) when
41
+ * the value does not fit a signed 64-bit integer. Non-`bigint` values pass
42
+ * through untouched. The error deliberately does not echo the value: it is
43
+ * plaintext being encrypted.
44
+ */
45
+ function encodeBigIntPlaintext(plaintext) {
46
+ if (typeof plaintext !== 'bigint') {
47
+ return plaintext;
48
+ }
49
+ if (plaintext > exports.BIGINT_MAX) {
50
+ throw new RangeError(`BigInt plaintext is above the maximum supported value: ${I64_BOUNDS_SUFFIX}`);
51
+ }
52
+ if (plaintext < exports.BIGINT_MIN) {
53
+ throw new RangeError(`BigInt plaintext is below the minimum supported value: ${I64_BOUNDS_SUFFIX}`);
54
+ }
55
+ return { [exports.BIGINT_WIRE_KEY]: plaintext.toString() };
56
+ }
57
+ /**
58
+ * Return `opts` with a `bigint` `plaintext` replaced by its tagged wire
59
+ * form. When the plaintext is not a `bigint`, the original object is
60
+ * returned unchanged (no clone).
61
+ */
62
+ function withEncodedPlaintext(opts) {
63
+ // `opts?.` (matching the detection pass in withEncodedPlaintexts): a
64
+ // null/undefined element must fall through to native's own validation
65
+ // error rather than throw a raw property-access TypeError here — the
66
+ // error a bad element produces must not depend on whether a *sibling*
67
+ // element happens to carry a bigint.
68
+ if (typeof opts?.plaintext !== 'bigint') {
69
+ return opts;
70
+ }
71
+ return { ...opts, plaintext: encodeBigIntPlaintext(opts.plaintext) };
72
+ }
73
+ /**
74
+ * Bulk variant of {@link withEncodedPlaintext}: returns the original array
75
+ * (no clone) when no payload carries a `bigint` plaintext.
76
+ */
77
+ function withEncodedPlaintexts(payloads) {
78
+ if (!Array.isArray(payloads) ||
79
+ !payloads.some((p) => typeof p?.plaintext === 'bigint')) {
80
+ return payloads;
81
+ }
82
+ return payloads.map(withEncodedPlaintext);
83
+ }
@@ -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.bigint` — storage-only domain.
6
+ *
7
+ * Operators: none. Required keys: `v` `i` `c`.
8
+ */
9
+ export type Bigint = {
10
+ v: SchemaVersion;
11
+ i: Identifier;
12
+ c: Ciphertext;
13
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.bigint_eq` — equality domain.
7
+ *
8
+ * Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`.
9
+ */
10
+ export type BigintEq = {
11
+ v: SchemaVersion;
12
+ i: Identifier;
13
+ c: Ciphertext;
14
+ hm: Hmac256;
15
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.bigint_ord` — ordering domain.
7
+ *
8
+ * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.
9
+ */
10
+ export type BigintOrd = {
11
+ v: SchemaVersion;
12
+ i: Identifier;
13
+ c: Ciphertext;
14
+ ob: OreBlock256;
15
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.bigint_ord_ope` — ordering domain.
7
+ *
8
+ * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`.
9
+ */
10
+ export type BigintOrdOpe = {
11
+ v: SchemaVersion;
12
+ i: Identifier;
13
+ c: Ciphertext;
14
+ op: OpeCllw;
15
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.bigint_ord_ore` — ordering domain.
7
+ *
8
+ * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.
9
+ */
10
+ export type BigintOrdOre = {
11
+ v: SchemaVersion;
12
+ i: Identifier;
13
+ c: Ciphertext;
14
+ ob: OreBlock256;
15
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Bloom-filter match term — the `bf` wire key. Backs the `_match` domains
3
+ * (`@>`/`<@` containment).
4
+ *
5
+ * **Signed** i16, not u16: EQL stores the filter as PostgreSQL `smallint[]`,
6
+ * and filters sized above 32768 emit upper-half bit positions as negative
7
+ * signed values.
8
+ */
9
+ export type BloomFilter = Array<number>;
@@ -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.boolean` — storage-only domain.
6
+ *
7
+ * Operators: none. Required keys: `v` `i` `c`.
8
+ */
9
+ export type Boolean = {
10
+ v: SchemaVersion;
11
+ i: Identifier;
12
+ c: Ciphertext;
13
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * mp_base85 source ciphertext — the `c` envelope key.
3
+ *
4
+ * Required by every v3 domain CHECK; present on every payload.
5
+ */
6
+ export type Ciphertext = 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.date` — storage-only domain.
6
+ *
7
+ * Operators: none. Required keys: `v` `i` `c`.
8
+ */
9
+ export type Date = {
10
+ v: SchemaVersion;
11
+ i: Identifier;
12
+ c: Ciphertext;
13
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.date_eq` — equality domain.
7
+ *
8
+ * Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`.
9
+ */
10
+ export type DateEq = {
11
+ v: SchemaVersion;
12
+ i: Identifier;
13
+ c: Ciphertext;
14
+ hm: Hmac256;
15
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.date_ord` — ordering domain.
7
+ *
8
+ * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.
9
+ */
10
+ export type DateOrd = {
11
+ v: SchemaVersion;
12
+ i: Identifier;
13
+ c: Ciphertext;
14
+ ob: OreBlock256;
15
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.date_ord_ope` — ordering domain.
7
+ *
8
+ * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`.
9
+ */
10
+ export type DateOrdOpe = {
11
+ v: SchemaVersion;
12
+ i: Identifier;
13
+ c: Ciphertext;
14
+ op: OpeCllw;
15
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.date_ord_ore` — ordering domain.
7
+ *
8
+ * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.
9
+ */
10
+ export type DateOrdOre = {
11
+ v: SchemaVersion;
12
+ i: Identifier;
13
+ c: Ciphertext;
14
+ ob: OreBlock256;
15
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ 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.double` — storage-only domain.
6
+ *
7
+ * Operators: none. Required keys: `v` `i` `c`.
8
+ */
9
+ export type Double = {
10
+ v: SchemaVersion;
11
+ i: Identifier;
12
+ c: Ciphertext;
13
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.double_eq` — equality domain.
7
+ *
8
+ * Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`.
9
+ */
10
+ export type DoubleEq = {
11
+ v: SchemaVersion;
12
+ i: Identifier;
13
+ c: Ciphertext;
14
+ hm: Hmac256;
15
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.double_ord` — ordering domain.
7
+ *
8
+ * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.
9
+ */
10
+ export type DoubleOrd = {
11
+ v: SchemaVersion;
12
+ i: Identifier;
13
+ c: Ciphertext;
14
+ ob: OreBlock256;
15
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.double_ord_ope` — ordering domain.
7
+ *
8
+ * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`.
9
+ */
10
+ export type DoubleOrdOpe = {
11
+ v: SchemaVersion;
12
+ i: Identifier;
13
+ c: Ciphertext;
14
+ op: OpeCllw;
15
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.double_ord_ore` — ordering domain.
7
+ *
8
+ * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.
9
+ */
10
+ export type DoubleOrdOre = {
11
+ v: SchemaVersion;
12
+ i: Identifier;
13
+ c: Ciphertext;
14
+ ob: OreBlock256;
15
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ /**
2
+ * HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains
3
+ * (`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.
4
+ */
5
+ export type Hmac256 = 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,15 @@
1
+ /**
2
+ * Table + column identifier — wire shape `{"t": "...", "c": "..."}`.
3
+ *
4
+ * Shared by every payload.
5
+ */
6
+ export type Identifier = {
7
+ /**
8
+ * Table name.
9
+ */
10
+ t: string;
11
+ /**
12
+ * Column name.
13
+ */
14
+ c: string;
15
+ };
@@ -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.integer` — storage-only domain.
6
+ *
7
+ * Operators: none. Required keys: `v` `i` `c`.
8
+ */
9
+ export type Integer = {
10
+ v: SchemaVersion;
11
+ i: Identifier;
12
+ c: Ciphertext;
13
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.integer_eq` — equality domain.
7
+ *
8
+ * Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`.
9
+ */
10
+ export type IntegerEq = {
11
+ v: SchemaVersion;
12
+ i: Identifier;
13
+ c: Ciphertext;
14
+ hm: Hmac256;
15
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.integer_ord` — ordering domain.
7
+ *
8
+ * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.
9
+ */
10
+ export type IntegerOrd = {
11
+ v: SchemaVersion;
12
+ i: Identifier;
13
+ c: Ciphertext;
14
+ ob: OreBlock256;
15
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.integer_ord_ope` — ordering domain.
7
+ *
8
+ * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`.
9
+ */
10
+ export type IntegerOrdOpe = {
11
+ v: SchemaVersion;
12
+ i: Identifier;
13
+ c: Ciphertext;
14
+ op: OpeCllw;
15
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.integer_ord_ore` — ordering domain.
7
+ *
8
+ * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.
9
+ */
10
+ export type IntegerOrdOre = {
11
+ v: SchemaVersion;
12
+ i: Identifier;
13
+ c: Ciphertext;
14
+ ob: OreBlock256;
15
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });