@gomomento/sdk-core 1.115.0 → 1.116.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.
@@ -1,7 +1,7 @@
1
1
  import { CreateCache, DeleteCache, ListCaches, CacheFlush, CacheGet, CacheSet, CacheDelete, CacheIncrement, IncrementOptions, CacheSetIfNotExists, SetIfNotExistsOptions, SetIfAbsentOptions, SetIfPresentOptions, SetIfEqualOptions, SetIfNotEqualOptions, SetIfPresentAndNotEqualOptions, SetIfAbsentOrEqualOptions, SetIfPresentAndHashEqualOptions, SetIfPresentAndHashNotEqualOptions, SetIfAbsentOrHashEqualOptions, SetIfAbsentOrHashNotEqualOptions, CacheSetFetch, CacheSetAddElement, CacheSetAddElements, CacheSetContainsElement, CacheSetContainsElements, CacheSetRemoveElement, CacheSetRemoveElements, CacheListFetch, CacheListLength, CacheListPushFront, CacheListPushBack, CacheListConcatenateBack, CacheListConcatenateFront, CacheListPopBack, CacheListPopFront, CacheListRemoveValue, CacheListRetain, CacheDictionarySetField, CacheDictionarySetFields, CacheDictionaryGetField, CacheDictionaryGetFields, CacheDictionaryIncrement, CacheDictionaryFetch, CacheDictionaryRemoveField, CacheDictionaryRemoveFields, CacheDictionaryLength, CacheSortedSetFetch, CacheSortedSetPutElement, CacheSortedSetPutElements, CacheSortedSetGetRank, CacheSortedSetGetScore, CacheSortedSetGetScores, CacheSortedSetIncrementScore, CacheSortedSetRemoveElement, CacheSortedSetRemoveElements, CacheSortedSetLength, CacheSortedSetLengthByScore, CacheSortedSetUnionStore, CacheItemGetTtl, CacheItemGetType, CacheKeyExists, CacheKeysExist, CacheUpdateTtl, CacheIncreaseTtl, CacheDecreaseTtl, CacheGetBatch, CacheSetBatch, CacheSetIfAbsent, CacheSetIfPresent, CacheSetIfEqual, CacheSetIfNotEqual, CacheSetIfPresentAndNotEqual, CacheSetIfAbsentOrEqual, CacheSetSample, CacheSetPop, CacheSetLength, CacheGetWithHash, CacheSetWithHash, CacheSetIfPresentAndHashEqual, CacheSetIfPresentAndHashNotEqual, CacheSetIfAbsentOrHashEqual, CacheSetIfAbsentOrHashNotEqual } from '../../../index';
2
2
  import { ListFetchCallOptions, ListRetainCallOptions, SetBatchItem, SortedSetSource } from '../../../utils';
3
- import { ICacheClient, SetOptions, SetAddElementOptions, SetAddElementsOptions, ListPushFrontOptions, ListPushBackOptions, ListConcatenateBackOptions, ListConcatenateFrontOptions, DictionarySetFieldOptions, DictionarySetFieldsOptions, DictionaryIncrementOptions, SortedSetFetchByRankOptions, SortedSetPutElementOptions, SortedSetPutElementsOptions, SortedSetFetchByScoreOptions, SortedSetGetRankOptions, SortedSetIncrementOptions, SortedSetLengthByScoreOptions, SortedSetUnionStoreOptions, SetBatchOptions, GetOptions, GetBatchOptions, GetWithHashOptions, SetWithHashOptions } from '../../../clients/ICacheClient';
4
- import { IControlClient } from './IControlClient';
3
+ import { ICacheClient, SetOptions, SetAddElementOptions, SetAddElementsOptions, ListPushFrontOptions, ListPushBackOptions, ListConcatenateBackOptions, ListConcatenateFrontOptions, DictionarySetFieldOptions, DictionarySetFieldsOptions, DictionaryIncrementOptions, SortedSetFetchByRankOptions, SortedSetPutElementOptions, SortedSetPutElementsOptions, SortedSetFetchByScoreOptions, SortedSetGetRankOptions, SortedSetIncrementOptions, SortedSetLengthByScoreOptions, SortedSetUnionStoreOptions, SetBatchOptions, GetOptions, GetBatchOptions, GetWithHashOptions, SetWithHashOptions, SetFetchOptions, DeleteOptions, ListLengthOptions, ListPopBackOptions, ListPopFrontOptions, ListRemoveValueOptions, SetContainsElementsOptions, SetRemoveElementsOptions, SetSampleOptions, SetPopOptions, SetLengthOptions, DictionaryFetchOptions, DictionaryGetFieldOptions, DictionaryRemoveFieldOptions, DictionaryLengthOptions, SortedSetGetScoreOptions, SortedSetRemoveElementOptions, SortedSetLengthOptions, ItemGetTypeOptions, ItemGetTtlOptions, KeyExistsOptions, UpdateTtlOptions, IncreaseTtlOptions, DecreaseTtlOptions } from '../../../clients/ICacheClient';
4
+ import { ControlCallOptions, IControlClient } from './IControlClient';
5
5
  import { IDataClient } from './IDataClient';
6
6
  import { IPingClient } from './IPingClient';
7
7
  import { IMomentoCache } from '../../../clients/IMomentoCache';
@@ -25,7 +25,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
25
25
  * {@link CreateCache.AlreadyExists} if the cache already exists.
26
26
  * {@link CreateCache.Error} on failure.
27
27
  */
28
- createCache(cacheName: string): Promise<CreateCache.Response>;
28
+ createCache(cacheName: string, options?: ControlCallOptions): Promise<CreateCache.Response>;
29
29
  /**
30
30
  * Deletes a cache and all items stored in it.
31
31
  *
@@ -34,7 +34,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
34
34
  * {@link DeleteCache.Success} on success.
35
35
  * {@link DeleteCache.Error} on failure.
36
36
  */
37
- deleteCache(cacheName: string): Promise<DeleteCache.Response>;
37
+ deleteCache(cacheName: string, options?: ControlCallOptions): Promise<DeleteCache.Response>;
38
38
  /**
39
39
  * Lists all caches.
40
40
  *
@@ -42,7 +42,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
42
42
  * {@link ListCaches.Success} containing the list on success.
43
43
  * {@link ListCaches.Error} on failure.
44
44
  */
