@ampt/data
Advanced tools
Comparing version 1.0.6 to 1.0.7
{ | ||
"name": "@ampt/data", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.cjs", |
@@ -86,5 +86,11 @@ export type getOptions = { | ||
lastKey?: string | ||
next?: () => Promise<GetResponse<T> | undefined> | ||
next?: () => Promise<GetBatchResponse<T> | []> | ||
} | ||
export type GetBatchResponseMeta<T> = { | ||
items: KeyValueMeta<T>[] | ||
lastKey?: string | ||
next: () => Promise<GetBatchResponseMeta<T> | []> | ||
} | ||
export type ScanResponse<T> = Optional<{ | ||
@@ -147,10 +153,14 @@ items: KeyValue<T>[] | ||
get<T>(keys: string, options: true): Promise<GetResponseMeta<T>> | ||
getByLabel<T>(label: labels, keys: Query | string[], options?: getOptions | boolean): Promise<GetBatchResponse<T>> | ||
getByLabel<T>(label: labels, keys: Query | string[], options: getOptionsMeta): Promise<GetBatchResponseMeta<T>> | ||
getByLabel<T>(label: labels, keys: Query | string[], options: true): Promise<GetBatchResponseMeta<T>> | ||
getByLabel<T>(label: labels, keys: Query | string[], options: false): Promise<GetBatchResponse<T>> | ||
getByLabel<T>(label: labels, keys: string, options?: getOptions | boolean): Promise<GetResponse<T>> | ||
getByLabel<T>(label: labels, keys: string, options?: getOptionsMeta): Promise<GetResponseMeta<T>> | ||
getByLabel<T>(label: labels, keys: string, options: true): Promise<GetResponseMeta<T>> | ||
getByLabel<T>(label: labels, keys: string, options: false): Promise<GetResponse<T>> | ||
getByLabel<T>( | ||
label: labels, | ||
keys: Query | string[] | string, | ||
options?: getOptions | boolean | ||
): Promise<GetBatchResponse<T>> | ||
getByLabel<T>( | ||
label: labels, | ||
keys: Query | string[] | string, | ||
options: getOptionsMeta | ||
): Promise<GetBatchResponseMeta<T>> | ||
getByLabel<T>(label: labels, keys: Query | string[] | string, options: true): Promise<GetBatchResponseMeta<T>> | ||
getByLabel<T>(label: labels, keys: Query | string[] | string, options: false): Promise<GetBatchResponse<T>> | ||
scan<T>(options: scanOptions | boolean): Promise<ScanResponse<T>> | ||
@@ -157,0 +167,0 @@ set<T>(keys: BatchSetItem<T>[], opts?: setBatchOptions | boolean): Promise<SetBatchResponse<T>> |
27597
1032840