npm package diff
Package: @forge/storage
Versions: 1.5.15-experimental-f6dcf26 - 1.5.15-experimental-204139e
File: package/out/global-storage.d.ts
Index: package/out/global-storage.d.ts
===================================================================
--- package/out/global-storage.d.ts
+++ package/out/global-storage.d.ts
@@ -1,14 +1,34 @@
import { BulkResponse, FetchMethod } from './index';
-import { CustomEntityListOptions, ListOptions } from './query-interfaces';
+import { CustomEntityListOptions, FilterClause, ListOptions } from './query-interfaces';
import { BulkItem, SharedStorageAdapter } from './storage-adapter';
interface ListResults {
results: {
key: string;
value: any;
}[];
nextCursor?: string;
}
+export declare type colorsEnum = 'or' | 'and';
+declare type TransactionRequestCondition = {
+ [key in colorsEnum]?: FilterClause[];
+};
+export interface TransactionRequestSet {
+ key: string;
+ value: string | number | boolean | Record<string, any> | any[];
+ entityName?: string;
+ conditions?: TransactionRequestCondition;
+}
+export interface TransactionRequestDeleteCheck {
+ key: string;
+ entityName?: string;
+ conditions?: TransactionRequestCondition;
+}
+export interface TransactionRequestInput {
+ set?: TransactionRequestSet[];
+ delete?: TransactionRequestDeleteCheck[];
+ check?: TransactionRequestDeleteCheck[];
+}
export declare class GlobalStorage implements SharedStorageAdapter {
private getAppContextAri;
private apiClient;
private readonly endpoint;
@@ -16,8 +36,9 @@
private doGetAppContextAri;
get(key: string): Promise<any>;
getSecret(key: string): Promise<any>;
list(options: ListOptions): Promise<ListResults>;
+ transaction(options: TransactionRequestInput, isCustomEntity?: boolean): Promise<void>;
listCustomEntities(options: CustomEntityListOptions): Promise<ListResults>;
set(key: string, value: any): Promise<void>;
setSecret(key: string, value: any): Promise<void>;
bulkSet(items: BulkItem[]): Promise<BulkResponse>;