@interopio/browser 3.3.6 → 3.4.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/browser.d.ts CHANGED
@@ -939,10 +939,10 @@ export namespace IOConnectBrowser {
939
939
  /**
940
940
  * Updates the context of the current or a given channel.
941
941
  * @param data Data object with which to update the channel context.
942
- * @param name The name of the channel to be updated. If not provided will update the current channel.
942
+ * @param options The name of the Channel to update, or an object containing the name of the Channel to update and a flag indicating whether the published data is an FDC3 context. If no options are provided, the current Channel will be updated.
943
943
  * @returns Promise that resolves when the data has been published.
944
944
  */
945
- publish(data: any, name?: string): Promise<void>;
945
+ publish(data: any, options?: string | PublishOptions): Promise<void>;
946
946
 
947
947
  /**
948
948
  * Returns a list of all channel names.
@@ -1059,6 +1059,21 @@ export namespace IOConnectBrowser {
1059
1059
  restrictAll(restrictions: RestrictionsConfig): Promise<void>;
1060
1060
  }
1061
1061
 
1062
+ /**
1063
+ * Options for updating a Channel context with the `publish()` method.
1064
+ */
1065
+ export interface PublishOptions {
1066
+ /**
1067
+ * The name of the Channel to update. If not provided, the current Channel will be updated.
1068
+ */
1069
+ name?: string;
1070
+
1071
+ /**
1072
+ * Flag indicating whether the published data is an FDC3 context. If so, it must contain a required `type` property.
1073
+ */
1074
+ fdc3?: boolean;
1075
+ }
1076
+
1062
1077
  /**
1063
1078
  * All restrictions applied to a window for publishing or subscribing to Channels.
1064
1079
  */
@@ -1856,6 +1871,11 @@ export namespace IOConnectBrowser {
1856
1871
  */
1857
1872
  getIntents(handler: IntentHandler): Promise<GetIntentsResult>;
1858
1873
 
1874
+ /**
1875
+ * Removes all saved Intent handlers for previously raised Intents.
1876
+ */
1877
+ clearSavedHandlers(): Promise<void>;
1878
+
1859
1879
  /**
1860
1880
  * An object, which exposes the Intents Resolver API.
1861
1881
  */
@@ -1882,32 +1902,111 @@ export namespace IOConnectBrowser {
1882
1902
  methodResponseTimeoutMs?: number;
1883
1903
  }
1884
1904
 
1905
+ /**
1906
+ * Describes an Intent handler app within the Intents Resolver API.
1907
+ */
1885
1908
  interface ResolverIntentHandler {
1909
+ /**
1910
+ * Name of the Intent handler app.
1911
+ */
1886
1912
  applicationName: string;
1913
+
1914
+ /**
1915
+ * Title of the Intent handler.
1916
+ */
1917
+ applicationTitle?: string;
1918
+
1919
+ /**
1920
+ * Icon of the Intent handler app.
1921
+ */
1887
1922
  applicationIcon?: string;
1923
+
1924
+ /**
1925
+ * ID of the Intent handler app instance.
1926
+ */
1888
1927
  instanceId?: string;
1889
1928
  }
1890
1929
 
1930
+ /**
1931
+ * API for controlling the Intents Resolver UI app.
1932
+ */
1891
1933
  export interface Resolver {
1892
1934
  /**
1893
- * Name of the raised intent
1935
+ * Name of the raised Intent.
1894
1936
  */
1895
- intent: string;
1937
+ intent?: string | IntentRequest;
1938
+
1939
+ /**
1940
+ * Version of the Intents Resolver API.
1941
+ */
1942
+ version: string;
1896
1943
 
1897
1944
  /**
1898
- * Notifies when a ResolverIntentHandler of the current intent is added. Replays the already existing handlers.
1945
+ * Criteria for filtering the available Intent handlers. Available only if the `filterHandlers()` method was used to open the Intents Resolver UI.
1899
1946
  */
1900
- onHandlerAdded(callback: (handler: ResolverIntentHandler) => void): UnsubscribeFunction;
1947
+ handlerFilter?: HandlerFilter;
1901
1948
 
1902
1949
  /**
1903
- * Notifies when a ResolverIntentHandler of the current intent is removed.
1950
+ * Details about the app instance that opened the Intents Resolver UI.
1904
1951
  */
1905
- onHandlerRemoved(callback: (removedHandler: ResolverIntentHandler) => void): UnsubscribeFunction;
1952
+ caller?: ResolverCaller;
1906
1953
 
1907
1954
  /**
1908
- * Sends the chosen handler to the application which raised the intent
1955
+ * Retrieves the title for the search operation. Available only if the `filterHandlers()` method was used to open the Intents Resolver UI and the `title` property of the `HandlerFilter` object was set.
1909
1956
  */
1910
- sendResponse(handler: ResolverIntentHandler): Promise<IOConnectCore.Interop.InvocationResult | undefined>;
1957
+ getTitle(): string | undefined;
1958
+
1959
+ /**
1960
+ * Notifies when a handler for the current Intent is added. Replays already existing handlers.
1961
+ * @param callback Callback function for handling the event.
1962
+ */
1963
+ onHandlerAdded(callback: (handler: ResolverIntentHandler, intent: IntentInfo) => void): UnsubscribeFunction;
1964
+
1965
+ /**
1966
+ * Notifies when a handler for the current Intent is removed.
1967
+ * @param callback Callback function for handling the event.
1968
+ */
1969
+ onHandlerRemoved(callback: (removedHandler: ResolverIntentHandler, intent: IntentInfo) => void): UnsubscribeFunction;
1970
+
1971
+ /**
1972
+ * Sends the chosen Intent handler to the app which raised the Intent.
1973
+ * @param response The Intent handler that will be sent to the app which raised the Intent.
1974
+ * @param options Options for sending the Intent handler to the app that raised the Intent.
1975
+ */
1976
+ sendResponse(response: ResolverIntentHandler, options?: SendResolverResponseOptions): Promise<IOConnectCore.Interop.InvocationResult | undefined>;
1977
+ }
1978
+
1979
+ /**
1980
+ * Describes the app instance that opened the Intents Resolver UI.
1981
+ */
1982
+ export interface ResolverCaller {
1983
+ /**
1984
+ * ID of the Interop instance of the app that opened the Intents Resolver UI.
1985
+ */
1986
+ id: string;
1987
+ /**
1988
+ * Name of the app that opened the Intents Resolver UI.
1989
+ */
1990
+ applicationName?: string;
1991
+ /**
1992
+ * Title of the app that opened the Intents Resolver UI.
1993
+ */
1994
+ applicationTitle?: string;
1995
+ }
1996
+
1997
+ /**
1998
+ * Options for sending the chosen Intent handler to the app that raised the Intent.
1999
+ */
2000
+ export interface SendResolverResponseOptions {
2001
+ /**
2002
+ * If `true`, the chosen Intent handler will be saved as a handler for the raised Intent. If the handler is saved, the next time the same Intent is raised, the Intents Resolver UI won't open and the saved handler will be used automatically.
2003
+ * @default false
2004
+ */
2005
+ saveHandler: boolean;
2006
+ /**
2007
+ * Use this property to supply the name of the Intent when the Intents Resolver UI is opened via the `filterHandlers()` method and you want to save the Intent handler for that Intent. If the Intents Resolver UI is opened via the `raise()` method, it isn't necessary to explicitly provide the Intent name here, as specifying an Intent name is mandatory when using the `raise()` method.
2008
+ */
2009
+ intent?: string;
1911
2010
  }
1912
2011
 
1913
2012
  /**
@@ -2107,6 +2206,12 @@ export namespace IOConnectBrowser {
2107
2206
  * @default: false
2108
2207
  */
2109
2208
  readonly waitUserResponseIndefinitely?: boolean;
2209
+
2210
+ /**
2211
+ * If `true`, the previously saved Intent handler for this Intent (if any) will be cleared.
2212
+ * @default false
2213
+ */
2214
+ readonly clearSavedHandler?: boolean;
2110
2215
  }
2111
2216
 
2112
2217
  /**
package/changelog.md CHANGED
@@ -1,3 +1,7 @@
1
+ 3.4.0
2
+ feat: Extend channels methods with fdc3 options
3
+ feat: Add error events
4
+ feat: Implement open telemetry
1
5
  3.3.5
2
6
  feat: Added the permissions config for workspaces
3
7
  3.3.3