45
- listCaches(): Promise<ListCaches.Response>;
45
+ listCaches(options?: ControlCallOptions): Promise<ListCaches.Response>;
46
46
  /**
47
47
  * Gets the value stored for the given key.
48
48
  *
@@ -51,6 +51,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
51
51
  * @param {GetOptions} [options]
52
52
  * @param {decompress} [options.decompress=false] - Whether to decompress the value. Overrides the client-wide
53
53
  * automatic decompression setting.
54
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
54
55
  * @returns {Promise<CacheGet.Response>} -
55
56
  * {@link CacheGet.Hit} containing the value if one is found.
56
57
  * {@link CacheGet.Miss} if the key does not exist.
@@ -65,6 +66,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
65
66
  * @param {GetOptions} [options]
66
67
  * @param {decompress} [options.decompress=false] - Whether to decompress the value. Overrides the client-wide
67
68
  * automatic decompression setting.
69
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
68
70
  * @returns {Promise<CacheGet.Response>} -
69
71
  * {@link CacheGetWithHash.Hit} containing the value and hash if one is found.
70
72
  * {@link CacheGetWithHash.Miss} if the key does not exist.
@@ -80,6 +82,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
80
82
  * @param {string | Uint8Array} value - The value to be stored.
81
83
  * @param {SetOptions} [options]
82
84
  * @param {number} [options.ttl] - The time to live for the item in the cache.
85
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
83
86
  * Uses the client's default TTL if this is not supplied.
84
87
  * @param {boolean} [options.compress=false] - Whether to compress the value. Defaults to false.
85
88
  * @returns {Promise<CacheSet.Response>} -
@@ -94,10 +97,11 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
94
97
  * @param {string} cacheName - The cache to store the value in.
95
98
  * @param {string | Uint8Array} key - The key to set.
96
99
  * @param {string | Uint8Array} value - The value to be stored.
97
- * @param {SetOptions} [options]
100
+ * @param {SetWithHashOptions} [options]
98
101
  * @param {number} [options.ttl] - The time to live for the item in the cache.
99
102
  * Uses the client's default TTL if this is not supplied.
100
103
  * @param {boolean} [options.compress=false] - Whether to compress the value. Defaults to false.
104
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
101
105
  * @returns {Promise<CacheSet.Response>} -
102
106
  * {@link CacheSetWithHash.Stored} on success containing the hash of the value stored.
103
107
  * {@link CacheSetWithHash.NotStored} on not storing the new value.
@@ -110,11 +114,13 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
110
114
  *
111
115
  * @param {string} cacheName - The cache to delete from.
112
116
  * @param {string | Uint8Array} key - The key to delete.
117
+ * @param {DeleteOptions} options
118
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
113
119
  * @returns {Promise<CacheDelete.Response>} -
114
120
  * {@link CacheDelete.Success} on success.
115
121
  * {@link CacheDelete.Error} on failure.
116
122
  */
117
- delete(cacheName: string, key: string | Uint8Array): Promise<CacheDelete.Response>;
123
+ delete(cacheName: string, key: string | Uint8Array, options?: DeleteOptions): Promise<CacheDelete.Response>;
118
124
  /**
119
125
  * Gets the value stored for the given keys.
120
126
  *
@@ -123,6 +129,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
123
129
  * @param {GetBatchOptions} [options]
124
130
  * @param {decompress} [options.decompress=false] - Whether to decompress the value. Overrides the client-wide
125
131
  * automatic decompression setting.
132
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
126
133
  * @returns {Promise<CacheGetBatch.Response>} -
127
134
  * {@link CacheGetBatch.Success} containing the values if they were found.
128
135
  * {@link CacheGetBatch.Error} on failure.
@@ -138,6 +145,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
138
145
  * @param {number} [options.ttl] - The time to live for the items in the cache.
139
146
  * Uses the client's default TTL if this is not supplied.
140
147
  * @param {boolean} [options.compress=false] - Whether to compress the value. Defaults to false.
148
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
141
149
  * @returns {Promise<CacheSetBatch.Response>} -
142
150
  * {@link CacheSetBatch.Success} on success.
143
151
  * {@link CacheSetBatch.Error} on failure.
@@ -156,6 +164,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
156
164
  * @param {CollectionTtl} [options.ttl] - How the TTL should be managed.
157
165
  * Refreshes the list's TTL using the client's default if this is not
158
166
  * supplied.
167
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
159
168
  * @returns {Promise<CacheListConcatenateBack.Response>} -
160
169
  * {@link CacheListConcatenateBack.Success} on success.
161
170
  * {@link CacheListConcatenateBack.Error} on failure.
@@ -174,6 +183,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
174
183
  * @param {CollectionTtl} [options.ttl] - How the TTL should be managed.
175
184
  * Refreshes the list's TTL using the client's default if this is not
176
185
  * supplied.
186
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
177
187
  * @returns {Promise<CacheListConcatenateFront.Response>} -
178
188
  * {@link CacheListConcatenateFront.Success} on success.
179
189
  * {@link CacheListConcatenateFront.Error} on failure.
@@ -187,6 +197,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
187
197
  * @param {ListFetchCallOptions} [options]
188
198
  * @param {number} [options.startIndex] - Start inclusive index for fetch operation.
189
199
  * @param {number} [options.endIndex] - End exclusive index for fetch operation.
200
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
190
201
  * @returns {Promise<CacheListFetch.Response>} -
191
202
  * {@link CacheListFetch.Hit} containing the list elements if the list exists.
192
203
  * {@link CacheListFetch.Miss} if the list does not exist.
@@ -198,34 +209,40 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
198
209
  *
199
210
  * @param {string} cacheName - The cache containing the list.
200
211
  * @param {string} listName - The list to get the length of.
212
+ * @param {ListLengthOptions} options
213
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
201
214
  * @returns {Promise<CacheListLength.Response>} -
202
215
  * {@link CacheListLength.Hit} containing the length if the list exists.
203
216
  * {@link CacheListLength.Miss} if the list does not exist.
204
217
  * {@link CacheListLength.Error} on failure.
205
218
  */
206
- listLength(cacheName: string, listName: string): Promise<CacheListLength.Response>;
219
+ listLength(cacheName: string, listName: string, options?: ListLengthOptions): Promise<CacheListLength.Response>;
207
220
  /**
208
221
  * Gets and removes the last value from the given list.
209
222
  *
210
223
  * @param {string} cacheName - The cache containing the list.
211
224
  * @param {string} listName - The list to pop.
225
+ * @param {ListPopBackOptions} options
226
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
212
227
  * @returns {Promise<CacheListPopBack.Response>} -
213
228
  * {@link CacheListPopBack.Hit} containing the element if the list exists.
214
229
  * {@link CacheListPopBack.Miss} if the list does not exist.
215
230
  * {@link CacheListPopBack.Error} on failure.
216
231
  */
217
- listPopBack(cacheName: string, listName: string): Promise<CacheListPopBack.Response>;
232
+ listPopBack(cacheName: string, listName: string, options?: ListPopBackOptions): Promise<CacheListPopBack.Response>;
218
233
  /**
219
234
  * Gets and removes the first value from the given list.
220
235
  *
221
236
  * @param {string} cacheName - The cache containing the list.
222
237
  * @param {string} listName - The list to pop.
238
+ * @param {ListPopFrontOptions} options
239
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
223
240
  * @returns {Promise<CacheListPopFront.Response>} -
224
241
  * {@link CacheListPopFront.Hit} containing the element if the list exists.
225
242
  * {@link CacheListPopFront.Miss} if the list does not exist.
226
243
  * {@link CacheListPopFront.Error} on failure.
227
244
  */
