monday-sdk-js 0.5.4 → 0.5.6

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monday-sdk-js",
3
- "version": "0.5.4",
3
+ "version": "0.5.6",
4
4
  "private": false,
5
5
  "repository": "https://github.com/mondaycom/monday-sdk-js",
6
6
  "main": "src/index.js",
@@ -91,7 +91,7 @@ export interface ClientData {
91
91
  T extends keyof GetterResponse = keyof GetterResponse,
92
92
  AppFeatureType extends AppFeatureTypes = AppFeatureTypes
93
93
  >(
94
- type: T,
94
+ type: T | string,
95
95
  params?: Record<string, any> & { appFeatureType?: AppFeatureType }
96
96
  ): Promise<Response<GetterResponse<AppFeatureType>[T] & CustomResponse>>;
97
97
 
@@ -100,16 +100,17 @@ export interface ClientData {
100
100
  * @param typeOrTypes The type, or array of types, of events to subscribe to
101
101
  * @param callback A callback function that is fired when the listener is triggered by a client-side event
102
102
  * @param params Reserved for future use
103
+ * @return Unsubscribe/unlisten from all added during this method call
103
104
  */
104
105
  listen<
105
106
  CustomResponse,
106
107
  T extends SubscribableEvents = SubscribableEvents,
107
108
  AppFeatureType extends AppFeatureTypes = AppFeatureTypes
108
109
  >(
109
- typeOrTypes: T | ReadonlyArray<T>,
110
+ typeOrTypes: (T | string) | ReadonlyArray<T | string>,
110
111
  callback: (res: { data: SubscribableEventsResponse<AppFeatureType>[T] & CustomResponse }) => void,
111
112
  params?: Record<string, any> & { appFeatureType?: AppFeatureType }
112
- ): void;
113
+ ): () => void;
113
114
 
114
115
  /**
115
116
  * Set data in your application, such as updating settings
package/types/index.d.ts CHANGED
@@ -19,4 +19,6 @@ declare function init(
19
19
  }>
20
20
  ): MondayServerSdk;
21
21
 
22
- export = init;
22
+ export { MondayClientSdk, MondayServerSdk };
23
+
24
+ export default init;