@openfin/core 42.100.80 → 42.100.82

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.
@@ -88,6 +88,12 @@ declare type AlertRequestedEvent = BaseEvent_5 & {
88
88
  url: string;
89
89
  };
90
90
 
91
+ declare type AnalyticsOnlyCalls = 'window-get-web-window' | 'layout-get-by-view-identity' | 'layout-get-stack-by-view' | 'layout-add-view' | 'layout-close-view' | 'view-get-parent-layout' | 'view-get-current-stack' | 'window-is-main-window' | 'window-get-parent-application' | 'window-get-parent-window' | 'window-create-window' | 'window-get-layout' | 'window-dispatch-popup-result' | `layout-controller-${string}`;
92
+
93
+ declare type AnalyticsProtocolMap = {
94
+ [k in AnalyticsOnlyCalls]: VoidCall;
95
+ };
96
+
91
97
  declare type AnchorType = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
92
98
 
93
99
  declare type AnyStrategy = ChannelStrategy<any>;
@@ -3253,6 +3259,7 @@ declare type ClipboardApiPermissions = {
3253
3259
  writeRtf: boolean;
3254
3260
  readRtf: boolean;
3255
3261
  write: boolean;
3262
+ setClipboard: boolean;
3256
3263
  };
3257
3264
 
3258
3265
  /**
@@ -5215,6 +5222,19 @@ declare type ExtensionsInstallFailedEvent = ExtensionsEvent & {
5215
5222
  type: 'extensions-install-failed';
5216
5223
  };
5217
5224
 
5225
+ /**
5226
+ * these api calls are not implemented in the javscript api, only in the external adapter
5227
+ * If they don't exist in the external adapter they should be removed.
5228
+ */
5229
+ declare type ExternalAdapterOnlyCalls = 'subscriber-added' | 'subscriber-removed' | 'clipboard-clear' | 'create-proxy-socket' | 'authenticate-proxy-socket' | 'convert-options' | 'generate-guid' | 'get-config' | 'get-remote-config' | 'get-nearest-display-root' | 'get-preload-scripts' | 'raise-event' | 'set-window-preload-state' | 'dock-window' | 'get-current-window-options' | 'redirect-window-to-url' | 'request-new-content' | 'raise-many-events' | 'show-menu' | 'resolve-proxy' | 'undock-window' | 'window-embedded' | 'window-get-cached-bounds' | 'resource-fetch-authenticate' | 'set-cookie';
5230
+
5231
+ declare type ExternalAdapterOnlyCallsMap = {
5232
+ [k in ExternalAdapterOnlyCalls]: {
5233
+ request: any;
5234
+ response: any;
5235
+ };
5236
+ };
5237
+
5218
5238
  /**
5219
5239
  * An ExternalApplication object representing native language adapter connections to the runtime. Allows
5220
5240
  * the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
@@ -9487,6 +9507,8 @@ declare namespace OpenFin_2 {
9487
9507
  TabStack,
9488
9508
  _Window as Window,
9489
9509
  _WindowModule,
9510
+ Clipboard_2 as Clipboard,
9511
+ InterApplicationBus,
9490
9512
  InteropClient,
9491
9513
  InteropBroker,
9492
9514
  InteropModule,
@@ -11515,6 +11537,10 @@ declare interface PlatformProvider {
11515
11537
  * @returns A promise resolving to `true` if the window should prevent the app from quitting, otherwise `false`.
11516
11538
  */
11517
11539
  shouldWindowPreventQuit(windowIdentity: OpenFin_2.Identity): Promise<boolean>;
11540
+ /**
11541
+ * Method that is called every time an error occurs when processing an action in the Platform Provider. It is meant to be overriden, as a means to debug Platform applications
11542
+ */
11543
+ onError(action: string, error: Error, callerIdentity: OpenFin_2.Identity): void;
11518
11544
  }
11519
11545
 
11520
11546
  /**
@@ -12081,7 +12107,7 @@ declare type PropagatedWindowEvent<TargetTopic extends string> = PropagatedEvent
12081
12107
  */
12082
12108
  declare type PropagatedWindowEventType = PropagatedEvent_3<string>['type'];
12083
12109
 