228
- listPopFront(cacheName: string, listName: string): Promise<CacheListPopFront.Response>;
245
+ listPopFront(cacheName: string, listName: string, options?: ListPopFrontOptions): Promise<CacheListPopFront.Response>;
229
246
  /**
230
247
  * Adds an element to the back of the given list. Creates the list if
231
248
  * it does not already exist.
@@ -239,6 +256,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
239
256
  * @param {CollectionTtl} [options.ttl] - How the TTL should be managed.
240
257
  * Refreshes the list's TTL using the client's default if this is not
241
258
  * supplied.
259
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
242
260
  * @returns {Promise<CacheListPushBack.Response>} -
243
261
  * {@link CacheListPushBack.Success} containing the list's new length on
244
262
  * success.
@@ -258,6 +276,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
258
276
  * @param {CollectionTtl} [options.ttl] - How the TTL should be managed.
259
277
  * Refreshes the list's TTL using the client's default if this is not
260
278
  * supplied.
279
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
261
280
  * @returns {Promise<CacheListPushFront.Response>} -
262
281
  * {@link CacheListPushFront.Success} containing the list's new length on
263
282
  * success.
@@ -270,13 +289,15 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
270
289
  * @param {string} cacheName - The cache containing the list.
271
290
  * @param {string} listName - The list to remove from.
272
291
  * @param {string | Uint8Array} value - The value to remove.
292
+ * @param {ListRemoveValueOptions} options
293
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
273
294
  * @returns {Promise<CacheListRemoveValue.Response>} -
274
295
  * {@link CacheListRemoveValue.Success} on success. Removing an element that
275
296
  * does not occur in the list or removing from a non-existent list counts as a
276
297
  * success.
277
298
  * {@link CacheListRemoveValue.Error} on failure.
278
299
  */
279
- listRemoveValue(cacheName: string, listName: string, value: string | Uint8Array): Promise<CacheListRemoveValue.Response>;
300
+ listRemoveValue(cacheName: string, listName: string, value: string | Uint8Array, options?: ListRemoveValueOptions): Promise<CacheListRemoveValue.Response>;
280
301
  /**
281
302
  * Retains slice of elements of a given list, deletes the rest of the list
282
303
  * that isn't being retained. Returns a Success or Error.
@@ -291,6 +312,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
291
312
  * @param {CollectionTtl} [options.ttl] - How the TTL should be managed.
292
313
  * Refreshes the list's TTL using the client's default if this is not
293
314
  * supplied.
315
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
294
316
  * @returns {Promise<CacheListRetain.Response>} -
295
317
  * {@link CacheListRetain.Success} on success.
296
318
  * {@link CacheListRetain.Error} on failure.
@@ -301,12 +323,14 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
301
323
  *
302
324
  * @param {string} cacheName - The cache containing the set.
303
325
  * @param {string} setName - The set to fetch.
326
+ * @param {SetFetchOptions} options
327
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
304
328
  * @returns {Promise<CacheSetFetch.Response>} -
305
329
  * {@link CacheSetFetch.Hit} containing the set elements if the set exists.
306
330
  * {@link CacheSetFetch.Miss} if the set does not exist.
307
331
  * {@link CacheSetFetch.Error} on failure.
308
332
  */
309
- setFetch(cacheName: string, setName: string): Promise<CacheSetFetch.Response>;
333
+ setFetch(cacheName: string, setName: string, options?: SetFetchOptions): Promise<CacheSetFetch.Response>;
310
334
  /**
311
335
  * Adds an element to the given set. Creates the set if it does not already
312
336
  * exist.
@@ -321,6 +345,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
321
345
  * @param {SetAddElementOptions} options
322
346
  * @param {CollectionTtl} [options.ttl] - How the TTL should be managed.
323
347
  * Refreshes the set's TTL using the client's default if this is not supplied.
348
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
324
349
  * @returns {Promise<CacheSetAddElement.Response>} -
325
350
  * {@link CacheSetAddElement.Success} on success.
326
351
  * {@link CacheSetAddElement.Error} on failure.
@@ -340,6 +365,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
340
365
  * @param {SetAddElementsOptions} options
341
366
  * @param {CollectionTtl} [options.ttl] - How the TTL should be managed.
342
367
  * Refreshes the set's TTL using the client's default if this is not supplied.
368
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
343
369
  * @returns {Promise<CacheSetAddElements.Response>} -
344
370
  * {@link CacheSetAddElements.Success} on success.
345
371
  * {@link CacheSetAddElements.Error} on failure.
@@ -350,49 +376,57 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
350
376
  * @param cacheName - The cache containing the set.
351
377
  * @param setName - The set to check.
352
378
  * @param element - The element to check for.
379
+ * @param {SetContainsElementsOptions} options
380
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
353
381
  * @returns {Promise<CacheSetContainsElement.Response>} -
354
382
  * {@link CacheSetContainsElement.Hit} if the set exists and contains the element.
355
383
  * {@link CacheSetContainsElement.Miss} if the set does not contain the element.
356
384
  * {@link CacheSetContainsElement.Error} on failure.
357
385
  */
358
- setContainsElement(cacheName: string, setName: string, element: string | Uint8Array): Promise<CacheSetContainsElement.Response>;
386
+ setContainsElement(cacheName: string, setName: string, element: string | Uint8Array, options?: SetContainsElementsOptions): Promise<CacheSetContainsElement.Response>;
359
387
  /**
360
388
  * Tests if the given set contains the given elements.
361
389
  * @param cacheName - The cache containing the set.
362
390
  * @param setName - The set to check.
363
391
  * @param elements - The elements to check for.
392
+ * @param {SetContainsElementsOptions} options
393
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
364
394
  * @returns {Promise<CacheSetContainsElements.Response>} -
365
395
  * {@link CacheSetContainsElements.Hit} containing the elements to their presence in the cache.
366
396
  * {@link CacheSetContainsElements.Miss} if the set does not contain the elements.
367
397
  * {@link CacheSetContainsElements.Error} on failure.
368
398
  */
369
- setContainsElements(cacheName: string, setName: string, elements: string[] | Uint8Array[]): Promise<CacheSetContainsElements.Response>;
399
+ setContainsElements(cacheName: string, setName: string, elements: string[] | Uint8Array[], options?: SetContainsElementsOptions): Promise<CacheSetContainsElements.Response>;
370
400
  /**
371
401
  * Removes an element from the given set.
372
402
  *
373
403
  * @param {string} cacheName - The cache containing the set.
374
404
  * @param {string} setName - The set to remove from.
375
405
  * @param {string | Uint8Array} element - The element to remove.
406
+ * @param {SetRemoveElementsOptions} options
407
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
376
408
  * @returns {Promise<CacheSetRemoveElement.Response>} -
377
409
  * {@link CacheSetRemoveElement.Success} on success. Removing an element that
378
410
  * does not occur in the set or removing from a non-existent set counts as a
379
411
  * success.
380
412
  * {@link CacheSetRemoveElement.Error} on failure.
381
413
  */
