@openfin/core 40.102.2 → 40.103.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -3221,6 +3221,40 @@ declare class Clipboard_2 extends Base {
3221
3221
  getAvailableFormats(type?: OpenFin_2.ClipboardSelectionType): Promise<Array<string>>;
3222
3222
  }
3223
3223
 
3224
+ /**
3225
+ * Generated when a copy operation is blocked through {@link OpenFin.DomainSettings}.
3226
+ * @interface
3227
+ */
3228
+ declare type ClipboardCopyBlockedEvent = NamedEvent & {
3229
+ type: 'clipboard-copy-blocked';
3230
+ /**
3231
+ * URL of the Window or View that generated the event.
3232
+ */
3233
+ url: string;
3234
+ reason: CopyBlockedEventReason;
3235
+ };
3236
+
3237
+ /**
3238
+ * Generated when a paste operation is blocked through {@link OpenFin.DomainSettings}.
3239
+ * @interface
3240
+ */
3241
+ declare type ClipboardPasteBlockedEvent = NamedEvent & {
3242
+ type: 'clipboard-paste-blocked';
3243
+ /**
3244
+ * URL of the Window or View that generated the event.
3245
+ */
3246
+ url: string;
3247
+ reason: PasteBlockedEventReason;
3248
+ };
3249
+
3250
+ /**
3251
+ * Clipboard Permissions
3252
+ */
3253
+ declare type ClipboardPermissions = {
3254
+ copy?: CopyPermissions;
3255
+ paste?: PastePermissions;
3256
+ };
3257
+
3224
3258
  /**
3225
3259
  * The type of clipboard to write to, can be 'clipboard' or 'selection'.
3226
3260
  * Defaults to 'clipboard'. Use 'selection' for linux only.
@@ -3995,6 +4029,40 @@ declare type CookieOption = {
3995
4029
  name: string;
3996
4030
  };
3997
4031
 
4032
+ /**
4033
+ * Reasons for a copy operation being blocked
4034
+ *
4035
+ * 'disabled': Copy operation is disabled through domain-based permissions.
4036
+ */
4037
+ declare type CopyBlockedEventReason = 'disabled';
4038
+
4039
+ /**
4040
+ * Control copy operations for a matched URL.
4041
+ */
4042
+ declare type CopyPermissions = {
4043
+ /**
4044
+ * @defaultValue 'allowed'
4045
+ *
4046
+ * Controls the behavior for copy operations for a matched URL.
4047
+ *
4048
+ * allow: Enables all copy operations.
4049
+ * block: Disables all copy operations.
4050
+ * protect: Protects any copied content. Only URLs that have set paste.behavior: 'all-content' will be allowed to paste this content.
4051
+ */
4052
+ behavior: 'allow' | 'block' | 'protect';
4053
+ /**
4054
+ * Additional copy operation options
4055
+ */
4056
+ options?: {
4057
+ /**
4058
+ * @defaultValue ''
4059
+ *
4060
+ * When setting behavior = 'protected' , this string will be pasted to other applications that do not have a matching URL instead of the original content.
4061
+ */
4062
+ replacementText: string;
4063
+ };
4064
+ };
4065
+
3998
4066
  /**
3999
4067
  * Defines and applies rounded corners for a frameless window. **NOTE:** On macOS corner is not ellipse but circle rounded by the
4000
4068
  * average of _height_ and _width_.
@@ -4850,7 +4918,7 @@ declare type Event_4 = (WebContentsEvents.Event<'view'> & {
4850
4918
  */
4851
4919
  declare type Event_5<Topic extends string> = {
4852
4920
  topic: Topic;
4853
- } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | DidStartLoadingEvent | PageFaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent | ContentBlockedEvent | WillRedirectEvent);
4921
+ } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | DidStartLoadingEvent | PageFaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent | ContentBlockedEvent | WillRedirectEvent | ClipboardCopyBlockedEvent | ClipboardPasteBlockedEvent);
4854
4922
 
4855
4923
  /**
4856
4924
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link Window}. Events are
@@ -5607,11 +5675,8 @@ declare type FrameEventType = EventType_5;
5607
5675
  /**
5608
5676
  * @interface
5609
5677
  */
