@katlux/providers 0.1.1-alpha.134 → 0.1.1-alpha.135
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 +1 -1
- package/dist/index.cjs +554 -231
- package/dist/index.d.cts +41 -29
- package/dist/index.d.mts +41 -29
- package/dist/index.d.ts +41 -29
- package/dist/index.mjs +554 -232
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -464,28 +464,6 @@ interface INormalizeOptions {
|
|
|
464
464
|
* - Final lowercasing and NFKC normalization.
|
|
465
465
|
*/
|
|
466
466
|
declare function foldAscii(value: string): string;
|
|
467
|
-
/**
|
|
468
|
-
* Canonical normalization primitive shared across:
|
|
469
|
-
* - In-memory filter evaluations (`filterLogic.ts`)
|
|
470
|
-
* - Trigram search indexing (`CSearchIndex.ts`)
|
|
471
|
-
* - Blind-index token generation (`CKeyManager.ts`)
|
|
472
|
-
* - Encrypted filter rewrites (`rewriteEncryptedFilters.ts`)
|
|
473
|
-
*
|
|
474
|
-
* Default behavior:
|
|
475
|
-
* - Coerces value to string
|
|
476
|
-
* - Normalizes via Unicode NFKC (Compatibility Decomposition followed by Canonical Composition)
|
|
477
|
-
* - Trims leading and trailing whitespace
|
|
478
|
-
* - Converts to lowercase via standard Unicode case folding
|
|
479
|
-
* - Strips combining dot above (U+0307) so capital dotted 'İ' matches lowercase 'i' by default
|
|
480
|
-
* - Folds Greek final sigma (ς / U+03C2) to medial sigma (σ / U+03C3) so queries match across word boundaries
|
|
481
|
-
*
|
|
482
|
-
* Configurable options:
|
|
483
|
-
* - `locale`: When provided (such as 'tr' or 'tr-TR'), uses `toLocaleLowerCase(locale)`
|
|
484
|
-
* ensuring Turkish dotted/dotless I conversions (İ -> i, I -> ı).
|
|
485
|
-
* - `asciiFold`: When true, maps diacritics and extended Latin characters to pure ASCII equivalents
|
|
486
|
-
* ensuring cross-locale equivalence (e.g. 'Çelik' == 'Celik', 'Łódź' == 'lodz', 'Straße' == 'strasse').
|
|
487
|
-
* - `normalizer`: Optional custom transformer invoked after baseline normalization.
|
|
488
|
-
*/
|
|
489
467
|
declare function normalizeFilterValue(value: any, options?: INormalizeOptions): string;
|
|
490
468
|
|
|
491
469
|
/**
|
|
@@ -1819,8 +1797,9 @@ declare class CSearchIndex {
|
|
|
1819
1797
|
declare abstract class AEncryptedClientProvider<TRow = TDataRow> extends ADataProvider<TRow> {
|
|
1820
1798
|
encryption?: IProviderEncryptionOptions;
|
|
1821
1799
|
protected _searchIndex?: CSearchIndex;
|
|
1822
|
-
protected _decryptedCache: Map<string | number, TRow>;
|
|
1823
1800
|
protected _decryptedRefCache: WeakMap<object, TRow>;
|
|
1801
|
+
protected _idToEncryptedRef: Map<string | number, object>;
|
|
1802
|
+
protected _decryptedCache: Map<string | number, TRow>;
|
|
1824
1803
|
constructor(options?: IDataProviderOptions);
|
|
1825
1804
|
get isEncryptionEnabled(): boolean;
|
|
1826
1805
|
get searchIndex(): CSearchIndex | undefined;
|
|
@@ -1837,7 +1816,11 @@ declare abstract class AEncryptedClientProvider<TRow = TDataRow> extends ADataPr
|
|
|
1837
1816
|
* Evicts a single row or row ID from both `_decryptedCache` and `_decryptedRefCache`.
|
|
1838
1817
|
*/
|
|
1839
1818
|
evictDecryptedRow(rowOrId: any): void;
|
|
1840
|
-
|
|
1819
|
+
private _forEachChunk;
|
|
1820
|
+
populateDecryptedCache(rows: TRow[], options?: {
|
|
1821
|
+
chunkSize?: number;
|
|
1822
|
+
isStale?: () => boolean;
|
|
1823
|
+
}): Promise<void>;
|
|
1841
1824
|
isFieldEncrypted(field: string, sampleRows?: TRow[]): boolean;
|
|
1842
1825
|
warnIfEncryptedFilterWithoutSupport(filter: IDataFilter | any, sampleRows?: TRow[]): void;
|
|
1843
1826
|
protected _guardEncryptedSorting(sortList: IDataSort[]): void;
|
|
@@ -1845,13 +1828,19 @@ declare abstract class AEncryptedClientProvider<TRow = TDataRow> extends ADataPr
|
|
|
1845
1828
|
protected _initSearchIndex(): void;
|
|
1846
1829
|
setEncryption(encryption?: IProviderEncryptionOptions): void;
|
|
1847
1830
|
clearEncryption(): void;
|
|
1831
|
+
protected _getApiUrl(): string | undefined;
|
|
1832
|
+
private _extractPlainFields;
|
|
1833
|
+
private _indexEncryptedRows;
|
|
1848
1834
|
protected encryptRows(rows: TRow[]): Promise<TRow[]>;
|
|
1849
1835
|
protected encryptRowsChunked(rows: TRow[], options?: ISetDataChunkedOptions): Promise<TRow[]>;
|
|
1850
1836
|
/**
|
|
1851
1837
|
* Indexes pre-encrypted rows by performing a transient in-memory decryption pass
|
|
1852
1838
|
* on search fields to populate CSearchIndex without mutating underlying encrypted records in allData.
|
|
1853
1839
|
*/
|
|
1854
|
-
indexPreEncryptedRows(rows: TRow[]
|
|
1840
|
+
indexPreEncryptedRows(rows: TRow[], options?: {
|
|
1841
|
+
chunkSize?: number;
|
|
1842
|
+
isStale?: () => boolean;
|
|
1843
|
+
}): Promise<void>;
|
|
1855
1844
|
decryptRows(rows: TRow[]): Promise<{
|
|
1856
1845
|
rows: TRow[];
|
|
1857
1846
|
decrypted: boolean;
|
|
@@ -1870,8 +1859,14 @@ interface IProviderEncryptionHost<TRow> {
|
|
|
1870
1859
|
idKey: string;
|
|
1871
1860
|
encryptRows(rows: TRow[]): Promise<TRow[]>;
|
|
1872
1861
|
encryptRowsChunked(rows: TRow[], options?: ISetDataChunkedOptions): Promise<TRow[]>;
|
|
1873
|
-
indexPreEncryptedRows(rows: TRow[]
|
|
1874
|
-
|
|
1862
|
+
indexPreEncryptedRows(rows: TRow[], options?: {
|
|
1863
|
+
chunkSize?: number;
|
|
1864
|
+
isStale?: () => boolean;
|
|
1865
|
+
}): Promise<void>;
|
|
1866
|
+
populateDecryptedCache(rows: TRow[], options?: {
|
|
1867
|
+
chunkSize?: number;
|
|
1868
|
+
isStale?: () => boolean;
|
|
1869
|
+
}): Promise<void>;
|
|
1875
1870
|
cacheDecryptedRow(encryptedRow: any, decryptedRow: TRow): void;
|
|
1876
1871
|
getDecryptedRow(rowOrId: any): TRow | undefined;
|
|
1877
1872
|
decryptRows(rows: TRow[]): Promise<{
|
|
@@ -1893,6 +1888,7 @@ declare class CFlatClientDataProvider<TRow = TDataRow> extends AEncryptedClientP
|
|
|
1893
1888
|
batchSize: number | false;
|
|
1894
1889
|
batchLoad: 'initially' | 'onDemand';
|
|
1895
1890
|
onDemandFilterPolicy: 'ingestAll' | 'warnOnly';
|
|
1891
|
+
maxCachedBatches?: number;
|
|
1896
1892
|
onBatchLoaded?: (batch: IBatchLoadedEvent<TRow>) => void;
|
|
1897
1893
|
loadedBatches: Set<number>;
|
|
1898
1894
|
protected _rawSourceData?: TRow[];
|
|
@@ -1905,6 +1901,11 @@ declare class CFlatClientDataProvider<TRow = TDataRow> extends AEncryptedClientP
|
|
|
1905
1901
|
protected _batchGeneration: number;
|
|
1906
1902
|
protected _inFlightLoad?: Promise<void>;
|
|
1907
1903
|
constructor(options?: IDataProviderOptions);
|
|
1904
|
+
/**
|
|
1905
|
+
* Evicts oldest loaded batches when maxCachedBatches is configured and exceeded,
|
|
1906
|
+
* clearing their slots in _allData so they can be re-fetched on demand.
|
|
1907
|
+
*/
|
|
1908
|
+
protected _evictOldestBatchesIfNeeded(activeBatch?: number): void;
|
|
1908
1909
|
protected _assignAllData(data: TRow[], preserveDecryptedCache?: boolean): void;
|
|
1909
1910
|
get allData(): TRow[];
|
|
1910
1911
|
set allData(data: TRow[]);
|
|
@@ -1995,6 +1996,7 @@ declare class CAPIFlatClientDataProvider<TRow = TDataRow> extends CFlatClientDat
|
|
|
1995
1996
|
private _lastDataReceivedPromise;
|
|
1996
1997
|
private _lastBatch1CallbackGen;
|
|
1997
1998
|
private _suppressOnDemandWarn;
|
|
1999
|
+
protected _getApiUrl(): string | undefined;
|
|
1998
2000
|
setData(data: TRow[]): Promise<void> | void;
|
|
1999
2001
|
protected _assignAllData(data: TRow[], preserveDecryptedCache?: boolean): void;
|
|
2000
2002
|
set allData(data: TRow[]);
|
|
@@ -2146,9 +2148,12 @@ declare class CTreeClientDataProvider<TRow extends TDataRow = TDataRow> extends
|
|
|
2146
2148
|
private _filteredNodesCache;
|
|
2147
2149
|
private _allVisibleRowsCache;
|
|
2148
2150
|
protected _decryptedNodeMap: Map<string | number, TRow>;
|
|
2151
|
+
protected _knownIds: Set<string | number>;
|
|
2149
2152
|
clearDecryptedCache(): void;
|
|
2150
2153
|
invalidateDecryptedRow(rowOrId: any): void;
|
|
2151
2154
|
protected _assignAllData(data: TRow[], preserveDecryptedCache?: boolean): void;
|
|
2155
|
+
/** Appends unique rows in-place using _knownIds without cloning allData. */
|
|
2156
|
+
protected _appendUniqueTreeRows(rows: TRow[]): boolean;
|
|
2152
2157
|
get allData(): TRow[];
|
|
2153
2158
|
set allData(data: TRow[]);
|
|
2154
2159
|
invalidateStaticCache(): void;
|
|
@@ -2218,6 +2223,7 @@ declare class CAPITreeClientDataProvider<TRow extends TDataRow = TDataRow> exten
|
|
|
2218
2223
|
protected _abortController?: AbortController;
|
|
2219
2224
|
private _lastDataReceivedPromise;
|
|
2220
2225
|
private _lastBatch1CallbackGen;
|
|
2226
|
+
protected _getApiUrl(): string | undefined;
|
|
2221
2227
|
setData(data: TRow[]): Promise<void> | void;
|
|
2222
2228
|
protected _bumpRequestGeneration(nextUrl?: string): number;
|
|
2223
2229
|
private _shouldSkipDecryption;
|
|
@@ -2238,7 +2244,9 @@ declare class CAPITreeClientDataProvider<TRow extends TDataRow = TDataRow> exten
|
|
|
2238
2244
|
private _initialFetch;
|
|
2239
2245
|
protected _fetchBatchedTree(reqGen: number, batchGen: number, disableCache: boolean, shouldSkipDecryption: boolean): Promise<void>;
|
|
2240
2246
|
protected _streamRemainingTreeBatches(reqGen: number, batchGen: number, batchSize: number, disableCache: boolean, shouldSkipDecryption: boolean, startPage?: number): Promise<void>;
|
|
2241
|
-
loadBatch(batchNumber: number
|
|
2247
|
+
loadBatch(batchNumber: number, options?: {
|
|
2248
|
+
skipPageLoad?: boolean;
|
|
2249
|
+
}): Promise<void>;
|
|
2242
2250
|
ensureRangeLoaded(startIndex: number, endIndex: number): Promise<void>;
|
|
2243
2251
|
loadRange(startIndex: number, endIndex: number): Promise<void>;
|
|
2244
2252
|
setCurrentPage(currentPage: number): Promise<void>;
|
|
@@ -2848,6 +2856,7 @@ declare const applyOperator: (operator: string, rowValue: any, filterValue: any,
|
|
|
2848
2856
|
* Normalizes standard and shorthand filter structures into a canonical IDataFilter tree.
|
|
2849
2857
|
*/
|
|
2850
2858
|
declare const normalizeFilter: (filter: any) => IDataFilter | null;
|
|
2859
|
+
declare const compileFilter: (filter: IDataFilter | any, options?: INormalizeOptions) => ((row: TDataRow) => boolean);
|
|
2851
2860
|
declare const evaluateFilter: (filter: IDataFilter | any, row: TDataRow, options?: INormalizeOptions) => boolean;
|
|
2852
2861
|
declare const filterTreeData: (nodes: any[], filter: IDataFilter, options: {
|
|
2853
2862
|
idKey: string;
|
|
@@ -3769,6 +3778,7 @@ declare class CWebCryptoEncryptionProvider extends AEncryptionProvider {
|
|
|
3769
3778
|
private _inflightKeyCache;
|
|
3770
3779
|
setDefaultKey(key: TKeyProvider): void;
|
|
3771
3780
|
clearKeys(): void;
|
|
3781
|
+
setKeyring(keys: Record<string, TKeyProvider | IKeyPair>, activeKid?: string): void;
|
|
3772
3782
|
constructor(key?: TKeyProvider | IKeyPair, options?: ICWebCryptoOptions);
|
|
3773
3783
|
/**
|
|
3774
3784
|
* Derives or returns a CryptoKey for encryption/decryption based on KDF settings.
|
|
@@ -3817,9 +3827,11 @@ declare class CWebCryptoAESCBCProvider extends AEncryptionProvider {
|
|
|
3817
3827
|
private _cachedKeyId?;
|
|
3818
3828
|
private _kdfOptions?;
|
|
3819
3829
|
private _decryptSaltCache;
|
|
3830
|
+
private _inflightKeyCache;
|
|
3820
3831
|
constructor(key?: TKeyProvider | IKeyPair | any, options?: ICWebCryptoAESCBCOptions);
|
|
3821
3832
|
setDefaultKey(key: TKeyProvider | IKeyPair): void;
|
|
3822
3833
|
clearKeys(): void;
|
|
3834
|
+
setKeyring(keys: Record<string, TKeyProvider | IKeyPair>, activeKid?: string): void;
|
|
3823
3835
|
warmupKey(options?: IEncryptionContext): Promise<void>;
|
|
3824
3836
|
/**
|
|
3825
3837
|
* Derives 64 bytes (512 bits) of key material:
|
|
@@ -4468,5 +4480,5 @@ declare function resolveBucketsForRange(operator: string, targetValue: any, conf
|
|
|
4468
4480
|
*/
|
|
4469
4481
|
declare function isEncrypted(payload: any): boolean;
|
|
4470
4482
|
|
|
4471
|
-
export { AAPIDataProvider, ADataProvider, AEncryptedClientProvider, AEncryptionProvider, BLIND_INDEX_FRAMING_VERSION, CAPIFlatClientDataProvider, CAPIFlatServerDataProvider, CAPITreeClientDataProvider, CAPITreeServerDataProvider, CApplicationCache, CBrowserSessionCache, CCookieCache, CECDHEncryptionProvider, CFlatClientDataProvider, CFlatServerDataProvider, CIndexedDBCache, CIndexedDBKeyPinningStore, CKeyManager, CKeyPinningStore, CLocalStorageCache, CLocalStorageKeyPinningStore, CMemoryCache, CMemoryKeyPinningStore, CNodeCryptoEncryptionProvider, CRSAEncryptionProvider, CSearchIndex, CServerSessionCache, CTreeClientDataProvider, CTreeServerDataProvider, CWebCryptoAESCBCProvider, CWebCryptoEncryptionProvider, CWebCryptoStreamCipher, CacheProviderFactory, DECRYPT_ERROR_SENTINEL, DEFAULT_KEY_CACHE_MAX_SIZE, DEFAULT_MAX_ALLOWED_ITERATIONS, DEFAULT_MAX_SALT_DERIVATIONS, DEFAULT_MIN_BUCKET_STEP, DEFAULT_PBKDF2_ITERATIONS, DefaultHydrationAdapter, ECacheStrategy, EDataFilterOperator, ENCRYPTION_CONTEXT_KEYS, EQueueStorage, ERR_AUTH_UNAUTHORIZED, ERR_CRYPTO_AUTH_FAILED, ERR_CRYPTO_DECRYPT_FAILED, ERR_CRYPTO_TAG_MISMATCH, KatluxIndexedDB, PROVIDER_CONSTRUCTOR_OPTION_KEYS, QueueStorageFactory, RANGE_BUCKET_POLICY, RequestProvider, RequestProviderRegistry, RequestQueue, SEARCH_FILTER_NOT_OPERATOR, SENSITIVE_HEADER_KEYS, SENSITIVE_RANGE_BUCKET_FIELDS, _bidxHmacKeyCache, aadToBytes, acquireSaltDerivationSlot, applyOperator, areKeysIdentical, assertMaxAllowedIterations, attachSaltDerivationBudget, buildAadString, buildCanonicalFieldAad, buildEncryptionContext, canonicalizeJson, claimSaltDerivationSlotSync, clearBlindIndexKeyCache, clearCachedCipherProvider, clearSSRData, combineCiphertextAndTag, compareAnd, compareContains, compareEqual, compareIn, compareOr, compareRangeBuckets, compareSteppedBuckets, compareValues, computeBlindIndex, computeBlindIndexSchemeId, computeDateBucket, computeMultiBlindIndex, computeRangeBucket, computeRangeBucketUnchecked, computeSteppedBucket, computeTierBucket, computeWriteBlindIndex, createDecryptionStream, createEncryptionProvider, createEncryptionStream, debounce, decryptBlob, decryptPageRows, decryptPayload, deriveAuthAndEncryptionKeys, deriveBlindIndexHmacKey, deriveKey, deriveKeyFromSecret, encryptBlob, encryptPayload, encryptRows, encryptRowsChunked, escapeAadComponent, evaluateFilter, exportAESKey, exportPrivateKey, exportPrivateKeyToPEM, exportPublicKey, exportPublicKeyToPEM, extractDefaultRowId, extractFilterFieldNames, extractTrigrams, fastKeyHash, fetchWithSSR, filterData, filterTreeData, foldAscii, fromBase64, generateAESKey, generateAccountDataKey, generateECDHKeyPair, generateECDSAKeyPair, generateRSAKeyPair, generateSigningKeyPair, getAppRoute, getAppRouter, getCipherProvider, getDateBucketRange, getGlobalDataProviderConfig, getHydrationAdapter, getKeyFingerprint, getKeyIdentifier, getLruCacheEntry, getPlatformApp, getRandomValues, getRangeBucketRange, getSSRData, getSSRPayload, getSafeKeyIdentifier, getSaltDerivationBudget, getSteppedBucketRange, getSubtleCrypto, getTierBucketRange, importAESKey, importECDSAPrivateKeyFromPEM, importECDSAPublicKeyFromPEM, importPrivateKey, importPrivateKeyFromPEM, importPublicKey, importPublicKeyFromPEM, invertFilterOperator, isAuthOrDecryptionError, isDataEncrypted, isEncrypted, isEncryptedPayload, isFieldBlindIndexStale, isIntervalFullyMatchingOperator, isIntervalMatchingOperator, negateFilterNode, normalizeDecryptError, normalizeFilter, normalizeFilterValue, normalizeIndexTerm, normalizeUrl, onPlatformReady, parseDateValue, parseDecryptedJsonSafely, parseNumericValue, pickEncryptionContext, pickProviderOptions, randomBytes, rangeBucketPolicy, reencryptBatch, reencryptDataset, rekeyEncryptedPayload, rekeyUserKeypair, resolveAndClampPbkdf2Iterations, resolveAuthorityCryptoKey, resolveBucketsForRange, resolveBucketsForRangeUnchecked, resolveCachedSaltDerivation, resolveInfoBytes, resolveSalt, rewrapAccountKeyForUser, rewriteEncryptedFilters, runWithSaltDerivationSlot, safeSetProperty, serializeAadFieldValue, serializePlaintextToBytes, setGlobalDataProviderConfig, setHydrationAdapter, setLruCacheEntry, sign, signGrant, signKeyResetAttestation, sortData, textDecoder, textEncoder, toBase64, unwrapAccountKeyForUser, unwrapHMACKeyForUser, unwrapKey, useDebounce, useFilterLogic, useSortLogic, validateBlindIndexKeyring, validateRangeBucketConfig, verify, verifyAndPinKey, verifyAttestation, verifyGrant, wrapAccountKeyForUser, wrapHMACKeyForUser, wrapKey };
|
|
4483
|
+
export { AAPIDataProvider, ADataProvider, AEncryptedClientProvider, AEncryptionProvider, BLIND_INDEX_FRAMING_VERSION, CAPIFlatClientDataProvider, CAPIFlatServerDataProvider, CAPITreeClientDataProvider, CAPITreeServerDataProvider, CApplicationCache, CBrowserSessionCache, CCookieCache, CECDHEncryptionProvider, CFlatClientDataProvider, CFlatServerDataProvider, CIndexedDBCache, CIndexedDBKeyPinningStore, CKeyManager, CKeyPinningStore, CLocalStorageCache, CLocalStorageKeyPinningStore, CMemoryCache, CMemoryKeyPinningStore, CNodeCryptoEncryptionProvider, CRSAEncryptionProvider, CSearchIndex, CServerSessionCache, CTreeClientDataProvider, CTreeServerDataProvider, CWebCryptoAESCBCProvider, CWebCryptoEncryptionProvider, CWebCryptoStreamCipher, CacheProviderFactory, DECRYPT_ERROR_SENTINEL, DEFAULT_KEY_CACHE_MAX_SIZE, DEFAULT_MAX_ALLOWED_ITERATIONS, DEFAULT_MAX_SALT_DERIVATIONS, DEFAULT_MIN_BUCKET_STEP, DEFAULT_PBKDF2_ITERATIONS, DefaultHydrationAdapter, ECacheStrategy, EDataFilterOperator, ENCRYPTION_CONTEXT_KEYS, EQueueStorage, ERR_AUTH_UNAUTHORIZED, ERR_CRYPTO_AUTH_FAILED, ERR_CRYPTO_DECRYPT_FAILED, ERR_CRYPTO_TAG_MISMATCH, KatluxIndexedDB, PROVIDER_CONSTRUCTOR_OPTION_KEYS, QueueStorageFactory, RANGE_BUCKET_POLICY, RequestProvider, RequestProviderRegistry, RequestQueue, SEARCH_FILTER_NOT_OPERATOR, SENSITIVE_HEADER_KEYS, SENSITIVE_RANGE_BUCKET_FIELDS, _bidxHmacKeyCache, aadToBytes, acquireSaltDerivationSlot, applyOperator, areKeysIdentical, assertMaxAllowedIterations, attachSaltDerivationBudget, buildAadString, buildCanonicalFieldAad, buildEncryptionContext, canonicalizeJson, claimSaltDerivationSlotSync, clearBlindIndexKeyCache, clearCachedCipherProvider, clearSSRData, combineCiphertextAndTag, compareAnd, compareContains, compareEqual, compareIn, compareOr, compareRangeBuckets, compareSteppedBuckets, compareValues, compileFilter, computeBlindIndex, computeBlindIndexSchemeId, computeDateBucket, computeMultiBlindIndex, computeRangeBucket, computeRangeBucketUnchecked, computeSteppedBucket, computeTierBucket, computeWriteBlindIndex, createDecryptionStream, createEncryptionProvider, createEncryptionStream, debounce, decryptBlob, decryptPageRows, decryptPayload, deriveAuthAndEncryptionKeys, deriveBlindIndexHmacKey, deriveKey, deriveKeyFromSecret, encryptBlob, encryptPayload, encryptRows, encryptRowsChunked, escapeAadComponent, evaluateFilter, exportAESKey, exportPrivateKey, exportPrivateKeyToPEM, exportPublicKey, exportPublicKeyToPEM, extractDefaultRowId, extractFilterFieldNames, extractTrigrams, fastKeyHash, fetchWithSSR, filterData, filterTreeData, foldAscii, fromBase64, generateAESKey, generateAccountDataKey, generateECDHKeyPair, generateECDSAKeyPair, generateRSAKeyPair, generateSigningKeyPair, getAppRoute, getAppRouter, getCipherProvider, getDateBucketRange, getGlobalDataProviderConfig, getHydrationAdapter, getKeyFingerprint, getKeyIdentifier, getLruCacheEntry, getPlatformApp, getRandomValues, getRangeBucketRange, getSSRData, getSSRPayload, getSafeKeyIdentifier, getSaltDerivationBudget, getSteppedBucketRange, getSubtleCrypto, getTierBucketRange, importAESKey, importECDSAPrivateKeyFromPEM, importECDSAPublicKeyFromPEM, importPrivateKey, importPrivateKeyFromPEM, importPublicKey, importPublicKeyFromPEM, invertFilterOperator, isAuthOrDecryptionError, isDataEncrypted, isEncrypted, isEncryptedPayload, isFieldBlindIndexStale, isIntervalFullyMatchingOperator, isIntervalMatchingOperator, negateFilterNode, normalizeDecryptError, normalizeFilter, normalizeFilterValue, normalizeIndexTerm, normalizeUrl, onPlatformReady, parseDateValue, parseDecryptedJsonSafely, parseNumericValue, pickEncryptionContext, pickProviderOptions, randomBytes, rangeBucketPolicy, reencryptBatch, reencryptDataset, rekeyEncryptedPayload, rekeyUserKeypair, resolveAndClampPbkdf2Iterations, resolveAuthorityCryptoKey, resolveBucketsForRange, resolveBucketsForRangeUnchecked, resolveCachedSaltDerivation, resolveInfoBytes, resolveSalt, rewrapAccountKeyForUser, rewriteEncryptedFilters, runWithSaltDerivationSlot, safeSetProperty, serializeAadFieldValue, serializePlaintextToBytes, setGlobalDataProviderConfig, setHydrationAdapter, setLruCacheEntry, sign, signGrant, signKeyResetAttestation, sortData, textDecoder, textEncoder, toBase64, unwrapAccountKeyForUser, unwrapHMACKeyForUser, unwrapKey, useDebounce, useFilterLogic, useSortLogic, validateBlindIndexKeyring, validateRangeBucketConfig, verify, verifyAndPinKey, verifyAttestation, verifyGrant, wrapAccountKeyForUser, wrapHMACKeyForUser, wrapKey };
|
|
4472
4484
|
export type { CacheDriverLoader, IAccessGrant, IAsymmetricSecurityDefaults, IBaseEncryptionProviderOptions, IBatchLoadedEvent, IBatchProgress, IBlindIndexFieldConfig, IBlindIndexKeyring, IBlindIndexOptions, IBlindIndexSchemeOptions, IBlindIndexVersionConfig, ICNodeCryptoOptions, ICWebCryptoAESCBCOptions, ICWebCryptoOptions, ICacheEntry, ICacheQuotaOptions, ICookieCacheOptions, IDataFilter, IDataProviderGlobalConfig, IDataProviderOptions, IDataProviderSetStateOptions, IDataProviderState, IDataResult, IDataSort, IDateRangeBucketConfig, IDeadLetterItem, IDebouncedFunction, IDecryptBatchSession, IDecryptErrorInfo, IDeriveAuthAndEncryptionOptions, IDomainDerivedKeys, IEncryptRecordSession, IEncryptedFilterRewriteOptions, IEncryptedPayload, IEncryptionContext, IEncryptionOperationOptions, IEncryptionProvider, IFieldEncryptionContext, IFlushOptions, IHKDFFromSecretOptions, IKDFOptions, IKDatatableAction, IKeyPair, IKeyPin, IKeyPinChangeEvent, IKeyPinningStore, IKeyResetAttestation, IMigrationProgress, IMigrationSummary, INormalizeOptions, IPlatformRouter, IProviderEncryptionOptions, IQueueStorageAdapter, IQueuedOperation, IQueuedRequest, IRangeBucketFieldConfig, IRangeBucketValidationOptions, IReencryptBatchOptions, IReencryptBatchResult, IReencryptDatasetOptions, IRekeyKeypairParams, IRekeyPayloadOptions, IRekeyedKeypairResult, IRequestOptions, IRewrittenEncryptedFilters, IRewrittenPersistenceQuery, ISSRHydrationAdapter, ISaltDerivationBudget, ISearchFilterCompoundNode, ISearchFilterNotNode, ISearchIndexEvalContext, ISearchIndexOptions, ISearchIndexRowEntry, ISensitiveFieldPolicyRule, ISetDataChunkedOptions, ISignedGrant, ISignedKeyResetAttestation, ISortDataOptions, ISteppedRangeBucketConfig, IStreamDecryptionOptions, IStreamEncryptionOptions, IStreamWithBufferMetric, ITierRangeBucketConfig, ITreeDataProvider, ITreeDataProviderOptions, ITreeNode, ITreeNodeStatic, ITrigramFieldConfig, IVerifyAndPinOptions, IVerifyAndPinResult, IVerifyGrantOptions, IVirtualScrollState, IWrappedKey, InFlightBridge, InFlightSubscriber, TBlindIndexKeyStatus, TDataProviderListener, TDataProviderStateChangeListener, TDataRow, TDateBucketGranularity, TECDHAlgorithm, TECDHCurve, TEncryptionAlgorithm, TKatluxStore, TKdfHash, TKdfStrategy, TKeyProvider, TPageDataHandler, TQueueItemStatus, TRSAAlgorithm, TRangeBucketConfig, TRawKey, TSearchFilterNode, TServerRequestEvent, TStreamAlgorithm, TSupportedAlgorithm, TSymmetricAlgorithm, TTreePageDataHandler, TTreeRow, TTrustedAuthorities, TUnsubscribe, TreePaginationMode };
|
package/dist/index.d.mts
CHANGED
|
@@ -464,28 +464,6 @@ interface INormalizeOptions {
|
|
|
464
464
|
* - Final lowercasing and NFKC normalization.
|
|
465
465
|
*/
|
|
466
466
|
declare function foldAscii(value: string): string;
|
|
467
|
-
/**
|
|
468
|
-
* Canonical normalization primitive shared across:
|
|
469
|
-
* - In-memory filter evaluations (`filterLogic.ts`)
|
|
470
|
-
* - Trigram search indexing (`CSearchIndex.ts`)
|
|
471
|
-
* - Blind-index token generation (`CKeyManager.ts`)
|
|
472
|
-
* - Encrypted filter rewrites (`rewriteEncryptedFilters.ts`)
|
|
473
|
-
*
|
|
474
|
-
* Default behavior:
|
|
475
|
-
* - Coerces value to string
|
|
476
|
-
* - Normalizes via Unicode NFKC (Compatibility Decomposition followed by Canonical Composition)
|
|
477
|
-
* - Trims leading and trailing whitespace
|
|
478
|
-
* - Converts to lowercase via standard Unicode case folding
|
|
479
|
-
* - Strips combining dot above (U+0307) so capital dotted 'İ' matches lowercase 'i' by default
|
|
480
|
-
* - Folds Greek final sigma (ς / U+03C2) to medial sigma (σ / U+03C3) so queries match across word boundaries
|
|
481
|
-
*
|
|
482
|
-
* Configurable options:
|
|
483
|
-
* - `locale`: When provided (such as 'tr' or 'tr-TR'), uses `toLocaleLowerCase(locale)`
|
|
484
|
-
* ensuring Turkish dotted/dotless I conversions (İ -> i, I -> ı).
|
|
485
|
-
* - `asciiFold`: When true, maps diacritics and extended Latin characters to pure ASCII equivalents
|
|
486
|
-
* ensuring cross-locale equivalence (e.g. 'Çelik' == 'Celik', 'Łódź' == 'lodz', 'Straße' == 'strasse').
|
|
487
|
-
* - `normalizer`: Optional custom transformer invoked after baseline normalization.
|
|
488
|
-
*/
|
|
489
467
|
declare function normalizeFilterValue(value: any, options?: INormalizeOptions): string;
|
|
490
468
|
|
|
491
469
|
/**
|
|
@@ -1819,8 +1797,9 @@ declare class CSearchIndex {
|
|
|
1819
1797
|
declare abstract class AEncryptedClientProvider<TRow = TDataRow> extends ADataProvider<TRow> {
|
|
1820
1798
|
encryption?: IProviderEncryptionOptions;
|
|
1821
1799
|
protected _searchIndex?: CSearchIndex;
|
|
1822
|
-
protected _decryptedCache: Map<string | number, TRow>;
|
|
1823
1800
|
protected _decryptedRefCache: WeakMap<object, TRow>;
|
|
1801
|
+
protected _idToEncryptedRef: Map<string | number, object>;
|
|
1802
|
+
protected _decryptedCache: Map<string | number, TRow>;
|
|
1824
1803
|
constructor(options?: IDataProviderOptions);
|
|
1825
1804
|
get isEncryptionEnabled(): boolean;
|
|
1826
1805
|
get searchIndex(): CSearchIndex | undefined;
|
|
@@ -1837,7 +1816,11 @@ declare abstract class AEncryptedClientProvider<TRow = TDataRow> extends ADataPr
|
|
|
1837
1816
|
* Evicts a single row or row ID from both `_decryptedCache` and `_decryptedRefCache`.
|
|
1838
1817
|
*/
|
|
1839
1818
|
evictDecryptedRow(rowOrId: any): void;
|
|
1840
|
-
|
|
1819
|
+
private _forEachChunk;
|
|
1820
|
+
populateDecryptedCache(rows: TRow[], options?: {
|
|
1821
|
+
chunkSize?: number;
|
|
1822
|
+
isStale?: () => boolean;
|
|
1823
|
+
}): Promise<void>;
|
|
1841
1824
|
isFieldEncrypted(field: string, sampleRows?: TRow[]): boolean;
|
|
1842
1825
|
warnIfEncryptedFilterWithoutSupport(filter: IDataFilter | any, sampleRows?: TRow[]): void;
|
|
1843
1826
|
protected _guardEncryptedSorting(sortList: IDataSort[]): void;
|
|
@@ -1845,13 +1828,19 @@ declare abstract class AEncryptedClientProvider<TRow = TDataRow> extends ADataPr
|
|
|
1845
1828
|
protected _initSearchIndex(): void;
|
|
1846
1829
|
setEncryption(encryption?: IProviderEncryptionOptions): void;
|
|
1847
1830
|
clearEncryption(): void;
|
|
1831
|
+
protected _getApiUrl(): string | undefined;
|
|
1832
|
+
private _extractPlainFields;
|
|
1833
|
+
private _indexEncryptedRows;
|
|
1848
1834
|
protected encryptRows(rows: TRow[]): Promise<TRow[]>;
|
|
1849
1835
|
protected encryptRowsChunked(rows: TRow[], options?: ISetDataChunkedOptions): Promise<TRow[]>;
|
|
1850
1836
|
/**
|
|
1851
1837
|
* Indexes pre-encrypted rows by performing a transient in-memory decryption pass
|
|
1852
1838
|
* on search fields to populate CSearchIndex without mutating underlying encrypted records in allData.
|
|
1853
1839
|
*/
|
|
1854
|
-
indexPreEncryptedRows(rows: TRow[]
|
|
1840
|
+
indexPreEncryptedRows(rows: TRow[], options?: {
|
|
1841
|
+
chunkSize?: number;
|
|
1842
|
+
isStale?: () => boolean;
|
|
1843
|
+
}): Promise<void>;
|
|
1855
1844
|
decryptRows(rows: TRow[]): Promise<{
|
|
1856
1845
|
rows: TRow[];
|
|
1857
1846
|
decrypted: boolean;
|
|
@@ -1870,8 +1859,14 @@ interface IProviderEncryptionHost<TRow> {
|
|
|
1870
1859
|
idKey: string;
|
|
1871
1860
|
encryptRows(rows: TRow[]): Promise<TRow[]>;
|
|
1872
1861
|
encryptRowsChunked(rows: TRow[], options?: ISetDataChunkedOptions): Promise<TRow[]>;
|
|
1873
|
-
indexPreEncryptedRows(rows: TRow[]
|
|
1874
|
-
|
|
1862
|
+
indexPreEncryptedRows(rows: TRow[], options?: {
|
|
1863
|
+
chunkSize?: number;
|
|
1864
|
+
isStale?: () => boolean;
|
|
1865
|
+
}): Promise<void>;
|
|
1866
|
+
populateDecryptedCache(rows: TRow[], options?: {
|
|
1867
|
+
chunkSize?: number;
|
|
1868
|
+
isStale?: () => boolean;
|
|
1869
|
+
}): Promise<void>;
|
|
1875
1870
|
cacheDecryptedRow(encryptedRow: any, decryptedRow: TRow): void;
|
|
1876
1871
|
getDecryptedRow(rowOrId: any): TRow | undefined;
|
|
1877
1872
|
decryptRows(rows: TRow[]): Promise<{
|
|
@@ -1893,6 +1888,7 @@ declare class CFlatClientDataProvider<TRow = TDataRow> extends AEncryptedClientP
|
|
|
1893
1888
|
batchSize: number | false;
|
|
1894
1889
|
batchLoad: 'initially' | 'onDemand';
|
|
1895
1890
|
onDemandFilterPolicy: 'ingestAll' | 'warnOnly';
|
|
1891
|
+
maxCachedBatches?: number;
|
|
1896
1892
|
onBatchLoaded?: (batch: IBatchLoadedEvent<TRow>) => void;
|
|
1897
1893
|
loadedBatches: Set<number>;
|
|
1898
1894
|
protected _rawSourceData?: TRow[];
|
|
@@ -1905,6 +1901,11 @@ declare class CFlatClientDataProvider<TRow = TDataRow> extends AEncryptedClientP
|
|
|
1905
1901
|
protected _batchGeneration: number;
|
|
1906
1902
|
protected _inFlightLoad?: Promise<void>;
|
|
1907
1903
|
constructor(options?: IDataProviderOptions);
|
|
1904
|
+
/**
|
|
1905
|
+
* Evicts oldest loaded batches when maxCachedBatches is configured and exceeded,
|
|
1906
|
+
* clearing their slots in _allData so they can be re-fetched on demand.
|
|
1907
|
+
*/
|
|
1908
|
+
protected _evictOldestBatchesIfNeeded(activeBatch?: number): void;
|
|
1908
1909
|
protected _assignAllData(data: TRow[], preserveDecryptedCache?: boolean): void;
|
|
1909
1910
|
get allData(): TRow[];
|
|
1910
1911
|
set allData(data: TRow[]);
|
|
@@ -1995,6 +1996,7 @@ declare class CAPIFlatClientDataProvider<TRow = TDataRow> extends CFlatClientDat
|
|
|
1995
1996
|
private _lastDataReceivedPromise;
|
|
1996
1997
|
private _lastBatch1CallbackGen;
|
|
1997
1998
|
private _suppressOnDemandWarn;
|
|
1999
|
+
protected _getApiUrl(): string | undefined;
|
|
1998
2000
|
setData(data: TRow[]): Promise<void> | void;
|
|
1999
2001
|
protected _assignAllData(data: TRow[], preserveDecryptedCache?: boolean): void;
|
|
2000
2002
|
set allData(data: TRow[]);
|
|
@@ -2146,9 +2148,12 @@ declare class CTreeClientDataProvider<TRow extends TDataRow = TDataRow> extends
|
|
|
2146
2148
|
private _filteredNodesCache;
|
|
2147
2149
|
private _allVisibleRowsCache;
|
|
2148
2150
|
protected _decryptedNodeMap: Map<string | number, TRow>;
|
|
2151
|
+
protected _knownIds: Set<string | number>;
|
|
2149
2152
|
clearDecryptedCache(): void;
|
|
2150
2153
|
invalidateDecryptedRow(rowOrId: any): void;
|
|
2151
2154
|
protected _assignAllData(data: TRow[], preserveDecryptedCache?: boolean): void;
|
|
2155
|
+
/** Appends unique rows in-place using _knownIds without cloning allData. */
|
|
2156
|
+
protected _appendUniqueTreeRows(rows: TRow[]): boolean;
|
|
2152
2157
|
get allData(): TRow[];
|
|
2153
2158
|
set allData(data: TRow[]);
|
|
2154
2159
|
invalidateStaticCache(): void;
|
|
@@ -2218,6 +2223,7 @@ declare class CAPITreeClientDataProvider<TRow extends TDataRow = TDataRow> exten
|
|
|
2218
2223
|
protected _abortController?: AbortController;
|
|
2219
2224
|
private _lastDataReceivedPromise;
|
|
2220
2225
|
private _lastBatch1CallbackGen;
|
|
2226
|
+
protected _getApiUrl(): string | undefined;
|
|
2221
2227
|
setData(data: TRow[]): Promise<void> | void;
|
|
2222
2228
|
protected _bumpRequestGeneration(nextUrl?: string): number;
|
|
2223
2229
|
private _shouldSkipDecryption;
|
|
@@ -2238,7 +2244,9 @@ declare class CAPITreeClientDataProvider<TRow extends TDataRow = TDataRow> exten
|
|
|
2238
2244
|
private _initialFetch;
|
|
2239
2245
|
protected _fetchBatchedTree(reqGen: number, batchGen: number, disableCache: boolean, shouldSkipDecryption: boolean): Promise<void>;
|
|
2240
2246
|
protected _streamRemainingTreeBatches(reqGen: number, batchGen: number, batchSize: number, disableCache: boolean, shouldSkipDecryption: boolean, startPage?: number): Promise<void>;
|
|
2241
|
-
loadBatch(batchNumber: number
|
|
2247
|
+
loadBatch(batchNumber: number, options?: {
|
|
2248
|
+
skipPageLoad?: boolean;
|
|
2249
|
+
}): Promise<void>;
|
|
2242
2250
|
ensureRangeLoaded(startIndex: number, endIndex: number): Promise<void>;
|
|
2243
2251
|
loadRange(startIndex: number, endIndex: number): Promise<void>;
|
|
2244
2252
|
setCurrentPage(currentPage: number): Promise<void>;
|
|
@@ -2848,6 +2856,7 @@ declare const applyOperator: (operator: string, rowValue: any, filterValue: any,
|
|
|
2848
2856
|
* Normalizes standard and shorthand filter structures into a canonical IDataFilter tree.
|
|
2849
2857
|
*/
|
|
2850
2858
|
declare const normalizeFilter: (filter: any) => IDataFilter | null;
|
|
2859
|
+
declare const compileFilter: (filter: IDataFilter | any, options?: INormalizeOptions) => ((row: TDataRow) => boolean);
|
|
2851
2860
|
declare const evaluateFilter: (filter: IDataFilter | any, row: TDataRow, options?: INormalizeOptions) => boolean;
|
|
2852
2861
|
declare const filterTreeData: (nodes: any[], filter: IDataFilter, options: {
|
|
2853
2862
|
idKey: string;
|
|
@@ -3769,6 +3778,7 @@ declare class CWebCryptoEncryptionProvider extends AEncryptionProvider {
|
|
|
3769
3778
|
private _inflightKeyCache;
|
|
3770
3779
|
setDefaultKey(key: TKeyProvider): void;
|
|
3771
3780
|
clearKeys(): void;
|
|
3781
|
+
setKeyring(keys: Record<string, TKeyProvider | IKeyPair>, activeKid?: string): void;
|
|
3772
3782
|
constructor(key?: TKeyProvider | IKeyPair, options?: ICWebCryptoOptions);
|
|
3773
3783
|
/**
|
|
3774
3784
|
* Derives or returns a CryptoKey for encryption/decryption based on KDF settings.
|
|
@@ -3817,9 +3827,11 @@ declare class CWebCryptoAESCBCProvider extends AEncryptionProvider {
|
|
|
3817
3827
|
private _cachedKeyId?;
|
|
3818
3828
|
private _kdfOptions?;
|
|
3819
3829
|
private _decryptSaltCache;
|
|
3830
|
+
private _inflightKeyCache;
|
|
3820
3831
|
constructor(key?: TKeyProvider | IKeyPair | any, options?: ICWebCryptoAESCBCOptions);
|
|
3821
3832
|
setDefaultKey(key: TKeyProvider | IKeyPair): void;
|
|
3822
3833
|
clearKeys(): void;
|
|
3834
|
+
setKeyring(keys: Record<string, TKeyProvider | IKeyPair>, activeKid?: string): void;
|
|
3823
3835
|
warmupKey(options?: IEncryptionContext): Promise<void>;
|
|
3824
3836
|
/**
|
|
3825
3837
|
* Derives 64 bytes (512 bits) of key material:
|
|
@@ -4468,5 +4480,5 @@ declare function resolveBucketsForRange(operator: string, targetValue: any, conf
|
|
|
4468
4480
|
*/
|
|
4469
4481
|
declare function isEncrypted(payload: any): boolean;
|
|
4470
4482
|
|
|
4471
|
-
export { AAPIDataProvider, ADataProvider, AEncryptedClientProvider, AEncryptionProvider, BLIND_INDEX_FRAMING_VERSION, CAPIFlatClientDataProvider, CAPIFlatServerDataProvider, CAPITreeClientDataProvider, CAPITreeServerDataProvider, CApplicationCache, CBrowserSessionCache, CCookieCache, CECDHEncryptionProvider, CFlatClientDataProvider, CFlatServerDataProvider, CIndexedDBCache, CIndexedDBKeyPinningStore, CKeyManager, CKeyPinningStore, CLocalStorageCache, CLocalStorageKeyPinningStore, CMemoryCache, CMemoryKeyPinningStore, CNodeCryptoEncryptionProvider, CRSAEncryptionProvider, CSearchIndex, CServerSessionCache, CTreeClientDataProvider, CTreeServerDataProvider, CWebCryptoAESCBCProvider, CWebCryptoEncryptionProvider, CWebCryptoStreamCipher, CacheProviderFactory, DECRYPT_ERROR_SENTINEL, DEFAULT_KEY_CACHE_MAX_SIZE, DEFAULT_MAX_ALLOWED_ITERATIONS, DEFAULT_MAX_SALT_DERIVATIONS, DEFAULT_MIN_BUCKET_STEP, DEFAULT_PBKDF2_ITERATIONS, DefaultHydrationAdapter, ECacheStrategy, EDataFilterOperator, ENCRYPTION_CONTEXT_KEYS, EQueueStorage, ERR_AUTH_UNAUTHORIZED, ERR_CRYPTO_AUTH_FAILED, ERR_CRYPTO_DECRYPT_FAILED, ERR_CRYPTO_TAG_MISMATCH, KatluxIndexedDB, PROVIDER_CONSTRUCTOR_OPTION_KEYS, QueueStorageFactory, RANGE_BUCKET_POLICY, RequestProvider, RequestProviderRegistry, RequestQueue, SEARCH_FILTER_NOT_OPERATOR, SENSITIVE_HEADER_KEYS, SENSITIVE_RANGE_BUCKET_FIELDS, _bidxHmacKeyCache, aadToBytes, acquireSaltDerivationSlot, applyOperator, areKeysIdentical, assertMaxAllowedIterations, attachSaltDerivationBudget, buildAadString, buildCanonicalFieldAad, buildEncryptionContext, canonicalizeJson, claimSaltDerivationSlotSync, clearBlindIndexKeyCache, clearCachedCipherProvider, clearSSRData, combineCiphertextAndTag, compareAnd, compareContains, compareEqual, compareIn, compareOr, compareRangeBuckets, compareSteppedBuckets, compareValues, computeBlindIndex, computeBlindIndexSchemeId, computeDateBucket, computeMultiBlindIndex, computeRangeBucket, computeRangeBucketUnchecked, computeSteppedBucket, computeTierBucket, computeWriteBlindIndex, createDecryptionStream, createEncryptionProvider, createEncryptionStream, debounce, decryptBlob, decryptPageRows, decryptPayload, deriveAuthAndEncryptionKeys, deriveBlindIndexHmacKey, deriveKey, deriveKeyFromSecret, encryptBlob, encryptPayload, encryptRows, encryptRowsChunked, escapeAadComponent, evaluateFilter, exportAESKey, exportPrivateKey, exportPrivateKeyToPEM, exportPublicKey, exportPublicKeyToPEM, extractDefaultRowId, extractFilterFieldNames, extractTrigrams, fastKeyHash, fetchWithSSR, filterData, filterTreeData, foldAscii, fromBase64, generateAESKey, generateAccountDataKey, generateECDHKeyPair, generateECDSAKeyPair, generateRSAKeyPair, generateSigningKeyPair, getAppRoute, getAppRouter, getCipherProvider, getDateBucketRange, getGlobalDataProviderConfig, getHydrationAdapter, getKeyFingerprint, getKeyIdentifier, getLruCacheEntry, getPlatformApp, getRandomValues, getRangeBucketRange, getSSRData, getSSRPayload, getSafeKeyIdentifier, getSaltDerivationBudget, getSteppedBucketRange, getSubtleCrypto, getTierBucketRange, importAESKey, importECDSAPrivateKeyFromPEM, importECDSAPublicKeyFromPEM, importPrivateKey, importPrivateKeyFromPEM, importPublicKey, importPublicKeyFromPEM, invertFilterOperator, isAuthOrDecryptionError, isDataEncrypted, isEncrypted, isEncryptedPayload, isFieldBlindIndexStale, isIntervalFullyMatchingOperator, isIntervalMatchingOperator, negateFilterNode, normalizeDecryptError, normalizeFilter, normalizeFilterValue, normalizeIndexTerm, normalizeUrl, onPlatformReady, parseDateValue, parseDecryptedJsonSafely, parseNumericValue, pickEncryptionContext, pickProviderOptions, randomBytes, rangeBucketPolicy, reencryptBatch, reencryptDataset, rekeyEncryptedPayload, rekeyUserKeypair, resolveAndClampPbkdf2Iterations, resolveAuthorityCryptoKey, resolveBucketsForRange, resolveBucketsForRangeUnchecked, resolveCachedSaltDerivation, resolveInfoBytes, resolveSalt, rewrapAccountKeyForUser, rewriteEncryptedFilters, runWithSaltDerivationSlot, safeSetProperty, serializeAadFieldValue, serializePlaintextToBytes, setGlobalDataProviderConfig, setHydrationAdapter, setLruCacheEntry, sign, signGrant, signKeyResetAttestation, sortData, textDecoder, textEncoder, toBase64, unwrapAccountKeyForUser, unwrapHMACKeyForUser, unwrapKey, useDebounce, useFilterLogic, useSortLogic, validateBlindIndexKeyring, validateRangeBucketConfig, verify, verifyAndPinKey, verifyAttestation, verifyGrant, wrapAccountKeyForUser, wrapHMACKeyForUser, wrapKey };
|
|
4483
|
+
export { AAPIDataProvider, ADataProvider, AEncryptedClientProvider, AEncryptionProvider, BLIND_INDEX_FRAMING_VERSION, CAPIFlatClientDataProvider, CAPIFlatServerDataProvider, CAPITreeClientDataProvider, CAPITreeServerDataProvider, CApplicationCache, CBrowserSessionCache, CCookieCache, CECDHEncryptionProvider, CFlatClientDataProvider, CFlatServerDataProvider, CIndexedDBCache, CIndexedDBKeyPinningStore, CKeyManager, CKeyPinningStore, CLocalStorageCache, CLocalStorageKeyPinningStore, CMemoryCache, CMemoryKeyPinningStore, CNodeCryptoEncryptionProvider, CRSAEncryptionProvider, CSearchIndex, CServerSessionCache, CTreeClientDataProvider, CTreeServerDataProvider, CWebCryptoAESCBCProvider, CWebCryptoEncryptionProvider, CWebCryptoStreamCipher, CacheProviderFactory, DECRYPT_ERROR_SENTINEL, DEFAULT_KEY_CACHE_MAX_SIZE, DEFAULT_MAX_ALLOWED_ITERATIONS, DEFAULT_MAX_SALT_DERIVATIONS, DEFAULT_MIN_BUCKET_STEP, DEFAULT_PBKDF2_ITERATIONS, DefaultHydrationAdapter, ECacheStrategy, EDataFilterOperator, ENCRYPTION_CONTEXT_KEYS, EQueueStorage, ERR_AUTH_UNAUTHORIZED, ERR_CRYPTO_AUTH_FAILED, ERR_CRYPTO_DECRYPT_FAILED, ERR_CRYPTO_TAG_MISMATCH, KatluxIndexedDB, PROVIDER_CONSTRUCTOR_OPTION_KEYS, QueueStorageFactory, RANGE_BUCKET_POLICY, RequestProvider, RequestProviderRegistry, RequestQueue, SEARCH_FILTER_NOT_OPERATOR, SENSITIVE_HEADER_KEYS, SENSITIVE_RANGE_BUCKET_FIELDS, _bidxHmacKeyCache, aadToBytes, acquireSaltDerivationSlot, applyOperator, areKeysIdentical, assertMaxAllowedIterations, attachSaltDerivationBudget, buildAadString, buildCanonicalFieldAad, buildEncryptionContext, canonicalizeJson, claimSaltDerivationSlotSync, clearBlindIndexKeyCache, clearCachedCipherProvider, clearSSRData, combineCiphertextAndTag, compareAnd, compareContains, compareEqual, compareIn, compareOr, compareRangeBuckets, compareSteppedBuckets, compareValues, compileFilter, computeBlindIndex, computeBlindIndexSchemeId, computeDateBucket, computeMultiBlindIndex, computeRangeBucket, computeRangeBucketUnchecked, computeSteppedBucket, computeTierBucket, computeWriteBlindIndex, createDecryptionStream, createEncryptionProvider, createEncryptionStream, debounce, decryptBlob, decryptPageRows, decryptPayload, deriveAuthAndEncryptionKeys, deriveBlindIndexHmacKey, deriveKey, deriveKeyFromSecret, encryptBlob, encryptPayload, encryptRows, encryptRowsChunked, escapeAadComponent, evaluateFilter, exportAESKey, exportPrivateKey, exportPrivateKeyToPEM, exportPublicKey, exportPublicKeyToPEM, extractDefaultRowId, extractFilterFieldNames, extractTrigrams, fastKeyHash, fetchWithSSR, filterData, filterTreeData, foldAscii, fromBase64, generateAESKey, generateAccountDataKey, generateECDHKeyPair, generateECDSAKeyPair, generateRSAKeyPair, generateSigningKeyPair, getAppRoute, getAppRouter, getCipherProvider, getDateBucketRange, getGlobalDataProviderConfig, getHydrationAdapter, getKeyFingerprint, getKeyIdentifier, getLruCacheEntry, getPlatformApp, getRandomValues, getRangeBucketRange, getSSRData, getSSRPayload, getSafeKeyIdentifier, getSaltDerivationBudget, getSteppedBucketRange, getSubtleCrypto, getTierBucketRange, importAESKey, importECDSAPrivateKeyFromPEM, importECDSAPublicKeyFromPEM, importPrivateKey, importPrivateKeyFromPEM, importPublicKey, importPublicKeyFromPEM, invertFilterOperator, isAuthOrDecryptionError, isDataEncrypted, isEncrypted, isEncryptedPayload, isFieldBlindIndexStale, isIntervalFullyMatchingOperator, isIntervalMatchingOperator, negateFilterNode, normalizeDecryptError, normalizeFilter, normalizeFilterValue, normalizeIndexTerm, normalizeUrl, onPlatformReady, parseDateValue, parseDecryptedJsonSafely, parseNumericValue, pickEncryptionContext, pickProviderOptions, randomBytes, rangeBucketPolicy, reencryptBatch, reencryptDataset, rekeyEncryptedPayload, rekeyUserKeypair, resolveAndClampPbkdf2Iterations, resolveAuthorityCryptoKey, resolveBucketsForRange, resolveBucketsForRangeUnchecked, resolveCachedSaltDerivation, resolveInfoBytes, resolveSalt, rewrapAccountKeyForUser, rewriteEncryptedFilters, runWithSaltDerivationSlot, safeSetProperty, serializeAadFieldValue, serializePlaintextToBytes, setGlobalDataProviderConfig, setHydrationAdapter, setLruCacheEntry, sign, signGrant, signKeyResetAttestation, sortData, textDecoder, textEncoder, toBase64, unwrapAccountKeyForUser, unwrapHMACKeyForUser, unwrapKey, useDebounce, useFilterLogic, useSortLogic, validateBlindIndexKeyring, validateRangeBucketConfig, verify, verifyAndPinKey, verifyAttestation, verifyGrant, wrapAccountKeyForUser, wrapHMACKeyForUser, wrapKey };
|
|
4472
4484
|
export type { CacheDriverLoader, IAccessGrant, IAsymmetricSecurityDefaults, IBaseEncryptionProviderOptions, IBatchLoadedEvent, IBatchProgress, IBlindIndexFieldConfig, IBlindIndexKeyring, IBlindIndexOptions, IBlindIndexSchemeOptions, IBlindIndexVersionConfig, ICNodeCryptoOptions, ICWebCryptoAESCBCOptions, ICWebCryptoOptions, ICacheEntry, ICacheQuotaOptions, ICookieCacheOptions, IDataFilter, IDataProviderGlobalConfig, IDataProviderOptions, IDataProviderSetStateOptions, IDataProviderState, IDataResult, IDataSort, IDateRangeBucketConfig, IDeadLetterItem, IDebouncedFunction, IDecryptBatchSession, IDecryptErrorInfo, IDeriveAuthAndEncryptionOptions, IDomainDerivedKeys, IEncryptRecordSession, IEncryptedFilterRewriteOptions, IEncryptedPayload, IEncryptionContext, IEncryptionOperationOptions, IEncryptionProvider, IFieldEncryptionContext, IFlushOptions, IHKDFFromSecretOptions, IKDFOptions, IKDatatableAction, IKeyPair, IKeyPin, IKeyPinChangeEvent, IKeyPinningStore, IKeyResetAttestation, IMigrationProgress, IMigrationSummary, INormalizeOptions, IPlatformRouter, IProviderEncryptionOptions, IQueueStorageAdapter, IQueuedOperation, IQueuedRequest, IRangeBucketFieldConfig, IRangeBucketValidationOptions, IReencryptBatchOptions, IReencryptBatchResult, IReencryptDatasetOptions, IRekeyKeypairParams, IRekeyPayloadOptions, IRekeyedKeypairResult, IRequestOptions, IRewrittenEncryptedFilters, IRewrittenPersistenceQuery, ISSRHydrationAdapter, ISaltDerivationBudget, ISearchFilterCompoundNode, ISearchFilterNotNode, ISearchIndexEvalContext, ISearchIndexOptions, ISearchIndexRowEntry, ISensitiveFieldPolicyRule, ISetDataChunkedOptions, ISignedGrant, ISignedKeyResetAttestation, ISortDataOptions, ISteppedRangeBucketConfig, IStreamDecryptionOptions, IStreamEncryptionOptions, IStreamWithBufferMetric, ITierRangeBucketConfig, ITreeDataProvider, ITreeDataProviderOptions, ITreeNode, ITreeNodeStatic, ITrigramFieldConfig, IVerifyAndPinOptions, IVerifyAndPinResult, IVerifyGrantOptions, IVirtualScrollState, IWrappedKey, InFlightBridge, InFlightSubscriber, TBlindIndexKeyStatus, TDataProviderListener, TDataProviderStateChangeListener, TDataRow, TDateBucketGranularity, TECDHAlgorithm, TECDHCurve, TEncryptionAlgorithm, TKatluxStore, TKdfHash, TKdfStrategy, TKeyProvider, TPageDataHandler, TQueueItemStatus, TRSAAlgorithm, TRangeBucketConfig, TRawKey, TSearchFilterNode, TServerRequestEvent, TStreamAlgorithm, TSupportedAlgorithm, TSymmetricAlgorithm, TTreePageDataHandler, TTreeRow, TTrustedAuthorities, TUnsubscribe, TreePaginationMode };
|
package/dist/index.d.ts
CHANGED
|
@@ -464,28 +464,6 @@ interface INormalizeOptions {
|
|
|
464
464
|
* - Final lowercasing and NFKC normalization.
|
|
465
465
|
*/
|
|
466
466
|
declare function foldAscii(value: string): string;
|
|
467
|
-
/**
|
|
468
|
-
* Canonical normalization primitive shared across:
|
|
469
|
-
* - In-memory filter evaluations (`filterLogic.ts`)
|
|
470
|
-
* - Trigram search indexing (`CSearchIndex.ts`)
|
|
471
|
-
* - Blind-index token generation (`CKeyManager.ts`)
|
|
472
|
-
* - Encrypted filter rewrites (`rewriteEncryptedFilters.ts`)
|
|
473
|
-
*
|
|
474
|
-
* Default behavior:
|
|
475
|
-
* - Coerces value to string
|
|
476
|
-
* - Normalizes via Unicode NFKC (Compatibility Decomposition followed by Canonical Composition)
|
|
477
|
-
* - Trims leading and trailing whitespace
|
|
478
|
-
* - Converts to lowercase via standard Unicode case folding
|
|
479
|
-
* - Strips combining dot above (U+0307) so capital dotted 'İ' matches lowercase 'i' by default
|
|
480
|
-
* - Folds Greek final sigma (ς / U+03C2) to medial sigma (σ / U+03C3) so queries match across word boundaries
|
|
481
|
-
*
|
|
482
|
-
* Configurable options:
|
|
483
|
-
* - `locale`: When provided (such as 'tr' or 'tr-TR'), uses `toLocaleLowerCase(locale)`
|
|
484
|
-
* ensuring Turkish dotted/dotless I conversions (İ -> i, I -> ı).
|
|
485
|
-
* - `asciiFold`: When true, maps diacritics and extended Latin characters to pure ASCII equivalents
|
|
486
|
-
* ensuring cross-locale equivalence (e.g. 'Çelik' == 'Celik', 'Łódź' == 'lodz', 'Straße' == 'strasse').
|
|
487
|
-
* - `normalizer`: Optional custom transformer invoked after baseline normalization.
|
|
488
|
-
*/
|
|
489
467
|
declare function normalizeFilterValue(value: any, options?: INormalizeOptions): string;
|
|
490
468
|
|
|
491
469
|
/**
|
|
@@ -1819,8 +1797,9 @@ declare class CSearchIndex {
|
|
|
1819
1797
|
declare abstract class AEncryptedClientProvider<TRow = TDataRow> extends ADataProvider<TRow> {
|
|
1820
1798
|
encryption?: IProviderEncryptionOptions;
|
|
1821
1799
|
protected _searchIndex?: CSearchIndex;
|
|
1822
|
-
protected _decryptedCache: Map<string | number, TRow>;
|
|
1823
1800
|
protected _decryptedRefCache: WeakMap<object, TRow>;
|
|
1801
|
+
protected _idToEncryptedRef: Map<string | number, object>;
|
|
1802
|
+
protected _decryptedCache: Map<string | number, TRow>;
|
|
1824
1803
|
constructor(options?: IDataProviderOptions);
|
|
1825
1804
|
get isEncryptionEnabled(): boolean;
|
|
1826
1805
|
get searchIndex(): CSearchIndex | undefined;
|
|
@@ -1837,7 +1816,11 @@ declare abstract class AEncryptedClientProvider<TRow = TDataRow> extends ADataPr
|
|
|
1837
1816
|
* Evicts a single row or row ID from both `_decryptedCache` and `_decryptedRefCache`.
|
|
1838
1817
|
*/
|
|
1839
1818
|
evictDecryptedRow(rowOrId: any): void;
|
|
1840
|
-
|
|
1819
|
+
private _forEachChunk;
|
|
1820
|
+
populateDecryptedCache(rows: TRow[], options?: {
|
|
1821
|
+
chunkSize?: number;
|
|
1822
|
+
isStale?: () => boolean;
|
|
1823
|
+
}): Promise<void>;
|
|
1841
1824
|
isFieldEncrypted(field: string, sampleRows?: TRow[]): boolean;
|
|
1842
1825
|
warnIfEncryptedFilterWithoutSupport(filter: IDataFilter | any, sampleRows?: TRow[]): void;
|
|
1843
1826
|
protected _guardEncryptedSorting(sortList: IDataSort[]): void;
|
|
@@ -1845,13 +1828,19 @@ declare abstract class AEncryptedClientProvider<TRow = TDataRow> extends ADataPr
|
|
|
1845
1828
|
protected _initSearchIndex(): void;
|
|
1846
1829
|
setEncryption(encryption?: IProviderEncryptionOptions): void;
|
|
1847
1830
|
clearEncryption(): void;
|
|
1831
|
+
protected _getApiUrl(): string | undefined;
|
|
1832
|
+
private _extractPlainFields;
|
|
1833
|
+
private _indexEncryptedRows;
|
|
1848
1834
|
protected encryptRows(rows: TRow[]): Promise<TRow[]>;
|
|
1849
1835
|
protected encryptRowsChunked(rows: TRow[], options?: ISetDataChunkedOptions): Promise<TRow[]>;
|
|
1850
1836
|
/**
|
|
1851
1837
|
* Indexes pre-encrypted rows by performing a transient in-memory decryption pass
|
|
1852
1838
|
* on search fields to populate CSearchIndex without mutating underlying encrypted records in allData.
|
|
1853
1839
|
*/
|
|
1854
|
-
indexPreEncryptedRows(rows: TRow[]
|
|
1840
|
+
indexPreEncryptedRows(rows: TRow[], options?: {
|
|
1841
|
+
chunkSize?: number;
|
|
1842
|
+
isStale?: () => boolean;
|
|
1843
|
+
}): Promise<void>;
|
|
1855
1844
|
decryptRows(rows: TRow[]): Promise<{
|
|
1856
1845
|
rows: TRow[];
|
|
1857
1846
|
decrypted: boolean;
|
|
@@ -1870,8 +1859,14 @@ interface IProviderEncryptionHost<TRow> {
|
|
|
1870
1859
|
idKey: string;
|
|
1871
1860
|
encryptRows(rows: TRow[]): Promise<TRow[]>;
|
|
1872
1861
|
encryptRowsChunked(rows: TRow[], options?: ISetDataChunkedOptions): Promise<TRow[]>;
|
|
1873
|
-
indexPreEncryptedRows(rows: TRow[]
|
|
1874
|
-
|
|
1862
|
+
indexPreEncryptedRows(rows: TRow[], options?: {
|
|
1863
|
+
chunkSize?: number;
|
|
1864
|
+
isStale?: () => boolean;
|
|
1865
|
+
}): Promise<void>;
|
|
1866
|
+
populateDecryptedCache(rows: TRow[], options?: {
|
|
1867
|
+
chunkSize?: number;
|
|
1868
|
+
isStale?: () => boolean;
|
|
1869
|
+
}): Promise<void>;
|
|
1875
1870
|
cacheDecryptedRow(encryptedRow: any, decryptedRow: TRow): void;
|
|
1876
1871
|
getDecryptedRow(rowOrId: any): TRow | undefined;
|
|
1877
1872
|
decryptRows(rows: TRow[]): Promise<{
|
|
@@ -1893,6 +1888,7 @@ declare class CFlatClientDataProvider<TRow = TDataRow> extends AEncryptedClientP
|
|
|
1893
1888
|
batchSize: number | false;
|
|
1894
1889
|
batchLoad: 'initially' | 'onDemand';
|
|
1895
1890
|
onDemandFilterPolicy: 'ingestAll' | 'warnOnly';
|
|
1891
|
+
maxCachedBatches?: number;
|
|
1896
1892
|
onBatchLoaded?: (batch: IBatchLoadedEvent<TRow>) => void;
|
|
1897
1893
|
loadedBatches: Set<number>;
|
|
1898
1894
|
protected _rawSourceData?: TRow[];
|
|
@@ -1905,6 +1901,11 @@ declare class CFlatClientDataProvider<TRow = TDataRow> extends AEncryptedClientP
|
|
|
1905
1901
|
protected _batchGeneration: number;
|
|
1906
1902
|
protected _inFlightLoad?: Promise<void>;
|
|
1907
1903
|
constructor(options?: IDataProviderOptions);
|
|
1904
|
+
/**
|
|
1905
|
+
* Evicts oldest loaded batches when maxCachedBatches is configured and exceeded,
|
|
1906
|
+
* clearing their slots in _allData so they can be re-fetched on demand.
|
|
1907
|
+
*/
|
|
1908
|
+
protected _evictOldestBatchesIfNeeded(activeBatch?: number): void;
|
|
1908
1909
|
protected _assignAllData(data: TRow[], preserveDecryptedCache?: boolean): void;
|
|
1909
1910
|
get allData(): TRow[];
|
|
1910
1911
|
set allData(data: TRow[]);
|
|
@@ -1995,6 +1996,7 @@ declare class CAPIFlatClientDataProvider<TRow = TDataRow> extends CFlatClientDat
|
|
|
1995
1996
|
private _lastDataReceivedPromise;
|
|
1996
1997
|
private _lastBatch1CallbackGen;
|
|
1997
1998
|
private _suppressOnDemandWarn;
|
|
1999
|
+
protected _getApiUrl(): string | undefined;
|
|
1998
2000
|
setData(data: TRow[]): Promise<void> | void;
|
|
1999
2001
|
protected _assignAllData(data: TRow[], preserveDecryptedCache?: boolean): void;
|
|
2000
2002
|
set allData(data: TRow[]);
|
|
@@ -2146,9 +2148,12 @@ declare class CTreeClientDataProvider<TRow extends TDataRow = TDataRow> extends
|
|
|
2146
2148
|
private _filteredNodesCache;
|
|
2147
2149
|
private _allVisibleRowsCache;
|
|
2148
2150
|
protected _decryptedNodeMap: Map<string | number, TRow>;
|
|
2151
|
+
protected _knownIds: Set<string | number>;
|
|
2149
2152
|
clearDecryptedCache(): void;
|
|
2150
2153
|
invalidateDecryptedRow(rowOrId: any): void;
|
|
2151
2154
|
protected _assignAllData(data: TRow[], preserveDecryptedCache?: boolean): void;
|
|
2155
|
+
/** Appends unique rows in-place using _knownIds without cloning allData. */
|
|
2156
|
+
protected _appendUniqueTreeRows(rows: TRow[]): boolean;
|
|
2152
2157
|
get allData(): TRow[];
|
|
2153
2158
|
set allData(data: TRow[]);
|
|
2154
2159
|
invalidateStaticCache(): void;
|
|
@@ -2218,6 +2223,7 @@ declare class CAPITreeClientDataProvider<TRow extends TDataRow = TDataRow> exten
|
|
|
2218
2223
|
protected _abortController?: AbortController;
|
|
2219
2224
|
private _lastDataReceivedPromise;
|
|
2220
2225
|
private _lastBatch1CallbackGen;
|
|
2226
|
+
protected _getApiUrl(): string | undefined;
|
|
2221
2227
|
setData(data: TRow[]): Promise<void> | void;
|
|
2222
2228
|
protected _bumpRequestGeneration(nextUrl?: string): number;
|
|
2223
2229
|
private _shouldSkipDecryption;
|
|
@@ -2238,7 +2244,9 @@ declare class CAPITreeClientDataProvider<TRow extends TDataRow = TDataRow> exten
|
|
|
2238
2244
|
private _initialFetch;
|
|
2239
2245
|
protected _fetchBatchedTree(reqGen: number, batchGen: number, disableCache: boolean, shouldSkipDecryption: boolean): Promise<void>;
|
|
2240
2246
|
protected _streamRemainingTreeBatches(reqGen: number, batchGen: number, batchSize: number, disableCache: boolean, shouldSkipDecryption: boolean, startPage?: number): Promise<void>;
|
|
2241
|
-
loadBatch(batchNumber: number
|
|
2247
|
+
loadBatch(batchNumber: number, options?: {
|
|
2248
|
+
skipPageLoad?: boolean;
|
|
2249
|
+
}): Promise<void>;
|
|
2242
2250
|
ensureRangeLoaded(startIndex: number, endIndex: number): Promise<void>;
|
|
2243
2251
|
loadRange(startIndex: number, endIndex: number): Promise<void>;
|
|
2244
2252
|
setCurrentPage(currentPage: number): Promise<void>;
|
|
@@ -2848,6 +2856,7 @@ declare const applyOperator: (operator: string, rowValue: any, filterValue: any,
|
|
|
2848
2856
|
* Normalizes standard and shorthand filter structures into a canonical IDataFilter tree.
|
|
2849
2857
|
*/
|
|
2850
2858
|
declare const normalizeFilter: (filter: any) => IDataFilter | null;
|
|
2859
|
+
declare const compileFilter: (filter: IDataFilter | any, options?: INormalizeOptions) => ((row: TDataRow) => boolean);
|
|
2851
2860
|
declare const evaluateFilter: (filter: IDataFilter | any, row: TDataRow, options?: INormalizeOptions) => boolean;
|
|
2852
2861
|
declare const filterTreeData: (nodes: any[], filter: IDataFilter, options: {
|
|
2853
2862
|
idKey: string;
|
|
@@ -3769,6 +3778,7 @@ declare class CWebCryptoEncryptionProvider extends AEncryptionProvider {
|
|
|
3769
3778
|
private _inflightKeyCache;
|
|
3770
3779
|
setDefaultKey(key: TKeyProvider): void;
|
|
3771
3780
|
clearKeys(): void;
|
|
3781
|
+
setKeyring(keys: Record<string, TKeyProvider | IKeyPair>, activeKid?: string): void;
|
|
3772
3782
|
constructor(key?: TKeyProvider | IKeyPair, options?: ICWebCryptoOptions);
|
|
3773
3783
|
/**
|
|
3774
3784
|
* Derives or returns a CryptoKey for encryption/decryption based on KDF settings.
|
|
@@ -3817,9 +3827,11 @@ declare class CWebCryptoAESCBCProvider extends AEncryptionProvider {
|
|
|
3817
3827
|
private _cachedKeyId?;
|
|
3818
3828
|
private _kdfOptions?;
|
|
3819
3829
|
private _decryptSaltCache;
|
|
3830
|
+
private _inflightKeyCache;
|
|
3820
3831
|
constructor(key?: TKeyProvider | IKeyPair | any, options?: ICWebCryptoAESCBCOptions);
|
|
3821
3832
|
setDefaultKey(key: TKeyProvider | IKeyPair): void;
|
|
3822
3833
|
clearKeys(): void;
|
|
3834
|
+
setKeyring(keys: Record<string, TKeyProvider | IKeyPair>, activeKid?: string): void;
|
|
3823
3835
|
warmupKey(options?: IEncryptionContext): Promise<void>;
|
|
3824
3836
|
/**
|
|
3825
3837
|
* Derives 64 bytes (512 bits) of key material:
|
|
@@ -4468,5 +4480,5 @@ declare function resolveBucketsForRange(operator: string, targetValue: any, conf
|
|
|
4468
4480
|
*/
|
|
4469
4481
|
declare function isEncrypted(payload: any): boolean;
|
|
4470
4482
|
|
|
4471
|
-
export { AAPIDataProvider, ADataProvider, AEncryptedClientProvider, AEncryptionProvider, BLIND_INDEX_FRAMING_VERSION, CAPIFlatClientDataProvider, CAPIFlatServerDataProvider, CAPITreeClientDataProvider, CAPITreeServerDataProvider, CApplicationCache, CBrowserSessionCache, CCookieCache, CECDHEncryptionProvider, CFlatClientDataProvider, CFlatServerDataProvider, CIndexedDBCache, CIndexedDBKeyPinningStore, CKeyManager, CKeyPinningStore, CLocalStorageCache, CLocalStorageKeyPinningStore, CMemoryCache, CMemoryKeyPinningStore, CNodeCryptoEncryptionProvider, CRSAEncryptionProvider, CSearchIndex, CServerSessionCache, CTreeClientDataProvider, CTreeServerDataProvider, CWebCryptoAESCBCProvider, CWebCryptoEncryptionProvider, CWebCryptoStreamCipher, CacheProviderFactory, DECRYPT_ERROR_SENTINEL, DEFAULT_KEY_CACHE_MAX_SIZE, DEFAULT_MAX_ALLOWED_ITERATIONS, DEFAULT_MAX_SALT_DERIVATIONS, DEFAULT_MIN_BUCKET_STEP, DEFAULT_PBKDF2_ITERATIONS, DefaultHydrationAdapter, ECacheStrategy, EDataFilterOperator, ENCRYPTION_CONTEXT_KEYS, EQueueStorage, ERR_AUTH_UNAUTHORIZED, ERR_CRYPTO_AUTH_FAILED, ERR_CRYPTO_DECRYPT_FAILED, ERR_CRYPTO_TAG_MISMATCH, KatluxIndexedDB, PROVIDER_CONSTRUCTOR_OPTION_KEYS, QueueStorageFactory, RANGE_BUCKET_POLICY, RequestProvider, RequestProviderRegistry, RequestQueue, SEARCH_FILTER_NOT_OPERATOR, SENSITIVE_HEADER_KEYS, SENSITIVE_RANGE_BUCKET_FIELDS, _bidxHmacKeyCache, aadToBytes, acquireSaltDerivationSlot, applyOperator, areKeysIdentical, assertMaxAllowedIterations, attachSaltDerivationBudget, buildAadString, buildCanonicalFieldAad, buildEncryptionContext, canonicalizeJson, claimSaltDerivationSlotSync, clearBlindIndexKeyCache, clearCachedCipherProvider, clearSSRData, combineCiphertextAndTag, compareAnd, compareContains, compareEqual, compareIn, compareOr, compareRangeBuckets, compareSteppedBuckets, compareValues, computeBlindIndex, computeBlindIndexSchemeId, computeDateBucket, computeMultiBlindIndex, computeRangeBucket, computeRangeBucketUnchecked, computeSteppedBucket, computeTierBucket, computeWriteBlindIndex, createDecryptionStream, createEncryptionProvider, createEncryptionStream, debounce, decryptBlob, decryptPageRows, decryptPayload, deriveAuthAndEncryptionKeys, deriveBlindIndexHmacKey, deriveKey, deriveKeyFromSecret, encryptBlob, encryptPayload, encryptRows, encryptRowsChunked, escapeAadComponent, evaluateFilter, exportAESKey, exportPrivateKey, exportPrivateKeyToPEM, exportPublicKey, exportPublicKeyToPEM, extractDefaultRowId, extractFilterFieldNames, extractTrigrams, fastKeyHash, fetchWithSSR, filterData, filterTreeData, foldAscii, fromBase64, generateAESKey, generateAccountDataKey, generateECDHKeyPair, generateECDSAKeyPair, generateRSAKeyPair, generateSigningKeyPair, getAppRoute, getAppRouter, getCipherProvider, getDateBucketRange, getGlobalDataProviderConfig, getHydrationAdapter, getKeyFingerprint, getKeyIdentifier, getLruCacheEntry, getPlatformApp, getRandomValues, getRangeBucketRange, getSSRData, getSSRPayload, getSafeKeyIdentifier, getSaltDerivationBudget, getSteppedBucketRange, getSubtleCrypto, getTierBucketRange, importAESKey, importECDSAPrivateKeyFromPEM, importECDSAPublicKeyFromPEM, importPrivateKey, importPrivateKeyFromPEM, importPublicKey, importPublicKeyFromPEM, invertFilterOperator, isAuthOrDecryptionError, isDataEncrypted, isEncrypted, isEncryptedPayload, isFieldBlindIndexStale, isIntervalFullyMatchingOperator, isIntervalMatchingOperator, negateFilterNode, normalizeDecryptError, normalizeFilter, normalizeFilterValue, normalizeIndexTerm, normalizeUrl, onPlatformReady, parseDateValue, parseDecryptedJsonSafely, parseNumericValue, pickEncryptionContext, pickProviderOptions, randomBytes, rangeBucketPolicy, reencryptBatch, reencryptDataset, rekeyEncryptedPayload, rekeyUserKeypair, resolveAndClampPbkdf2Iterations, resolveAuthorityCryptoKey, resolveBucketsForRange, resolveBucketsForRangeUnchecked, resolveCachedSaltDerivation, resolveInfoBytes, resolveSalt, rewrapAccountKeyForUser, rewriteEncryptedFilters, runWithSaltDerivationSlot, safeSetProperty, serializeAadFieldValue, serializePlaintextToBytes, setGlobalDataProviderConfig, setHydrationAdapter, setLruCacheEntry, sign, signGrant, signKeyResetAttestation, sortData, textDecoder, textEncoder, toBase64, unwrapAccountKeyForUser, unwrapHMACKeyForUser, unwrapKey, useDebounce, useFilterLogic, useSortLogic, validateBlindIndexKeyring, validateRangeBucketConfig, verify, verifyAndPinKey, verifyAttestation, verifyGrant, wrapAccountKeyForUser, wrapHMACKeyForUser, wrapKey };
|
|
4483
|
+
export { AAPIDataProvider, ADataProvider, AEncryptedClientProvider, AEncryptionProvider, BLIND_INDEX_FRAMING_VERSION, CAPIFlatClientDataProvider, CAPIFlatServerDataProvider, CAPITreeClientDataProvider, CAPITreeServerDataProvider, CApplicationCache, CBrowserSessionCache, CCookieCache, CECDHEncryptionProvider, CFlatClientDataProvider, CFlatServerDataProvider, CIndexedDBCache, CIndexedDBKeyPinningStore, CKeyManager, CKeyPinningStore, CLocalStorageCache, CLocalStorageKeyPinningStore, CMemoryCache, CMemoryKeyPinningStore, CNodeCryptoEncryptionProvider, CRSAEncryptionProvider, CSearchIndex, CServerSessionCache, CTreeClientDataProvider, CTreeServerDataProvider, CWebCryptoAESCBCProvider, CWebCryptoEncryptionProvider, CWebCryptoStreamCipher, CacheProviderFactory, DECRYPT_ERROR_SENTINEL, DEFAULT_KEY_CACHE_MAX_SIZE, DEFAULT_MAX_ALLOWED_ITERATIONS, DEFAULT_MAX_SALT_DERIVATIONS, DEFAULT_MIN_BUCKET_STEP, DEFAULT_PBKDF2_ITERATIONS, DefaultHydrationAdapter, ECacheStrategy, EDataFilterOperator, ENCRYPTION_CONTEXT_KEYS, EQueueStorage, ERR_AUTH_UNAUTHORIZED, ERR_CRYPTO_AUTH_FAILED, ERR_CRYPTO_DECRYPT_FAILED, ERR_CRYPTO_TAG_MISMATCH, KatluxIndexedDB, PROVIDER_CONSTRUCTOR_OPTION_KEYS, QueueStorageFactory, RANGE_BUCKET_POLICY, RequestProvider, RequestProviderRegistry, RequestQueue, SEARCH_FILTER_NOT_OPERATOR, SENSITIVE_HEADER_KEYS, SENSITIVE_RANGE_BUCKET_FIELDS, _bidxHmacKeyCache, aadToBytes, acquireSaltDerivationSlot, applyOperator, areKeysIdentical, assertMaxAllowedIterations, attachSaltDerivationBudget, buildAadString, buildCanonicalFieldAad, buildEncryptionContext, canonicalizeJson, claimSaltDerivationSlotSync, clearBlindIndexKeyCache, clearCachedCipherProvider, clearSSRData, combineCiphertextAndTag, compareAnd, compareContains, compareEqual, compareIn, compareOr, compareRangeBuckets, compareSteppedBuckets, compareValues, compileFilter, computeBlindIndex, computeBlindIndexSchemeId, computeDateBucket, computeMultiBlindIndex, computeRangeBucket, computeRangeBucketUnchecked, computeSteppedBucket, computeTierBucket, computeWriteBlindIndex, createDecryptionStream, createEncryptionProvider, createEncryptionStream, debounce, decryptBlob, decryptPageRows, decryptPayload, deriveAuthAndEncryptionKeys, deriveBlindIndexHmacKey, deriveKey, deriveKeyFromSecret, encryptBlob, encryptPayload, encryptRows, encryptRowsChunked, escapeAadComponent, evaluateFilter, exportAESKey, exportPrivateKey, exportPrivateKeyToPEM, exportPublicKey, exportPublicKeyToPEM, extractDefaultRowId, extractFilterFieldNames, extractTrigrams, fastKeyHash, fetchWithSSR, filterData, filterTreeData, foldAscii, fromBase64, generateAESKey, generateAccountDataKey, generateECDHKeyPair, generateECDSAKeyPair, generateRSAKeyPair, generateSigningKeyPair, getAppRoute, getAppRouter, getCipherProvider, getDateBucketRange, getGlobalDataProviderConfig, getHydrationAdapter, getKeyFingerprint, getKeyIdentifier, getLruCacheEntry, getPlatformApp, getRandomValues, getRangeBucketRange, getSSRData, getSSRPayload, getSafeKeyIdentifier, getSaltDerivationBudget, getSteppedBucketRange, getSubtleCrypto, getTierBucketRange, importAESKey, importECDSAPrivateKeyFromPEM, importECDSAPublicKeyFromPEM, importPrivateKey, importPrivateKeyFromPEM, importPublicKey, importPublicKeyFromPEM, invertFilterOperator, isAuthOrDecryptionError, isDataEncrypted, isEncrypted, isEncryptedPayload, isFieldBlindIndexStale, isIntervalFullyMatchingOperator, isIntervalMatchingOperator, negateFilterNode, normalizeDecryptError, normalizeFilter, normalizeFilterValue, normalizeIndexTerm, normalizeUrl, onPlatformReady, parseDateValue, parseDecryptedJsonSafely, parseNumericValue, pickEncryptionContext, pickProviderOptions, randomBytes, rangeBucketPolicy, reencryptBatch, reencryptDataset, rekeyEncryptedPayload, rekeyUserKeypair, resolveAndClampPbkdf2Iterations, resolveAuthorityCryptoKey, resolveBucketsForRange, resolveBucketsForRangeUnchecked, resolveCachedSaltDerivation, resolveInfoBytes, resolveSalt, rewrapAccountKeyForUser, rewriteEncryptedFilters, runWithSaltDerivationSlot, safeSetProperty, serializeAadFieldValue, serializePlaintextToBytes, setGlobalDataProviderConfig, setHydrationAdapter, setLruCacheEntry, sign, signGrant, signKeyResetAttestation, sortData, textDecoder, textEncoder, toBase64, unwrapAccountKeyForUser, unwrapHMACKeyForUser, unwrapKey, useDebounce, useFilterLogic, useSortLogic, validateBlindIndexKeyring, validateRangeBucketConfig, verify, verifyAndPinKey, verifyAttestation, verifyGrant, wrapAccountKeyForUser, wrapHMACKeyForUser, wrapKey };
|
|
4472
4484
|
export type { CacheDriverLoader, IAccessGrant, IAsymmetricSecurityDefaults, IBaseEncryptionProviderOptions, IBatchLoadedEvent, IBatchProgress, IBlindIndexFieldConfig, IBlindIndexKeyring, IBlindIndexOptions, IBlindIndexSchemeOptions, IBlindIndexVersionConfig, ICNodeCryptoOptions, ICWebCryptoAESCBCOptions, ICWebCryptoOptions, ICacheEntry, ICacheQuotaOptions, ICookieCacheOptions, IDataFilter, IDataProviderGlobalConfig, IDataProviderOptions, IDataProviderSetStateOptions, IDataProviderState, IDataResult, IDataSort, IDateRangeBucketConfig, IDeadLetterItem, IDebouncedFunction, IDecryptBatchSession, IDecryptErrorInfo, IDeriveAuthAndEncryptionOptions, IDomainDerivedKeys, IEncryptRecordSession, IEncryptedFilterRewriteOptions, IEncryptedPayload, IEncryptionContext, IEncryptionOperationOptions, IEncryptionProvider, IFieldEncryptionContext, IFlushOptions, IHKDFFromSecretOptions, IKDFOptions, IKDatatableAction, IKeyPair, IKeyPin, IKeyPinChangeEvent, IKeyPinningStore, IKeyResetAttestation, IMigrationProgress, IMigrationSummary, INormalizeOptions, IPlatformRouter, IProviderEncryptionOptions, IQueueStorageAdapter, IQueuedOperation, IQueuedRequest, IRangeBucketFieldConfig, IRangeBucketValidationOptions, IReencryptBatchOptions, IReencryptBatchResult, IReencryptDatasetOptions, IRekeyKeypairParams, IRekeyPayloadOptions, IRekeyedKeypairResult, IRequestOptions, IRewrittenEncryptedFilters, IRewrittenPersistenceQuery, ISSRHydrationAdapter, ISaltDerivationBudget, ISearchFilterCompoundNode, ISearchFilterNotNode, ISearchIndexEvalContext, ISearchIndexOptions, ISearchIndexRowEntry, ISensitiveFieldPolicyRule, ISetDataChunkedOptions, ISignedGrant, ISignedKeyResetAttestation, ISortDataOptions, ISteppedRangeBucketConfig, IStreamDecryptionOptions, IStreamEncryptionOptions, IStreamWithBufferMetric, ITierRangeBucketConfig, ITreeDataProvider, ITreeDataProviderOptions, ITreeNode, ITreeNodeStatic, ITrigramFieldConfig, IVerifyAndPinOptions, IVerifyAndPinResult, IVerifyGrantOptions, IVirtualScrollState, IWrappedKey, InFlightBridge, InFlightSubscriber, TBlindIndexKeyStatus, TDataProviderListener, TDataProviderStateChangeListener, TDataRow, TDateBucketGranularity, TECDHAlgorithm, TECDHCurve, TEncryptionAlgorithm, TKatluxStore, TKdfHash, TKdfStrategy, TKeyProvider, TPageDataHandler, TQueueItemStatus, TRSAAlgorithm, TRangeBucketConfig, TRawKey, TSearchFilterNode, TServerRequestEvent, TStreamAlgorithm, TSupportedAlgorithm, TSymmetricAlgorithm, TTreePageDataHandler, TTreeRow, TTrustedAuthorities, TUnsubscribe, TreePaginationMode };
|