382
- setRemoveElement(cacheName: string, setName: string, element: string | Uint8Array): Promise<CacheSetRemoveElement.Response>;
414
+ setRemoveElement(cacheName: string, setName: string, element: string | Uint8Array, options?: SetRemoveElementsOptions): Promise<CacheSetRemoveElement.Response>;
383
415
  /**
384
416
  * Removes multiple elements from the given set.
385
417
  *
386
418
  * @param {string} cacheName - The cache containing the set.
387
419
  * @param {string} setName - The set to remove from.
388
420
  * @param {string[] | Uint8Array[]} elements - The elements to remove.
421
+ * @param {SetRemoveElementsOptions} options
422
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
389
423
  * @returns {Promise<CacheSetRemoveElements.Response>} -
390
424
  * {@link CacheSetRemoveElements.Success} on success. Removing elements that
391
425
  * do not occur in the set or removing from a non-existent set counts as a
392
426
  * success.
393
427
  * {@link CacheSetRemoveElements.Error} on failure.
394
428
  */
395
- setRemoveElements(cacheName: string, setName: string, elements: string[] | Uint8Array[]): Promise<CacheSetRemoveElements.Response>;
429
+ setRemoveElements(cacheName: string, setName: string, elements: string[] | Uint8Array[], options?: SetRemoveElementsOptions): Promise<CacheSetRemoveElements.Response>;
396
430
  /**
397
431
  * Fetch a random sample of elements from the set.
398
432
  * Returns a different random sample for each call.
@@ -401,36 +435,42 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
401
435
  * @param {string} setName - The set to remove from.
402
436
  * @param {number} limit - The maximum number of elements to return.
403
437
  * If the set contains fewer than 'limit' elements, the entire set will be returned.
438
+ * @param {SetSampleOptions} options
439
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
404
440
  * @returns {Promise<CacheSetSample.Response>} -
405
441
  * {@link CacheSetSample.Hit} containing the set elements if the set exists.
406
442
  * {@link CacheSetSample.Miss} if the set does not exist.
407
443
  * {@link CacheSetSample.Error} on failure.
408
444
  */
409
- setSample(cacheName: string, setName: string, limit: number): Promise<CacheSetSample.Response>;
445
+ setSample(cacheName: string, setName: string, limit: number, options?: SetSampleOptions): Promise<CacheSetSample.Response>;
410
446
  /**
411
447
  * Pops a random sample of elements from the set.
412
448
  *
413
449
  * @param {string} cacheName - The cache containing the set.
414
450
  * @param {string} setName - The set to remove from.
415
451
  * @param {number} count - The maximum number of elements to return.
452
+ * @param {SetPopOptions} options
453
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
416
454
  * If the set contains fewer than 'limit' elements, the entire set will be returned.
417
455
  * @returns {Promise<CacheSetPop.Response>} -
418
456
  * {@link CacheSetPop.Hit} containing the set elements if the set exists.
419
457
  * {@link CacheSetPop.Miss} if the set does not exist.
420
458
  * {@link CacheSetPop.Error} on failure.
421
459
  */
422
- setPop(cacheName: string, setName: string, count: number): Promise<CacheSetPop.Response>;
460
+ setPop(cacheName: string, setName: string, count: number, options?: SetPopOptions): Promise<CacheSetPop.Response>;
423
461
  /**
424
462
  * Get the number of elements in the set.
425
463
  *
426
464
  * @param {string} cacheName - The cache containing the set.
427
465
  * @param {string} setName - The set to remove from.
466
+ * @param {SetLengthOptions} options
467
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
428
468
  * @returns {Promise<CacheSetLength.Response>} -
429
469
  * {@link CacheSetLength.Hit} containing the set elements if the set exists.
430
470
  * {@link CacheSetLength.Miss} if the set does not exist.
431
471
  * {@link CacheSetLength.Error} on failure.
432
472
  */
433
- setLength(cacheName: string, setName: string): Promise<CacheSetLength.Response>;
473
+ setLength(cacheName: string, setName: string, options?: SetLengthOptions): Promise<CacheSetLength.Response>;
434
474
  /**
435
475
  * Associates the given key with the given value if key is not already present in the cache.
436
476
  *
@@ -440,6 +480,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
440
480
  * @param {string | Uint8Array} field - The value to be stored.
441
481
  * @param {SetIfNotExistsOptions} [options]
442
482
  * @param {number} [options.ttl] - The time to live for the item in the cache.
483
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
443
484
  * Uses the client's default TTL if this is not supplied.
444
485
  * @returns {Promise<CacheSetIfNotExists.Response>} -
445
486
  * {@link CacheSetIfNotExists.Stored} on storing the new value.
@@ -455,6 +496,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
455
496
  * @param {string | Uint8Array} field - The value to be stored.
456
497
  * @param {SetIfAbsentOptions} [options]
457
498
  * @param {number} [options.ttl] - The time to live for the item in the cache.
499
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
458
500
  * Uses the client's default TTL if this is not supplied.
459
501
  * @param {boolean} [options.compress=false] - Whether to compress the value. Defaults to false.
460
502
  * @returns {Promise<CacheSetIfAbsent.Response>} -
@@ -471,6 +513,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
471
513
  * @param {string | Uint8Array} field - The value to be stored.
472
514
  * @param {SetIfPresentOptions} [options]
473
515
  * @param {number} [options.ttl] - The time to live for the item in the cache.
516
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
474
517
  * Uses the client's default TTL if this is not supplied.
475
518
  * @returns {Promise<CacheSetIfPresent.Response>} -
476
519
  * {@link CacheSetIfPresent.Stored} on storing the new value.
@@ -488,6 +531,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
488
531
  * @param {string | Uint8Array} equal - The value to compare to the cached value.
489
532
  * @param {SetIfEqualOptions} [options]
490
533
  * @param {number} [options.ttl] - The time to live for the item in the cache.
534
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
491
535
  * Uses the client's default TTL if this is not supplied.
492
536
  * @returns {Promise<CacheSetIfEqual.Response>} -
493
537
  * {@link CacheSetIfEqual.Stored} on storing the new value.
@@ -506,6 +550,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
506
550
  * @param {SetIfNotEqualOptions} [options]
507
551
  * @param {number} [options.ttl] - The time to live for the item in the cache.
508
552
  * Uses the client's default TTL if this is not supplied.
553
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
509
554
  * @returns {Promise<CacheSetIfNotEqual.Response>} -
510
555
  * {@link CacheSetIfNotEqual.Stored} on storing the new value.
511
556
  * {@link CacheSetIfNotEqual.NotStored} on not storing the new value.
@@ -523,6 +568,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
523
568
  * @param {SetIfAbsentOptions} [options]
524
569
  * @param {number} [options.ttl] - The time to live for the item in the cache.
525
570
  * Uses the client's default TTL if this is not supplied.
571
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
526
572
  * @returns {Promise<CacheSetIfPresentAndNotEqual.Response>} -
527
573
  * {@link CacheSetIfPresentAndNotEqual.Stored} on storing the new value.
528
574
  * {@link CacheSetIfPresentAndNotEqual.NotStored} on not storing the new value.
@@ -540,6 +586,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
540
586
  * @param {SetIfAbsentOrEqualOptions} [options]
541
587
  * @param {number} [options.ttl] - The time to live for the item in the cache.
542
588
  * Uses the client's default TTL if this is not supplied.
589
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
543
590
  * @returns {Promise<CacheSetIfAbsentOrEqual.Response>} -
544
591
  * {@link CacheSetIfAbsentOrEqual.Stored} on storing the new value.
545
592
  * {@link CacheSetIfAbsentOrEqual.NotStored} on not storing the new value.
@@ -556,6 +603,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
556
603
  * @param {Uint8Array} hashEqual - The hash to compare to the cached hash.
557
604
  * @param {SetIfPresentAndHashEqualOptions} [options]
558
605
  * @param {number} [options.ttl] - The time to live for the item in the cache.
606
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
559
607
  * Uses the client's default TTL if this is not supplied.
560
608
  * @returns {Promise<CacheSetIfPresentAndHashEqual.Response>} -
561
609
  * {@link CacheSetIfPresentAndHashEqual.Stored} on storing the new value.
@@ -574,6 +622,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
574
622
  * @param {SetIfPresentAndHashNotEqualOptions} [options]
575
623
  * @param {number} [options.ttl] - The time to live for the item in the cache.
576
624
  * Uses the client's default TTL if this is not supplied.
625
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
577
626
  * @returns {Promise<CacheSetIfPresentAndHashNotEqual.Response>} -
578
627
  * {@link CacheSetIfPresentAndHashNotEqual.Stored} on storing the new value.
579
628
  * {@link CacheSetIfPresentAndHashNotEqual.NotStored} on not storing the new value.
@@ -591,6 +640,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
591
640
  * @param {setIfAbsentOrHashEqualOptions} [options]
592
641
  * @param {number} [options.ttl] - The time to live for the item in the cache.
593
642
  * Uses the client's default TTL if this is not supplied.
643
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
594
644
  * @returns {Promise<CacheSetIfAbsentOrHashEqual.Response>} -
595
645
  * {@link CacheSetIfAbsentOrHashEqual.Stored} on storing the new value.
596
646
  * {@link CacheSetIfAbsentOrHashEqual.NotStored} on not storing the new value.
@@ -607,6 +657,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
607
657
  * @param {string | Uint8Array} hashNotEqual - The value to compare to the cached value.
608
658
  * @param {SetIfAbsentOrHashNotEqualOptions} [options]
609
659
  * @param {number} [options.ttl] - The time to live for the item in the cache.
660
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
610
661
  * Uses the client's default TTL if this is not supplied.
611
662
  * @returns {Promise<CacheSetIfAbsentOrHashNotEqual.Response>} -
612
663
  * {@link CacheSetIfAbsentOrHashNotEqual.Stored} on storing the new value.
@@ -622,19 +673,21 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
622
673
  * {@link CacheFlush.Success} on success.
623
674
  * {@link CacheFlush.Error} on failure.
624
675
  */
