@deepdesk/deepdesk-sdk 18.0.2 → 18.0.3-beta.0
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/dist/index.cjs.js +7 -7
- package/dist/index.d.mts +23 -4
- package/dist/index.d.ts +23 -4
- package/dist/index.esm.js +7 -7
- package/dist/index.iife.js +30 -30
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2066,6 +2066,7 @@ declare class DeepdeskSDK {
|
|
|
2066
2066
|
private broadcastEvents;
|
|
2067
2067
|
private eventListeners;
|
|
2068
2068
|
private unmountHandlers;
|
|
2069
|
+
private disposeHandlers;
|
|
2069
2070
|
private inlineSuggestions;
|
|
2070
2071
|
private aboveSuggestions;
|
|
2071
2072
|
private floatingMenu;
|
|
@@ -3133,6 +3134,7 @@ declare class DeepdeskSDK {
|
|
|
3133
3134
|
setPlatformVariables(mapping: VariableMapping): void;
|
|
3134
3135
|
/**
|
|
3135
3136
|
* Registers a callback to be called when conversation is loaded.
|
|
3137
|
+
* Convenient wrapper around `subscribe`.
|
|
3136
3138
|
*
|
|
3137
3139
|
* This method allows you to register a callback function that will be executed
|
|
3138
3140
|
* when a conversation is successfully loaded. The callback is called after
|
|
@@ -3141,6 +3143,8 @@ declare class DeepdeskSDK {
|
|
|
3141
3143
|
* If a conversation is already loaded when this method is called, the callback
|
|
3142
3144
|
* will be executed immediately.
|
|
3143
3145
|
*
|
|
3146
|
+
* If the conversation changes, the callback will be called again.
|
|
3147
|
+
*
|
|
3144
3148
|
* @param callback - Function to call when conversation loads
|
|
3145
3149
|
*
|
|
3146
3150
|
* @example
|
|
@@ -3151,7 +3155,7 @@ declare class DeepdeskSDK {
|
|
|
3151
3155
|
* });
|
|
3152
3156
|
* ```
|
|
3153
3157
|
*/
|
|
3154
|
-
whenConversationLoaded(callback: () => void):
|
|
3158
|
+
whenConversationLoaded(callback: () => void): Unsubscribe;
|
|
3155
3159
|
private overlayContainerFactory;
|
|
3156
3160
|
private createInlineContainer;
|
|
3157
3161
|
private createContainer;
|
|
@@ -3236,15 +3240,17 @@ declare class DeepdeskSDK {
|
|
|
3236
3240
|
*/
|
|
3237
3241
|
subscribe<T>(selector: (state: RootState) => T, callback: (value: T) => void): Unsubscribe;
|
|
3238
3242
|
/**
|
|
3239
|
-
* Unmounts the SDK and cleans up all resources.
|
|
3243
|
+
* Unmounts the SDK and cleans up all resources related to the mount() method.
|
|
3240
3244
|
*
|
|
3241
3245
|
* This method removes all UI components, event listeners, and cleans up
|
|
3242
|
-
* internal resources.
|
|
3243
|
-
* or when you need to remount it on a different element.
|
|
3246
|
+
* internal resources.
|
|
3244
3247
|
*
|
|
3245
3248
|
* After calling this method, the SDK instance can be reused by calling
|
|
3246
3249
|
* `mount()` again on a new input element.
|
|
3247
3250
|
*
|
|
3251
|
+
* **Important:** This method does not clean up all DeepdeskSDK resources.
|
|
3252
|
+
* Use `dispose()` to clean up all resources instead.
|
|
3253
|
+
*
|
|
3248
3254
|
* @example
|
|
3249
3255
|
* ```typescript
|
|
3250
3256
|
* // Unmount when switching conversations
|
|
@@ -3252,6 +3258,19 @@ declare class DeepdeskSDK {
|
|
|
3252
3258
|
* ```
|
|
3253
3259
|
*/
|
|
3254
3260
|
unmount(): void;
|
|
3261
|
+
/**
|
|
3262
|
+
* Disposes of the DeepdeskSDK instance.
|
|
3263
|
+
*
|
|
3264
|
+
* This method removes all UI components, event listeners, and cleans up
|
|
3265
|
+
* internal resources. It should be called when you're done using the SDK.
|
|
3266
|
+
*
|
|
3267
|
+
* @example
|
|
3268
|
+
* ```typescript
|
|
3269
|
+
* // Dispose of DeepdeskSDK instance after conversation is unloaded
|
|
3270
|
+
* sdk.dispose();
|
|
3271
|
+
* ```
|
|
3272
|
+
*/
|
|
3273
|
+
dispose(): void;
|
|
3255
3274
|
private renderSuggestions;
|
|
3256
3275
|
private renderInlineSuggestions;
|
|
3257
3276
|
private renderAboveSuggestions;
|
package/dist/index.d.ts
CHANGED
|
@@ -2066,6 +2066,7 @@ declare class DeepdeskSDK {
|
|
|
2066
2066
|
private broadcastEvents;
|
|
2067
2067
|
private eventListeners;
|
|
2068
2068
|
private unmountHandlers;
|
|
2069
|
+
private disposeHandlers;
|
|
2069
2070
|
private inlineSuggestions;
|
|
2070
2071
|
private aboveSuggestions;
|
|
2071
2072
|
private floatingMenu;
|
|
@@ -3133,6 +3134,7 @@ declare class DeepdeskSDK {
|
|
|
3133
3134
|
setPlatformVariables(mapping: VariableMapping): void;
|
|
3134
3135
|
/**
|
|
3135
3136
|
* Registers a callback to be called when conversation is loaded.
|
|
3137
|
+
* Convenient wrapper around `subscribe`.
|
|
3136
3138
|
*
|
|
3137
3139
|
* This method allows you to register a callback function that will be executed
|
|
3138
3140
|
* when a conversation is successfully loaded. The callback is called after
|
|
@@ -3141,6 +3143,8 @@ declare class DeepdeskSDK {
|
|
|
3141
3143
|
* If a conversation is already loaded when this method is called, the callback
|
|
3142
3144
|
* will be executed immediately.
|
|
3143
3145
|
*
|
|
3146
|
+
* If the conversation changes, the callback will be called again.
|
|
3147
|
+
*
|
|
3144
3148
|
* @param callback - Function to call when conversation loads
|
|
3145
3149
|
*
|
|
3146
3150
|
* @example
|
|
@@ -3151,7 +3155,7 @@ declare class DeepdeskSDK {
|
|
|
3151
3155
|
* });
|
|
3152
3156
|
* ```
|
|
3153
3157
|
*/
|
|
3154
|
-
whenConversationLoaded(callback: () => void):
|
|
3158
|
+
whenConversationLoaded(callback: () => void): Unsubscribe;
|
|
3155
3159
|
private overlayContainerFactory;
|
|
3156
3160
|
private createInlineContainer;
|
|
3157
3161
|
private createContainer;
|
|
@@ -3236,15 +3240,17 @@ declare class DeepdeskSDK {
|
|
|
3236
3240
|
*/
|
|
3237
3241
|
subscribe<T>(selector: (state: RootState) => T, callback: (value: T) => void): Unsubscribe;
|
|
3238
3242
|
/**
|
|
3239
|
-
* Unmounts the SDK and cleans up all resources.
|
|
3243
|
+
* Unmounts the SDK and cleans up all resources related to the mount() method.
|
|
3240
3244
|
*
|
|
3241
3245
|
* This method removes all UI components, event listeners, and cleans up
|
|
3242
|
-
* internal resources.
|
|
3243
|
-
* or when you need to remount it on a different element.
|
|
3246
|
+
* internal resources.
|
|
3244
3247
|
*
|
|
3245
3248
|
* After calling this method, the SDK instance can be reused by calling
|
|
3246
3249
|
* `mount()` again on a new input element.
|
|
3247
3250
|
*
|
|
3251
|
+
* **Important:** This method does not clean up all DeepdeskSDK resources.
|
|
3252
|
+
* Use `dispose()` to clean up all resources instead.
|
|
3253
|
+
*
|
|
3248
3254
|
* @example
|
|
3249
3255
|
* ```typescript
|
|
3250
3256
|
* // Unmount when switching conversations
|
|
@@ -3252,6 +3258,19 @@ declare class DeepdeskSDK {
|
|
|
3252
3258
|
* ```
|
|
3253
3259
|
*/
|
|
3254
3260
|
unmount(): void;
|
|
3261
|
+
/**
|
|
3262
|
+
* Disposes of the DeepdeskSDK instance.
|
|
3263
|
+
*
|
|
3264
|
+
* This method removes all UI components, event listeners, and cleans up
|
|
3265
|
+
* internal resources. It should be called when you're done using the SDK.
|
|
3266
|
+
*
|
|
3267
|
+
* @example
|
|
3268
|
+
* ```typescript
|
|
3269
|
+
* // Dispose of DeepdeskSDK instance after conversation is unloaded
|
|
3270
|
+
* sdk.dispose();
|
|
3271
|
+
* ```
|
|
3272
|
+
*/
|
|
3273
|
+
dispose(): void;
|
|
3255
3274
|
private renderSuggestions;
|
|
3256
3275
|
private renderInlineSuggestions;
|
|
3257
3276
|
private renderAboveSuggestions;
|