5610
- declare type FrameInfo = {
5611
- name: string;
5612
- uuid: string;
5678
+ declare type FrameInfo = EntityInfo & {
5613
5679
  url: string;
5614
- entityType: EntityType_4;
5615
5680
  parent: Identity_4;
5616
5681
  };
5617
5682
 
@@ -9327,6 +9392,8 @@ declare namespace OpenFin_2 {
9327
9392
  ClientConnectionPayload,
9328
9393
  EntityInfo,
9329
9394
  EntityType_4 as EntityType,
9395
+ ScreenCaptureState,
9396
+ ScreenCapturePermission,
9330
9397
  Bounds,
9331
9398
  WindowBounds,
9332
9399
  GetBoundsOptions,
@@ -9547,7 +9614,11 @@ declare namespace OpenFin_2 {
9547
9614
  StructuredContentBehavior,
9548
9615
  StructuredContentPermissions,
9549
9616
  ContentPermission,
9617
+ ScreenCaptureBehavior,
9550
9618
  PerDomainSettings,
9619
+ CopyPermissions,
9620
+ PastePermissions,
9621
+ ClipboardPermissions,
9551
9622
  DomainSettingsRule,
9552
9623
  FileDownloadBehavior,
9553
9624
  FileDownloadBehaviorNames,
@@ -9728,6 +9799,29 @@ declare type PageTitleUpdatedEvent = NamedEvent & {
9728
9799
  title: string;
9729
9800
  };
9730
9801
 
9802
+ /**
9803
+ * Reasons for a paste operation being blocked
9804
+ *
9805
+ * 'invalid-data': Copy protection is enabled and the pasted data is invalid.
9806
+ * 'disabled': Copy protection is turned on and the current URL for this WebContent has been disabled through domain-based settings from accessing the copied data.
9807
+ */
9808
+ declare type PasteBlockedEventReason = 'invalid-data' | 'disabled';
9809
+
9810
+ /**
9811
+ * Control copy operations for a matched URL.
9812
+ */
9813
+ declare type PastePermissions = {
9814
+ /**
9815
+ * @defaultValue 'non-protected-content'
9816
+ *
9817
+ * Controls the behavior for paste operations for a matched URL.
9818
+ *
9819
+ * non-protected-content: All matching URLs will be able to paste content copied from non-protected URLs.
9820
+ * all-content: All matching URLs will be able to paste content copied from both protected (copy.behavior = 'protect') and on-protected (copy.behavior = 'allow') URLs.
9821
+ */
9822
+ behavior: 'non-protected-content' | 'all-content';
9823
+ };
9824
+
9731
9825
  declare type PathServeRequest = ServeRequest & {
9732
9826
  path: string;
9733
9827
  };
@@ -9871,6 +9965,16 @@ declare type PerDomainSettings = {
9871
9965
  * {@inheritdoc ChromiumPolicies}
9872
9966
  */
9873
9967
  chromiumPolicies?: ChromiumPolicies;
9968
+ contentProtection?: {
9969
+ /**
9970
+ * {@inheritdoc ScreenCaptureBehavior}
9971
+ */
9972
+ screenCapture: ScreenCaptureBehavior;
9973
+ /**
9974
+ * {@inheritdoc ClipboardPermissions}
9975
+ */
9976
+ clipboard?: ClipboardPermissions;
9977
+ };
9874
9978
  };
9875
9979
 
9876
9980
  /**
@@ -12521,6 +12625,10 @@ declare interface ProtocolMap extends ProtocolMapBase {
12521
12625
  };
12522
12626
  response: OpenFin_2.PopupResult;
12523
12627
  };
12628
+ 'get-screen-capture-permissions': {
12629
+ request: OpenFin_2.Identity;
12630
+ response: OpenFin_2.ScreenCapturePermission;
12631
+ };
12524
12632
  'render-overlay': {
12525
12633
  request: {
12526
12634
  bounds: OpenFin_2.Bounds;
@@ -13050,6 +13158,31 @@ declare type RvmLaunchOptions = {
13050
13158
  subscribe?: (launch: LaunchEmitter) => void;
13051
13159
  };
13052
13160
 
13161
+ /**
13162
+ * @interface
13163
+ * Controls whether this content should be allowed or blocked when capturing the screen.
13164
+ */
13165
+ declare type ScreenCaptureBehavior = 'allow' | 'block';
13166
+
13167
+ /**
13168
+ * Returned by getScreenCapturePermission. Includes sub-entity permission states and the resulting permission.
13169
+ * @interface
13170
+ */
13171
+ declare type ScreenCapturePermission = {
13172
+ permission: ScreenCaptureBehavior;
13173
+ permissions: ScreenCaptureState[];
13174
+ };
13175
+
13176
+ /**
13177
+ * screenCapture state for a given entity as defined in domain settings.
13178
+ * @interface
13179
+ */
13180
+ declare type ScreenCaptureState = {
13181
+ info: EntityInfo;
13182
+ behavior: ScreenCaptureBehavior;
13183
+ url: string;
13184
+ };
13185
+
13053
13186
  /**
13054
13187
  * @interface
13055
13188
  */
@@ -17295,6 +17428,19 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17295
17428
  * {@link OpenFin.WebContentsEvents event namespace}.
17296
17429
  */
17297
17430
  showPopupWindow(options: OpenFin_2.PopupOptions): Promise<OpenFin_2.PopupResult>;
17431
+ /**
17432
+ *
17433
+ * Get the screen capture permission for this content.
17434
+ *
17435
+ * @example
17436
+ * ```js
17437
+ * const { permission } = await fin.me.getScreenCapturePermission();
17438
+ *
17439
+ * console.log(`This content is currently ${permission}ed in screen captures.`);
17440
+ *
17441
+ * ```
17442
+ */
17443
+ getScreenCapturePermission(): Promise<OpenFin_2.ScreenCapturePermission>;
17298
17444
  }
17299
17445
 
17300
17446
  /**
@@ -17333,6 +17479,8 @@ declare namespace WebContentsEvents {
17333
17479
  FileDownloadProgressEvent,
17334
17480
  FileDownloadCompletedEvent,
17335
17481
  ContentBlockedEvent,
17482
+ ClipboardCopyBlockedEvent,
17483
+ ClipboardPasteBlockedEvent,
17336
17484
  Event_5 as Event,
17337
17485
  WebContentsEvent,
17338
17486
  WillPropagateWebContentsEvent,
package/out/stub.d.ts CHANGED
@@ -3277,6 +3277,40 @@ declare class Clipboard_2 extends Base {
3277
3277
  getAvailableFormats(type?: OpenFin_2.ClipboardSelectionType): Promise<Array<string>>;
3278
3278
  }
3279
3279
 
3280
+ /**
3281
+ * Generated when a copy operation is blocked through {@link OpenFin.DomainSettings}.
3282
+ * @interface
3283
+ */
3284
+ declare type ClipboardCopyBlockedEvent = NamedEvent & {
3285
+ type: 'clipboard-copy-blocked';
3286
+ /**
3287
+ * URL of the Window or View that generated the event.
3288
+ */
3289
+ url: string;
3290
+ reason: CopyBlockedEventReason;
3291
+ };
3292
+
3293
+ /**
3294
+ * Generated when a paste operation is blocked through {@link OpenFin.DomainSettings}.
3295
+ * @interface
3296
+ */
3297
+ declare type ClipboardPasteBlockedEvent = NamedEvent & {
3298
+ type: 'clipboard-paste-blocked';
3299
+ /**
3300
+ * URL of the Window or View that generated the event.
3301
+ */
3302
+ url: string;
3303
+ reason: PasteBlockedEventReason;
3304
+ };
3305
+
3306
+ /**
3307
+ * Clipboard Permissions
3308
+ */
3309
+ declare type ClipboardPermissions = {
3310
+ copy?: CopyPermissions;
3311
+ paste?: PastePermissions;
3312
+ };
3313
+
3280
3314
  /**
3281
3315
  * The type of clipboard to write to, can be 'clipboard' or 'selection'.
3282
3316
  * Defaults to 'clipboard'. Use 'selection' for linux only.
@@ -4054,6 +4088,40 @@ declare type CookieOption = {
4054
4088
  name: string;
4055
4089
  };
4056
4090
 
4091
+ /**
4092
+ * Reasons for a copy operation being blocked
4093
+ *
4094
+ * 'disabled': Copy operation is disabled through domain-based permissions.
4095
+ */
4096
+ declare type CopyBlockedEventReason = 'disabled';
4097
+
4098
+ /**
4099
+ * Control copy operations for a matched URL.
4100
+ */
4101
+ declare type CopyPermissions = {
4102
+ /**
4103
+ * @defaultValue 'allowed'
4104
+ *
4105
+ * Controls the behavior for copy operations for a matched URL.
4106
+ *
4107
+ * allow: Enables all copy operations.
4108
+ * block: Disables all copy operations.
4109
+ * protect: Protects any copied content. Only URLs that have set paste.behavior: 'all-content' will be allowed to paste this content.
4110
+ */
4111
+ behavior: 'allow' | 'block' | 'protect';
4112
+ /**
4113
+ * Additional copy operation options
4114
+ */
4115
+ options?: {
4116
+ /**
4117
+ * @defaultValue ''
4118
+ *
4119
+ * When setting behavior = 'protected' , this string will be pasted to other applications that do not have a matching URL instead of the original content.
4120
+ */
4121
+ replacementText: string;
4122
+ };
4123
+ };
4124
+
4057
4125
  /**
4058
4126
  * Defines and applies rounded corners for a frameless window. **NOTE:** On macOS corner is not ellipse but circle rounded by the
4059
4127
  * average of _height_ and _width_.
@@ -4914,7 +4982,7 @@ declare type Event_4 = (WebContentsEvents.Event<'view'> & {
4914
4982
  */
4915
4983
  declare type Event_5<Topic extends string> = {
4916
4984
  topic: Topic;
4917
- } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | DidStartLoadingEvent | PageFaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent | ContentBlockedEvent | WillRedirectEvent);
4985
+ } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | DidStartLoadingEvent | PageFaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent | ContentBlockedEvent | WillRedirectEvent | ClipboardCopyBlockedEvent | ClipboardPasteBlockedEvent);
4918
4986
 