625
- flushCache(cacheName: string): Promise<CacheFlush.Response>;
676
+ flushCache(cacheName: string, options?: ControlCallOptions): Promise<CacheFlush.Response>;
626
677
  /**
627
678
  * Fetches all elements of the given dictionary.
628
679
  *
629
680
  * @param {string} cacheName - The cache to perform the lookup in.
630
681
  * @param {string} dictionaryName - The dictionary to fetch.
682
+ * @param {DictionaryFetchOptions} options
683
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
631
684
  * @returns {Promise<CacheDictionaryFetch.Response>} -
632
685
  * {@link CacheDictionaryFetch.Hit} containing the dictionary elements if the
633
686
  * dictionary exists.
634
687
  * {@link CacheDictionaryFetch.Miss} if the dictionary does not exist.
635
688
  * {@link CacheDictionaryFetch.Error} on failure.
636
689
  */
637
- dictionaryFetch(cacheName: string, dictionaryName: string): Promise<CacheDictionaryFetch.Response>;
690
+ dictionaryFetch(cacheName: string, dictionaryName: string, options?: DictionaryFetchOptions): Promise<CacheDictionaryFetch.Response>;
638
691
  /**
639
692
  * Adds an integer quantity to a field value.
640
693
  *
@@ -647,6 +700,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
647
700
  * negative, or zero. Defaults to 1.
648
701
  * @param {IncrementOptions} options
649
702
  * @param {CollectionTtl} [options.ttl] - How the TTL should be managed.
703
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
650
704
  * @returns {Promise<CacheIncrement>} -
651
705
  * {@link CacheIncrement.Success} containing the incremented value
652
706
  * on success.
@@ -667,6 +721,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
667
721
  * @param {CollectionTtl} [options.ttl] - How the TTL should be managed.
668
722
  * Refreshes the dictionary's TTL using the client's default if this is not
669
723
  * supplied.
724
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
670
725
  * @returns {Promise<CacheDictionarySetField.Response>} -
671
726
  * {@link CacheDictionarySetField.Success} on success.
672
727
  * {@link CacheDictionarySetField.Error} on failure.
@@ -684,6 +739,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
684
739
  * @param {CollectionTtl} [options.ttl] - How the TTL should be managed.
685
740
  * Refreshes the dictionary's TTL using the client's default if this is not
686
741
  * supplied.
742
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
687
743
  * @returns {Promise<CacheDictionarySetFields.Response>} -
688
744
  * {@link CacheDictionarySetFields.Success} on success.
689
745
  * {@link CacheDictionarySetFields.Error} on failure.
@@ -695,26 +751,30 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
695
751
  * @param {string} cacheName - The cache containing the dictionary.
696
752
  * @param {string} dictionaryName - The dictionary to look up.
697
753
  * @param {string | Uint8Array} field - The field to look up.
754
+ * @param {DictionaryGetFieldOptions} options
755
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
698
756
  * @returns {Promise<CacheDictionaryGetField.Response>} -
699
757
  * {@link CacheDictionaryGetField.Hit} containing the dictionary element if
700
758
  * one is found.
701
759
  * {@link CacheDictionaryGetField.Miss} if the dictionary does not exist.
702
760
  * {@link CacheDictionaryGetField.Error} on failure.
703
761
  */
704
- dictionaryGetField(cacheName: string, dictionaryName: string, field: string | Uint8Array): Promise<CacheDictionaryGetField.Response>;
762
+ dictionaryGetField(cacheName: string, dictionaryName: string, field: string | Uint8Array, options?: DictionaryGetFieldOptions): Promise<CacheDictionaryGetField.Response>;
705
763
  /**
706
764
  * Gets multiple values from the given dictionary.
707
765
  *
708
766
  * @param {string} cacheName - The cache containing the dictionary.
709
767
  * @param {string} dictionaryName - The dictionary to look up.
710
768
  * @param {string[] | Uint8Array[]} fields - The fields to look up.
769
+ * @param {DictionaryGetFieldOptions} options
770
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
711
771
  * @returns {Promise<CacheDictionaryGetFields.Response>} -
712
772
  * {@link CacheDictionaryGetFields.Hit} containing the dictionary elements if
713
773
  * the dictionary exists.
714
774
  * {@link CacheDictionaryGetFields.Miss} if the dictionary does not exist.
715
775
  * {@link CacheDictionaryGetFields.Error} on failure.
716
776
  */
