@delali/narsil 0.3.1-next.98 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +45 -0
- package/README.md +27 -8
- package/dist/adapters/filesystem.d.ts +1 -1
- package/dist/adapters/filesystem.mjs +101 -13
- package/dist/adapters/gcs.d.ts +49 -0
- package/dist/adapters/gcs.mjs +213 -0
- package/dist/adapters/indexeddb.d.ts +1 -1
- package/dist/adapters/indexeddb.mjs +2 -7
- package/dist/adapters/memory.d.ts +1 -1
- package/dist/adapters/memory.mjs +5 -0
- package/dist/adapters/s3.d.ts +53 -0
- package/dist/adapters/s3.mjs +263 -0
- package/dist/{adapters-BQFQ4PRz.d.ts → adapters-pljAqmrC.d.ts} +33 -0
- package/dist/browser/chunk-4E5APHTM.mjs +1459 -0
- package/dist/browser/chunk-NDYADQ4Y.mjs +23426 -0
- package/dist/browser/chunk-QAOVAYAG.mjs +564 -0
- package/dist/browser/chunk-WC2DEXWU.mjs +29 -0
- package/dist/browser/chunk-YINZFPLT.mjs +1239 -0
- package/dist/browser/chunk-YJHGOJAC.mjs +15 -0
- package/dist/browser/{chunk-Z7QH2XHB.mjs → core-leaf-HWAXCEWX.mjs} +3987 -2103
- package/dist/browser/custom-token-results-R5BIX7SL.mjs +59 -0
- package/dist/browser/digest-leaf-64IPRPZD.mjs +151 -0
- package/dist/browser/durability-config-75NSFCQN.mjs +97 -0
- package/dist/browser/embed-GG6PS3EA.mjs +264 -0
- package/dist/browser/geo-index-GNHY4PUB.mjs +1484 -0
- package/dist/browser/gzip-JF3S6PPT.mjs +31 -0
- package/dist/browser/module-ZZTNG5JZ.mjs +5762 -0
- package/dist/browser/msgpack-leaf-44XNWSSY.mjs +302 -0
- package/dist/browser/optional-reads-XMVPG6HG.mjs +3230 -0
- package/dist/browser/optional-writes-76DWMRQH.mjs +3603 -0
- package/dist/browser/phrase-module-6UGFVW5J.mjs +617 -0
- package/dist/browser/resolve-vector-text-XRR2OVHE.mjs +85 -0
- package/dist/browser/restore-queue-SG5O735W.mjs +196 -0
- package/dist/browser/{runtime-NYE5TB6O.mjs → runtime-OMKE7DF4.mjs} +83 -25
- package/dist/browser/segment-codec-leaf-A427QJUX.mjs +554 -0
- package/dist/browser/segment-merge-leaf-7BZ54JPI.mjs +1636 -0
- package/dist/browser/storage-leaf-5UTR5K7J.mjs +19829 -0
- package/dist/browser/store-leaf-3L33V35P.mjs +2070 -0
- package/dist/browser/suggestions-leaf-UBNDVKBD.mjs +1430 -0
- package/dist/browser/worker-copies-JXSGYR5X.mjs +2951 -0
- package/dist/{capabilities-BTTIs96E.d.ts → capabilities-DMte5K9_.d.ts} +162 -18
- package/dist/chunk-2AFZE7Y3.mjs +72 -0
- package/dist/chunk-2CKDCC65.mjs +47 -0
- package/dist/chunk-3ECIRFS5.mjs +61 -0
- package/dist/chunk-44W3CBNG.mjs +7 -0
- package/dist/chunk-4H4RG2FR.mjs +13 -0
- package/dist/chunk-4PY4JYMY.mjs +11 -0
- package/dist/chunk-4ZPVAHWF.mjs +1289 -0
- package/dist/chunk-5EI5CXO6.mjs +197 -0
- package/dist/chunk-5F5MXWS5.mjs +283 -0
- package/dist/{chunk-OHP7QR33.mjs → chunk-5FLRXF73.mjs} +25 -4
- package/dist/chunk-6FOENO4E.mjs +273 -0
- package/dist/chunk-6GHX35ZM.mjs +108 -0
- package/dist/chunk-6MSZ543Y.mjs +32 -0
- package/dist/chunk-6N6HHBCQ.mjs +4596 -0
- package/dist/{chunk-LXPIXDUJ.mjs → chunk-7P5YWDRQ.mjs} +403 -169
- package/dist/{chunk-TGP5M5R7.mjs → chunk-7T4LAYT4.mjs} +1 -1
- package/dist/{chunk-GGSH6KBQ.mjs → chunk-ASZLNVWW.mjs} +23 -3
- package/dist/chunk-AVBPB3MI.mjs +602 -0
- package/dist/{chunk-UCDF35PU.mjs → chunk-AVGUEEQ3.mjs} +494 -245
- package/dist/chunk-BUMREPLU.mjs +15 -0
- package/dist/chunk-BY6NALRK.mjs +31921 -0
- package/dist/chunk-C4ZMXXTL.mjs +92 -0
- package/dist/{chunk-2WYMG3OZ.mjs → chunk-C74KPRR7.mjs} +274 -19
- package/dist/{chunk-RSRVGAIQ.mjs → chunk-D456ZFPQ.mjs} +3 -2
- package/dist/chunk-DXZ6JDWG.mjs +797 -0
- package/dist/chunk-FJXJZUWF.mjs +209 -0
- package/dist/chunk-FS3HPPSC.mjs +212 -0
- package/dist/chunk-FT4KLZXW.mjs +1164 -0
- package/dist/chunk-GR5GMFJJ.mjs +104 -0
- package/dist/chunk-GXCDWLQI.mjs +193 -0
- package/dist/chunk-GXED6R3Q.mjs +271 -0
- package/dist/chunk-HLPRHOSO.mjs +17 -0
- package/dist/chunk-IL5DRCNU.mjs +3041 -0
- package/dist/{chunk-P36MUFEJ.mjs → chunk-JDDXV6UF.mjs} +2 -1
- package/dist/chunk-K5HSUPYS.mjs +11 -0
- package/dist/chunk-KYIRXTCA.mjs +100 -0
- package/dist/chunk-LFXS6OF7.mjs +289 -0
- package/dist/chunk-LNGE7SLY.mjs +151 -0
- package/dist/chunk-M2Z5WVWW.mjs +194 -0
- package/dist/{chunk-45AVKHMJ.mjs → chunk-M3B7SGJB.mjs} +63 -50
- package/dist/chunk-M3OW2XSP.mjs +40 -0
- package/dist/chunk-MFPSQZ6P.mjs +127 -0
- package/dist/chunk-MRCJBWJZ.mjs +1292 -0
- package/dist/chunk-MSIN4NM3.mjs +25 -0
- package/dist/chunk-MW3CJVGP.mjs +219 -0
- package/dist/chunk-MYM6CAVK.mjs +76 -0
- package/dist/chunk-NJJN4FMM.mjs +84 -0
- package/dist/chunk-NM7I3BM7.mjs +59 -0
- package/dist/chunk-OIJ64LGT.mjs +19 -0
- package/dist/{chunk-K7D4ZTSW.mjs → chunk-P4F4UWLC.mjs} +1 -1
- package/dist/chunk-Q2AP2FSN.mjs +15 -0
- package/dist/chunk-R2PJKSNL.mjs +54 -0
- package/dist/{chunk-HXJBSHXF.mjs → chunk-R724DJSG.mjs} +5056 -2619
- package/dist/chunk-S2POFTLN.mjs +10 -0
- package/dist/chunk-S5QMWECL.mjs +7 -0
- package/dist/chunk-SLAC5PAB.mjs +5008 -0
- package/dist/chunk-T4HMSZCX.mjs +5 -0
- package/dist/chunk-TACP6VK6.mjs +111 -0
- package/dist/chunk-TGPKS2UM.mjs +125 -0
- package/dist/chunk-TKKXPKEO.mjs +979 -0
- package/dist/chunk-V6EUBAIT.mjs +19 -0
- package/dist/chunk-XL56L4IR.mjs +228 -0
- package/dist/chunk-XQIAMDAG.mjs +3076 -0
- package/dist/chunk-YTUZ4R22.mjs +1063 -0
- package/dist/{chunk-KV3AZFT3.mjs → chunk-ZKOQR7EA.mjs} +45 -1
- package/dist/chunk-ZPJFGGGI.mjs +638 -0
- package/dist/chunk-ZXX5GZEX.mjs +17 -0
- package/dist/{client-i9eLJrw5.d.ts → client-BKqtl0_V.d.ts} +442 -22
- package/dist/client.d.ts +11 -10
- package/dist/client.mjs +8 -898
- package/dist/config-Bnl7L-0H.d.ts +608 -0
- package/dist/{config-P__Diiy4.d.ts → config-CJ-jfI0a.d.ts} +119 -9
- package/dist/core-leaf-6JVHEVFB.mjs +8 -0
- package/dist/custom-token-results-NXHBVY7U.mjs +59 -0
- package/dist/digest-leaf-KXBGKYHZ.mjs +1 -0
- package/dist/direct-executor-V3WOYU2Y.mjs +17 -0
- package/dist/distribution/coordinator/etcd.d.ts +63 -7
- package/dist/distribution/coordinator/etcd.mjs +725 -81
- package/dist/distribution/coordinator/in-memory.d.ts +3 -3
- package/dist/distribution/coordinator/in-memory.mjs +65 -10
- package/dist/distribution/transport/grpc.d.ts +2 -2
- package/dist/distribution/transport/grpc.mjs +39 -10
- package/dist/distribution/transport/in-memory.d.ts +2 -2
- package/dist/distribution/transport/in-memory.mjs +9 -6
- package/dist/distribution/transport/tcp.d.ts +2 -2
- package/dist/distribution/transport/tcp.mjs +20 -15
- package/dist/distribution.d.ts +267 -56
- package/dist/distribution.mjs +23156 -11362
- package/dist/durability-config-VWS2K24E.mjs +96 -0
- package/dist/embed-4PHHKGBK.mjs +263 -0
- package/dist/embeddings/openai.d.ts +1 -1
- package/dist/embeddings/openai.mjs +2 -2
- package/dist/{memory-CUEDwr-F.d.ts → engine-qjAxJSKk.d.ts} +2254 -1123
- package/dist/geo-index-2ZMMWWSK.mjs +1484 -0
- package/dist/gzip-2UCZW2MM.mjs +31 -0
- package/dist/{index-lcdGLyJH.d.ts → index-B_vmxpgW.d.ts} +260 -102
- package/dist/index.browser.mjs +4 -4
- package/dist/index.d.ts +2133 -57
- package/dist/index.mjs +16 -32
- package/dist/index.react-native.mjs +12 -0
- package/dist/invalidation/broadcast-channel.d.ts +1 -1
- package/dist/invalidation/filesystem.d.ts +1 -1
- package/dist/invalidation/filesystem.mjs +1 -2
- package/dist/invalidation/noop.d.ts +1 -1
- package/dist/languages/albanian.mjs +1 -1
- package/dist/languages/amharic.mjs +1 -1
- package/dist/languages/arabic.mjs +1 -1
- package/dist/languages/armenian.mjs +1 -1
- package/dist/languages/azerbaijani.mjs +1 -1
- package/dist/languages/bambara.mjs +1 -1
- package/dist/languages/basque.mjs +1 -1
- package/dist/languages/belarusian.mjs +1 -1
- package/dist/languages/bengali.mjs +1 -1
- package/dist/languages/bosnian.mjs +1 -1
- package/dist/languages/breton.mjs +1 -1
- package/dist/languages/bulgarian.mjs +1 -1
- package/dist/languages/burmese.mjs +1 -1
- package/dist/languages/catalan.mjs +1 -1
- package/dist/languages/chinese.mjs +1 -1
- package/dist/languages/croatian.mjs +1 -1
- package/dist/languages/czech.mjs +1 -1
- package/dist/languages/dagbani.mjs +1 -1
- package/dist/languages/danish.mjs +1 -1
- package/dist/languages/dutch.mjs +1 -1
- package/dist/languages/english.mjs +1 -1
- package/dist/languages/esperanto.mjs +1 -1
- package/dist/languages/estonian.mjs +1 -1
- package/dist/languages/ewe.mjs +1 -1
- package/dist/languages/faroese.mjs +1 -1
- package/dist/languages/fijian.mjs +1 -1
- package/dist/languages/finnish.mjs +1 -1
- package/dist/languages/french.mjs +1 -1
- package/dist/languages/ga.mjs +1 -1
- package/dist/languages/galician.mjs +1 -1
- package/dist/languages/georgian.mjs +1 -1
- package/dist/languages/german.mjs +1 -1
- package/dist/languages/greek.mjs +1 -1
- package/dist/languages/guarani.mjs +1 -1
- package/dist/languages/gujarati.mjs +1 -1
- package/dist/languages/haitian-creole.mjs +1 -1
- package/dist/languages/hausa.mjs +1 -1
- package/dist/languages/hawaiian.mjs +1 -1
- package/dist/languages/hebrew.mjs +1 -1
- package/dist/languages/hindi.mjs +1 -1
- package/dist/languages/hungarian.mjs +1 -1
- package/dist/languages/icelandic.mjs +1 -1
- package/dist/languages/igbo.mjs +1 -1
- package/dist/languages/indonesian.mjs +1 -1
- package/dist/languages/irish.mjs +1 -1
- package/dist/languages/italian.mjs +1 -1
- package/dist/languages/japanese.mjs +1 -1
- package/dist/languages/kannada.mjs +1 -1
- package/dist/languages/kazakh.mjs +1 -1
- package/dist/languages/khmer.mjs +1 -1
- package/dist/languages/kinyarwanda.mjs +1 -1
- package/dist/languages/kirundi.mjs +1 -1
- package/dist/languages/korean.mjs +1 -1
- package/dist/languages/kurmanji.mjs +1 -1
- package/dist/languages/kyrgyz.mjs +1 -1
- package/dist/languages/lao.mjs +1 -1
- package/dist/languages/latin.mjs +1 -1
- package/dist/languages/latvian.mjs +1 -1
- package/dist/languages/lingala.mjs +1 -1
- package/dist/languages/lithuanian.mjs +1 -1
- package/dist/languages/luxembourgish.mjs +1 -1
- package/dist/languages/macedonian.mjs +1 -1
- package/dist/languages/malagasy.mjs +1 -1
- package/dist/languages/malay.mjs +1 -1
- package/dist/languages/malayalam.mjs +1 -1
- package/dist/languages/maltese.mjs +1 -1
- package/dist/languages/maori.mjs +1 -1
- package/dist/languages/marathi.mjs +1 -1
- package/dist/languages/nepali.mjs +1 -1
- package/dist/languages/norwegian.mjs +1 -1
- package/dist/languages/oromo.mjs +1 -1
- package/dist/languages/persian.mjs +1 -1
- package/dist/languages/polish.mjs +1 -1
- package/dist/languages/portuguese.mjs +1 -1
- package/dist/languages/punjabi.mjs +1 -1
- package/dist/languages/romanian.mjs +1 -1
- package/dist/languages/russian.mjs +1 -1
- package/dist/languages/samoan.mjs +1 -1
- package/dist/languages/sanskrit.mjs +1 -1
- package/dist/languages/scottish-gaelic.mjs +1 -1
- package/dist/languages/serbian.mjs +1 -1
- package/dist/languages/shona.mjs +1 -1
- package/dist/languages/sinhala.mjs +1 -1
- package/dist/languages/slovak.mjs +1 -1
- package/dist/languages/slovenian.mjs +1 -1
- package/dist/languages/sorani.mjs +1 -1
- package/dist/languages/spanish.mjs +1 -1
- package/dist/languages/swahili.mjs +1 -1
- package/dist/languages/swedish.mjs +1 -1
- package/dist/languages/tagalog.mjs +1 -1
- package/dist/languages/tamil.mjs +1 -1
- package/dist/languages/tatar.mjs +1 -1
- package/dist/languages/telugu.mjs +1 -1
- package/dist/languages/thai.mjs +1 -1
- package/dist/languages/tibetan.mjs +1 -1
- package/dist/languages/tigrinya.mjs +1 -1
- package/dist/languages/tongan.mjs +1 -1
- package/dist/languages/turkish.mjs +1 -1
- package/dist/languages/twi.mjs +1 -1
- package/dist/languages/ukrainian.mjs +1 -1
- package/dist/languages/urdu.mjs +1 -1
- package/dist/languages/vietnamese.mjs +1 -1
- package/dist/languages/welsh.mjs +1 -1
- package/dist/languages/wolof.mjs +1 -1
- package/dist/languages/xhosa.mjs +1 -1
- package/dist/languages/yoruba.mjs +1 -1
- package/dist/languages/zulu.mjs +1 -1
- package/dist/long-query-thread-UCRK7MSI.mjs +154 -0
- package/dist/module-5ZSLUQII.mjs +3729 -0
- package/dist/msgpack-leaf-H5ZYW7S7.mjs +9 -0
- package/dist/optional-reads-5HFMF2QZ.mjs +3373 -0
- package/dist/optional-writes-4UOQKETU.mjs +247 -0
- package/dist/paged-partition-archive-BBRLZCIF.mjs +253 -0
- package/dist/partial-words.browser.mjs +1650 -0
- package/dist/partial-words.mjs +17 -11
- package/dist/{chunk-ASY5PHYI.mjs → pattern.browser.mjs} +253 -311
- package/dist/pattern.mjs +6 -7
- package/dist/persistence/durability/checkpoint-worker.d.ts +93 -25
- package/dist/persistence/durability/checkpoint-worker.mjs +51 -41
- package/dist/phrase-module-EFESWOCR.mjs +635 -0
- package/dist/query-actions-HMJUVWGT.mjs +119 -0
- package/dist/query-suggestions/merge-worker.d.ts +55 -0
- package/dist/query-suggestions/merge-worker.mjs +53 -0
- package/dist/query-suggestions-CBYkrQ5T.d.ts +311 -0
- package/dist/query-suggestions.browser.mjs +47 -0
- package/dist/query-suggestions.d.ts +20 -0
- package/dist/query-suggestions.mjs +19 -0
- package/dist/react-native/chunks/chunk-3OEFSHVV.mjs +970 -0
- package/dist/{browser/chunk-RELZRJNR.mjs → react-native/chunks/chunk-43R4GCM7.mjs} +49 -50
- package/dist/react-native/chunks/chunk-AKRYHAVG.mjs +6729 -0
- package/dist/react-native/chunks/chunk-CW2ZFXSE.mjs +14 -0
- package/dist/react-native/chunks/chunk-G3WCDTOF.mjs +29640 -0
- package/dist/react-native/chunks/chunk-GXXHHA2T.mjs +212 -0
- package/dist/react-native/chunks/chunk-H3MDVPBO.mjs +151 -0
- package/dist/react-native/chunks/chunk-HQEVQEDJ.mjs +52 -0
- package/dist/react-native/chunks/chunk-HRDMIQ63.mjs +131 -0
- package/dist/react-native/chunks/chunk-HTBY4GON.mjs +565 -0
- package/dist/react-native/chunks/chunk-LX62Y4B5.mjs +61 -0
- package/dist/react-native/chunks/chunk-MRH36RN3.mjs +902 -0
- package/dist/react-native/chunks/chunk-Q32DDFKX.mjs +19 -0
- package/dist/react-native/chunks/chunk-UE4ANHSX.mjs +127 -0
- package/dist/react-native/chunks/chunk-UNZPWLVL.mjs +1063 -0
- package/dist/react-native/chunks/chunk-UO44MA5M.mjs +232 -0
- package/dist/react-native/chunks/chunk-UYKIV2KT.mjs +42 -0
- package/dist/react-native/chunks/chunk-VUJCSQG5.mjs +11 -0
- package/dist/react-native/chunks/chunk-WVHF4ZAK.mjs +802 -0
- package/dist/react-native/chunks/chunk-ZUJCUPVS.mjs +54 -0
- package/dist/react-native/chunks/core-leaf-S2KNBWDY.mjs +7 -0
- package/dist/react-native/chunks/custom-token-results-3OZEMRE7.mjs +59 -0
- package/dist/react-native/chunks/digest-leaf-X6OIFDIU.mjs +1 -0
- package/dist/react-native/chunks/durability-config-FCSD4MXY.mjs +96 -0
- package/dist/react-native/chunks/embed-HA2I7RCF.mjs +263 -0
- package/dist/react-native/chunks/geo-index-QEYKEVPH.mjs +1484 -0
- package/dist/react-native/chunks/gzip.react-native-CVM4NQG2.mjs +12 -0
- package/dist/react-native/chunks/module-FMBX75GP.mjs +5209 -0
- package/dist/react-native/chunks/msgpack-leaf-JMNGSTRW.mjs +7 -0
- package/dist/react-native/chunks/optional-reads-AFPO2FEB.mjs +3364 -0
- package/dist/react-native/chunks/optional-writes-XOH25XZI.mjs +296 -0
- package/dist/react-native/chunks/phrase-module-IGYBK7XH.mjs +636 -0
- package/dist/react-native/chunks/replace-IMZUVUOE.mjs +57 -0
- package/dist/react-native/chunks/resolve-vector-text-GE2CRJKI.mjs +84 -0
- package/dist/react-native/chunks/restore-queue-LLNMYB4Z.mjs +187 -0
- package/dist/react-native/chunks/runtime-UOHD2XUJ.mjs +615 -0
- package/dist/react-native/chunks/segment-codec-leaf-VR6O5GLC.mjs +13 -0
- package/dist/react-native/chunks/segment-merge-leaf-LLMWU4EW.mjs +14 -0
- package/dist/react-native/chunks/storage-leaf-JD7PIDO4.mjs +19633 -0
- package/dist/react-native/chunks/store-leaf-4UVCMYGN.mjs +15 -0
- package/dist/react-native/chunks/suggestions-leaf-J5VT5RHY.mjs +1321 -0
- package/dist/react-native/chunks/worker-copies-ZYHY7FKJ.mjs +2831 -0
- package/dist/react-native/partial-words.mjs +1658 -0
- package/dist/react-native/pattern.mjs +2570 -0
- package/dist/react-native/query-suggestions.mjs +55 -0
- package/dist/react-native/sync.mjs +2759 -0
- package/dist/react-native/synonyms.mjs +676 -0
- package/dist/react.d.ts +12 -8
- package/dist/react.mjs +45 -1
- package/dist/{rerank-NWTKK636.mjs → rerank-RI2PMNOD.mjs} +22 -12
- package/dist/rerankers/http.d.ts +1 -1
- package/dist/rerankers/http.mjs +2 -2
- package/dist/resolve-vector-text-OD4J3WHF.mjs +3 -0
- package/dist/restore-queue-PCKWDAKQ.mjs +192 -0
- package/dist/runtime-USQYKN3I.mjs +615 -0
- package/dist/{schema-4W_7tk1f.d.ts → schema-CzG9OUw5.d.ts} +70 -30
- package/dist/segment-codec-leaf-QJM7I6QG.mjs +18 -0
- package/dist/segment-merge-leaf-4BJGIJHY.mjs +18 -0
- package/dist/server.d.ts +348 -22
- package/dist/server.mjs +2211 -327
- package/dist/storage-leaf-GRRRI7UV.mjs +5962 -0
- package/dist/store-leaf-6VMMSVBE.mjs +20 -0
- package/dist/stored-values-BWIMpiT_.d.ts +25 -0
- package/dist/suggestions-leaf-4KPTMPTL.mjs +54 -0
- package/dist/sync/filesystem.d.ts +30 -0
- package/dist/sync/filesystem.mjs +288 -0
- package/dist/sync/indexeddb.browser.mjs +287 -0
- package/dist/sync/indexeddb.d.ts +30 -0
- package/dist/sync/indexeddb.mjs +242 -0
- package/dist/sync.browser.mjs +1271 -0
- package/dist/sync.d.ts +23 -0
- package/dist/sync.mjs +2712 -0
- package/dist/synonyms.browser.mjs +658 -0
- package/dist/synonyms.mjs +17 -7
- package/dist/tasks-65b6t6lk.d.ts +782 -0
- package/dist/thread-UJ3W5LVI.mjs +31 -0
- package/dist/{types-B3b68nfF.d.ts → types-Ck97nB3D.d.ts} +1 -1
- package/dist/types-CpCg-Gq-.d.ts +227 -0
- package/dist/{types-Cb9kiY5P.d.ts → types-DvncmvuQ.d.ts} +12 -1
- package/dist/vector/search-worker.d.ts +10 -2
- package/dist/vector/search-worker.mjs +11 -11
- package/dist/worker-copies-YSXZXIGC.mjs +2232 -0
- package/dist/workers/entry.mjs +75 -15
- package/openapi.json +6840 -0
- package/package.json +406 -19
- package/dist/browser/chunk-CN4I4FZU.mjs +0 -602
- package/dist/browser/chunk-HOZW3PKP.mjs +0 -9
- package/dist/browser/chunk-JPTQZWJQ.mjs +0 -10
- package/dist/browser/chunk-LD55ZGU3.mjs +0 -347
- package/dist/browser/chunk-NAFT3K6X.mjs +0 -24546
- package/dist/browser/chunk-NNG3EEB6.mjs +0 -2728
- package/dist/browser/chunk-QWES44AW.mjs +0 -473
- package/dist/browser/durability-wiring-PY3L7DES.mjs +0 -3679
- package/dist/browser/module-PDXYHT75.mjs +0 -2822
- package/dist/browser/release-76MXRPGV.mjs +0 -33
- package/dist/browser/restore-queue-DVIYJ7RU.mjs +0 -35
- package/dist/browser/snapshot-J57MZK6L.mjs +0 -1207
- package/dist/browser/write-L7FAQA47.mjs +0 -208
- package/dist/chunk-37CD3OKS.mjs +0 -87
- package/dist/chunk-5XNIRLFC.mjs +0 -96
- package/dist/chunk-7X5JST5L.mjs +0 -114
- package/dist/chunk-AV4IJKD2.mjs +0 -35
- package/dist/chunk-AY3AQ3UH.mjs +0 -73
- package/dist/chunk-BKB3XTMI.mjs +0 -707
- package/dist/chunk-C7SLA6CM.mjs +0 -19
- package/dist/chunk-COVCQ73F.mjs +0 -587
- package/dist/chunk-DJHHF2L5.mjs +0 -17
- package/dist/chunk-E74YLAIG.mjs +0 -24
- package/dist/chunk-FMWRCP2C.mjs +0 -57
- package/dist/chunk-GES7U2PM.mjs +0 -68
- package/dist/chunk-HJSN7UYG.mjs +0 -10
- package/dist/chunk-JFRNNBOM.mjs +0 -35
- package/dist/chunk-K25LZA54.mjs +0 -8484
- package/dist/chunk-KEHK2O6P.mjs +0 -13
- package/dist/chunk-KOKM4PQN.mjs +0 -52
- package/dist/chunk-KZ3NX2P7.mjs +0 -21
- package/dist/chunk-L3L5YFXC.mjs +0 -614
- package/dist/chunk-L5ORED7V.mjs +0 -25
- package/dist/chunk-LH4NZNJJ.mjs +0 -1731
- package/dist/chunk-LU2CE5AE.mjs +0 -507
- package/dist/chunk-LXWDQLTW.mjs +0 -30
- package/dist/chunk-MHOSCQCQ.mjs +0 -948
- package/dist/chunk-NKRBEGJZ.mjs +0 -1705
- package/dist/chunk-NTRMFARG.mjs +0 -462
- package/dist/chunk-NW4XDSP2.mjs +0 -212
- package/dist/chunk-OOEXLUGR.mjs +0 -117
- package/dist/chunk-ORBLD3EL.mjs +0 -6
- package/dist/chunk-OWNZYMRE.mjs +0 -3591
- package/dist/chunk-PPY2GSIB.mjs +0 -44
- package/dist/chunk-QY7GC2MW.mjs +0 -33
- package/dist/chunk-R6A773WK.mjs +0 -226
- package/dist/chunk-R6PR4WYZ.mjs +0 -68
- package/dist/chunk-R7EEKAJE.mjs +0 -593
- package/dist/chunk-RONEOEON.mjs +0 -426
- package/dist/chunk-VWULPWRJ.mjs +0 -7469
- package/dist/chunk-WCJKUGHB.mjs +0 -262
- package/dist/chunk-WQBCBKY3.mjs +0 -8
- package/dist/chunk-X5CV2E2B.mjs +0 -1
- package/dist/chunk-YA7XLE2R.mjs +0 -1256
- package/dist/chunk-YTJCGKM4.mjs +0 -56
- package/dist/chunk-ZG477IPV.mjs +0 -526
- package/dist/chunk-ZYNAMIYX.mjs +0 -113
- package/dist/config-BGB_fDtq.d.ts +0 -237
- package/dist/direct-executor-CXZ66ACP.mjs +0 -22
- package/dist/durability-wiring-QTHOGFMZ.mjs +0 -3229
- package/dist/engine-BGCEm9E_.d.ts +0 -577
- package/dist/module-3NONKBZX.mjs +0 -1860
- package/dist/release-BH3DKW3T.mjs +0 -33
- package/dist/restore-queue-JPRBUYII.mjs +0 -35
- package/dist/runtime-ZKYZFJJC.mjs +0 -177
- package/dist/snapshot-HOGXNO5W.mjs +0 -793
- package/dist/tasks-HG3rlxx6.d.ts +0 -302
- package/dist/thread-B657LQXK.mjs +0 -692
- package/dist/write-XLIGTXBU.mjs +0 -238
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { P as PartitionConfig, A as AnyDocument, a as InsertOptions, W as WriteOptions } from './schema-
|
|
2
|
-
import { V as VectorMaintenanceResult, B as BatchResult, L as ListParams,
|
|
1
|
+
import { P as PartitionConfig, B as BM25Params, A as AnyDocument, a as InsertOptions, W as WriteOptions } from './schema-CzG9OUw5.js';
|
|
2
|
+
import { o as SnapshotOptions, V as VectorMaintenanceResult, B as BatchResult, L as ListParams, y as ListResult, F as FollowChangesOptions, d as ChangesEvent, a as ChangePosition, h as ChangesStatus, g as ChangesSetting, I as IndexInfo, x as IndexStats, P as PartitionStatsResult, Q as QueryParams, t as QueryResult, z as PreflightResult, w as SuggestParams, A as SuggestResult, q as SyncStatus, p as SyncSetting } from './engine-qjAxJSKk.js';
|
|
3
3
|
import { a as SynonymRule } from './synonyms-CpOAHPa-.js';
|
|
4
|
-
import {
|
|
4
|
+
import { f as TaskRecord, a as ChangeAnalysisBody, M as MemoryStatsResponse, m as CreateBackupBody, R as RestoreBackupBody, c as ImportResult, H as HttpIndexConfig, d as TaskListQuery, T as TaskListPage } from './tasks-65b6t6lk.js';
|
|
5
|
+
import { B as BackupListing } from './config-Bnl7L-0H.js';
|
|
6
|
+
import { d as QuerySuggestionsSetting, e as QuerySuggestionsStatus, f as RecordQueryResult, c as QuerySuggestionsPreview, M as ManualQuerySuggestion } from './query-suggestions-CBYkrQ5T.js';
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* This is the `fetch` implementation the client sends every request through.
|
|
@@ -24,9 +26,61 @@ interface NarsilClientOptions {
|
|
|
24
26
|
/**
|
|
25
27
|
* The server answers at this address. Pass an absolute URL such as
|
|
26
28
|
* `https://search.example.com`, or a path such as `/search-api` when a
|
|
27
|
-
* browser reaches the server through its own origin.
|
|
29
|
+
* browser reaches the server through its own origin. Pass a list of them,
|
|
30
|
+
* such as the address of every node in a cluster, so that the client moves
|
|
31
|
+
* on when one of them fails. An empty list, or one that holds an address the
|
|
32
|
+
* client cannot read, fails with `CONFIG_INVALID`.
|
|
33
|
+
*
|
|
34
|
+
* A client takes one server URL or a list of them. It sends each request to
|
|
35
|
+
* one URL, starting one place after the URL that took the previous request,
|
|
36
|
+
* so that requests spread across the list.
|
|
37
|
+
*
|
|
38
|
+
* The client moves a request to the next URL when the connection fails, when
|
|
39
|
+
* the request times out, or when the server answers 502, 503, or 504. It
|
|
40
|
+
* tries each URL at most once as it moves down the list, and it fails with
|
|
41
|
+
* the error from its last try once every URL has failed. `timeoutMs` applies
|
|
42
|
+
* to each try.
|
|
43
|
+
*
|
|
44
|
+
* The client tries a read once more when every URL has failed its connection
|
|
45
|
+
* or answered 502, 503, or 504, so a list of N URLs can take N + 1 requests.
|
|
46
|
+
* With one URL, the second try goes to that same URL. The client sends the
|
|
47
|
+
* extra try straight away, to the first URL in the skip order below. A read
|
|
48
|
+
* that timed out on any URL takes no extra try.
|
|
49
|
+
*
|
|
50
|
+
* The client repeats a request on another URL only where repeating it cannot
|
|
51
|
+
* apply a change twice. A read, meaning a get, a search, a listing, or a
|
|
52
|
+
* stats call, moves on after any of the failures above. A write moves on only
|
|
53
|
+
* where the client sent no byte of it, because the connection was refused or
|
|
54
|
+
* the name did not resolve, or where the server refused it with
|
|
55
|
+
* `NODE_NOT_READY`. A write that times out, or that a server answers with
|
|
56
|
+
* 502, 503, or 504, fails without being sent again, so that the caller
|
|
57
|
+
* decides whether to resend it. A request whose body is a stream goes to one
|
|
58
|
+
* URL alone, because the client cannot read the stream a second time. A
|
|
59
|
+
* browser reports no reason for a failed connection, so a write that a
|
|
60
|
+
* browser sends moves on only after a `NODE_NOT_READY` answer.
|
|
61
|
+
*
|
|
62
|
+
* After a URL refuses a connection, the client skips it for
|
|
63
|
+
* {@link NarsilClientOptions.urlSkipMs}, 1,000 milliseconds unless you say
|
|
64
|
+
* otherwise, then for twice as long after each further refusal, up to
|
|
65
|
+
* {@link NarsilClientOptions.maxUrlSkipMs}, 30,000 milliseconds unless you
|
|
66
|
+
* say otherwise, and it uses it again once the URL answers with any status
|
|
67
|
+
* other than 502, 503, or 504. When
|
|
68
|
+
* every URL is in its skip period, the client tries the one whose skip period
|
|
69
|
+
* ends first.
|
|
28
70
|
*/
|
|
29
|
-
url: string;
|
|
71
|
+
url: string | readonly string[];
|
|
72
|
+
/**
|
|
73
|
+
* The client skips a URL for this many milliseconds after it refuses a
|
|
74
|
+
* connection, and for twice as long after each further refusal. It skips
|
|
75
|
+
* one for 1000 unless you say otherwise.
|
|
76
|
+
*/
|
|
77
|
+
urlSkipMs?: number;
|
|
78
|
+
/**
|
|
79
|
+
* The client never skips a URL for longer than this many milliseconds, and
|
|
80
|
+
* it stops at 30000 unless you say otherwise. It must be at least
|
|
81
|
+
* {@link NarsilClientOptions.urlSkipMs}.
|
|
82
|
+
*/
|
|
83
|
+
maxUrlSkipMs?: number;
|
|
30
84
|
/**
|
|
31
85
|
* The client sends this key as `authorization: Bearer <key>`, which a server
|
|
32
86
|
* reads in its `onRequest` hook. For any other scheme, set the header
|
|
@@ -36,9 +90,10 @@ interface NarsilClientOptions {
|
|
|
36
90
|
/** The client sends these headers with every request, and a per-call header of the same name replaces one. */
|
|
37
91
|
headers?: Record<string, string>;
|
|
38
92
|
/**
|
|
39
|
-
* The client waits this many milliseconds for an answer before it
|
|
40
|
-
* `CLIENT_REQUEST_TIMEOUT`, and it waits 30000 unless you say
|
|
41
|
-
*
|
|
93
|
+
* The client waits this many milliseconds for an answer on each try before it
|
|
94
|
+
* fails with `CLIENT_REQUEST_TIMEOUT`, and it waits 30000 unless you say
|
|
95
|
+
* otherwise, so a read that tries again can take longer than this in total.
|
|
96
|
+
* Pass 0 so that it waits for as long as the server takes. Three routes carry a
|
|
42
97
|
* corpus or a whole index, so {@link BulkOperations.importDocuments},
|
|
43
98
|
* {@link AdminOperations.snapshot}, and {@link AdminOperations.restore} set no
|
|
44
99
|
* deadline of their own until this one arrives.
|
|
@@ -66,7 +121,7 @@ interface NarsilClientOptions {
|
|
|
66
121
|
interface RequestOptions {
|
|
67
122
|
/** Aborting this stops the request, which then fails with `CLIENT_REQUEST_ABORTED`. */
|
|
68
123
|
signal?: AbortSignal;
|
|
69
|
-
/** The client waits this many milliseconds
|
|
124
|
+
/** The client waits this many milliseconds on each try of this one request, and 0 waits for as long as the server takes. */
|
|
70
125
|
timeoutMs?: number;
|
|
71
126
|
/** The client adds these headers to this request, and one of the same name replaces what it would otherwise send. */
|
|
72
127
|
headers?: Record<string, string>;
|
|
@@ -108,11 +163,12 @@ interface AdminOperations {
|
|
|
108
163
|
*
|
|
109
164
|
* @param indexName - This names the index to stream.
|
|
110
165
|
* @param options - This sets the signal, the deadline, and the headers for
|
|
111
|
-
* this request.
|
|
166
|
+
* this request. Set `queryHistory` to add the index's popular query
|
|
167
|
+
* history, which holds raw searches, to the archive.
|
|
112
168
|
* @returns The stream holds the archive's bytes in the order that the server
|
|
113
169
|
* sends them.
|
|
114
170
|
*/
|
|
115
|
-
snapshot(indexName: string, options?: RequestOptions): Promise<ReadableStream<Uint8Array>>;
|
|
171
|
+
snapshot(indexName: string, options?: RequestOptions & SnapshotOptions): Promise<ReadableStream<Uint8Array>>;
|
|
116
172
|
/**
|
|
117
173
|
* Uploads a snapshot archive and replaces the named index with the
|
|
118
174
|
* archive's contents. The method also accepts the single `.nrsl` file that
|
|
@@ -248,6 +304,22 @@ interface AdminOperations {
|
|
|
248
304
|
* set passes its limits. The index then keeps the set that it held before.
|
|
249
305
|
*/
|
|
250
306
|
updateSynonyms(indexName: string, synonyms: SynonymRule[], options?: RequestOptions): Promise<void>;
|
|
307
|
+
/**
|
|
308
|
+
* Replaces the BM25 setting of an index, which takes effect from the next
|
|
309
|
+
* search without a rebuild. A value that the call leaves out returns to its
|
|
310
|
+
* default, and `{}` clears the setting.
|
|
311
|
+
*
|
|
312
|
+
* @param indexName - The server replaces the setting of this index.
|
|
313
|
+
* @param bm25 - This is the new setting, in the shape that
|
|
314
|
+
* {@link BM25Params} describes.
|
|
315
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
316
|
+
* this request.
|
|
317
|
+
* @throws A `NarsilError` with `CONFIG_INVALID` when `k1` is not a number
|
|
318
|
+
* from 0 to 1,000, when `b` is not a number from 0 to 1, or when `fields`
|
|
319
|
+
* holds a name that is not a text field. The index then keeps the setting
|
|
320
|
+
* that it held before.
|
|
321
|
+
*/
|
|
322
|
+
updateBM25(indexName: string, bm25: BM25Params, options?: RequestOptions): Promise<void>;
|
|
251
323
|
/**
|
|
252
324
|
* Reads the synonym set of an index, with every word as the caller wrote it.
|
|
253
325
|
*
|
|
@@ -270,6 +342,21 @@ interface AdminOperations {
|
|
|
270
342
|
* @returns The record is the task to follow.
|
|
271
343
|
*/
|
|
272
344
|
rebuildAnalysis(indexName: string, options?: RequestOptions): Promise<TaskRecord>;
|
|
345
|
+
/**
|
|
346
|
+
* Starts a change of the language, the tokeniser, or the stop words of a live
|
|
347
|
+
* index, which keeps answering searches during the change.
|
|
348
|
+
*
|
|
349
|
+
* @param indexName - The index to change.
|
|
350
|
+
* @param change - The settings to change. A key that you leave out keeps its
|
|
351
|
+
* current value, and `null` on `tokenizer` or `stopWords` returns that key to
|
|
352
|
+
* the language default.
|
|
353
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
354
|
+
* this request.
|
|
355
|
+
* @returns The record is the task to follow, and it ends with any failure of
|
|
356
|
+
* the change, such as `ANALYSIS_CHANGE_REPLACED` when a later change replaces
|
|
357
|
+
* this one or when a restore of the index is in flight.
|
|
358
|
+
*/
|
|
359
|
+
changeAnalysis(indexName: string, change: ChangeAnalysisBody, options?: RequestOptions): Promise<TaskRecord>;
|
|
273
360
|
/**
|
|
274
361
|
* Reports the server process's heap usage, its estimate of what the indexes
|
|
275
362
|
* hold, each worker's heap, and how many worker threads receive requests.
|
|
@@ -281,6 +368,63 @@ interface AdminOperations {
|
|
|
281
368
|
getMemoryStats(options?: RequestOptions): Promise<MemoryStatsResponse>;
|
|
282
369
|
}
|
|
283
370
|
|
|
371
|
+
/**
|
|
372
|
+
* These methods back up an index to the store outside the cluster, list and delete the backups there, and restore one
|
|
373
|
+
* as a new index. A server that fronts a cluster node with a backup store answers them.
|
|
374
|
+
*
|
|
375
|
+
* Each method except {@link BackupOperations.listBackups} answers with a {@link TaskRecord} while the work continues,
|
|
376
|
+
* and the task's `steps` report how many partitions, or how many files for a deletion, are done. Follow that task with
|
|
377
|
+
* {@link TaskOperations.waitForTask}.
|
|
378
|
+
*
|
|
379
|
+
* @public
|
|
380
|
+
*/
|
|
381
|
+
interface BackupOperations {
|
|
382
|
+
/**
|
|
383
|
+
* Starts a backup of an index, which holds every write that the cluster acknowledged before the backup started.
|
|
384
|
+
*
|
|
385
|
+
* @param indexName - This names the index to back up.
|
|
386
|
+
* @param backupName - This names the backup, with 1 to 128 letters, digits, `.`, `_`, and `-`, starting with a
|
|
387
|
+
* letter or a digit.
|
|
388
|
+
* @param options - This sets the signal, the deadline, and the headers for this request. Set `queryHistory` to add
|
|
389
|
+
* every node's popular query suggestion history of the index, which holds raw searches, to the backup.
|
|
390
|
+
* @returns The record is the task to follow.
|
|
391
|
+
* @throws A `NarsilError` with `CLUSTER_OPERATION_UNSUPPORTED` from a server that fronts a single engine. The task
|
|
392
|
+
* reports `BACKUP_ALREADY_EXISTS` or `BACKUP_DURABILITY_REQUIRED` in its `error`.
|
|
393
|
+
*/
|
|
394
|
+
createBackup(indexName: string, backupName: string, options?: RequestOptions & Pick<CreateBackupBody, 'queryHistory'>): Promise<TaskRecord>;
|
|
395
|
+
/**
|
|
396
|
+
* Lists the backups under the cluster's key prefix, in name order.
|
|
397
|
+
*
|
|
398
|
+
* @param options - This sets the signal, the deadline, and the headers for this request.
|
|
399
|
+
* @returns One summary per backup, and a {@link DamagedBackup} with `BACKUP_DAMAGED` for each manifest that the
|
|
400
|
+
* cluster can't read.
|
|
401
|
+
*/
|
|
402
|
+
listBackups(options?: RequestOptions): Promise<BackupListing[]>;
|
|
403
|
+
/**
|
|
404
|
+
* Starts the restore of a backup as a new index, on a cluster of any size.
|
|
405
|
+
*
|
|
406
|
+
* @param backupName - This names the backup to restore.
|
|
407
|
+
* @param restore - This names the new index, and it can set the replication factor and the allocation constraints in
|
|
408
|
+
* place of the backup's.
|
|
409
|
+
* @param options - This sets the signal, the deadline, and the headers for this request.
|
|
410
|
+
* @returns The record is the task to follow.
|
|
411
|
+
* @throws A `NarsilError` with `CLUSTER_OPERATION_UNSUPPORTED` from a server that fronts a single engine. The task
|
|
412
|
+
* reports `BACKUP_NOT_FOUND`, `BACKUP_DAMAGED`, or `INDEX_ALREADY_EXISTS` in its `error`, and a failed restore
|
|
413
|
+
* creates no index.
|
|
414
|
+
*/
|
|
415
|
+
restoreBackup(backupName: string, restore: RestoreBackupBody, options?: RequestOptions): Promise<TaskRecord>;
|
|
416
|
+
/**
|
|
417
|
+
* Starts the deletion of a backup, which also removes each of its files that no other backup lists.
|
|
418
|
+
*
|
|
419
|
+
* @param backupName - This names the backup to delete.
|
|
420
|
+
* @param options - This sets the signal, the deadline, and the headers for this request.
|
|
421
|
+
* @returns The record is the task to follow.
|
|
422
|
+
* @throws A `NarsilError` with `CLUSTER_OPERATION_UNSUPPORTED` from a server that fronts a single engine. The task
|
|
423
|
+
* reports `BACKUP_NOT_FOUND` in its `error`.
|
|
424
|
+
*/
|
|
425
|
+
deleteBackup(backupName: string, options?: RequestOptions): Promise<TaskRecord>;
|
|
426
|
+
}
|
|
427
|
+
|
|
284
428
|
/**
|
|
285
429
|
* This is a corpus, in whichever form you already hold it.
|
|
286
430
|
*
|
|
@@ -419,6 +563,89 @@ interface BulkOperations {
|
|
|
419
563
|
startImport(indexName: string, source: ImportSource, options?: RequestOptions): Promise<TaskRecord>;
|
|
420
564
|
}
|
|
421
565
|
|
|
566
|
+
/**
|
|
567
|
+
* Where a subscription to the change feed starts, which changes it receives, and how it proves the caller's access.
|
|
568
|
+
*
|
|
569
|
+
* @public
|
|
570
|
+
*/
|
|
571
|
+
interface ChangeFeedOptions extends FollowChangesOptions {
|
|
572
|
+
/**
|
|
573
|
+
* The client offers this value as a second WebSocket subprotocol, after `narsil.changes.v1`, because a browser
|
|
574
|
+
* sends no header of the caller's choosing with a WebSocket upgrade. The server's `onRequest` hook reads it from
|
|
575
|
+
* the `sec-websocket-protocol` header. It must hold only the characters that an HTTP token allows.
|
|
576
|
+
*/
|
|
577
|
+
credential?: string;
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* One connection to the change feed of an index, which returns its events one at a time.
|
|
581
|
+
*
|
|
582
|
+
* The server stops sending once the changes that the caller has not acknowledged pass the window in bytes, so call
|
|
583
|
+
* {@link ChangeSubscription.ack} with each position once the caller has saved it.
|
|
584
|
+
*
|
|
585
|
+
* @public
|
|
586
|
+
*/
|
|
587
|
+
interface ChangeSubscription extends AsyncIterable<ChangesEvent> {
|
|
588
|
+
/**
|
|
589
|
+
* Tells the server that the caller has saved these positions, which frees the window for further changes. Pass
|
|
590
|
+
* only positions that the caller has saved, each at or below a `scannedSeqNo` that the feed returned. The
|
|
591
|
+
* subscription remembers the highest position of every partition and sends all of them, because the server
|
|
592
|
+
* expects each acknowledgement to cover every partition.
|
|
593
|
+
*
|
|
594
|
+
* @param positions - The saved positions of any partitions whose position moved.
|
|
595
|
+
* @throws NarsilError with `CHANGES_INVALID_POSITIONS` for a position that is not a whole number at or above
|
|
596
|
+
* zero, or for a partition that the index lacks.
|
|
597
|
+
*/
|
|
598
|
+
ack(positions: ChangePosition[]): void;
|
|
599
|
+
/** Closes the connection and ends the iteration. */
|
|
600
|
+
close(): void;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* These methods read and replace the change capture setting of an index and follow its changes over the server's
|
|
605
|
+
* change feed, as {@link ChangesOperations} does on the engine.
|
|
606
|
+
*
|
|
607
|
+
* @public
|
|
608
|
+
*/
|
|
609
|
+
interface ChangesClientOperations {
|
|
610
|
+
/**
|
|
611
|
+
* Returns the change capture state of an index, as {@link ChangesOperations.getChanges} does on the engine.
|
|
612
|
+
*
|
|
613
|
+
* @param indexName - The server reports the state of this index.
|
|
614
|
+
* @param options - This sets the signal, the deadline, and the headers for this request.
|
|
615
|
+
* @returns The setting and the epoch.
|
|
616
|
+
* @throws A `NarsilError` with `INDEX_NOT_FOUND` when no index has that name.
|
|
617
|
+
*/
|
|
618
|
+
getChanges(indexName: string, options?: RequestOptions): Promise<ChangesStatus>;
|
|
619
|
+
/**
|
|
620
|
+
* Replaces the change capture setting of an index, as {@link ChangesOperations.updateChanges} does on the engine.
|
|
621
|
+
*
|
|
622
|
+
* @param indexName - The server replaces the setting of this index.
|
|
623
|
+
* @param setting - This is the new setting.
|
|
624
|
+
* @param options - This sets the signal, the deadline, and the headers for this request.
|
|
625
|
+
* @throws A `NarsilError` with `CHANGES_DURABILITY_REQUIRED` when the server's engine has no write-ahead log
|
|
626
|
+
* durability, and with `CONFIG_INVALID` when a field has the wrong type or a history limit is not a positive whole
|
|
627
|
+
* number.
|
|
628
|
+
*/
|
|
629
|
+
updateChanges(indexName: string, setting: ChangesSetting, options?: RequestOptions): Promise<void>;
|
|
630
|
+
/**
|
|
631
|
+
* Opens the change feed of an index and returns its events, as {@link ChangesOperations.followChanges} does on the
|
|
632
|
+
* engine. The server serves the feed only where its `changes` option is on.
|
|
633
|
+
*
|
|
634
|
+
* The first event gives the epoch and the positions. Each later event holds the changes of one partition in
|
|
635
|
+
* `seqNo` order, and the last event is a resync where the positions no longer lead to the index's changes. Save each
|
|
636
|
+
* `scannedSeqNo` once you apply its changes, then acknowledge it with {@link ChangeSubscription.ack}.
|
|
637
|
+
*
|
|
638
|
+
* @param indexName - The server sends the changes of this index.
|
|
639
|
+
* @param options - The epoch and positions to start from, a filter, a signal, and a credential.
|
|
640
|
+
* @returns The subscription, which opens its connection at once.
|
|
641
|
+
* @throws A `NarsilError` from the iteration with `CHANGES_NOT_ENABLED` when capture turns off, with the code in the
|
|
642
|
+
* close reason when the index's setting refuses the subscription, with `CONFIG_INVALID` when the server refuses the
|
|
643
|
+
* epoch, the positions, or the filter, and with `CLIENT_CONNECTION_FAILED` when the connection fails or the server
|
|
644
|
+
* refuses it, in which case subscribe again from the saved positions.
|
|
645
|
+
*/
|
|
646
|
+
followChanges(indexName: string, options?: ChangeFeedOptions): ChangeSubscription;
|
|
647
|
+
}
|
|
648
|
+
|
|
422
649
|
/**
|
|
423
650
|
* This says what an upsert did, which is how {@link DocumentOperations.put}
|
|
424
651
|
* reports whether the id already held a document.
|
|
@@ -645,6 +872,115 @@ interface IndexOperations {
|
|
|
645
872
|
close(indexName: string, options?: RequestOptions): Promise<void>;
|
|
646
873
|
}
|
|
647
874
|
|
|
875
|
+
/**
|
|
876
|
+
* These methods count searches and manage the popular query suggestions of an
|
|
877
|
+
* index on a server, as `querySuggestions(engine)` does on an engine.
|
|
878
|
+
*
|
|
879
|
+
* @public
|
|
880
|
+
*/
|
|
881
|
+
interface QuerySuggestionOperations {
|
|
882
|
+
/**
|
|
883
|
+
* Replaces the popular query suggestions setting of an index. Turning the
|
|
884
|
+
* feature off deletes the search history of the index on the server and
|
|
885
|
+
* keeps its suggestions indexes.
|
|
886
|
+
*
|
|
887
|
+
* @param indexName - The server replaces the setting of this index.
|
|
888
|
+
* @param setting - This is the new setting, whose omitted limits take their defaults.
|
|
889
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
890
|
+
* this request.
|
|
891
|
+
* @throws A `NarsilError` with `CONFIG_INVALID` when the setting breaks a
|
|
892
|
+
* limit, names a field the schema lacks, or turns the feature on for an index
|
|
893
|
+
* with device sync on or for a server without a key.
|
|
894
|
+
*/
|
|
895
|
+
updateQuerySuggestions(indexName: string, setting: QuerySuggestionsSetting, options?: RequestOptions): Promise<void>;
|
|
896
|
+
/**
|
|
897
|
+
* Reads the setting, the last build, the next scheduled build, and the
|
|
898
|
+
* suggestions indexes of an index.
|
|
899
|
+
*
|
|
900
|
+
* @param indexName - The server reports on this index.
|
|
901
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
902
|
+
* this request.
|
|
903
|
+
* @returns The status of the index.
|
|
904
|
+
*/
|
|
905
|
+
querySuggestionsStatus(indexName: string, options?: RequestOptions): Promise<QuerySuggestionsStatus>;
|
|
906
|
+
/**
|
|
907
|
+
* Counts one search that a person followed with a click. The server takes
|
|
908
|
+
* the person and the group from its `identify` function, so this request
|
|
909
|
+
* carries the search alone.
|
|
910
|
+
*
|
|
911
|
+
* @param indexName - The index that the person searched.
|
|
912
|
+
* @param query - The search, which the server normalises before it counts it.
|
|
913
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
914
|
+
* this request, such as the credentials that `identify` reads.
|
|
915
|
+
* @returns Whether the server counted the search, and why not where it didn't.
|
|
916
|
+
* @throws A `NarsilError` with `QUERY_SUGGESTIONS_NOT_ENABLED` when the index
|
|
917
|
+
* has the feature off or the server has no `identify` function.
|
|
918
|
+
*/
|
|
919
|
+
recordQuery(indexName: string, query: string, options?: RequestOptions): Promise<RecordQueryResult>;
|
|
920
|
+
/**
|
|
921
|
+
* Starts a build of the suggestions of an index. Follow the returned record
|
|
922
|
+
* with {@link TaskOperations.waitForTask}, whose `build` field reports the
|
|
923
|
+
* build once it ends.
|
|
924
|
+
*
|
|
925
|
+
* @param indexName - The server builds the suggestions of this index.
|
|
926
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
927
|
+
* this request.
|
|
928
|
+
* @returns The record of the task that runs the build.
|
|
929
|
+
*/
|
|
930
|
+
buildQuerySuggestions(indexName: string, options?: RequestOptions): Promise<TaskRecord>;
|
|
931
|
+
/**
|
|
932
|
+
* Lists the phrases that enough people searched for, before the result
|
|
933
|
+
* checks of a build run.
|
|
934
|
+
*
|
|
935
|
+
* @param indexName - The source index.
|
|
936
|
+
* @param limit - The most phrases to list, from 1 to 1,000. Defaults to 100.
|
|
937
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
938
|
+
* this request.
|
|
939
|
+
* @returns The phrases, most counted first.
|
|
940
|
+
*/
|
|
941
|
+
previewQuerySuggestions(indexName: string, limit?: number, options?: RequestOptions): Promise<QuerySuggestionsPreview>;
|
|
942
|
+
/**
|
|
943
|
+
* Reads the ban list of an index.
|
|
944
|
+
*
|
|
945
|
+
* @param indexName - The source index.
|
|
946
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
947
|
+
* this request.
|
|
948
|
+
* @returns The banned phrases in their normal form.
|
|
949
|
+
*/
|
|
950
|
+
readQueryBans(indexName: string, options?: RequestOptions): Promise<string[]>;
|
|
951
|
+
/**
|
|
952
|
+
* Replaces the ban list of an index, and removes each newly banned phrase
|
|
953
|
+
* from every suggestions index of the index before it answers.
|
|
954
|
+
*
|
|
955
|
+
* @param indexName - The source index.
|
|
956
|
+
* @param bans - At most 1,000 phrases, which the server normalises.
|
|
957
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
958
|
+
* this request.
|
|
959
|
+
* @returns The stored ban list.
|
|
960
|
+
*/
|
|
961
|
+
replaceQueryBans(indexName: string, bans: string[], options?: RequestOptions): Promise<string[]>;
|
|
962
|
+
/**
|
|
963
|
+
* Bans a phrase and removes it from every suggestions index of an index.
|
|
964
|
+
*
|
|
965
|
+
* @param indexName - The source index.
|
|
966
|
+
* @param query - The phrase, which the server normalises.
|
|
967
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
968
|
+
* this request.
|
|
969
|
+
* @returns The number of suggestions indexes that held the phrase.
|
|
970
|
+
*/
|
|
971
|
+
removeQuery(indexName: string, query: string, options?: RequestOptions): Promise<number>;
|
|
972
|
+
/**
|
|
973
|
+
* Adds a suggestion by hand, which a build leaves in place.
|
|
974
|
+
*
|
|
975
|
+
* @param indexName - The source index.
|
|
976
|
+
* @param suggestion - The group, the phrase, and its count.
|
|
977
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
978
|
+
* this request.
|
|
979
|
+
* @returns The name of the suggestions index that holds the phrase.
|
|
980
|
+
*/
|
|
981
|
+
addManualSuggestion(indexName: string, suggestion: ManualQuerySuggestion, options?: RequestOptions): Promise<string>;
|
|
982
|
+
}
|
|
983
|
+
|
|
648
984
|
/**
|
|
649
985
|
* These methods search an index over HTTP.
|
|
650
986
|
*
|
|
@@ -796,10 +1132,92 @@ interface ServerOperations {
|
|
|
796
1132
|
isReady(options?: RequestOptions): Promise<boolean>;
|
|
797
1133
|
}
|
|
798
1134
|
|
|
1135
|
+
/**
|
|
1136
|
+
* Where a download of the published snapshot carries on from, which
|
|
1137
|
+
* {@link SyncSettingOperations.syncSnapshot} takes.
|
|
1138
|
+
*
|
|
1139
|
+
* @public
|
|
1140
|
+
*/
|
|
1141
|
+
interface SyncSnapshotResume {
|
|
1142
|
+
/** The download carries on from this byte of the archive. */
|
|
1143
|
+
offset: number;
|
|
1144
|
+
/** The earlier part of the download carried this entity tag, which the server compares with the current one. */
|
|
1145
|
+
entityTag: string;
|
|
1146
|
+
}
|
|
1147
|
+
/**
|
|
1148
|
+
* One download of the published snapshot of an index.
|
|
1149
|
+
*
|
|
1150
|
+
* @public
|
|
1151
|
+
*/
|
|
1152
|
+
interface SyncSnapshotDownload {
|
|
1153
|
+
/** The archive carries this entity tag, 64 lowercase hexadecimal digits, which changes with each new snapshot. */
|
|
1154
|
+
entityTag: string;
|
|
1155
|
+
/**
|
|
1156
|
+
* The stream starts at this byte of the archive. It is 0 where the server
|
|
1157
|
+
* published a new snapshot after the earlier part, so the caller starts
|
|
1158
|
+
* again from the first byte.
|
|
1159
|
+
*/
|
|
1160
|
+
offset: number;
|
|
1161
|
+
/** The whole archive holds this many bytes. */
|
|
1162
|
+
totalBytes: number;
|
|
1163
|
+
/** The bytes of the archive from `offset` to its end. */
|
|
1164
|
+
stream: ReadableStream<Uint8Array>;
|
|
1165
|
+
}
|
|
1166
|
+
/**
|
|
1167
|
+
* These methods read and replace the device sync setting of an index, as
|
|
1168
|
+
* {@link SyncOperations} does on the engine.
|
|
1169
|
+
*
|
|
1170
|
+
* @public
|
|
1171
|
+
*/
|
|
1172
|
+
interface SyncSettingOperations {
|
|
1173
|
+
/**
|
|
1174
|
+
* Returns the device sync state of an index, as {@link SyncOperations.getSync}
|
|
1175
|
+
* does on the engine.
|
|
1176
|
+
*
|
|
1177
|
+
* @param indexName - The server reports the state of this index.
|
|
1178
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
1179
|
+
* this request.
|
|
1180
|
+
* @returns The setting, whether a device has asked for the published
|
|
1181
|
+
* snapshot, and the epoch.
|
|
1182
|
+
* @throws A `NarsilError` with `INDEX_NOT_FOUND` when no index has that name.
|
|
1183
|
+
*/
|
|
1184
|
+
getSync(indexName: string, options?: RequestOptions): Promise<SyncStatus>;
|
|
1185
|
+
/**
|
|
1186
|
+
* Replaces the device sync setting of an index. Turning sync on gives the
|
|
1187
|
+
* index a new epoch, and turning it off deletes the published snapshot and
|
|
1188
|
+
* the history and closes every feed of the index.
|
|
1189
|
+
*
|
|
1190
|
+
* @param indexName - The server replaces the setting of this index.
|
|
1191
|
+
* @param setting - This is the new setting.
|
|
1192
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
1193
|
+
* this request.
|
|
1194
|
+
* @throws A `NarsilError` with `SYNC_DURABILITY_REQUIRED` when the server's
|
|
1195
|
+
* engine has no write-ahead log durability, and with `CONFIG_INVALID` when a
|
|
1196
|
+
* history limit is not a positive whole number.
|
|
1197
|
+
*/
|
|
1198
|
+
updateSync(indexName: string, setting: SyncSetting, options?: RequestOptions): Promise<void>;
|
|
1199
|
+
/**
|
|
1200
|
+
* Downloads the published snapshot of an index with device sync on, or the
|
|
1201
|
+
* rest of it from where an earlier download stopped. The archive restores
|
|
1202
|
+
* through {@link Narsil.restore} like any other snapshot archive.
|
|
1203
|
+
*
|
|
1204
|
+
* @param indexName - The server sends the snapshot of this index.
|
|
1205
|
+
* @param resume - Where an earlier download of the same snapshot stopped.
|
|
1206
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
1207
|
+
* this request.
|
|
1208
|
+
* @returns The stream, the byte it starts from, the archive's length, and
|
|
1209
|
+
* its entity tag.
|
|
1210
|
+
* @throws A `NarsilError` with `SYNC_NOT_ENABLED` when the index has sync
|
|
1211
|
+
* off, and with `SYNC_SNAPSHOT_PREPARING` while a cluster node takes the
|
|
1212
|
+
* backup that the snapshot needs.
|
|
1213
|
+
*/
|
|
1214
|
+
syncSnapshot(indexName: string, resume?: SyncSnapshotResume, options?: RequestOptions): Promise<SyncSnapshotDownload>;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
799
1217
|
/**
|
|
800
1218
|
* These settings say how {@link TaskOperations.waitForTask} follows a task.
|
|
801
1219
|
*
|
|
802
|
-
* `timeoutMs` bounds each poll request, as it does everywhere else, while
|
|
1220
|
+
* `timeoutMs` bounds each try of a poll request, as it does everywhere else, while
|
|
803
1221
|
* `waitTimeoutMs` bounds the whole wait.
|
|
804
1222
|
*
|
|
805
1223
|
* @public
|
|
@@ -889,8 +1307,8 @@ interface TaskOperations {
|
|
|
889
1307
|
}
|
|
890
1308
|
|
|
891
1309
|
/**
|
|
892
|
-
* This client reaches one Narsil server, and it runs
|
|
893
|
-
* server serves.
|
|
1310
|
+
* This client reaches one Narsil server, or any of a list of them, and it runs
|
|
1311
|
+
* every operation that a server serves.
|
|
894
1312
|
*
|
|
895
1313
|
* Every method has the name the embedded engine uses, so a call written against
|
|
896
1314
|
* {@link Narsil} works here. HTTP forces two differences: every method takes
|
|
@@ -902,23 +1320,25 @@ interface TaskOperations {
|
|
|
902
1320
|
*
|
|
903
1321
|
* @public
|
|
904
1322
|
*/
|
|
905
|
-
interface NarsilClient extends IndexOperations, DocumentOperations, BulkOperations, SearchOperations, TaskOperations, AdminOperations, ServerOperations {
|
|
1323
|
+
interface NarsilClient extends IndexOperations, DocumentOperations, BulkOperations, SearchOperations, TaskOperations, AdminOperations, BackupOperations, ServerOperations, SyncSettingOperations, ChangesClientOperations, QuerySuggestionOperations {
|
|
906
1324
|
}
|
|
907
1325
|
/**
|
|
908
|
-
* Builds a client for one Narsil server
|
|
1326
|
+
* Builds a client for one Narsil server, or for a list of them that it moves
|
|
1327
|
+
* between as {@link NarsilClientOptions.url} describes.
|
|
909
1328
|
*
|
|
910
1329
|
* The client opens no connection, and it holds no state beyond the
|
|
911
|
-
* capabilities it has read
|
|
912
|
-
* application's lifetime.
|
|
1330
|
+
* capabilities it has read and the URLs it is skipping, so nothing needs
|
|
1331
|
+
* closing. Keep one client for the application's lifetime.
|
|
913
1332
|
*
|
|
914
|
-
* @param options - These set the server
|
|
1333
|
+
* @param options - These set the server addresses, the credentials, and the
|
|
915
1334
|
* defaults every request inherits.
|
|
916
1335
|
* @returns The client is ready to use.
|
|
917
|
-
* @throws A `NarsilError` with `CONFIG_INVALID` when it cannot read
|
|
918
|
-
* as a URL
|
|
1336
|
+
* @throws A `NarsilError` with `CONFIG_INVALID` when it cannot read an address
|
|
1337
|
+
* as a URL, when the list of addresses is empty, or when a skip duration is
|
|
1338
|
+
* not a whole number of milliseconds.
|
|
919
1339
|
*
|
|
920
1340
|
* @public
|
|
921
1341
|
*/
|
|
922
1342
|
declare function createNarsilClient(options: NarsilClientOptions): NarsilClient;
|
|
923
1343
|
|
|
924
|
-
export { type AdminOperations as A, type
|
|
1344
|
+
export { type AdminOperations as A, type BackupOperations as B, type ChangeFeedOptions as C, type DocumentOperations as D, type FetchFunction as F, type ImportSource as I, type NarsilClient as N, type PutResult as P, type QuerySuggestionOperations as Q, type RequestOptions as R, type SearchOperations as S, type TaskOperations as T, type WaitForTaskOptions as W, type BulkOperations as a, type ChangeSubscription as b, type ChangesClientOperations as c, type IndexOperations as d, type NarsilClientOptions as e, type ServerOperations as f, type ServerVersion as g, type SyncSettingOperations as h, type SyncSnapshotDownload as i, type SyncSnapshotResume as j, createNarsilClient as k };
|
package/dist/client.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export { B as BackupListing, a as BackupSummary, D as DamagedBackup } from './config-Bnl7L-0H.js';
|
|
2
|
+
export { C as Change, a as ChangePosition, b as ChangeType, c as ChangesBatch, d as ChangesEvent, e as ChangesOperations, f as ChangesResync, g as ChangesSetting, h as ChangesStatus, i as ChangesSubscribed, j as ClientErrorCode, k as ClientErrorCodes, E as ErrorCode, l as ErrorCodes, F as FollowChangesOptions, N as NarsilError, m as NarsilErrorCode, S as ServerErrorCode, n as ServerErrorCodes, o as SnapshotOptions, p as SyncSetting, q as SyncStatus, r as isNarsilError } from './engine-qjAxJSKk.js';
|
|
3
|
+
export { A as ASYNC_IMPORT_CAPABILITY, B as BM25_TUNING_CAPABILITY, C as CHANGE_ANALYSIS_CAPABILITY, D as DOCUMENT_EXPORT_CAPABILITY, E as ErrorEnvelope, I as INDEX_LIFECYCLE_CAPABILITY, R as REBUILD_ANALYSIS_CAPABILITY, S as SERVER_CAPABILITIES, a as SYNONYMS_CAPABILITY, T as TASK_CANCEL_CAPABILITY, b as TASK_FILTER_CAPABILITY } from './capabilities-DMte5K9_.js';
|
|
4
|
+
export { B as BackupListResponse, C as CapabilitiesResponse, a as ChangeAnalysisBody, b as CreateIndexEmbedding, E as ErrorDetail, H as HttpIndexConfig, I as ImportError, c as ImportResult, M as MemoryStatsResponse, R as RestoreBackupBody, T as TaskListPage, d as TaskListQuery, e as TaskProgress, f as TaskRecord, g as TaskStatus, h as TaskStepProgress, i as TaskType } from './tasks-65b6t6lk.js';
|
|
5
|
+
export { M as ManualQuerySuggestion, Q as QuerySuggestionPreviewEntry, a as QuerySuggestionsBuild, b as QuerySuggestionsBuildTrigger, c as QuerySuggestionsPreview, d as QuerySuggestionsSetting, e as QuerySuggestionsStatus, R as RecordQueryOutcome, f as RecordQueryResult } from './query-suggestions-CBYkrQ5T.js';
|
|
6
|
+
export { A as AdminOperations, B as BackupOperations, a as BulkOperations, C as ChangeFeedOptions, b as ChangeSubscription, c as ChangesClientOperations, D as DocumentOperations, F as FetchFunction, I as ImportSource, d as IndexOperations, N as NarsilClient, e as NarsilClientOptions, P as PutResult, Q as QuerySuggestionOperations, R as RequestOptions, S as SearchOperations, f as ServerOperations, g as ServerVersion, h as SyncSettingOperations, i as SyncSnapshotDownload, j as SyncSnapshotResume, T as TaskOperations, W as WaitForTaskOptions, k as createNarsilClient } from './client-BKqtl0_V.js';
|
|
7
|
+
import './config-CJ-jfI0a.js';
|
|
8
|
+
import './adapters-pljAqmrC.js';
|
|
9
|
+
import './schema-CzG9OUw5.js';
|
|
7
10
|
import './synonyms-CpOAHPa-.js';
|
|
8
|
-
import './
|
|
9
|
-
import './
|
|
10
|
-
import './index-lcdGLyJH.js';
|
|
11
|
-
import './types-Cb9kiY5P.js';
|
|
11
|
+
import './index-B_vmxpgW.js';
|
|
12
|
+
import './types-DvncmvuQ.js';
|