@algolia/client-common
Advanced tools
Comparing version
@@ -402,2 +402,11 @@ type Cache = { | ||
} | ||
declare class IndexNotFoundError extends AlgoliaError { | ||
constructor(indexName: string); | ||
} | ||
declare class IndicesInSameAppError extends AlgoliaError { | ||
constructor(); | ||
} | ||
declare class IndexAlreadyExistsError extends AlgoliaError { | ||
constructor(indexName: string); | ||
} | ||
declare class ErrorWithStackTrace extends AlgoliaError { | ||
@@ -451,2 +460,2 @@ stackTrace: StackFrame[]; | ||
export { type AlgoliaAgent, type AlgoliaAgentOptions, AlgoliaError, ApiError, type AuthMode, type BrowserLocalStorageCacheItem, type BrowserLocalStorageOptions, type Cache, type CacheEvents, type ClientOptions, type CreateClientOptions, type CreateIterablePromise, DEFAULT_CONNECT_TIMEOUT_BROWSER, DEFAULT_CONNECT_TIMEOUT_NODE, DEFAULT_READ_TIMEOUT_BROWSER, DEFAULT_READ_TIMEOUT_NODE, DEFAULT_WRITE_TIMEOUT_BROWSER, DEFAULT_WRITE_TIMEOUT_NODE, DeserializationError, DetailedApiError, type DetailedError, type DetailedErrorWithMessage, type DetailedErrorWithTypeID, type EndRequest, ErrorWithStackTrace, type FallbackableCacheOptions, type GetAlgoliaAgent, type Headers, type Host, type IterableOptions, LogLevelEnum, type LogLevelType, type Logger, type MemoryCacheOptions, type Method, type QueryParameters, type Request, type RequestOptions, type Requester, type Response, RetryError, type StackFrame, type StatefulHost, type Timeouts, type Transporter, type TransporterOptions, createAlgoliaAgent, createAuth, createBrowserLocalStorageCache, createFallbackableCache, createIterablePromise, createMemoryCache, createNullCache, createNullLogger, createStatefulHost, createTransporter, deserializeFailure, deserializeSuccess, getAlgoliaAgent, isNetworkError, isRetryable, isSuccess, serializeData, serializeHeaders, serializeQueryParameters, serializeUrl, shuffle, stackFrameWithoutCredentials, stackTraceWithoutCredentials }; | ||
export { type AlgoliaAgent, type AlgoliaAgentOptions, AlgoliaError, ApiError, type AuthMode, type BrowserLocalStorageCacheItem, type BrowserLocalStorageOptions, type Cache, type CacheEvents, type ClientOptions, type CreateClientOptions, type CreateIterablePromise, DEFAULT_CONNECT_TIMEOUT_BROWSER, DEFAULT_CONNECT_TIMEOUT_NODE, DEFAULT_READ_TIMEOUT_BROWSER, DEFAULT_READ_TIMEOUT_NODE, DEFAULT_WRITE_TIMEOUT_BROWSER, DEFAULT_WRITE_TIMEOUT_NODE, DeserializationError, DetailedApiError, type DetailedError, type DetailedErrorWithMessage, type DetailedErrorWithTypeID, type EndRequest, ErrorWithStackTrace, type FallbackableCacheOptions, type GetAlgoliaAgent, type Headers, type Host, IndexAlreadyExistsError, IndexNotFoundError, IndicesInSameAppError, type IterableOptions, LogLevelEnum, type LogLevelType, type Logger, type MemoryCacheOptions, type Method, type QueryParameters, type Request, type RequestOptions, type Requester, type Response, RetryError, type StackFrame, type StatefulHost, type Timeouts, type Transporter, type TransporterOptions, createAlgoliaAgent, createAuth, createBrowserLocalStorageCache, createFallbackableCache, createIterablePromise, createMemoryCache, createNullCache, createNullLogger, createStatefulHost, createTransporter, deserializeFailure, deserializeSuccess, getAlgoliaAgent, isNetworkError, isRetryable, isSuccess, serializeData, serializeHeaders, serializeQueryParameters, serializeUrl, shuffle, stackFrameWithoutCredentials, stackTraceWithoutCredentials }; |
@@ -281,2 +281,17 @@ // src/cache/createBrowserLocalStorageCache.ts | ||
}; | ||
var IndexNotFoundError = class extends AlgoliaError { | ||
constructor(indexName) { | ||
super(`${indexName} does not exist`, "IndexNotFoundError"); | ||
} | ||
}; | ||
var IndicesInSameAppError = class extends AlgoliaError { | ||
constructor() { | ||
super("Indices are in the same application. Use operationIndex instead.", "IndicesInSameAppError"); | ||
} | ||
}; | ||
var IndexAlreadyExistsError = class extends AlgoliaError { | ||
constructor(indexName) { | ||
super(`${indexName} index already exists.`, "IndexAlreadyExistsError"); | ||
} | ||
}; | ||
var ErrorWithStackTrace = class extends AlgoliaError { | ||
@@ -601,2 +616,5 @@ stackTrace; | ||
ErrorWithStackTrace, | ||
IndexAlreadyExistsError, | ||
IndexNotFoundError, | ||
IndicesInSameAppError, | ||
LogLevelEnum, | ||
@@ -603,0 +621,0 @@ RetryError, |
{ | ||
"name": "@algolia/client-common", | ||
"version": "5.23.4", | ||
"version": "5.24.0", | ||
"description": "Common package for the Algolia JavaScript API client.", | ||
@@ -39,9 +39,9 @@ "repository": { | ||
"@arethetypeswrong/cli": "0.17.4", | ||
"@types/node": "22.14.1", | ||
"@types/node": "22.15.3", | ||
"jsdom": "26.1.0", | ||
"publint": "0.3.11", | ||
"publint": "0.3.12", | ||
"ts-node": "10.9.2", | ||
"tsup": "8.4.0", | ||
"typescript": "5.8.3", | ||
"vitest": "3.1.1" | ||
"vitest": "3.1.2" | ||
}, | ||
@@ -48,0 +48,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
162323
2.32%1760
2.8%