717
- dictionaryGetFields(cacheName: string, dictionaryName: string, fields: string[] | Uint8Array[]): Promise<CacheDictionaryGetFields.Response>;
777
+ dictionaryGetFields(cacheName: string, dictionaryName: string, fields: string[] | Uint8Array[], options?: DictionaryGetFieldOptions): Promise<CacheDictionaryGetFields.Response>;
718
778
  /**
719
779
  * Removes an element from the given dictionary.
720
780
  *
@@ -724,11 +784,13 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
724
784
  * @param {string} cacheName - The cache containing the dictionary.
725
785
  * @param {string} dictionaryName - The dictionary to remove from.
726
786
  * @param {string | Uint8Array} field - The field to remove.
787
+ * @param {DictionaryRemoveFieldOptions} options
788
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
727
789
  * @returns {Promise<CacheDictionaryRemoveField.Response>} -
728
790
  * {@link CacheDictionaryRemoveField.Success} on success.
729
791
  * {@link CacheDictionaryRemoveField.Error} on failure.
730
792
  */
731
- dictionaryRemoveField(cacheName: string, dictionaryName: string, field: string | Uint8Array): Promise<CacheDictionaryRemoveField.Response>;
793
+ dictionaryRemoveField(cacheName: string, dictionaryName: string, field: string | Uint8Array, options?: DictionaryRemoveFieldOptions): Promise<CacheDictionaryRemoveField.Response>;
732
794
  /**
733
795
  * Removes multiple fields from the given dictionary.
734
796
  *
@@ -738,11 +800,13 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
738
800
  * @param {string} cacheName - The cache containing the dictionary.
739
801
  * @param {string} dictionaryName - The dictionary to remove from.
740
802
  * @param {string[] | Uint8Array[]} fields - The fields to remove.
803
+ * @param {DictionaryRemoveFieldOptions} options
804
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
741
805
  * @returns {Promise<CacheDictionaryRemoveFields.Response>} -
742
806
  * {@link CacheDictionaryRemoveFields.Success} on success.
743
807
  * {@link CacheDictionaryRemoveFields.Error} on failure.
744
808
  */
745
- dictionaryRemoveFields(cacheName: string, dictionaryName: string, fields: string[] | Uint8Array[]): Promise<CacheDictionaryRemoveFields.Response>;
809
+ dictionaryRemoveFields(cacheName: string, dictionaryName: string, fields: string[] | Uint8Array[], options?: DictionaryRemoveFieldOptions): Promise<CacheDictionaryRemoveFields.Response>;
746
810
  /**
747
811
  * Adds an integer quantity to a dictionary value.
748
812
  *
@@ -758,6 +822,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
758
822
  * @param {CollectionTtl} [options.ttl] - How the TTL should be managed.
759
823
  * Refreshes the dictionary's TTL using the client's default if this is not
760
824
  * supplied.
825
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
761
826
  * @returns {Promise<CacheDictionaryIncrement.Response>} -
762
827
  * {@link CacheDictionaryIncrement.Success} containing the incremented value
763
828
  * on success.
@@ -771,12 +836,14 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
771
836
  *
772
837
  * @param {string} cacheName - The cache containing the dictionary.
773
838
  * @param {string} dictionaryName - The dictionary to get the length of.
839
+ * @param {DictionaryLengthOptions} options
840
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
774
841
  * @returns {Promise<CacheDictionaryLength.Response>} -
775
842
  * {@link CacheDictionaryLength.Hit} containing the length if the dictionary exists.
776
843
  * {@link CacheDictionaryLength.Miss} if the dictionary does not exist.
777
844
  * {@link CacheDictionaryLength.Error} on failure.
778
845
  */
779
- dictionaryLength(cacheName: string, dictionaryName: string): Promise<CacheDictionaryLength.Response>;
846
+ dictionaryLength(cacheName: string, dictionaryName: string, options?: DictionaryLengthOptions): Promise<CacheDictionaryLength.Response>;
780
847
  /**
781
848
  * Adds an element to the given sorted set. If the element already exists, its
782
849
  * score is updated. Creates the sorted set if it does not exist.
@@ -789,6 +856,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
789
856
  * @param {CollectionTtl} [options.ttl] - How the TTL should be managed.
790
857
  * Refreshes the sorted set's TTL using the client's default if this is not
791
858
  * supplied.
859
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
792
860
  * @returns {Promise<CacheSortedSetPutElement.Response>} -
793
861
  * {@link CacheSortedSetPutElement.Success} on success.
794
862
  * {@link CacheSortedSetPutElement.Error} on failure.
@@ -806,6 +874,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
806
874
  * @param {CollectionTtl} [options.ttl] - How the TTL should be managed.
807
875
  * Refreshes the sorted set's TTL using the client's default if this is not
808
876
  * supplied.
877
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
809
878
  * @returns {Promise<CacheSortedSetPutElements.Response>} -
810
879
  * {@link CacheSortedSetPutElements.Success} on success.
811
880
  * {@link CacheSortedSetPutElements.Error} on failure.
@@ -826,6 +895,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
826
895
  * Defaults to null, which fetches up until and including the last element.
827
896
  * @param {SortedSetOrder} [options.order] - The order to fetch the elements in.
828
897
  * Defaults to ascending.
898
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
829
899
  * @returns {Promise<CacheSortedSetFetch.Response>}
830
900
  * {@link CacheSortedSetFetch.Hit} containing the requested elements when found.
831
901
  * {@link CacheSortedSetFetch.Miss} when the sorted set does not exist.
@@ -850,6 +920,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
850
920
  * to skip before returning the first element.
851
921
  * @param {number} [options.count] - The maximum number of elements to return.
852
922
  * Defaults to undefined, which returns all elements.
923
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
853
924
  * @returns {Promise<CacheSortedSetFetch.Response>} -
854
925
  * {@link CacheSortedSetFetch.Hit} containing the requested elements when found.
855
926
  * {@link CacheSortedSetFetch.Miss} when the sorted set does not exist.
@@ -865,6 +936,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
865
936
  * @param {SortedSetGetRankOptions} options
866
937
  * @param {SortedSetOrder} [options.order] - The order in which sorted set will be sorted to determine the rank.
867
938
  * Defaults to ascending.
939
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
868
940
  * @returns {Promise<CacheSortedSetGetRank.Response>}
869
941
  * {@link CacheSortedSetGetRank.Hit} containing the rank of the requested elements when found.
870
942
  * {@link CacheSortedSetGetRank.Miss} when the element does not exist.
@@ -877,24 +949,28 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
877
949
  * @param {string} cacheName - The cache containing the sorted set.
878
950
  * @param {string} sortedSetName - The sorted set to fetch from.
879
951
  * @param {string | Uint8Array} value - The value of the element whose score we are retrieving.
952
+ * @param {SortedSetGetScoreOptions} options
953
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
880
954
  * @returns {Promise<CacheSortedSetGetScore.Response>}
881
955
  * {@link CacheSortedSetGetScore.Hit} containing the score of the requested element when found.
882
956
  * {@link CacheSortedSetGetScore.Miss} when the element or collection does not exist.
883
957
  * {@link CacheSortedSetGetScore.Error} on failure.
884
958
  */