12084
- declare interface ProtocolMap extends ProtocolMapBase {
12110
+ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap & {
12085
12111
  'is-application-running': ApplicationIdentityCall<{}, boolean>;
12086
12112
  'destroy-application': ApplicationIdentityCall<{
12087
12113
  force: boolean;
@@ -12148,8 +12174,15 @@ declare interface ProtocolMap extends ProtocolMapBase {
12148
12174
  downloadLocation: string;
12149
12175
  };
12150
12176
  response: void;
12177
+ secure: true;
12178
+ namespace: 'Application';
12179
+ apiPath: '.setFileDownloadLocation';
12180
+ };
12181
+ 'get-file-download-location': ApplicationIdentityCall<{}, string> & {
12182
+ secure: true;
12183
+ namespace: 'Application';
12184
+ apiPath: '.getFileDownloadLocation';
12151
12185
  };
12152
- 'get-file-download-location': ApplicationIdentityCall<{}, string>;
12153
12186
  'show-tray-icon-popup-menu': {
12154
12187
  request: OpenFin_2.Identity & {
12155
12188
  options: OpenFin_2.ShowTrayIconPopupMenuOptions;
@@ -12189,44 +12222,79 @@ declare interface ProtocolMap extends ProtocolMapBase {
12189
12222
  'clipboard-read-image': {
12190
12223
  request: OpenFin_2.ReadImageClipboardRequest;
12191
12224
  response: string;
12225
+ secure: true;
12226
+ apiPath: '.readImage';
12227
+ namespace: 'Clipboard';
12192
12228
  };
12193
12229
  'clipboard-read-text': {
12194
12230
  request: {
12195
12231
  type?: OpenFin_2.ClipboardSelectionType;
12196
12232
  };
12197
12233
  response: string;
12234
+ secure: true;
12235
+ apiPath: '.readText';
12236
+ namespace: 'Clipboard';
12198
12237
  };
12199
12238
  'clipboard-read-html': {
12200
12239
  request: {
12201
12240
  type?: OpenFin_2.ClipboardSelectionType;
12202
12241
  };
12203
12242
  response: string;
12243
+ secure: true;
12244
+ apiPath: '.readHtml';
12245
+ namespace: 'Clipboard';
12204
12246
  };
12205
12247
  'clipboard-read-rtf': {
12206
12248
  request: {
12207
12249
  type?: OpenFin_2.ClipboardSelectionType;
12208
12250
  };
12209
12251
  response: string;
12252
+ secure: true;
12253
+ apiPath: '.readRtf';
12254
+ namespace: 'Clipboard';
12210
12255
  };
12211
12256
  'clipboard-write-image': {
12212
12257
  request: OpenFin_2.WriteImageClipboardRequest;
12213
12258
  response: void;
12259
+ secure: true;
12260
+ apiPath: '.writeImage';
12261
+ namespace: 'Clipboard';
12214
12262
  };
12215
12263
  'clipboard-write': {
12216
12264
  request: OpenFin_2.WriteAnyRequestType;
12217
12265
  response: void;
12266
+ secure: true;
12267
+ apiPath: '.write';
12268
+ namespace: 'Clipboard';
12218
12269
  };
12219
12270
  'clipboard-write-text': {
12220
12271
  request: OpenFin_2.WriteClipboardRequest;
12221
12272
  response: void;
12273
+ secure: true;
12274
+ apiPath: '.writeText';
12275
+ namespace: 'Clipboard';
12276
+ foo: '';
12277
+ };
12278
+ 'set-clipboard': {
12279
+ request: OpenFin_2.WriteClipboardRequest;
12280
+ response: void;
12281
+ secure: true;
12282
+ apiPath: '.setClipboard';
12283
+ namespace: 'Clipboard';
12222
12284
  };
12223
12285
  'clipboard-write-html': {
12224
12286
  request: OpenFin_2.WriteClipboardRequest;
12225
12287
  response: void;
12288
+ secure: true;
12289
+ apiPath: '.writeHtml';
12290
+ namespace: 'Clipboard';
12226
12291
  };
12227
12292
  'clipboard-write-rtf': {
12228
12293
  request: OpenFin_2.WriteClipboardRequest;
12229
12294
  response: void;
12295
+ secure: true;
12296
+ apiPath: '.writeRtf';
12297
+ namespace: 'Clipboard';
12230
12298
  };
12231
12299
  'get-view-window': IdentityCall<{}, OpenFin_2.Identity>;
12232
12300
  'create-view': IdentityCall<OpenFin_2.ViewCreationOptions & {
@@ -12441,6 +12509,10 @@ declare interface ProtocolMap extends ProtocolMapBase {
12441
12509
  request: any;
12442
12510
  response: any;
12443
12511
  };
12512
+ 'send-channel-result': {
12513
+ request: any;
12514
+ response: any;
12515
+ };
12444
12516
  'get-version': GetterCall<string>;
12445
12517
  'clear-cache': ApiCall<OpenFin_2.ClearCacheOption, void>;
12446
12518
  'delete-cache-request': VoidCall;
@@ -12490,7 +12562,11 @@ declare interface ProtocolMap extends ProtocolMapBase {
12490
12562
  action: string;
12491
12563
  runtimes: string[];
12492
12564
  }>;
12493
- 'get-installed-apps': GetterCall<OpenFin_2.InstalledApps>;
12565
+ 'get-installed-apps': GetterCall<OpenFin_2.InstalledApps> & {
12566
+ secure: true;
12567
+ apiPath: '.getInstalledApps';
12568
+ namespace: 'System';
12569
+ };
12494
12570
  'view-log': ApiCall<OpenFin_2.GetLogRequestType, string>;
12495
12571
  'get-machine-id': GetterCall<string>;
12496
12572
  'get-min-log-level': GetterCall<OpenFin_2.LogLevel>;
@@ -12503,8 +12579,16 @@ declare interface ProtocolMap extends ProtocolMapBase {
12503
12579
  'get-runtime-info': GetterCall<OpenFin_2.RuntimeInfo>;
12504
12580
  'get-rvm-info': GetterCall<OpenFin_2.RVMInfo>;
12505
12581
  'get-host-specs': GetterCall<OpenFin_2.HostSpecs>;
12506
- 'get-os-info': GetterCall<OpenFin_2.OSInfo>;
12507
- 'launch-external-process': ApiCall<OpenFin_2.ExternalProcessRequestType, OpenFin_2.Identity>;
12582
+ 'get-os-info': GetterCall<OpenFin_2.OSInfo> & {
12583
+ secure: true;
12584
+ apiPath: '.getOSInfo';
12585
+ namespace: 'System';
12586
+ };
12587
+ 'launch-external-process': ApiCall<OpenFin_2.ExternalProcessRequestType, OpenFin_2.Identity> & {
12588
+ secure: true;
12589
+ apiPath: '.launchExternalProcess';
12590
+ namespace: 'System';
12591
+ };
12508
12592
  'monitor-external-process': ApiCall<OpenFin_2.ExternalProcessInfo, OpenFin_2.Identity>;
12509
12593
  'write-to-log': ApiCall<{
12510
12594
  level: string;
@@ -12512,25 +12596,48 @@ declare interface ProtocolMap extends ProtocolMapBase {
12512
12596
  }, void>;
12513
12597
  'open-url-with-browser': ApiCall<{
12514
12598
  url: string;
12515
- }, void>;
12516
- 'register-custom-protocol': ApiCall<OpenFin_2.CustomProtocolOptions, void>;
12599
+ }, void> & {
12600
+ secure: true;
12601
+ apiPath: '.openUrlWithBrowser';
12602
+ namespace: 'System';
12603
+ };
12604
+ 'register-custom-protocol': ApiCall<OpenFin_2.CustomProtocolOptions, void> & {
12605
+ secure: true;
12606
+ apiPath: '.registerCustomProtocol';
12607
+ namespace: 'System';
12608
+ };
12517
12609
  'unregister-custom-protocol': ApiCall<{
12518
12610
  protocolName: string;
12519
- }, void>;
12611
+ }, void> & {
12612
+ secure: true;
12613
+ apiPath: '.unregisterCustomProtocol';
12614
+ namespace: 'System';
12615
+ };
12520
12616
  'get-custom-protocol-state': ApiCall<{
12521
12617
  protocolName: string;
12522
- }, OpenFin_2.CustomProtocolState>;
12618
+ }, OpenFin_2.CustomProtocolState> & {
12619
+ secure: true;
12620
+ apiPath: '.getCustomProtocolState';
12621
+ namespace: 'System';
12622
+ };
12523
12623
  'release-external-process': ApiCall<{
12524
12624
  uuid: string;
12525
12625
  }, void>;
12526
12626
  'show-developer-tools': ApiCall<OpenFin_2.Identity, void>;
12527
- 'terminate-external-process': ApiCall<OpenFin_2.TerminateExternalRequestType, void>;
12627
+ 'terminate-external-process': ApiCall<OpenFin_2.TerminateExternalRequestType, void> & {
12628
+ secure: true;
12629
+ apiPath: '.terminateExternalProcess';
12630
+ namespace: 'System';
12631
+ };
12528
12632
  'update-proxy': ApiCall<OpenFin_2.ProxyConfig, void>;
12529
12633
  'download-asset': {
12530
12634
  request: OpenFin_2.AppAssetInfo & {
12531
12635
  downloadId: string;
12532
12636
  };
12533
12637
  response: void;
12638
+ secure: true;
12639
+ apiPath: '.downloadAsset';
12640
+ namespace: 'System';
12534
12641
  };
12535
12642
  'download-runtime': {
12536
12643
  request: OpenFin_2.RuntimeDownloadOptions & {
@@ -12559,7 +12666,11 @@ declare interface ProtocolMap extends ProtocolMapBase {
12559
12666
  rootKey: string;
12560
12667
  subkey: string;
12561
12668
  value: string;
12562
- }, OpenFin_2.RegistryInfo>;
12669
+ }, OpenFin_2.RegistryInfo> & {
12670
+ secure: true;
12671
+ apiPath: '.readRegistryValue';
12672
+ namespace: 'System';
12673
+ };
12563
12674
  'register-external-connection': ApiCall<{
12564
12675
  uuid: string;
12565
12676
  }, OpenFin_2.ExternalConnection>;
@@ -12593,25 +12704,48 @@ declare interface ProtocolMap extends ProtocolMapBase {
12593
12704
  permissions: any;
12594
12705
  };
12595
12706
  response: OpenFin_2.NativeWindowIntegrationProviderAuthorization;
12707
+ secure: true;
12708
+ apiPath: '.enableNativeWindowIntegrationProvider';
12709
+ namespace: 'System';
12596
12710
  };
12597
12711
  'register-usage': ApiCall<OpenFin_2.RegisterUsageData, void>;
12598
12712
  'system-get-printers': GetterCall<OpenFin_2.PrinterInfo[]>;
12599
12713
  'system-update-process-logging-options': ApiCall<{
12600
12714
  options: OpenFin_2.ProcessLoggingOptions;
12601
12715
  }, void>;
12602
- 'get-domain-settings': ApiCall<void, OpenFin_2.DomainSettings>;
12716
+ 'get-domain-settings': ApiCall<void, OpenFin_2.DomainSettings> & {
12717
+ secure: true;
12718
+ apiPath: '.getDomainSettings';
12719
+ namespace: 'System';
12720
+ };
12603
12721
  'serve-asset': ApiCall<{
12604
12722
  options: OpenFin_2.ServeAssetOptions;
12605
- }, OpenFin_2.ServedAssetInfo>;
12723
+ }, OpenFin_2.ServedAssetInfo> & {
12724
+ secure: true;
12725
+ apiPath: '.serveAsset';
12726
+ namespace: 'System';
12727
+ };
12606
12728
  'set-domain-settings': ApiCall<{
12607
12729
  domainSettings: OpenFin_2.DomainSettings;
12608
- }, void>;
12730
+ }, void> & {
12731
+ secure: true;
12732
+ apiPath: '.setDomainSettings';
12733
+ namespace: 'System';
12734
+ };
12609
12735
  'get-current-domain-settings': ApiCall<{
12610
12736
  identity: OpenFin_2.Identity;
12611
- }, OpenFin_2.ResolvedDomainSettings>;
12737
+ }, OpenFin_2.ResolvedDomainSettings> & {
12738
+ secure: true;
12739
+ apiPath: '.getCurrentDomainSettings';
12740
+ namespace: 'System';
12741
+ };
12612
12742
  'resolve-domain-settings': ApiCall<{
12613
12743
  url: string;
12614
- }, OpenFin_2.ResolvedDomainSettings>;
12744
+ }, OpenFin_2.ResolvedDomainSettings> & {
12745
+ secure: true;
12746
+ apiPath: '.resolveDomainSettings';
12747
+ namespace: 'System';
12748
+ };
12615
12749
  'system-register-shutdown-handler': VoidCall;
12616
12750
  'get-permissions': GetterCall<any>;
12617
12751
  'refresh-extensions': {
@@ -12797,15 +12931,27 @@ declare interface ProtocolMap extends ProtocolMapBase {
12797
12931
  };
12798
12932
  response: void;
12799
12933
  };
12800
- }
12801
-
12802
- declare interface ProtocolMapBase {
12803
- [action: string]: {
12804
- request: any;
12805
- response: any;
12806
- specialResponse?: any;
12934
+ 'subscribe-to-desktop-event': {
12935
+ request: {
12936
+ topic: string;
12937
+ type: string;
12938
+ uuid?: string;
12939
+ name?: string;
12940
+ timestamp?: number;
12941
+ };
12942
+ response: void;
12807
12943
  };
12808
- }
12944
+ 'unsubscribe-to-desktop-event': {
12945
+ request: {
12946
+ topic: string;
12947
+ type: string;
12948
+ uuid?: string;
12949
+ name?: string;
12950
+ timestamp?: number;
12951
+ };
12952
+ response: void;
12953
+ };
12954
+ };
12809
12955
 
