npm package diff
Package: @forge/cache
Versions: 1.0.3-next.0 - 1.0.3-next.0-experimental-ab129b0
File: package/out/kvs/interfaces/kvs-api.d.ts
Index: package/out/kvs/interfaces/kvs-api.d.ts
===================================================================
--- package/out/kvs/interfaces/kvs-api.d.ts
+++ package/out/kvs/interfaces/kvs-api.d.ts
@@ -0,0 +1,95 @@
+declare type KeySchema = {
+ key: string;
+};
+declare type KeyValueSchema<T> = KeySchema & {
+ value: T;
+};
+export declare type GetRequest = KeySchema;
+export declare type GetResponse<T> = KeyValueSchema<T>;
+export declare type SetRequest<T> = KeyValueSchema<T>;
+export declare type SetResponse = void;
+export declare type DeleteRequest = KeySchema;
+export declare type DeleteResponse = void;
+declare type QueryWhere = {
+ condition: 'BEGINS_WITH';
+ property: 'key';
+ values: Array<unknown>;
+};
+export declare type QueryRequest = {
+ limit?: number;
+ after?: string;
+ where?: Array<QueryWhere>;
+};
+export declare type QueryResponse<T> = {
+ data: Array<KeyValueSchema<T>>;
+ cursor?: string;
+};
+export declare type SecretGetRequest = KeySchema;
+export declare type SecretGetResponse<T> = KeyValueSchema<T>;
+export declare type SecretSetRequest<T> = KeyValueSchema<T>;
+export declare type SecretSetResponse = void;
+export declare type SecretDeleteRequest = KeySchema;
+export declare type SecretDeleteResponse = void;
+declare type EntityKeySchema = {
+ entityName: string;
+ key: string;
+};
+declare type EntityKeyValueSchema<T> = EntityKeySchema & {
+ value: T;
+};
+export declare type EntityGetRequest = EntityKeySchema;
+export declare type EntityGetResponse<T> = EntityKeyValueSchema<T>;
+export declare type EntitySetRequest<T> = EntityKeyValueSchema<T>;
+export declare type EntitySetResponse = void;
+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>;
+};
+export declare type EntityQueryFilters = {
+ or?: Array<EntityQueryFilter>;
+ and?: Array<EntityQueryFilter>;
+};
+export declare type EntityQueryRequest = {
+ limit?: number;
+ cursor?: string;
+ range?: {
+ condition: 'BEGINS_WITH' | 'BETWEEN' | 'EQUAL_TO' | 'GREATER_THAN' | 'GREATER_THAN_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_EQUAL_TO';
+ values: Array<unknown>;
+ };
+ filters?: EntityQueryFilters;
+ sort?: 'ASC' | 'DESC';
+ partition?: Array<unknown>;
+ entityName: string;
+ indexName: string;
+};
+export declare type EntityQueryResponse<T> = {
+ data: Array<KeyValueSchema<T>>;
+ cursor?: string;
+};
+export declare type TransactionCondition = EntityQueryFilters;
+export declare type RequestSet<T> = {
+ key: string;
+ value: T;
+ entityName?: string;
+ conditions?: TransactionCondition;
+};
+export declare type RequestDelete = {
+ key: string;
+ entityName?: string;
+ conditions?: TransactionCondition;
+};
+export declare type RequestCheck = {
+ key: string;
+ entityName?: string;
+ conditions: TransactionCondition;
+};
+export declare type TransactionRequest<T> = {
+ set?: RequestSet<T>[];
+ delete?: RequestDelete[];
+ check?: RequestCheck[];
+};
+export {};
+//# sourceMappingURL=kvs-api.d.ts.map
\ No newline at end of file