885
- sortedSetGetScore(cacheName: string, sortedSetName: string, value: string | Uint8Array): Promise<CacheSortedSetGetScore.Response>;
959
+ sortedSetGetScore(cacheName: string, sortedSetName: string, value: string | Uint8Array, options?: SortedSetGetScoreOptions): Promise<CacheSortedSetGetScore.Response>;
886
960
  /**
887
961
  * Look up the scores of multiple elements in the sorted set, by the value of the elements.
888
962
  *
889
963
  * @param {string} cacheName - The cache containing the sorted set.
890
964
  * @param {string} sortedSetName - The sorted set to fetch from.
891
965
  * @param {string[] | Uint8Array[]} values - The values of the elements whose scores we are retrieving.
966
+ * @param {SortedSetGetScoreOptions} options
967
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
892
968
  * @returns {Promise<CacheSortedSetGetScores.Response>}
893
969
  * {@link CacheSortedSetGetScores.Hit} containing the scores of the requested elements when found.
894
970
  * {@link CacheSortedSetGetScores.Miss} when the element or collection does not exist.
895
971
  * {@link CacheSortedSetGetScores.Error} on failure.
896
972
  */
897
- sortedSetGetScores(cacheName: string, sortedSetName: string, values: string[] | Uint8Array[]): Promise<CacheSortedSetGetScores.Response>;
973
+ sortedSetGetScores(cacheName: string, sortedSetName: string, values: string[] | Uint8Array[], options?: SortedSetGetScoreOptions): Promise<CacheSortedSetGetScores.Response>;
898
974
  /**
899
975
  * Increment the score of an element in the sorted set.
900
976
  *
@@ -907,6 +983,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
907
983
  * @param {CollectionTtl} [options.ttl] - How the TTL should be managed.
908
984
  * Refreshes the sorted set's TTL using the client's default if this is not
909
985
  * supplied.
986
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
910
987
  * @returns {Promise<CacheSortedSetIncrementScore.Response>} -
911
988
  * {@link CacheSortedSetIncrementScore.Success} containing the incremented score
912
989
  * on success.
@@ -920,31 +997,37 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
920
997
  * @param {string} cacheName - The cache containing the sorted set.
921
998
  * @param {string} sortedSetName - The sorted set to remove from.
922
999
  * @param {string | Uint8Array} value - The value of the element to remove from the set.
1000
+ * @param {SortedSetRemoveElementOptions} options
1001
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
923
1002
  * @returns {Promise<CacheSortedSetRemoveElement.Response>}
924
1003
  * {@link CacheSortedSetRemoveElement.Success} if the element was successfully removed
925
1004
  * {@link CacheSortedSetIncrementScore.Error} on failure
926
1005
  */
927
- sortedSetRemoveElement(cacheName: string, sortedSetName: string, value: string | Uint8Array): Promise<CacheSortedSetRemoveElement.Response>;
1006
+ sortedSetRemoveElement(cacheName: string, sortedSetName: string, value: string | Uint8Array, options?: SortedSetRemoveElementOptions): Promise<CacheSortedSetRemoveElement.Response>;
928
1007
  /**
929
1008
  * Remove multiple elements from the sorted set
930
1009
  * @param {string} cacheName - The cache containing the sorted set.
931
1010
  * @param {string} sortedSetName - The sorted set to remove from.
932
1011
  * @param {string | Uint8Array} values - The values of the elements to remove from the set.
1012
+ * @param {SortedSetRemoveElementOptions} options
1013
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
933
1014
  * @returns {Promise<CacheSortedSetRemoveElement.Response>}
934
1015
  * {@link CacheSortedSetRemoveElement.Success} if the elements were successfully removed
935
1016
  * {@link CacheSortedSetIncrementScore.Error} on failure
936
1017
  */
937
- sortedSetRemoveElements(cacheName: string, sortedSetName: string, values: string[] | Uint8Array[]): Promise<CacheSortedSetRemoveElements.Response>;
1018
+ sortedSetRemoveElements(cacheName: string, sortedSetName: string, values: string[] | Uint8Array[], options?: SortedSetRemoveElementOptions): Promise<CacheSortedSetRemoveElements.Response>;
938
1019
  /**
939
1020
  * Fetch length (number of items) of sorted set
940
1021
  * @param {string} cacheName - The cache containing the sorted set.
941
1022
  * @param {string} sortedSetName - The sorted set name.
1023
+ * @param {SortedSetLengthOptions} options
1024
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
942
1025
  * @returns {Promise<CacheSortedSetLength.Response>}
943
1026
  * {@link CacheSortedSetLength.Hit} containing the length if the sorted set exists.
944
1027
  * {@link CacheSortedSetLength.Miss} if the sorted set does not exist.
945
1028
  * {@link CacheSortedSetLength.Error} on failure.
946
1029
  */
947
- sortedSetLength(cacheName: string, sortedSetName: string): Promise<CacheSortedSetLength.Response>;
1030
+ sortedSetLength(cacheName: string, sortedSetName: string, options?: SortedSetLengthOptions): Promise<CacheSortedSetLength.Response>;
948
1031
  /**
949
1032
  * Fetch length (number of items) of sorted set within the provided score range
950
1033
  * @param {string} cacheName - The cache containing the sorted set.
@@ -952,6 +1035,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
952
1035
  * @param {SortedSetLengthByScoreOptions} options - Optional parameter for specifying the score range to search in.
953
1036
  * @param {number} [options.minScore] - The lower bound on the score range to search in.
954
1037
  * @param {number} [options.maxScore] - The upper bound on the score range to search in.
1038
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
955
1039
  * @returns {Promise<CacheSortedSetLengthByScore.Response>}
956
1040
  * {@link CacheSortedSetLengthByScore.Hit} containing the length if the sorted set exists.
957
1041
  * {@link CacheSortedSetLengthByScore.Miss} if the sorted set does not exist.
@@ -967,6 +1051,7 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
967
1051
  * @param {SortedSetAggregate} [options.aggregate] - The aggregate function to use to combine shared elements
968
1052
  * @param {CollectionTtl} [options.ttl] - If the set does not exist, it is created with the given `ttl`.
969
1053
  * If it exists, it is overwritten with the result and its ttl is set to the given `ttl`
1054
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
970
1055
  * @returns {Promise<CacheSortedSetUnionStore.Response>}
971
1056
  * {@link CacheSortedSetUnionStore.Success} containing the length of the set which contains the result of the union.
972
1057
  * {@link CacheSortedSetUnionStore.Error} on failure.
@@ -976,75 +1061,89 @@ export declare abstract class AbstractCacheClient implements ICacheClient {
976
1061
  * Return the type of the key in the cache
977
1062
  * @param {string} cacheName - The cache containing the key.
978
1063
  * @param {string} key - The key for which type is requested.
1064
+ * @param {ItemGetTypeOptions} options
1065
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
979
1066
  * @returns {Promise<CacheItemGetType.Response>}
980
1067
  * {@link CacheItemGetType.Hit} containing type of key when found.
981
1068
  * {@link CacheItemGetType.Miss} when the key does not exist.
982
1069
  * {@link CacheItemGetType.Error} on failure.
983
1070
  */