12810
12956
  declare type ProtocolOffer = ClassicProtocolOffer | RTCProtocolOffer;
12811
12957
 
@@ -13371,7 +13517,9 @@ declare type SecurityRealmEvent = BaseEvent_9 & {
13371
13517
 
13372
13518
  declare type SendActionResponse<T extends keyof ProtocolMap> = Message<{
13373
13519
  data: ProtocolMap[T]['response'];
13374
- } & ProtocolMap[T]['specialResponse']>;
13520
+ } & (ProtocolMap[T] extends {
13521
+ specialResponse: infer U;
13522
+ } ? U : {})>;
13375
13523
 
13376
13524
  /**
13377
13525
  * @interface
@@ -15384,7 +15532,6 @@ declare type SystemEventType = EventType_8;
15384
15532
  */
15385
15533
  declare type SystemPermissions = {
15386
15534
  getOSInfo: boolean;
15387
- getAllExternalWindows: boolean;
15388
15535
  setDomainSettings: boolean;
15389
15536
  getDomainSettings: boolean;
15390
15537
  getCurrentDomainSettings: boolean;
@@ -15424,6 +15571,10 @@ declare type SystemPermissions = {
15424
15571
  enabled: boolean;
15425
15572
  protocols: string[];
15426
15573
  };
15574
+ getInstalledApps: boolean;
15575
+ downloadAsset: boolean;
15576
+ serveAsset: boolean;
15577
+ enableNativeWindowIntegrationProvider: boolean;
15427
15578
  };
15428
15579
 
15429
15580
  /**
@@ -15735,7 +15886,7 @@ declare class Transport<MeType extends EntityType = EntityType> extends EventEmi
15735
15886
  private connectRemote;
15736
15887
  connectByPort(config: ExistingConnectConfig): Promise<void>;
15737
15888
  private authorize;
15738
- sendAction<T extends keyof ProtocolMap = string>(action: T, payload?: ProtocolMap[T]['request'], uncorrelated?: boolean): SentMessage<SendActionResponse<T>>;
15889
+ sendAction<T extends keyof ProtocolMap>(action: T, payload?: ProtocolMap[T]['request'], uncorrelated?: boolean): SentMessage<SendActionResponse<T>>;
15739
15890
  protected nackHandler(payloadOrMessage: RuntimeErrorPayload | string, reject: Function, callSites?: NodeJS.CallSite[]): void;
15740
15891
  ferryAction(origData: any): Promise<Message<any>>;
15741
15892
  registerMessageHandler(handler: MessageHandler): void;