4919
4987
  /**
4920
4988
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link Window}. Events are
@@ -5695,11 +5763,8 @@ declare type FrameEventType = EventType_5;
5695
5763
  /**
5696
5764
  * @interface
5697
5765
  */
5698
- declare type FrameInfo = {
5699
- name: string;
5700
- uuid: string;
5766
+ declare type FrameInfo = EntityInfo & {
5701
5767
  url: string;
5702
- entityType: EntityType_4;
5703
5768
  parent: Identity_4;
5704
5769
  };
5705
5770
 
@@ -9645,6 +9710,8 @@ declare namespace OpenFin_2 {
9645
9710
  ClientConnectionPayload,
9646
9711
  EntityInfo,
9647
9712
  EntityType_4 as EntityType,
9713
+ ScreenCaptureState,
9714
+ ScreenCapturePermission,
9648
9715
  Bounds,
9649
9716
  WindowBounds,
9650
9717
  GetBoundsOptions,
@@ -9865,7 +9932,11 @@ declare namespace OpenFin_2 {
9865
9932
  StructuredContentBehavior,
9866
9933
  StructuredContentPermissions,
9867
9934
  ContentPermission,
9935
+ ScreenCaptureBehavior,
9868
9936
  PerDomainSettings,
9937
+ CopyPermissions,
9938
+ PastePermissions,
9939
+ ClipboardPermissions,
9869
9940
  DomainSettingsRule,
9870
9941
  FileDownloadBehavior,
9871
9942
  FileDownloadBehaviorNames,
@@ -10046,6 +10117,29 @@ declare type PageTitleUpdatedEvent = NamedEvent & {
10046
10117
  title: string;
10047
10118
  };
10048
10119
 
10120
+ /**
10121
+ * Reasons for a paste operation being blocked
10122
+ *
10123
+ * 'invalid-data': Copy protection is enabled and the pasted data is invalid.
10124
+ * 'disabled': Copy protection is turned on and the current URL for this WebContent has been disabled through domain-based settings from accessing the copied data.
10125
+ */
10126
+ declare type PasteBlockedEventReason = 'invalid-data' | 'disabled';
10127
+
10128
+ /**
10129
+ * Control copy operations for a matched URL.
10130
+ */
10131
+ declare type PastePermissions = {
10132
+ /**
10133
+ * @defaultValue 'non-protected-content'
10134
+ *
10135
+ * Controls the behavior for paste operations for a matched URL.
10136
+ *
10137
+ * non-protected-content: All matching URLs will be able to paste content copied from non-protected URLs.
10138
+ * all-content: All matching URLs will be able to paste content copied from both protected (copy.behavior = 'protect') and on-protected (copy.behavior = 'allow') URLs.
10139
+ */
10140
+ behavior: 'non-protected-content' | 'all-content';
10141
+ };
10142
+
10049
10143
  declare type PathServeRequest = ServeRequest & {
10050
10144
  path: string;
10051
10145
  };
@@ -10189,6 +10283,16 @@ declare type PerDomainSettings = {
10189
10283
  * {@inheritdoc ChromiumPolicies}
10190
10284
  */
10191
10285
  chromiumPolicies?: ChromiumPolicies;
10286
+ contentProtection?: {
10287
+ /**
10288
+ * {@inheritdoc ScreenCaptureBehavior}
10289
+ */
10290
+ screenCapture: ScreenCaptureBehavior;
10291
+ /**
10292
+ * {@inheritdoc ClipboardPermissions}
10293
+ */
10294
+ clipboard?: ClipboardPermissions;
10295
+ };
10192
10296
  };
10193
10297
 
10194
10298
  /**
@@ -12922,6 +13026,10 @@ declare interface ProtocolMap extends ProtocolMapBase {
12922
13026
  };
12923
13027
  response: OpenFin_2.PopupResult;
12924
13028
  };
13029
+ 'get-screen-capture-permissions': {
13030
+ request: OpenFin_2.Identity;
13031
+ response: OpenFin_2.ScreenCapturePermission;
13032
+ };
12925
13033
  'render-overlay': {
12926
13034
  request: {
12927
13035
  bounds: OpenFin_2.Bounds;
@@ -13451,6 +13559,31 @@ declare type RvmLaunchOptions = {
13451
13559
  subscribe?: (launch: LaunchEmitter) => void;
13452
13560
  };
13453
13561
 
13562
+ /**
13563
+ * @interface
13564
+ * Controls whether this content should be allowed or blocked when capturing the screen.
13565
+ */
13566
+ declare type ScreenCaptureBehavior = 'allow' | 'block';
13567
+
13568
+ /**
13569
+ * Returned by getScreenCapturePermission. Includes sub-entity permission states and the resulting permission.
13570
+ * @interface
13571
+ */
13572
+ declare type ScreenCapturePermission = {
13573
+ permission: ScreenCaptureBehavior;
13574
+ permissions: ScreenCaptureState[];
13575
+ };
13576
+
13577
+ /**
13578
+ * screenCapture state for a given entity as defined in domain settings.
13579
+ * @interface
13580
+ */
13581
+ declare type ScreenCaptureState = {
13582
+ info: EntityInfo;
13583
+ behavior: ScreenCaptureBehavior;
13584
+ url: string;
13585
+ };
13586
+
13454
13587
  /**
13455
13588
  * @interface
13456
13589
  */
@@ -17746,6 +17879,19 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17746
17879
  * {@link OpenFin.WebContentsEvents event namespace}.
17747
17880
  */
17748
17881
  showPopupWindow(options: OpenFin_2.PopupOptions): Promise<OpenFin_2.PopupResult>;
17882
+ /**
17883
+ *
17884
+ * Get the screen capture permission for this content.
17885
+ *
17886
+ * @example
17887
+ * ```js
17888
+ * const { permission } = await fin.me.getScreenCapturePermission();
17889
+ *
17890
+ * console.log(`This content is currently ${permission}ed in screen captures.`);
17891
+ *
17892
+ * ```
17893
+ */
17894
+ getScreenCapturePermission(): Promise<OpenFin_2.ScreenCapturePermission>;
17749
17895
  }
17750
17896
 
17751
17897
  /**
@@ -17784,6 +17930,8 @@ declare namespace WebContentsEvents {
17784
17930
  FileDownloadProgressEvent,
17785
17931
  FileDownloadCompletedEvent,
17786
17932
  ContentBlockedEvent,
17933
+ ClipboardCopyBlockedEvent,
17934
+ ClipboardPasteBlockedEvent,
17787
17935
  Event_5 as Event,
17788
17936
  WebContentsEvent,
17789
17937
  WillPropagateWebContentsEvent,