984
- itemGetType(cacheName: string, key: string | Uint8Array): Promise<CacheItemGetType.Response>;
1071
+ itemGetType(cacheName: string, key: string | Uint8Array, options?: ItemGetTypeOptions): Promise<CacheItemGetType.Response>;
985
1072
  /**
986
1073
  * Return the remaining ttl of the key in the cache in milliseconds.
987
1074
  * @param {string} cacheName - The cache containing the key.
988
1075
  * @param {string} key - The key for which the ttl remaining is requested.
1076
+ * @param {ItemGetTtlOptions} options
1077
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
989
1078
  * @returns {Promise<CacheItemGetTtl.Response>}
990
1079
  * {@link CacheItemGetTtl.Hit} containing ttl remaining of key when found.
991
1080
  * {@link CacheItemGetTtl.Miss} when the key does not exist.
992
1081
  * {@link CacheItemGetTtl.Error} on failure.
993
1082
  */
994
- itemGetTtl(cacheName: string, key: string | Uint8Array): Promise<CacheItemGetTtl.Response>;
1083
+ itemGetTtl(cacheName: string, key: string | Uint8Array, options?: ItemGetTtlOptions): Promise<CacheItemGetTtl.Response>;
995
1084
  /**
996
1085
  * Check if the provided key exists in the cache
997
1086
  * @param {string} cacheName - The cache to look in.
998
1087
  * @param {string | Uint8Array} key - The key to look up.
1088
+ * @param {KeyExistsOptions} options
1089
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
999
1090
  * @returns {Promise<CacheKeyExists.Response>}
1000
1091
  * {@link CacheKeyExists.Success} returns boolean indicating whether the key was found.
1001
1092
  * {@link CacheKeyExists.Error} on failure.
1002
1093
  */
1003
- keyExists(cacheName: string, key: string | Uint8Array): Promise<CacheKeyExists.Response>;
1094
+ keyExists(cacheName: string, key: string | Uint8Array, options?: KeyExistsOptions): Promise<CacheKeyExists.Response>;
1004
1095
  /**
1005
1096
  * Check if the provided keys exist in the cache
1006
1097
  * @param {string} cacheName - The cache to look in.
1007
1098
  * @param {string[] | Uint8Array[]} keys - The keys to look up.
1099
+ * @param {KeyExistsOptions} options
1100
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
1008
1101
  * @returns {Promise<CacheKeysExist.Response>}
1009
1102
  * {@link CacheKeysExist.Success} returns list of booleans indicating whether each key was found.
1010
1103
  * {@link CacheKeysExist.Error} on failure.
1011
1104
  */
1012
- keysExist(cacheName: string, keys: string[] | Uint8Array[]): Promise<CacheKeysExist.Response>;
1105
+ keysExist(cacheName: string, keys: string[] | Uint8Array[], options?: KeyExistsOptions): Promise<CacheKeysExist.Response>;
1013
1106
  /**
1014
1107
  * Update the ttl of the key in the cache in milliseconds.
1015
1108
  * @param {string} cacheName - The cache containing the key.
1016
1109
  * @param {string} key - The key for which the ttl remaining is requested.
1017
1110
  * @param {number} ttlMilliseconds - The ttl in milliseconds that should overwrite the current ttl.
1111
+ * @param {UpdateTtlOptions} options
1112
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
1018
1113
  * @returns {Promise<CacheUpdateTtl.Response>}
1019
1114
  * {@link CacheUpdateTtl.Set} when the ttl was successfully overwritten.
1020
1115
  * {@link CacheUpdateTtl.Miss} when the key does not exist.
1021
1116
  * {@link CacheUpdateTtl.Error} on failure.
1022
1117
  */
1023
- updateTtl(cacheName: string, key: string | Uint8Array, ttlMilliseconds: number): Promise<CacheUpdateTtl.Response>;
1118
+ updateTtl(cacheName: string, key: string | Uint8Array, ttlMilliseconds: number, options?: UpdateTtlOptions): Promise<CacheUpdateTtl.Response>;
1024
1119
  /**
1025
1120
  * Increase the ttl of the key in the cache in milliseconds.
1026
1121
  * @param {string} cacheName - The cache containing the key.
1027
1122
  * @param {string} key - The key for which the ttl remaining is requested.
1028
1123
  * @param {number} ttlMilliseconds - The ttl in milliseconds that should
1029
1124
  * overwrite the current ttl. Should be greater than the current ttl.
1125
+ * @param {IncreaseTtlOptions} options
1126
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
1030
1127
  * @returns {Promise<CacheIncreaseTtl.Response>}
1031
1128
  * {@link CacheIncreaseTtl.Set} when the ttl was successfully increased.
1032
1129
  * {@link CacheIncreaseTtl.Miss} when the key does not exist.
1033
1130
  * {@link CacheIncreaseTtl.Error} on failure.
1034
1131
  */
1035
- increaseTtl(cacheName: string, key: string | Uint8Array, ttlMilliseconds: number): Promise<CacheIncreaseTtl.Response>;
1132
+ increaseTtl(cacheName: string, key: string | Uint8Array, ttlMilliseconds: number, options?: IncreaseTtlOptions): Promise<CacheIncreaseTtl.Response>;
1036
1133
  /**
1037
1134
  * Decrease the ttl of the key in the cache in milliseconds.
1038
1135
  * @param {string} cacheName - The cache containing the key.
1039
1136
  * @param {string} key - The key for which the ttl remaining is requested.
1040
1137
  * @param {number} ttlMilliseconds - The ttl in milliseconds that should
1041
1138
  * overwrite the current ttl. Should be less than the current ttl.
1139
+ * @param {DecreaseTtlOptions} options
1140
+ * @param {AbortSignal} options.abortSignal - The signal to cancel the operation
1042
1141
  * @returns {Promise<CacheDecreaseTtl.Response>}
1043
1142
  * {@link CacheDecreaseTtl.Set} when the ttl was successfully decreased.
1044
1143
  * {@link CacheDecreaseTtl.Miss} when the key does not exist.
1045
1144
  * {@link CacheDecreaseTtl.Error} on failure.
1046
1145
  */
1047
- decreaseTtl(cacheName: string, key: string | Uint8Array, ttlMilliseconds: number): Promise<CacheDecreaseTtl.Response>;
1146
+ decreaseTtl(cacheName: string, key: string | Uint8Array, ttlMilliseconds: number, options?: DecreaseTtlOptions): Promise<CacheDecreaseTtl.Response>;
1048
1147
  private getNextDataClient;
1049
1148
  abstract close(): void;
1050
1149
  }