monday-sdk-js 0.3.0 → 0.3.2
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.
package/package.json
CHANGED
|
@@ -3,15 +3,42 @@ type SubscribableEvents = 'context' | 'settings' | 'itemIds' | 'events';
|
|
|
3
3
|
type SettableTypes = 'settings';
|
|
4
4
|
|
|
5
5
|
interface GetResponse {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
data: {
|
|
7
|
+
success: boolean;
|
|
8
|
+
value: any;
|
|
9
|
+
version?: any;
|
|
10
|
+
};
|
|
11
|
+
errorMessage?: string | undefined;
|
|
12
|
+
method: string;
|
|
13
|
+
requestId: string;
|
|
14
|
+
type?: string | undefined;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface DeleteResponse {
|
|
18
|
+
data: {
|
|
19
|
+
success: boolean;
|
|
20
|
+
value: any;
|
|
21
|
+
};
|
|
22
|
+
errorMessage?: string | undefined;
|
|
23
|
+
method: string;
|
|
24
|
+
requestId: string;
|
|
25
|
+
type?: string | undefined;
|
|
8
26
|
}
|
|
9
27
|
|
|
10
28
|
interface SetResponse {
|
|
11
|
-
|
|
12
|
-
|
|
29
|
+
data: {
|
|
30
|
+
success: boolean;
|
|
31
|
+
version: string;
|
|
32
|
+
reason?: string | undefined;
|
|
33
|
+
error?: string | undefined;
|
|
34
|
+
};
|
|
35
|
+
errorMessage?: string | undefined;
|
|
36
|
+
requestId: string;
|
|
37
|
+
method: string;
|
|
38
|
+
type?: string | undefined;
|
|
13
39
|
}
|
|
14
40
|
|
|
41
|
+
|
|
15
42
|
export interface ClientData {
|
|
16
43
|
/**
|
|
17
44
|
* Used for retrieving data from the parent monday.com application where your app is currently running.
|
|
@@ -62,14 +89,21 @@ export interface ClientData {
|
|
|
62
89
|
* Returns a stored value from the database under `key`
|
|
63
90
|
* @param key
|
|
64
91
|
*/
|
|
65
|
-
getItem(key: string): Promise<
|
|
92
|
+
getItem(key: string): Promise<GetResponse>;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Deletes a stored value from the database under `key`
|
|
96
|
+
* @param key
|
|
97
|
+
*/
|
|
98
|
+
deleteItem(key: string): Promise<DeleteResponse>;
|
|
66
99
|
|
|
67
100
|
/**
|
|
68
101
|
* Stores `value` under `key` in the database
|
|
69
102
|
* @param key
|
|
70
103
|
* @param value
|
|
104
|
+
* @param options
|
|
71
105
|
*/
|
|
72
|
-
setItem(key: string, value: any): Promise<SetResponse>;
|
|
106
|
+
setItem(key: string, value: any, options?: { previous_version?: string }): Promise<SetResponse>;
|
|
73
107
|
};
|
|
74
108
|
};
|
|
75
|
-
}
|
|
109
|
+
}
|