@distilled.cloud/typesense 0.0.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +66 -6
- package/lib/category.d.ts +5 -0
- package/lib/category.d.ts.map +1 -0
- package/lib/category.js +5 -0
- package/lib/category.js.map +1 -0
- package/lib/client.d.ts +11 -0
- package/lib/client.d.ts.map +1 -0
- package/lib/client.js +50 -0
- package/lib/client.js.map +1 -0
- package/lib/credentials.d.ts +20 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +29 -0
- package/lib/credentials.js.map +1 -0
- package/lib/errors.d.ts +31 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +23 -0
- package/lib/errors.js.map +1 -0
- package/lib/index.d.ts +16 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +16 -0
- package/lib/index.js.map +1 -0
- package/lib/operations/clearCache.d.ts +16 -0
- package/lib/operations/clearCache.d.ts.map +1 -0
- package/lib/operations/clearCache.js +20 -0
- package/lib/operations/clearCache.js.map +1 -0
- package/lib/operations/compactDb.d.ts +16 -0
- package/lib/operations/compactDb.d.ts.map +1 -0
- package/lib/operations/compactDb.js +20 -0
- package/lib/operations/compactDb.js.map +1 -0
- package/lib/operations/createAnalyticsEvent.d.ts +37 -0
- package/lib/operations/createAnalyticsEvent.d.ts.map +1 -0
- package/lib/operations/createAnalyticsEvent.js +34 -0
- package/lib/operations/createAnalyticsEvent.js.map +1 -0
- package/lib/operations/createAnalyticsRule.d.ts +13 -0
- package/lib/operations/createAnalyticsRule.d.ts.map +1 -0
- package/lib/operations/createAnalyticsRule.js +22 -0
- package/lib/operations/createAnalyticsRule.js.map +1 -0
- package/lib/operations/createCollection.d.ts +205 -0
- package/lib/operations/createCollection.d.ts.map +1 -0
- package/lib/operations/createCollection.js +117 -0
- package/lib/operations/createCollection.js.map +1 -0
- package/lib/operations/createConversationModel.d.ts +17 -0
- package/lib/operations/createConversationModel.d.ts.map +1 -0
- package/lib/operations/createConversationModel.js +24 -0
- package/lib/operations/createConversationModel.js.map +1 -0
- package/lib/operations/createKey.d.ts +41 -0
- package/lib/operations/createKey.d.ts.map +1 -0
- package/lib/operations/createKey.js +34 -0
- package/lib/operations/createKey.js.map +1 -0
- package/lib/operations/createNLSearchModel.d.ts +17 -0
- package/lib/operations/createNLSearchModel.d.ts.map +1 -0
- package/lib/operations/createNLSearchModel.js +24 -0
- package/lib/operations/createNLSearchModel.js.map +1 -0
- package/lib/operations/debug.d.ts +14 -0
- package/lib/operations/debug.d.ts.map +1 -0
- package/lib/operations/debug.js +18 -0
- package/lib/operations/debug.js.map +1 -0
- package/lib/operations/deleteAlias.d.ts +23 -0
- package/lib/operations/deleteAlias.d.ts.map +1 -0
- package/lib/operations/deleteAlias.js +25 -0
- package/lib/operations/deleteAlias.js.map +1 -0
- package/lib/operations/deleteAnalyticsRule.d.ts +49 -0
- package/lib/operations/deleteAnalyticsRule.d.ts.map +1 -0
- package/lib/operations/deleteAnalyticsRule.js +46 -0
- package/lib/operations/deleteAnalyticsRule.js.map +1 -0
- package/lib/operations/deleteCollection.d.ts +117 -0
- package/lib/operations/deleteCollection.d.ts.map +1 -0
- package/lib/operations/deleteCollection.js +74 -0
- package/lib/operations/deleteCollection.js.map +1 -0
- package/lib/operations/deleteConversationModel.d.ts +21 -0
- package/lib/operations/deleteConversationModel.d.ts.map +1 -0
- package/lib/operations/deleteConversationModel.js +26 -0
- package/lib/operations/deleteConversationModel.js.map +1 -0
- package/lib/operations/deleteCurationSet.d.ts +23 -0
- package/lib/operations/deleteCurationSet.d.ts.map +1 -0
- package/lib/operations/deleteCurationSet.js +27 -0
- package/lib/operations/deleteCurationSet.js.map +1 -0
- package/lib/operations/deleteCurationSetItem.d.ts +26 -0
- package/lib/operations/deleteCurationSetItem.d.ts.map +1 -0
- package/lib/operations/deleteCurationSetItem.js +33 -0
- package/lib/operations/deleteCurationSetItem.js.map +1 -0
- package/lib/operations/deleteDocument.d.ts +22 -0
- package/lib/operations/deleteDocument.d.ts.map +1 -0
- package/lib/operations/deleteDocument.js +29 -0
- package/lib/operations/deleteDocument.js.map +1 -0
- package/lib/operations/deleteDocuments.d.ts +25 -0
- package/lib/operations/deleteDocuments.d.ts.map +1 -0
- package/lib/operations/deleteDocuments.js +27 -0
- package/lib/operations/deleteDocuments.js.map +1 -0
- package/lib/operations/deleteKey.d.ts +21 -0
- package/lib/operations/deleteKey.d.ts.map +1 -0
- package/lib/operations/deleteKey.js +24 -0
- package/lib/operations/deleteKey.js.map +1 -0
- package/lib/operations/deleteNLSearchModel.d.ts +23 -0
- package/lib/operations/deleteNLSearchModel.d.ts.map +1 -0
- package/lib/operations/deleteNLSearchModel.js +28 -0
- package/lib/operations/deleteNLSearchModel.js.map +1 -0
- package/lib/operations/deletePreset.d.ts +23 -0
- package/lib/operations/deletePreset.d.ts.map +1 -0
- package/lib/operations/deletePreset.js +26 -0
- package/lib/operations/deletePreset.js.map +1 -0
- package/lib/operations/deleteStopwordsSet.d.ts +23 -0
- package/lib/operations/deleteStopwordsSet.d.ts.map +1 -0
- package/lib/operations/deleteStopwordsSet.js +28 -0
- package/lib/operations/deleteStopwordsSet.js.map +1 -0
- package/lib/operations/deleteSynonymSet.d.ts +23 -0
- package/lib/operations/deleteSynonymSet.d.ts.map +1 -0
- package/lib/operations/deleteSynonymSet.js +26 -0
- package/lib/operations/deleteSynonymSet.js.map +1 -0
- package/lib/operations/deleteSynonymSetItem.d.ts +26 -0
- package/lib/operations/deleteSynonymSetItem.d.ts.map +1 -0
- package/lib/operations/deleteSynonymSetItem.js +33 -0
- package/lib/operations/deleteSynonymSetItem.js.map +1 -0
- package/lib/operations/exportDocuments.d.ts +21 -0
- package/lib/operations/exportDocuments.d.ts.map +1 -0
- package/lib/operations/exportDocuments.js +28 -0
- package/lib/operations/exportDocuments.js.map +1 -0
- package/lib/operations/flushAnalytics.d.ts +16 -0
- package/lib/operations/flushAnalytics.d.ts.map +1 -0
- package/lib/operations/flushAnalytics.js +20 -0
- package/lib/operations/flushAnalytics.js.map +1 -0
- package/lib/operations/getAlias.d.ts +25 -0
- package/lib/operations/getAlias.d.ts.map +1 -0
- package/lib/operations/getAlias.js +27 -0
- package/lib/operations/getAlias.js.map +1 -0
- package/lib/operations/getAliases.d.ts +22 -0
- package/lib/operations/getAliases.d.ts.map +1 -0
- package/lib/operations/getAliases.js +23 -0
- package/lib/operations/getAliases.js.map +1 -0
- package/lib/operations/getAnalyticsEvents.d.ts +46 -0
- package/lib/operations/getAnalyticsEvents.d.ts.map +1 -0
- package/lib/operations/getAnalyticsEvents.js +40 -0
- package/lib/operations/getAnalyticsEvents.js.map +1 -0
- package/lib/operations/getAnalyticsStatus.d.ts +28 -0
- package/lib/operations/getAnalyticsStatus.d.ts.map +1 -0
- package/lib/operations/getAnalyticsStatus.js +28 -0
- package/lib/operations/getAnalyticsStatus.js.map +1 -0
- package/lib/operations/getCollection.d.ts +117 -0
- package/lib/operations/getCollection.d.ts.map +1 -0
- package/lib/operations/getCollection.js +74 -0
- package/lib/operations/getCollection.js.map +1 -0
- package/lib/operations/getCollections.d.ts +114 -0
- package/lib/operations/getCollections.d.ts.map +1 -0
- package/lib/operations/getCollections.js +70 -0
- package/lib/operations/getCollections.js.map +1 -0
- package/lib/operations/getDocument.d.ts +22 -0
- package/lib/operations/getDocument.d.ts.map +1 -0
- package/lib/operations/getDocument.js +29 -0
- package/lib/operations/getDocument.js.map +1 -0
- package/lib/operations/getKey.d.ts +35 -0
- package/lib/operations/getKey.d.ts.map +1 -0
- package/lib/operations/getKey.js +32 -0
- package/lib/operations/getKey.js.map +1 -0
- package/lib/operations/getKeys.d.ts +30 -0
- package/lib/operations/getKeys.d.ts.map +1 -0
- package/lib/operations/getKeys.js +26 -0
- package/lib/operations/getKeys.js.map +1 -0
- package/lib/operations/getSchemaChanges.d.ts +20 -0
- package/lib/operations/getSchemaChanges.d.ts.map +1 -0
- package/lib/operations/getSchemaChanges.js +22 -0
- package/lib/operations/getSchemaChanges.js.map +1 -0
- package/lib/operations/getStemmingDictionary.d.ts +31 -0
- package/lib/operations/getStemmingDictionary.d.ts.map +1 -0
- package/lib/operations/getStemmingDictionary.js +32 -0
- package/lib/operations/getStemmingDictionary.js.map +1 -0
- package/lib/operations/health.d.ts +14 -0
- package/lib/operations/health.d.ts.map +1 -0
- package/lib/operations/health.js +18 -0
- package/lib/operations/health.js.map +1 -0
- package/lib/operations/importDocuments.d.ts +21 -0
- package/lib/operations/importDocuments.d.ts.map +1 -0
- package/lib/operations/importDocuments.js +28 -0
- package/lib/operations/importDocuments.js.map +1 -0
- package/lib/operations/importStemmingDictionary.d.ts +19 -0
- package/lib/operations/importStemmingDictionary.d.ts.map +1 -0
- package/lib/operations/importStemmingDictionary.js +26 -0
- package/lib/operations/importStemmingDictionary.js.map +1 -0
- package/lib/operations/index.d.ts +80 -0
- package/lib/operations/index.d.ts.map +1 -0
- package/lib/operations/index.js +80 -0
- package/lib/operations/index.js.map +1 -0
- package/lib/operations/indexDocument.d.ts +25 -0
- package/lib/operations/indexDocument.d.ts.map +1 -0
- package/lib/operations/indexDocument.js +28 -0
- package/lib/operations/indexDocument.js.map +1 -0
- package/lib/operations/listStemmingDictionaries.d.ts +16 -0
- package/lib/operations/listStemmingDictionaries.d.ts.map +1 -0
- package/lib/operations/listStemmingDictionaries.js +22 -0
- package/lib/operations/listStemmingDictionaries.js.map +1 -0
- package/lib/operations/multiSearch.d.ts +415 -0
- package/lib/operations/multiSearch.d.ts.map +1 -0
- package/lib/operations/multiSearch.js +214 -0
- package/lib/operations/multiSearch.js.map +1 -0
- package/lib/operations/retrieveAPIStats.d.ts +40 -0
- package/lib/operations/retrieveAPIStats.d.ts.map +1 -0
- package/lib/operations/retrieveAPIStats.js +32 -0
- package/lib/operations/retrieveAPIStats.js.map +1 -0
- package/lib/operations/retrieveAllConversationModels.d.ts +16 -0
- package/lib/operations/retrieveAllConversationModels.d.ts.map +1 -0
- package/lib/operations/retrieveAllConversationModels.js +23 -0
- package/lib/operations/retrieveAllConversationModels.js.map +1 -0
- package/lib/operations/retrieveAllNLSearchModels.d.ts +16 -0
- package/lib/operations/retrieveAllNLSearchModels.d.ts.map +1 -0
- package/lib/operations/retrieveAllNLSearchModels.js +22 -0
- package/lib/operations/retrieveAllNLSearchModels.js.map +1 -0
- package/lib/operations/retrieveAllPresets.d.ts +22 -0
- package/lib/operations/retrieveAllPresets.d.ts.map +1 -0
- package/lib/operations/retrieveAllPresets.js +25 -0
- package/lib/operations/retrieveAllPresets.js.map +1 -0
- package/lib/operations/retrieveAnalyticsRule.d.ts +49 -0
- package/lib/operations/retrieveAnalyticsRule.d.ts.map +1 -0
- package/lib/operations/retrieveAnalyticsRule.js +46 -0
- package/lib/operations/retrieveAnalyticsRule.js.map +1 -0
- package/lib/operations/retrieveAnalyticsRules.d.ts +48 -0
- package/lib/operations/retrieveAnalyticsRules.d.ts.map +1 -0
- package/lib/operations/retrieveAnalyticsRules.js +44 -0
- package/lib/operations/retrieveAnalyticsRules.js.map +1 -0
- package/lib/operations/retrieveConversationModel.d.ts +21 -0
- package/lib/operations/retrieveConversationModel.d.ts.map +1 -0
- package/lib/operations/retrieveConversationModel.js +26 -0
- package/lib/operations/retrieveConversationModel.js.map +1 -0
- package/lib/operations/retrieveCurationSet.d.ts +75 -0
- package/lib/operations/retrieveCurationSet.d.ts.map +1 -0
- package/lib/operations/retrieveCurationSet.js +54 -0
- package/lib/operations/retrieveCurationSet.js.map +1 -0
- package/lib/operations/retrieveCurationSetItem.d.ts +70 -0
- package/lib/operations/retrieveCurationSetItem.d.ts.map +1 -0
- package/lib/operations/retrieveCurationSetItem.js +55 -0
- package/lib/operations/retrieveCurationSetItem.js.map +1 -0
- package/lib/operations/retrieveCurationSetItems.d.ts +67 -0
- package/lib/operations/retrieveCurationSetItems.d.ts.map +1 -0
- package/lib/operations/retrieveCurationSetItems.js +50 -0
- package/lib/operations/retrieveCurationSetItems.js.map +1 -0
- package/lib/operations/retrieveCurationSets.d.ts +68 -0
- package/lib/operations/retrieveCurationSets.d.ts.map +1 -0
- package/lib/operations/retrieveCurationSets.js +48 -0
- package/lib/operations/retrieveCurationSets.js.map +1 -0
- package/lib/operations/retrieveMetrics.d.ts +12 -0
- package/lib/operations/retrieveMetrics.d.ts.map +1 -0
- package/lib/operations/retrieveMetrics.js +18 -0
- package/lib/operations/retrieveMetrics.js.map +1 -0
- package/lib/operations/retrieveNLSearchModel.d.ts +23 -0
- package/lib/operations/retrieveNLSearchModel.d.ts.map +1 -0
- package/lib/operations/retrieveNLSearchModel.js +28 -0
- package/lib/operations/retrieveNLSearchModel.js.map +1 -0
- package/lib/operations/retrievePreset.d.ts +25 -0
- package/lib/operations/retrievePreset.d.ts.map +1 -0
- package/lib/operations/retrievePreset.js +27 -0
- package/lib/operations/retrievePreset.js.map +1 -0
- package/lib/operations/retrieveStopwordsSet.d.ts +31 -0
- package/lib/operations/retrieveStopwordsSet.d.ts.map +1 -0
- package/lib/operations/retrieveStopwordsSet.js +32 -0
- package/lib/operations/retrieveStopwordsSet.js.map +1 -0
- package/lib/operations/retrieveStopwordsSets.d.ts +24 -0
- package/lib/operations/retrieveStopwordsSets.d.ts.map +1 -0
- package/lib/operations/retrieveStopwordsSets.js +26 -0
- package/lib/operations/retrieveStopwordsSets.js.map +1 -0
- package/lib/operations/retrieveSynonymSet.d.ts +37 -0
- package/lib/operations/retrieveSynonymSet.d.ts.map +1 -0
- package/lib/operations/retrieveSynonymSet.js +35 -0
- package/lib/operations/retrieveSynonymSet.js.map +1 -0
- package/lib/operations/retrieveSynonymSetItem.d.ts +34 -0
- package/lib/operations/retrieveSynonymSetItem.d.ts.map +1 -0
- package/lib/operations/retrieveSynonymSetItem.js +37 -0
- package/lib/operations/retrieveSynonymSetItem.js.map +1 -0
- package/lib/operations/retrieveSynonymSetItems.d.ts +31 -0
- package/lib/operations/retrieveSynonymSetItems.d.ts.map +1 -0
- package/lib/operations/retrieveSynonymSetItems.js +32 -0
- package/lib/operations/retrieveSynonymSetItems.js.map +1 -0
- package/lib/operations/retrieveSynonymSets.d.ts +30 -0
- package/lib/operations/retrieveSynonymSets.d.ts.map +1 -0
- package/lib/operations/retrieveSynonymSets.js +29 -0
- package/lib/operations/retrieveSynonymSets.js.map +1 -0
- package/lib/operations/searchCollection.d.ts +257 -0
- package/lib/operations/searchCollection.d.ts.map +1 -0
- package/lib/operations/searchCollection.js +139 -0
- package/lib/operations/searchCollection.js.map +1 -0
- package/lib/operations/takeSnapshot.d.ts +22 -0
- package/lib/operations/takeSnapshot.d.ts.map +1 -0
- package/lib/operations/takeSnapshot.js +24 -0
- package/lib/operations/takeSnapshot.js.map +1 -0
- package/lib/operations/toggleSlowRequestLog.d.ts +20 -0
- package/lib/operations/toggleSlowRequestLog.d.ts.map +1 -0
- package/lib/operations/toggleSlowRequestLog.js +24 -0
- package/lib/operations/toggleSlowRequestLog.js.map +1 -0
- package/lib/operations/updateCollection.d.ts +173 -0
- package/lib/operations/updateCollection.d.ts.map +1 -0
- package/lib/operations/updateCollection.js +102 -0
- package/lib/operations/updateCollection.js.map +1 -0
- package/lib/operations/updateConversationModel.d.ts +39 -0
- package/lib/operations/updateConversationModel.d.ts.map +1 -0
- package/lib/operations/updateConversationModel.js +36 -0
- package/lib/operations/updateConversationModel.js.map +1 -0
- package/lib/operations/updateDocument.d.ts +25 -0
- package/lib/operations/updateDocument.d.ts.map +1 -0
- package/lib/operations/updateDocument.js +31 -0
- package/lib/operations/updateDocument.js.map +1 -0
- package/lib/operations/updateDocuments.d.ts +25 -0
- package/lib/operations/updateDocuments.d.ts.map +1 -0
- package/lib/operations/updateDocuments.js +27 -0
- package/lib/operations/updateDocuments.js.map +1 -0
- package/lib/operations/updateNLSearchModel.d.ts +23 -0
- package/lib/operations/updateNLSearchModel.d.ts.map +1 -0
- package/lib/operations/updateNLSearchModel.js +28 -0
- package/lib/operations/updateNLSearchModel.js.map +1 -0
- package/lib/operations/upsertAlias.d.ts +27 -0
- package/lib/operations/upsertAlias.d.ts.map +1 -0
- package/lib/operations/upsertAlias.js +28 -0
- package/lib/operations/upsertAlias.js.map +1 -0
- package/lib/operations/upsertAnalyticsRule.d.ts +71 -0
- package/lib/operations/upsertAnalyticsRule.d.ts.map +1 -0
- package/lib/operations/upsertAnalyticsRule.js +57 -0
- package/lib/operations/upsertAnalyticsRule.js.map +1 -0
- package/lib/operations/upsertCurationSet.d.ts +127 -0
- package/lib/operations/upsertCurationSet.d.ts.map +1 -0
- package/lib/operations/upsertCurationSet.js +79 -0
- package/lib/operations/upsertCurationSet.js.map +1 -0
- package/lib/operations/upsertCurationSetItem.d.ts +116 -0
- package/lib/operations/upsertCurationSetItem.d.ts.map +1 -0
- package/lib/operations/upsertCurationSetItem.js +78 -0
- package/lib/operations/upsertCurationSetItem.js.map +1 -0
- package/lib/operations/upsertPreset.d.ts +27 -0
- package/lib/operations/upsertPreset.d.ts.map +1 -0
- package/lib/operations/upsertPreset.js +28 -0
- package/lib/operations/upsertPreset.js.map +1 -0
- package/lib/operations/upsertStopwordsSet.d.ts +31 -0
- package/lib/operations/upsertStopwordsSet.d.ts.map +1 -0
- package/lib/operations/upsertStopwordsSet.js +32 -0
- package/lib/operations/upsertStopwordsSet.js.map +1 -0
- package/lib/operations/upsertSynonymSet.d.ts +51 -0
- package/lib/operations/upsertSynonymSet.d.ts.map +1 -0
- package/lib/operations/upsertSynonymSet.js +40 -0
- package/lib/operations/upsertSynonymSet.js.map +1 -0
- package/lib/operations/upsertSynonymSetItem.d.ts +42 -0
- package/lib/operations/upsertSynonymSetItem.d.ts.map +1 -0
- package/lib/operations/upsertSynonymSetItem.js +41 -0
- package/lib/operations/upsertSynonymSetItem.js.map +1 -0
- package/lib/operations/vote.d.ts +16 -0
- package/lib/operations/vote.d.ts.map +1 -0
- package/lib/operations/vote.js +20 -0
- package/lib/operations/vote.js.map +1 -0
- package/lib/retry.d.ts +22 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +21 -0
- package/lib/retry.js.map +1 -0
- package/lib/sensitive.d.ts +5 -0
- package/lib/sensitive.d.ts.map +1 -0
- package/lib/sensitive.js +5 -0
- package/lib/sensitive.js.map +1 -0
- package/lib/traits.d.ts +5 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +5 -0
- package/lib/traits.js.map +1 -0
- package/package.json +81 -7
- package/src/category.ts +4 -0
- package/src/client.ts +61 -0
- package/src/credentials.ts +43 -0
- package/src/errors.ts +47 -0
- package/src/index.ts +15 -0
- package/src/operations/clearCache.ts +26 -0
- package/src/operations/compactDb.ts +26 -0
- package/src/operations/createAnalyticsEvent.ts +40 -0
- package/src/operations/createAnalyticsRule.ts +28 -0
- package/src/operations/createCollection.ts +135 -0
- package/src/operations/createConversationModel.ts +34 -0
- package/src/operations/createKey.ts +38 -0
- package/src/operations/createNLSearchModel.ts +30 -0
- package/src/operations/debug.ts +24 -0
- package/src/operations/deleteAlias.ts +29 -0
- package/src/operations/deleteAnalyticsRule.ts +52 -0
- package/src/operations/deleteCollection.ts +86 -0
- package/src/operations/deleteConversationModel.ts +36 -0
- package/src/operations/deleteCurationSet.ts +33 -0
- package/src/operations/deleteCurationSetItem.ts +42 -0
- package/src/operations/deleteDocument.ts +35 -0
- package/src/operations/deleteDocuments.ts +33 -0
- package/src/operations/deleteKey.ts +28 -0
- package/src/operations/deleteNLSearchModel.ts +32 -0
- package/src/operations/deletePreset.ts +30 -0
- package/src/operations/deleteStopwordsSet.ts +32 -0
- package/src/operations/deleteSynonymSet.ts +32 -0
- package/src/operations/deleteSynonymSetItem.ts +41 -0
- package/src/operations/exportDocuments.ts +34 -0
- package/src/operations/flushAnalytics.ts +26 -0
- package/src/operations/getAlias.ts +31 -0
- package/src/operations/getAliases.ts +31 -0
- package/src/operations/getAnalyticsEvents.ts +46 -0
- package/src/operations/getAnalyticsStatus.ts +34 -0
- package/src/operations/getCollection.ts +84 -0
- package/src/operations/getCollections.ts +82 -0
- package/src/operations/getDocument.ts +35 -0
- package/src/operations/getKey.ts +36 -0
- package/src/operations/getKeys.ts +34 -0
- package/src/operations/getSchemaChanges.ts +30 -0
- package/src/operations/getStemmingDictionary.ts +43 -0
- package/src/operations/health.ts +24 -0
- package/src/operations/importDocuments.ts +34 -0
- package/src/operations/importStemmingDictionary.ts +34 -0
- package/src/operations/index.ts +79 -0
- package/src/operations/indexDocument.ts +34 -0
- package/src/operations/listStemmingDictionaries.ts +32 -0
- package/src/operations/multiSearch.ts +288 -0
- package/src/operations/retrieveAPIStats.ts +40 -0
- package/src/operations/retrieveAllConversationModels.ts +33 -0
- package/src/operations/retrieveAllNLSearchModels.ts +34 -0
- package/src/operations/retrieveAllPresets.ts +33 -0
- package/src/operations/retrieveAnalyticsRule.ts +55 -0
- package/src/operations/retrieveAnalyticsRules.ts +56 -0
- package/src/operations/retrieveConversationModel.ts +34 -0
- package/src/operations/retrieveCurationSet.ts +68 -0
- package/src/operations/retrieveCurationSetItem.ts +73 -0
- package/src/operations/retrieveCurationSetItems.ts +70 -0
- package/src/operations/retrieveCurationSets.ts +68 -0
- package/src/operations/retrieveMetrics.ts +24 -0
- package/src/operations/retrieveNLSearchModel.ts +35 -0
- package/src/operations/retrievePreset.ts +31 -0
- package/src/operations/retrieveStopwordsSet.ts +38 -0
- package/src/operations/retrieveStopwordsSets.ts +37 -0
- package/src/operations/retrieveSynonymSet.ts +41 -0
- package/src/operations/retrieveSynonymSetItem.ts +47 -0
- package/src/operations/retrieveSynonymSetItems.ts +44 -0
- package/src/operations/retrieveSynonymSets.ts +39 -0
- package/src/operations/searchCollection.ts +209 -0
- package/src/operations/takeSnapshot.ts +28 -0
- package/src/operations/toggleSlowRequestLog.ts +30 -0
- package/src/operations/updateCollection.ts +116 -0
- package/src/operations/updateConversationModel.ts +44 -0
- package/src/operations/updateDocument.ts +37 -0
- package/src/operations/updateDocuments.ts +33 -0
- package/src/operations/updateNLSearchModel.ts +32 -0
- package/src/operations/upsertAlias.ts +32 -0
- package/src/operations/upsertAnalyticsRule.ts +65 -0
- package/src/operations/upsertCurationSet.ts +105 -0
- package/src/operations/upsertCurationSetItem.ts +103 -0
- package/src/operations/upsertPreset.ts +32 -0
- package/src/operations/upsertStopwordsSet.ts +36 -0
- package/src/operations/upsertSynonymSet.ts +50 -0
- package/src/operations/upsertSynonymSetItem.ts +49 -0
- package/src/operations/vote.ts +26 -0
- package/src/retry.ts +35 -0
- package/src/sensitive.ts +4 -0
- package/src/traits.ts +4 -0
- package/bun.lock +0 -26
- package/index.ts +0 -1
- package/tsconfig.json +0 -29
package/src/errors.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typesense-specific error types.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports common HTTP errors from sdk-core and adds Typesense-specific
|
|
5
|
+
* error matching and API error types.
|
|
6
|
+
*/
|
|
7
|
+
export {
|
|
8
|
+
BadGateway,
|
|
9
|
+
BadRequest,
|
|
10
|
+
Conflict,
|
|
11
|
+
ConfigError,
|
|
12
|
+
Forbidden,
|
|
13
|
+
GatewayTimeout,
|
|
14
|
+
InternalServerError,
|
|
15
|
+
Locked,
|
|
16
|
+
NotFound,
|
|
17
|
+
ServiceUnavailable,
|
|
18
|
+
TooManyRequests,
|
|
19
|
+
Unauthorized,
|
|
20
|
+
UnprocessableEntity,
|
|
21
|
+
HTTP_STATUS_MAP,
|
|
22
|
+
DEFAULT_ERRORS,
|
|
23
|
+
API_ERRORS,
|
|
24
|
+
} from "@distilled.cloud/core/errors";
|
|
25
|
+
export type { DefaultErrors } from "@distilled.cloud/core/errors";
|
|
26
|
+
|
|
27
|
+
import * as Schema from "effect/Schema";
|
|
28
|
+
import * as Category from "@distilled.cloud/core/category";
|
|
29
|
+
|
|
30
|
+
// Unknown Typesense error - returned when an error code is not recognized
|
|
31
|
+
export class UnknownTypesenseError extends Schema.TaggedErrorClass<UnknownTypesenseError>()(
|
|
32
|
+
"UnknownTypesenseError",
|
|
33
|
+
{
|
|
34
|
+
code: Schema.optional(Schema.String),
|
|
35
|
+
message: Schema.optional(Schema.String),
|
|
36
|
+
body: Schema.Unknown,
|
|
37
|
+
},
|
|
38
|
+
).pipe(Category.withServerError) {}
|
|
39
|
+
|
|
40
|
+
// Schema parse error wrapper
|
|
41
|
+
export class TypesenseParseError extends Schema.TaggedErrorClass<TypesenseParseError>()(
|
|
42
|
+
"TypesenseParseError",
|
|
43
|
+
{
|
|
44
|
+
body: Schema.Unknown,
|
|
45
|
+
cause: Schema.Unknown,
|
|
46
|
+
},
|
|
47
|
+
).pipe(Category.withParseError) {}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typesense SDK for Effect
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* \`\`\`ts
|
|
6
|
+
* import * as Typesense from "@distilled.cloud/typesense";
|
|
7
|
+
* \`\`\`
|
|
8
|
+
*/
|
|
9
|
+
export * from "./credentials.ts";
|
|
10
|
+
export * as Category from "./category.ts";
|
|
11
|
+
export * as T from "./traits.ts";
|
|
12
|
+
export * as Retry from "./retry.ts";
|
|
13
|
+
export { API } from "./client.ts";
|
|
14
|
+
export * from "./errors.ts";
|
|
15
|
+
export { SensitiveString, SensitiveNullableString } from "./sensitive.ts";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client.ts";
|
|
3
|
+
import * as T from "../traits.ts";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const ClearCacheInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
7
|
+
{},
|
|
8
|
+
).pipe(T.Http({ method: "POST", path: "/operations/cache/clear" }));
|
|
9
|
+
export type ClearCacheInput = typeof ClearCacheInput.Type;
|
|
10
|
+
|
|
11
|
+
// Output Schema
|
|
12
|
+
export const ClearCacheOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
13
|
+
success: Schema.Boolean,
|
|
14
|
+
});
|
|
15
|
+
export type ClearCacheOutput = typeof ClearCacheOutput.Type;
|
|
16
|
+
|
|
17
|
+
// The operation
|
|
18
|
+
/**
|
|
19
|
+
* Clear the cached responses of search requests in the LRU cache.
|
|
20
|
+
*
|
|
21
|
+
* Clear the cached responses of search requests that are sent with `use_cache` parameter in the LRU cache.
|
|
22
|
+
*/
|
|
23
|
+
export const clearCache = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
24
|
+
inputSchema: ClearCacheInput,
|
|
25
|
+
outputSchema: ClearCacheOutput,
|
|
26
|
+
}));
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client.ts";
|
|
3
|
+
import * as T from "../traits.ts";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const CompactDbInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
7
|
+
{},
|
|
8
|
+
).pipe(T.Http({ method: "POST", path: "/operations/db/compact" }));
|
|
9
|
+
export type CompactDbInput = typeof CompactDbInput.Type;
|
|
10
|
+
|
|
11
|
+
// Output Schema
|
|
12
|
+
export const CompactDbOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
13
|
+
success: Schema.Boolean,
|
|
14
|
+
});
|
|
15
|
+
export type CompactDbOutput = typeof CompactDbOutput.Type;
|
|
16
|
+
|
|
17
|
+
// The operation
|
|
18
|
+
/**
|
|
19
|
+
* Compacting the on-disk database
|
|
20
|
+
*
|
|
21
|
+
* Typesense uses RocksDB to store your documents on the disk. If you do frequent writes or updates, you could benefit from running a compaction of the underlying RocksDB database. This could reduce the size of the database and decrease read latency. While the database will not block during this operation, we recommend running it during off-peak hours.
|
|
22
|
+
*/
|
|
23
|
+
export const compactDb = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
24
|
+
inputSchema: CompactDbInput,
|
|
25
|
+
outputSchema: CompactDbOutput,
|
|
26
|
+
}));
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client.ts";
|
|
3
|
+
import * as T from "../traits.ts";
|
|
4
|
+
import { BadRequest } from "../errors.ts";
|
|
5
|
+
|
|
6
|
+
// Input Schema
|
|
7
|
+
export const CreateAnalyticsEventInput =
|
|
8
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
9
|
+
name: Schema.String,
|
|
10
|
+
event_type: Schema.String,
|
|
11
|
+
data: Schema.Struct({
|
|
12
|
+
user_id: Schema.optional(Schema.String),
|
|
13
|
+
doc_id: Schema.optional(Schema.String),
|
|
14
|
+
doc_ids: Schema.optional(Schema.Array(Schema.String)),
|
|
15
|
+
q: Schema.optional(Schema.String),
|
|
16
|
+
analytics_tag: Schema.optional(Schema.String),
|
|
17
|
+
}),
|
|
18
|
+
}).pipe(T.Http({ method: "POST", path: "/analytics/events" }));
|
|
19
|
+
export type CreateAnalyticsEventInput = typeof CreateAnalyticsEventInput.Type;
|
|
20
|
+
|
|
21
|
+
// Output Schema
|
|
22
|
+
export const CreateAnalyticsEventOutput =
|
|
23
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
24
|
+
ok: Schema.Boolean,
|
|
25
|
+
});
|
|
26
|
+
export type CreateAnalyticsEventOutput = typeof CreateAnalyticsEventOutput.Type;
|
|
27
|
+
|
|
28
|
+
// The operation
|
|
29
|
+
/**
|
|
30
|
+
* Create an analytics event
|
|
31
|
+
*
|
|
32
|
+
* Submit a single analytics event. The event must correspond to an existing analytics rule by name.
|
|
33
|
+
*/
|
|
34
|
+
export const createAnalyticsEvent = /*@__PURE__*/ /*#__PURE__*/ API.make(
|
|
35
|
+
() => ({
|
|
36
|
+
inputSchema: CreateAnalyticsEventInput,
|
|
37
|
+
outputSchema: CreateAnalyticsEventOutput,
|
|
38
|
+
errors: [BadRequest] as const,
|
|
39
|
+
}),
|
|
40
|
+
);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client.ts";
|
|
3
|
+
import * as T from "../traits.ts";
|
|
4
|
+
import { BadRequest } from "../errors.ts";
|
|
5
|
+
|
|
6
|
+
// Input Schema
|
|
7
|
+
export const CreateAnalyticsRuleInput =
|
|
8
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({}).pipe(
|
|
9
|
+
T.Http({ method: "POST", path: "/analytics/rules" }),
|
|
10
|
+
);
|
|
11
|
+
export type CreateAnalyticsRuleInput = typeof CreateAnalyticsRuleInput.Type;
|
|
12
|
+
|
|
13
|
+
// Output Schema
|
|
14
|
+
export const CreateAnalyticsRuleOutput =
|
|
15
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
|
|
16
|
+
export type CreateAnalyticsRuleOutput = typeof CreateAnalyticsRuleOutput.Type;
|
|
17
|
+
|
|
18
|
+
// The operation
|
|
19
|
+
/**
|
|
20
|
+
* Create analytics rule(s)
|
|
21
|
+
*
|
|
22
|
+
* Create one or more analytics rules. You can send a single rule object or an array of rule objects.
|
|
23
|
+
*/
|
|
24
|
+
export const createAnalyticsRule = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
25
|
+
inputSchema: CreateAnalyticsRuleInput,
|
|
26
|
+
outputSchema: CreateAnalyticsRuleOutput,
|
|
27
|
+
errors: [BadRequest] as const,
|
|
28
|
+
}));
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client.ts";
|
|
3
|
+
import * as T from "../traits.ts";
|
|
4
|
+
import { BadRequest, Conflict } from "../errors.ts";
|
|
5
|
+
import { SensitiveString } from "../sensitive.ts";
|
|
6
|
+
|
|
7
|
+
// Input Schema
|
|
8
|
+
export const CreateCollectionInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
9
|
+
name: Schema.String,
|
|
10
|
+
fields: Schema.Array(
|
|
11
|
+
Schema.Struct({
|
|
12
|
+
name: Schema.String,
|
|
13
|
+
type: Schema.String,
|
|
14
|
+
optional: Schema.optional(Schema.Boolean),
|
|
15
|
+
facet: Schema.optional(Schema.Boolean),
|
|
16
|
+
index: Schema.optional(Schema.Boolean),
|
|
17
|
+
locale: Schema.optional(Schema.String),
|
|
18
|
+
sort: Schema.optional(Schema.Boolean),
|
|
19
|
+
infix: Schema.optional(Schema.Boolean),
|
|
20
|
+
reference: Schema.optional(Schema.String),
|
|
21
|
+
async_reference: Schema.optional(Schema.Boolean),
|
|
22
|
+
num_dim: Schema.optional(Schema.Number),
|
|
23
|
+
drop: Schema.optional(Schema.Boolean),
|
|
24
|
+
store: Schema.optional(Schema.Boolean),
|
|
25
|
+
vec_dist: Schema.optional(Schema.String),
|
|
26
|
+
range_index: Schema.optional(Schema.Boolean),
|
|
27
|
+
stem: Schema.optional(Schema.Boolean),
|
|
28
|
+
stem_dictionary: Schema.optional(Schema.String),
|
|
29
|
+
token_separators: Schema.optional(Schema.Array(Schema.String)),
|
|
30
|
+
symbols_to_index: Schema.optional(Schema.Array(Schema.String)),
|
|
31
|
+
embed: Schema.optional(
|
|
32
|
+
Schema.Struct({
|
|
33
|
+
from: Schema.Array(Schema.String),
|
|
34
|
+
model_config: Schema.Struct({
|
|
35
|
+
model_name: Schema.String,
|
|
36
|
+
api_key: Schema.optional(SensitiveString),
|
|
37
|
+
url: Schema.optional(Schema.String),
|
|
38
|
+
access_token: Schema.optional(SensitiveString),
|
|
39
|
+
refresh_token: Schema.optional(SensitiveString),
|
|
40
|
+
client_id: Schema.optional(Schema.String),
|
|
41
|
+
client_secret: Schema.optional(SensitiveString),
|
|
42
|
+
project_id: Schema.optional(Schema.String),
|
|
43
|
+
indexing_prefix: Schema.optional(Schema.String),
|
|
44
|
+
query_prefix: Schema.optional(Schema.String),
|
|
45
|
+
}),
|
|
46
|
+
}),
|
|
47
|
+
),
|
|
48
|
+
}),
|
|
49
|
+
),
|
|
50
|
+
default_sorting_field: Schema.optional(Schema.String),
|
|
51
|
+
token_separators: Schema.optional(Schema.Array(Schema.String)),
|
|
52
|
+
synonym_sets: Schema.optional(Schema.Array(Schema.String)),
|
|
53
|
+
enable_nested_fields: Schema.optional(Schema.Boolean),
|
|
54
|
+
symbols_to_index: Schema.optional(Schema.Array(Schema.String)),
|
|
55
|
+
voice_query_model: Schema.optional(
|
|
56
|
+
Schema.Struct({
|
|
57
|
+
model_name: Schema.optional(Schema.String),
|
|
58
|
+
}),
|
|
59
|
+
),
|
|
60
|
+
metadata: Schema.optional(Schema.Unknown),
|
|
61
|
+
}).pipe(T.Http({ method: "POST", path: "/collections" }));
|
|
62
|
+
export type CreateCollectionInput = typeof CreateCollectionInput.Type;
|
|
63
|
+
|
|
64
|
+
// Output Schema
|
|
65
|
+
export const CreateCollectionOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
66
|
+
{
|
|
67
|
+
name: Schema.String,
|
|
68
|
+
fields: Schema.Array(
|
|
69
|
+
Schema.Struct({
|
|
70
|
+
name: Schema.String,
|
|
71
|
+
type: Schema.String,
|
|
72
|
+
optional: Schema.optional(Schema.Boolean),
|
|
73
|
+
facet: Schema.optional(Schema.Boolean),
|
|
74
|
+
index: Schema.optional(Schema.Boolean),
|
|
75
|
+
locale: Schema.optional(Schema.String),
|
|
76
|
+
sort: Schema.optional(Schema.Boolean),
|
|
77
|
+
infix: Schema.optional(Schema.Boolean),
|
|
78
|
+
reference: Schema.optional(Schema.String),
|
|
79
|
+
async_reference: Schema.optional(Schema.Boolean),
|
|
80
|
+
num_dim: Schema.optional(Schema.Number),
|
|
81
|
+
drop: Schema.optional(Schema.Boolean),
|
|
82
|
+
store: Schema.optional(Schema.Boolean),
|
|
83
|
+
vec_dist: Schema.optional(Schema.String),
|
|
84
|
+
range_index: Schema.optional(Schema.Boolean),
|
|
85
|
+
stem: Schema.optional(Schema.Boolean),
|
|
86
|
+
stem_dictionary: Schema.optional(Schema.String),
|
|
87
|
+
token_separators: Schema.optional(Schema.Array(Schema.String)),
|
|
88
|
+
symbols_to_index: Schema.optional(Schema.Array(Schema.String)),
|
|
89
|
+
embed: Schema.optional(
|
|
90
|
+
Schema.Struct({
|
|
91
|
+
from: Schema.Array(Schema.String),
|
|
92
|
+
model_config: Schema.Struct({
|
|
93
|
+
model_name: Schema.String,
|
|
94
|
+
api_key: Schema.optional(SensitiveString),
|
|
95
|
+
url: Schema.optional(Schema.String),
|
|
96
|
+
access_token: Schema.optional(SensitiveString),
|
|
97
|
+
refresh_token: Schema.optional(SensitiveString),
|
|
98
|
+
client_id: Schema.optional(Schema.String),
|
|
99
|
+
client_secret: Schema.optional(SensitiveString),
|
|
100
|
+
project_id: Schema.optional(Schema.String),
|
|
101
|
+
indexing_prefix: Schema.optional(Schema.String),
|
|
102
|
+
query_prefix: Schema.optional(Schema.String),
|
|
103
|
+
}),
|
|
104
|
+
}),
|
|
105
|
+
),
|
|
106
|
+
}),
|
|
107
|
+
),
|
|
108
|
+
default_sorting_field: Schema.optional(Schema.String),
|
|
109
|
+
token_separators: Schema.optional(Schema.Array(Schema.String)),
|
|
110
|
+
synonym_sets: Schema.optional(Schema.Array(Schema.String)),
|
|
111
|
+
enable_nested_fields: Schema.optional(Schema.Boolean),
|
|
112
|
+
symbols_to_index: Schema.optional(Schema.Array(Schema.String)),
|
|
113
|
+
voice_query_model: Schema.optional(
|
|
114
|
+
Schema.Struct({
|
|
115
|
+
model_name: Schema.optional(Schema.String),
|
|
116
|
+
}),
|
|
117
|
+
),
|
|
118
|
+
metadata: Schema.optional(Schema.Unknown),
|
|
119
|
+
num_documents: Schema.Number,
|
|
120
|
+
created_at: Schema.Number,
|
|
121
|
+
},
|
|
122
|
+
);
|
|
123
|
+
export type CreateCollectionOutput = typeof CreateCollectionOutput.Type;
|
|
124
|
+
|
|
125
|
+
// The operation
|
|
126
|
+
/**
|
|
127
|
+
* Create a new collection
|
|
128
|
+
*
|
|
129
|
+
* When a collection is created, we give it a name and describe the fields that will be indexed from the documents added to the collection.
|
|
130
|
+
*/
|
|
131
|
+
export const createCollection = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
132
|
+
inputSchema: CreateCollectionInput,
|
|
133
|
+
outputSchema: CreateCollectionOutput,
|
|
134
|
+
errors: [BadRequest, Conflict] as const,
|
|
135
|
+
}));
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client.ts";
|
|
3
|
+
import * as T from "../traits.ts";
|
|
4
|
+
import { BadRequest } from "../errors.ts";
|
|
5
|
+
|
|
6
|
+
// Input Schema
|
|
7
|
+
export const CreateConversationModelInput =
|
|
8
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({}).pipe(
|
|
9
|
+
T.Http({ method: "POST", path: "/conversations/models" }),
|
|
10
|
+
);
|
|
11
|
+
export type CreateConversationModelInput =
|
|
12
|
+
typeof CreateConversationModelInput.Type;
|
|
13
|
+
|
|
14
|
+
// Output Schema
|
|
15
|
+
export const CreateConversationModelOutput =
|
|
16
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
17
|
+
id: Schema.String,
|
|
18
|
+
});
|
|
19
|
+
export type CreateConversationModelOutput =
|
|
20
|
+
typeof CreateConversationModelOutput.Type;
|
|
21
|
+
|
|
22
|
+
// The operation
|
|
23
|
+
/**
|
|
24
|
+
* Create a conversation model
|
|
25
|
+
*
|
|
26
|
+
* Create a Conversation Model
|
|
27
|
+
*/
|
|
28
|
+
export const createConversationModel = /*@__PURE__*/ /*#__PURE__*/ API.make(
|
|
29
|
+
() => ({
|
|
30
|
+
inputSchema: CreateConversationModelInput,
|
|
31
|
+
outputSchema: CreateConversationModelOutput,
|
|
32
|
+
errors: [BadRequest] as const,
|
|
33
|
+
}),
|
|
34
|
+
);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client.ts";
|
|
3
|
+
import * as T from "../traits.ts";
|
|
4
|
+
import { BadRequest, Conflict } from "../errors.ts";
|
|
5
|
+
|
|
6
|
+
// Input Schema
|
|
7
|
+
export const CreateKeyInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
value: Schema.optional(Schema.String),
|
|
9
|
+
description: Schema.String,
|
|
10
|
+
actions: Schema.Array(Schema.String),
|
|
11
|
+
collections: Schema.Array(Schema.String),
|
|
12
|
+
expires_at: Schema.optional(Schema.Number),
|
|
13
|
+
}).pipe(T.Http({ method: "POST", path: "/keys" }));
|
|
14
|
+
export type CreateKeyInput = typeof CreateKeyInput.Type;
|
|
15
|
+
|
|
16
|
+
// Output Schema
|
|
17
|
+
export const CreateKeyOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
18
|
+
value: Schema.optional(Schema.String),
|
|
19
|
+
description: Schema.String,
|
|
20
|
+
actions: Schema.Array(Schema.String),
|
|
21
|
+
collections: Schema.Array(Schema.String),
|
|
22
|
+
expires_at: Schema.optional(Schema.Number),
|
|
23
|
+
id: Schema.optional(Schema.Number),
|
|
24
|
+
value_prefix: Schema.optional(Schema.String),
|
|
25
|
+
});
|
|
26
|
+
export type CreateKeyOutput = typeof CreateKeyOutput.Type;
|
|
27
|
+
|
|
28
|
+
// The operation
|
|
29
|
+
/**
|
|
30
|
+
* Create an API Key
|
|
31
|
+
*
|
|
32
|
+
* Create an API Key with fine-grain access control. You can restrict access on both a per-collection and per-action level. The generated key is returned only during creation. You want to store this key carefully in a secure place.
|
|
33
|
+
*/
|
|
34
|
+
export const createKey = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
35
|
+
inputSchema: CreateKeyInput,
|
|
36
|
+
outputSchema: CreateKeyOutput,
|
|
37
|
+
errors: [BadRequest, Conflict] as const,
|
|
38
|
+
}));
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client.ts";
|
|
3
|
+
import * as T from "../traits.ts";
|
|
4
|
+
import { BadRequest } from "../errors.ts";
|
|
5
|
+
|
|
6
|
+
// Input Schema
|
|
7
|
+
export const CreateNLSearchModelInput =
|
|
8
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({}).pipe(
|
|
9
|
+
T.Http({ method: "POST", path: "/nl_search_models" }),
|
|
10
|
+
);
|
|
11
|
+
export type CreateNLSearchModelInput = typeof CreateNLSearchModelInput.Type;
|
|
12
|
+
|
|
13
|
+
// Output Schema
|
|
14
|
+
export const CreateNLSearchModelOutput =
|
|
15
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
16
|
+
id: Schema.String,
|
|
17
|
+
});
|
|
18
|
+
export type CreateNLSearchModelOutput = typeof CreateNLSearchModelOutput.Type;
|
|
19
|
+
|
|
20
|
+
// The operation
|
|
21
|
+
/**
|
|
22
|
+
* Create a NL search model
|
|
23
|
+
*
|
|
24
|
+
* Create a new NL search model.
|
|
25
|
+
*/
|
|
26
|
+
export const createNLSearchModel = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
27
|
+
inputSchema: CreateNLSearchModelInput,
|
|
28
|
+
outputSchema: CreateNLSearchModelOutput,
|
|
29
|
+
errors: [BadRequest] as const,
|
|
30
|
+
}));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client.ts";
|
|
3
|
+
import * as T from "../traits.ts";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const DebugInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({}).pipe(
|
|
7
|
+
T.Http({ method: "GET", path: "/debug" }),
|
|
8
|
+
);
|
|
9
|
+
export type DebugInput = typeof DebugInput.Type;
|
|
10
|
+
|
|
11
|
+
// Output Schema
|
|
12
|
+
export const DebugOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
13
|
+
version: Schema.optional(Schema.String),
|
|
14
|
+
});
|
|
15
|
+
export type DebugOutput = typeof DebugOutput.Type;
|
|
16
|
+
|
|
17
|
+
// The operation
|
|
18
|
+
/**
|
|
19
|
+
* Print debugging information
|
|
20
|
+
*/
|
|
21
|
+
export const debug = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
22
|
+
inputSchema: DebugInput,
|
|
23
|
+
outputSchema: DebugOutput,
|
|
24
|
+
}));
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client.ts";
|
|
3
|
+
import * as T from "../traits.ts";
|
|
4
|
+
import { NotFound } from "../errors.ts";
|
|
5
|
+
|
|
6
|
+
// Input Schema
|
|
7
|
+
export const DeleteAliasInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
aliasName: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
}).pipe(T.Http({ method: "DELETE", path: "/aliases/{aliasName}" }));
|
|
10
|
+
export type DeleteAliasInput = typeof DeleteAliasInput.Type;
|
|
11
|
+
|
|
12
|
+
// Output Schema
|
|
13
|
+
export const DeleteAliasOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
14
|
+
name: Schema.String,
|
|
15
|
+
collection_name: Schema.String,
|
|
16
|
+
});
|
|
17
|
+
export type DeleteAliasOutput = typeof DeleteAliasOutput.Type;
|
|
18
|
+
|
|
19
|
+
// The operation
|
|
20
|
+
/**
|
|
21
|
+
* Delete an alias
|
|
22
|
+
*
|
|
23
|
+
* @param aliasName - The name of the alias to delete
|
|
24
|
+
*/
|
|
25
|
+
export const deleteAlias = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
26
|
+
inputSchema: DeleteAliasInput,
|
|
27
|
+
outputSchema: DeleteAliasOutput,
|
|
28
|
+
errors: [NotFound] as const,
|
|
29
|
+
}));
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client.ts";
|
|
3
|
+
import * as T from "../traits.ts";
|
|
4
|
+
import { NotFound } from "../errors.ts";
|
|
5
|
+
|
|
6
|
+
// Input Schema
|
|
7
|
+
export const DeleteAnalyticsRuleInput =
|
|
8
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
9
|
+
ruleName: Schema.String.pipe(T.PathParam()),
|
|
10
|
+
}).pipe(T.Http({ method: "DELETE", path: "/analytics/rules/{ruleName}" }));
|
|
11
|
+
export type DeleteAnalyticsRuleInput = typeof DeleteAnalyticsRuleInput.Type;
|
|
12
|
+
|
|
13
|
+
// Output Schema
|
|
14
|
+
export const DeleteAnalyticsRuleOutput =
|
|
15
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
16
|
+
name: Schema.String,
|
|
17
|
+
type: Schema.Literals([
|
|
18
|
+
"popular_queries",
|
|
19
|
+
"nohits_queries",
|
|
20
|
+
"counter",
|
|
21
|
+
"log",
|
|
22
|
+
]),
|
|
23
|
+
collection: Schema.String,
|
|
24
|
+
event_type: Schema.String,
|
|
25
|
+
rule_tag: Schema.optional(Schema.String),
|
|
26
|
+
params: Schema.optional(
|
|
27
|
+
Schema.Struct({
|
|
28
|
+
destination_collection: Schema.optional(Schema.String),
|
|
29
|
+
limit: Schema.optional(Schema.Number),
|
|
30
|
+
capture_search_requests: Schema.optional(Schema.Boolean),
|
|
31
|
+
meta_fields: Schema.optional(Schema.Array(Schema.String)),
|
|
32
|
+
expand_query: Schema.optional(Schema.Boolean),
|
|
33
|
+
counter_field: Schema.optional(Schema.String),
|
|
34
|
+
weight: Schema.optional(Schema.Number),
|
|
35
|
+
}),
|
|
36
|
+
),
|
|
37
|
+
});
|
|
38
|
+
export type DeleteAnalyticsRuleOutput = typeof DeleteAnalyticsRuleOutput.Type;
|
|
39
|
+
|
|
40
|
+
// The operation
|
|
41
|
+
/**
|
|
42
|
+
* Delete an analytics rule
|
|
43
|
+
*
|
|
44
|
+
* Permanently deletes an analytics rule, given it's name
|
|
45
|
+
*
|
|
46
|
+
* @param ruleName - The name of the analytics rule to delete
|
|
47
|
+
*/
|
|
48
|
+
export const deleteAnalyticsRule = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
49
|
+
inputSchema: DeleteAnalyticsRuleInput,
|
|
50
|
+
outputSchema: DeleteAnalyticsRuleOutput,
|
|
51
|
+
errors: [NotFound] as const,
|
|
52
|
+
}));
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client.ts";
|
|
3
|
+
import * as T from "../traits.ts";
|
|
4
|
+
import { NotFound } from "../errors.ts";
|
|
5
|
+
import { SensitiveString } from "../sensitive.ts";
|
|
6
|
+
|
|
7
|
+
// Input Schema
|
|
8
|
+
export const DeleteCollectionInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
9
|
+
collectionName: Schema.String.pipe(T.PathParam()),
|
|
10
|
+
}).pipe(T.Http({ method: "DELETE", path: "/collections/{collectionName}" }));
|
|
11
|
+
export type DeleteCollectionInput = typeof DeleteCollectionInput.Type;
|
|
12
|
+
|
|
13
|
+
// Output Schema
|
|
14
|
+
export const DeleteCollectionOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
15
|
+
{
|
|
16
|
+
name: Schema.String,
|
|
17
|
+
fields: Schema.Array(
|
|
18
|
+
Schema.Struct({
|
|
19
|
+
name: Schema.String,
|
|
20
|
+
type: Schema.String,
|
|
21
|
+
optional: Schema.optional(Schema.Boolean),
|
|
22
|
+
facet: Schema.optional(Schema.Boolean),
|
|
23
|
+
index: Schema.optional(Schema.Boolean),
|
|
24
|
+
locale: Schema.optional(Schema.String),
|
|
25
|
+
sort: Schema.optional(Schema.Boolean),
|
|
26
|
+
infix: Schema.optional(Schema.Boolean),
|
|
27
|
+
reference: Schema.optional(Schema.String),
|
|
28
|
+
async_reference: Schema.optional(Schema.Boolean),
|
|
29
|
+
num_dim: Schema.optional(Schema.Number),
|
|
30
|
+
drop: Schema.optional(Schema.Boolean),
|
|
31
|
+
store: Schema.optional(Schema.Boolean),
|
|
32
|
+
vec_dist: Schema.optional(Schema.String),
|
|
33
|
+
range_index: Schema.optional(Schema.Boolean),
|
|
34
|
+
stem: Schema.optional(Schema.Boolean),
|
|
35
|
+
stem_dictionary: Schema.optional(Schema.String),
|
|
36
|
+
token_separators: Schema.optional(Schema.Array(Schema.String)),
|
|
37
|
+
symbols_to_index: Schema.optional(Schema.Array(Schema.String)),
|
|
38
|
+
embed: Schema.optional(
|
|
39
|
+
Schema.Struct({
|
|
40
|
+
from: Schema.Array(Schema.String),
|
|
41
|
+
model_config: Schema.Struct({
|
|
42
|
+
model_name: Schema.String,
|
|
43
|
+
api_key: Schema.optional(SensitiveString),
|
|
44
|
+
url: Schema.optional(Schema.String),
|
|
45
|
+
access_token: Schema.optional(SensitiveString),
|
|
46
|
+
refresh_token: Schema.optional(SensitiveString),
|
|
47
|
+
client_id: Schema.optional(Schema.String),
|
|
48
|
+
client_secret: Schema.optional(SensitiveString),
|
|
49
|
+
project_id: Schema.optional(Schema.String),
|
|
50
|
+
indexing_prefix: Schema.optional(Schema.String),
|
|
51
|
+
query_prefix: Schema.optional(Schema.String),
|
|
52
|
+
}),
|
|
53
|
+
}),
|
|
54
|
+
),
|
|
55
|
+
}),
|
|
56
|
+
),
|
|
57
|
+
default_sorting_field: Schema.optional(Schema.String),
|
|
58
|
+
token_separators: Schema.optional(Schema.Array(Schema.String)),
|
|
59
|
+
synonym_sets: Schema.optional(Schema.Array(Schema.String)),
|
|
60
|
+
enable_nested_fields: Schema.optional(Schema.Boolean),
|
|
61
|
+
symbols_to_index: Schema.optional(Schema.Array(Schema.String)),
|
|
62
|
+
voice_query_model: Schema.optional(
|
|
63
|
+
Schema.Struct({
|
|
64
|
+
model_name: Schema.optional(Schema.String),
|
|
65
|
+
}),
|
|
66
|
+
),
|
|
67
|
+
metadata: Schema.optional(Schema.Unknown),
|
|
68
|
+
num_documents: Schema.Number,
|
|
69
|
+
created_at: Schema.Number,
|
|
70
|
+
},
|
|
71
|
+
);
|
|
72
|
+
export type DeleteCollectionOutput = typeof DeleteCollectionOutput.Type;
|
|
73
|
+
|
|
74
|
+
// The operation
|
|
75
|
+
/**
|
|
76
|
+
* Delete a collection
|
|
77
|
+
*
|
|
78
|
+
* Permanently drops a collection. This action cannot be undone. For large collections, this might have an impact on read latencies.
|
|
79
|
+
*
|
|
80
|
+
* @param collectionName - The name of the collection to delete
|
|
81
|
+
*/
|
|
82
|
+
export const deleteCollection = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
83
|
+
inputSchema: DeleteCollectionInput,
|
|
84
|
+
outputSchema: DeleteCollectionOutput,
|
|
85
|
+
errors: [NotFound] as const,
|
|
86
|
+
}));
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client.ts";
|
|
3
|
+
import * as T from "../traits.ts";
|
|
4
|
+
import { NotFound } from "../errors.ts";
|
|
5
|
+
|
|
6
|
+
// Input Schema
|
|
7
|
+
export const DeleteConversationModelInput =
|
|
8
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
9
|
+
modelId: Schema.String.pipe(T.PathParam()),
|
|
10
|
+
}).pipe(
|
|
11
|
+
T.Http({ method: "DELETE", path: "/conversations/models/{modelId}" }),
|
|
12
|
+
);
|
|
13
|
+
export type DeleteConversationModelInput =
|
|
14
|
+
typeof DeleteConversationModelInput.Type;
|
|
15
|
+
|
|
16
|
+
// Output Schema
|
|
17
|
+
export const DeleteConversationModelOutput =
|
|
18
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
19
|
+
id: Schema.String,
|
|
20
|
+
});
|
|
21
|
+
export type DeleteConversationModelOutput =
|
|
22
|
+
typeof DeleteConversationModelOutput.Type;
|
|
23
|
+
|
|
24
|
+
// The operation
|
|
25
|
+
/**
|
|
26
|
+
* Delete a conversation model
|
|
27
|
+
*
|
|
28
|
+
* @param modelId - The id of the conversation model to delete
|
|
29
|
+
*/
|
|
30
|
+
export const deleteConversationModel = /*@__PURE__*/ /*#__PURE__*/ API.make(
|
|
31
|
+
() => ({
|
|
32
|
+
inputSchema: DeleteConversationModelInput,
|
|
33
|
+
outputSchema: DeleteConversationModelOutput,
|
|
34
|
+
errors: [NotFound] as const,
|
|
35
|
+
}),
|
|
36
|
+
);
|