@forge/kvs
1.2.7-next.0-experimental-2682d7a1.2.7-next.0-experimental-d997307
out/interfaces/kvs-api.d.tsout/interfaces/kvs-api.d.ts+19−10
Index: package/out/interfaces/kvs-api.d.ts
===================================================================
--- package/out/interfaces/kvs-api.d.ts
+++ package/out/interfaces/kvs-api.d.ts
@@ -1,21 +1,23 @@
-import { GetOptions } from './types';
+import { ExtendedSetOptions, GetOptions, MetadataField, SetOptions } from './types';
declare type KeySchema = {
key: string;
};
declare type KeyValueSchema<T> = KeySchema & {
value: T;
createdAt?: number;
updatedAt?: number;
+ expireTime?: string;
};
export declare type GetRequest = KeySchema & {
options?: GetOptions;
};
export declare type GetResponse<T> = KeyValueSchema<T>;
-export declare type SetRequest<T> = KeyValueSchema<T>;
-export declare type SetResponse = void;
+export declare type SetRequest<T> = Pick<KeyValueSchema<T>, 'key' | 'value'> & {
+ options?: ExtendedSetOptions;
+};
+export declare type SetResponse<T> = KeyValueSchema<T>;
export declare type DeleteRequest = KeySchema;
-export declare type DeleteResponse = void;
declare type QueryWhere = {
condition: 'BEGINS_WITH';
property: 'key';
values: Array<unknown>;
@@ -23,8 +25,11 @@
export declare type QueryRequest = {
limit?: number;
after?: string;
where?: Array<QueryWhere>;
+ options?: {
+ metadataFields?: Array<MetadataField>;
+ };
};
export declare type QueryResponse<T> = {
data: Array<KeyValueSchema<T>>;
cursor?: string;
@@ -32,29 +37,30 @@
export declare type SecretGetRequest = KeySchema & {
options?: GetOptions;
};
export declare type SecretGetResponse<T> = KeyValueSchema<T>;
-export declare type SecretSetRequest<T> = KeyValueSchema<T>;
-export declare type SecretSetResponse = void;
+export declare type SecretSetRequest<T> = KeyValueSchema<T> & {
+ options?: ExtendedSetOptions;
+};
export declare type SecretDeleteRequest = KeySchema;
-export declare type SecretDeleteResponse = void;
declare type EntityKeySchema = {
entityName: string;
key: string;
};
declare type EntityKeyValueSchema<T> = EntityKeySchema & {
value: T;
createdAt?: number;
updatedAt?: number;
+ expireTime?: string;
};
export declare type EntityGetRequest = EntityKeySchema & {
options?: GetOptions;
};
export declare type EntityGetResponse<T> = EntityKeyValueSchema<T>;
-export declare type EntitySetRequest<T> = EntityKeyValueSchema<T>;
-export declare type EntitySetResponse = void;
+export declare type EntitySetRequest<T> = EntityKeyValueSchema<T> & {
+ options?: ExtendedSetOptions;
+};
export declare type EntityDeleteRequest = EntityKeySchema;
-export declare type EntityDeleteResponse = void;
export declare type EntityQueryFilter = {
condition: 'BEGINS_WITH' | 'BETWEEN' | 'CONTAINS' | 'EQUAL_TO' | 'EXISTS' | 'GREATER_THAN' | 'GREATER_THAN_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_EQUAL_TO' | 'NOT_CONTAINS' | 'NOT_EQUAL_TO' | 'NOT_EXISTS';
property: string;
values: Array<unknown>;
@@ -74,8 +80,9 @@
sort?: 'ASC' | 'DESC';
partition?: Array<unknown>;
entityName: string;
indexName: string;
+ metadataFields?: Array<MetadataField>;
};
export declare type EntityQueryResponse<T> = {
data: Array<KeyValueSchema<T>>;
cursor?: string;
@@ -85,8 +92,9 @@
key: string;
value: T;
entityName?: string;
conditions?: TransactionCondition;
+ options?: SetOptions;
};
export declare type RequestDelete = {
key: string;
entityName?: string;
@@ -105,8 +113,9 @@
export declare type BatchSetItem<T> = {
entityName?: string;
key: string;
value: T;
+ options?: SetOptions;
};
export declare type BatchSetRequest<T> = Array<BatchSetItem<T>>;
export declare type BatchSetResponse = {
successfulKeys: BatchItemSuccess[];