@openfin/fdc3-api 41.100.39 → 41.100.42

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.
@@ -3214,6 +3214,40 @@ declare class Clipboard_2 extends Base {
3214
3214
  getAvailableFormats(type?: OpenFin.ClipboardSelectionType): Promise<Array<string>>;
3215
3215
  }
3216
3216
 
3217
+ /**
3218
+ * Generated when a copy operation is blocked through {@link OpenFin.DomainSettings}.
3219
+ * @interface
3220
+ */
3221
+ declare type ClipboardCopyBlockedEvent = NamedEvent & {
3222
+ type: 'clipboard-copy-blocked';
3223
+ /**
3224
+ * URL of the Window or View that generated the event.
3225
+ */
3226
+ url: string;
3227
+ reason: CopyBlockedEventReason;
3228
+ };
3229
+
3230
+ /**
3231
+ * Generated when a paste operation is blocked through {@link OpenFin.DomainSettings}.
3232
+ * @interface
3233
+ */
3234
+ declare type ClipboardPasteBlockedEvent = NamedEvent & {
3235
+ type: 'clipboard-paste-blocked';
3236
+ /**
3237
+ * URL of the Window or View that generated the event.
3238
+ */
3239
+ url: string;
3240
+ reason: PasteBlockedEventReason;
3241
+ };
3242
+
3243
+ /**
3244
+ * Clipboard Permissions
3245
+ */
3246
+ declare type ClipboardPermissions = {
3247
+ copy?: CopyPermissions;
3248
+ paste?: PastePermissions;
3249
+ };
3250
+
3217
3251
  /**
3218
3252
  * The type of clipboard to write to, can be 'clipboard' or 'selection'.
3219
3253
  * 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
+ * allowed: Enables all copy operations.
4049
+ * blocked: Disables all copy operations.
4050
+ * protected: Protects any copied content. Only URLs that have set paste.behavior: 'all-content' will be allowed to paste this content.
4051
+ */
4052
+ behavior: 'allowed' | 'blocked' | 'protected';
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_.
@@ -4841,7 +4909,7 @@ declare type Event_4 = (WebContentsEvents.Event<'view'> & {
4841
4909
  */
4842
4910
  declare type Event_5<Topic extends string> = {
4843
4911
  topic: Topic;
4844
- } & (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);
4912
+ } & (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);
4845
4913
 
4846
4914
  /**
4847
4915
  * [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
@@ -9894,6 +9962,9 @@ declare namespace OpenFin {
9894
9962
  ContentPermission,
9895
9963
  ScreenCaptureBehavior,
9896
9964
  PerDomainSettings,
9965
+ CopyPermissions,
9966
+ PastePermissions,
9967
+ ClipboardPermissions,
9897
9968
  DomainSettingsRule,
9898
9969
  FileDownloadBehavior,
9899
9970
  FileDownloadBehaviorNames,
@@ -10067,6 +10138,29 @@ declare type PageTitleUpdatedEvent = NamedEvent & {
10067
10138
  title: string;
10068
10139
  };
10069
10140
 
10141
+ /**
10142
+ * Reasons for a paste operation being blocked
10143
+ *
10144
+ * 'invalid-data': Copy protection is enabled and the pasted data is invalid.
10145
+ * '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.
10146
+ */
10147
+ declare type PasteBlockedEventReason = 'invalid-data' | 'disabled';
10148
+
10149
+ /**
10150
+ * Control copy operations for a matched URL.
10151
+ */
10152
+ declare type PastePermissions = {
10153
+ /**
10154
+ * @defaultValue 'non-protected-content'
10155
+ *
10156
+ * Controls the behavior for paste operations for a matched URL.
10157
+ *
10158
+ * non-protected-content: All matching URLs will be able to paste content copied from non-protected URLs.
10159
+ * all-content: All matching URLs will be able to paste content copied from both protected (copy.behavior = ‘protected') and non-protected (copy.behavior = 'allowed') URLs.
10160
+ */
10161
+ behavior: 'non-protected-content' | 'all-content';
10162
+ };
10163
+
10070
10164
  declare type Payload<Success extends boolean = boolean, Data = any> = {
10071
10165
  success: Success;
10072
10166
  data: Success extends true ? Data : never;
@@ -10210,7 +10304,11 @@ declare type PerDomainSettings = {
10210
10304
  /**
10211
10305
  * {@inheritdoc ScreenCaptureBehavior}
10212
10306
  */
10213
- screenCapture: ScreenCaptureBehavior;
10307
+ screenCapture?: ScreenCaptureBehavior;
10308
+ /**
10309
+ * {@inheritdoc ClipboardPermissions}
10310
+ */
10311
+ clipboard?: ClipboardPermissions;
10214
10312
  };
10215
10313
  };
10216
10314
 
@@ -17801,6 +17899,8 @@ declare namespace WebContentsEvents {
17801
17899
  FileDownloadProgressEvent,
17802
17900
  FileDownloadCompletedEvent,
17803
17901
  ContentBlockedEvent,
17902
+ ClipboardCopyBlockedEvent,
17903
+ ClipboardPasteBlockedEvent,
17804
17904
  Event_5 as Event,
17805
17905
  WebContentsEvent,
17806
17906
  WillPropagateWebContentsEvent,
@@ -3214,6 +3214,40 @@ declare class Clipboard_2 extends Base {
3214
3214
  getAvailableFormats(type?: OpenFin.ClipboardSelectionType): Promise<Array<string>>;
3215
3215
  }
3216
3216
 
3217
+ /**
3218
+ * Generated when a copy operation is blocked through {@link OpenFin.DomainSettings}.
3219
+ * @interface
3220
+ */
3221
+ declare type ClipboardCopyBlockedEvent = NamedEvent & {
3222
+ type: 'clipboard-copy-blocked';
3223
+ /**
3224
+ * URL of the Window or View that generated the event.
3225
+ */
3226
+ url: string;
3227
+ reason: CopyBlockedEventReason;
3228
+ };
3229
+
3230
+ /**
3231
+ * Generated when a paste operation is blocked through {@link OpenFin.DomainSettings}.
3232
+ * @interface
3233
+ */
3234
+ declare type ClipboardPasteBlockedEvent = NamedEvent & {
3235
+ type: 'clipboard-paste-blocked';
3236
+ /**
3237
+ * URL of the Window or View that generated the event.
3238
+ */
3239
+ url: string;
3240
+ reason: PasteBlockedEventReason;
3241
+ };
3242
+
3243
+ /**
3244
+ * Clipboard Permissions
3245
+ */
3246
+ declare type ClipboardPermissions = {
3247
+ copy?: CopyPermissions;
3248
+ paste?: PastePermissions;
3249
+ };
3250
+
3217
3251
  /**
3218
3252
  * The type of clipboard to write to, can be 'clipboard' or 'selection'.
3219
3253
  * 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
+ * allowed: Enables all copy operations.
4049
+ * blocked: Disables all copy operations.
4050
+ * protected: Protects any copied content. Only URLs that have set paste.behavior: 'all-content' will be allowed to paste this content.
4051
+ */
4052
+ behavior: 'allowed' | 'blocked' | 'protected';
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_.
@@ -4841,7 +4909,7 @@ declare type Event_4 = (WebContentsEvents.Event<'view'> & {
4841
4909
  */
4842
4910
  declare type Event_5<Topic extends string> = {
4843
4911
  topic: Topic;
4844
- } & (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);
4912
+ } & (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);
4845
4913
 
4846
4914
  /**
4847
4915
  * [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
@@ -9894,6 +9962,9 @@ declare namespace OpenFin {
9894
9962
  ContentPermission,
9895
9963
  ScreenCaptureBehavior,
9896
9964
  PerDomainSettings,
9965
+ CopyPermissions,
9966
+ PastePermissions,
9967
+ ClipboardPermissions,
9897
9968
  DomainSettingsRule,
9898
9969
  FileDownloadBehavior,
9899
9970
  FileDownloadBehaviorNames,
@@ -10067,6 +10138,29 @@ declare type PageTitleUpdatedEvent = NamedEvent & {
10067
10138
  title: string;
10068
10139
  };
10069
10140
 
10141
+ /**
10142
+ * Reasons for a paste operation being blocked
10143
+ *
10144
+ * 'invalid-data': Copy protection is enabled and the pasted data is invalid.
10145
+ * '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.
10146
+ */
10147
+ declare type PasteBlockedEventReason = 'invalid-data' | 'disabled';
10148
+
10149
+ /**
10150
+ * Control copy operations for a matched URL.
10151
+ */
10152
+ declare type PastePermissions = {
10153
+ /**
10154
+ * @defaultValue 'non-protected-content'
10155
+ *
10156
+ * Controls the behavior for paste operations for a matched URL.
10157
+ *
10158
+ * non-protected-content: All matching URLs will be able to paste content copied from non-protected URLs.
10159
+ * all-content: All matching URLs will be able to paste content copied from both protected (copy.behavior = ‘protected') and non-protected (copy.behavior = 'allowed') URLs.
10160
+ */
10161
+ behavior: 'non-protected-content' | 'all-content';
10162
+ };
10163
+
10070
10164
  declare type Payload<Success extends boolean = boolean, Data = any> = {
10071
10165
  success: Success;
10072
10166
  data: Success extends true ? Data : never;
@@ -10210,7 +10304,11 @@ declare type PerDomainSettings = {
10210
10304
  /**
10211
10305
  * {@inheritdoc ScreenCaptureBehavior}
10212
10306
  */
10213
- screenCapture: ScreenCaptureBehavior;
10307
+ screenCapture?: ScreenCaptureBehavior;
10308
+ /**
10309
+ * {@inheritdoc ClipboardPermissions}
10310
+ */
10311
+ clipboard?: ClipboardPermissions;
10214
10312
  };
10215
10313
  };
10216
10314
 
@@ -17801,6 +17899,8 @@ declare namespace WebContentsEvents {
17801
17899
  FileDownloadProgressEvent,
17802
17900
  FileDownloadCompletedEvent,
17803
17901
  ContentBlockedEvent,
17902
+ ClipboardCopyBlockedEvent,
17903
+ ClipboardPasteBlockedEvent,
17804
17904
  Event_5 as Event,
17805
17905
  WebContentsEvent,
17806
17906
  WillPropagateWebContentsEvent,
@@ -3214,6 +3214,40 @@ declare class Clipboard_2 extends Base {
3214
3214
  getAvailableFormats(type?: OpenFin.ClipboardSelectionType): Promise<Array<string>>;
3215
3215
  }
3216
3216
 
3217
+ /**
3218
+ * Generated when a copy operation is blocked through {@link OpenFin.DomainSettings}.
3219
+ * @interface
3220
+ */
3221
+ declare type ClipboardCopyBlockedEvent = NamedEvent & {
3222
+ type: 'clipboard-copy-blocked';
3223
+ /**
3224
+ * URL of the Window or View that generated the event.
3225
+ */
3226
+ url: string;
3227
+ reason: CopyBlockedEventReason;
3228
+ };
3229
+
3230
+ /**
3231
+ * Generated when a paste operation is blocked through {@link OpenFin.DomainSettings}.
3232
+ * @interface
3233
+ */
3234
+ declare type ClipboardPasteBlockedEvent = NamedEvent & {
3235
+ type: 'clipboard-paste-blocked';
3236
+ /**
3237
+ * URL of the Window or View that generated the event.
3238
+ */
3239
+ url: string;
3240
+ reason: PasteBlockedEventReason;
3241
+ };
3242
+
3243
+ /**
3244
+ * Clipboard Permissions
3245
+ */
3246
+ declare type ClipboardPermissions = {
3247
+ copy?: CopyPermissions;
3248
+ paste?: PastePermissions;
3249
+ };
3250
+
3217
3251
  /**
3218
3252
  * The type of clipboard to write to, can be 'clipboard' or 'selection'.
3219
3253
  * 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
+ * allowed: Enables all copy operations.
4049
+ * blocked: Disables all copy operations.
4050
+ * protected: Protects any copied content. Only URLs that have set paste.behavior: 'all-content' will be allowed to paste this content.
4051
+ */
4052
+ behavior: 'allowed' | 'blocked' | 'protected';
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_.
@@ -4841,7 +4909,7 @@ declare type Event_4 = (WebContentsEvents.Event<'view'> & {
4841
4909
  */
4842
4910
  declare type Event_5<Topic extends string> = {
4843
4911
  topic: Topic;
4844
- } & (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);
4912
+ } & (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);
4845
4913
 
4846
4914
  /**
4847
4915
  * [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
@@ -9894,6 +9962,9 @@ declare namespace OpenFin {
9894
9962
  ContentPermission,
9895
9963
  ScreenCaptureBehavior,
9896
9964
  PerDomainSettings,
9965
+ CopyPermissions,
9966
+ PastePermissions,
9967
+ ClipboardPermissions,
9897
9968
  DomainSettingsRule,
9898
9969
  FileDownloadBehavior,
9899
9970
  FileDownloadBehaviorNames,
@@ -10067,6 +10138,29 @@ declare type PageTitleUpdatedEvent = NamedEvent & {
10067
10138
  title: string;
10068
10139
  };
10069
10140
 
10141
+ /**
10142
+ * Reasons for a paste operation being blocked
10143
+ *
10144
+ * 'invalid-data': Copy protection is enabled and the pasted data is invalid.
10145
+ * '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.
10146
+ */
10147
+ declare type PasteBlockedEventReason = 'invalid-data' | 'disabled';
10148
+
10149
+ /**
10150
+ * Control copy operations for a matched URL.
10151
+ */
10152
+ declare type PastePermissions = {
10153
+ /**
10154
+ * @defaultValue 'non-protected-content'
10155
+ *
10156
+ * Controls the behavior for paste operations for a matched URL.
10157
+ *
10158
+ * non-protected-content: All matching URLs will be able to paste content copied from non-protected URLs.
10159
+ * all-content: All matching URLs will be able to paste content copied from both protected (copy.behavior = ‘protected') and non-protected (copy.behavior = 'allowed') URLs.
10160
+ */
10161
+ behavior: 'non-protected-content' | 'all-content';
10162
+ };
10163
+
10070
10164
  declare type Payload<Success extends boolean = boolean, Data = any> = {
10071
10165
  success: Success;
10072
10166
  data: Success extends true ? Data : never;
@@ -10210,7 +10304,11 @@ declare type PerDomainSettings = {
10210
10304
  /**
10211
10305
  * {@inheritdoc ScreenCaptureBehavior}
10212
10306
  */
10213
- screenCapture: ScreenCaptureBehavior;
10307
+ screenCapture?: ScreenCaptureBehavior;
10308
+ /**
10309
+ * {@inheritdoc ClipboardPermissions}
10310
+ */
10311
+ clipboard?: ClipboardPermissions;
10214
10312
  };
10215
10313
  };
10216
10314
 
@@ -17801,6 +17899,8 @@ declare namespace WebContentsEvents {
17801
17899
  FileDownloadProgressEvent,
17802
17900
  FileDownloadCompletedEvent,
17803
17901
  ContentBlockedEvent,
17902
+ ClipboardCopyBlockedEvent,
17903
+ ClipboardPasteBlockedEvent,
17804
17904
  Event_5 as Event,
17805
17905
  WebContentsEvent,
17806
17906
  WillPropagateWebContentsEvent,
package/out/fdc3-api.d.ts CHANGED
@@ -3270,6 +3270,40 @@ declare class Clipboard_2 extends Base {
3270
3270
  getAvailableFormats(type?: OpenFin.ClipboardSelectionType): Promise<Array<string>>;
3271
3271
  }
3272
3272
 
3273
+ /**
3274
+ * Generated when a copy operation is blocked through {@link OpenFin.DomainSettings}.
3275
+ * @interface
3276
+ */
3277
+ declare type ClipboardCopyBlockedEvent = NamedEvent & {
3278
+ type: 'clipboard-copy-blocked';
3279
+ /**
3280
+ * URL of the Window or View that generated the event.
3281
+ */
3282
+ url: string;
3283
+ reason: CopyBlockedEventReason;
3284
+ };
3285
+
3286
+ /**
3287
+ * Generated when a paste operation is blocked through {@link OpenFin.DomainSettings}.
3288
+ * @interface
3289
+ */
3290
+ declare type ClipboardPasteBlockedEvent = NamedEvent & {
3291
+ type: 'clipboard-paste-blocked';
3292
+ /**
3293
+ * URL of the Window or View that generated the event.
3294
+ */
3295
+ url: string;
3296
+ reason: PasteBlockedEventReason;
3297
+ };
3298
+
3299
+ /**
3300
+ * Clipboard Permissions
3301
+ */
3302
+ declare type ClipboardPermissions = {
3303
+ copy?: CopyPermissions;
3304
+ paste?: PastePermissions;
3305
+ };
3306
+
3273
3307
  /**
3274
3308
  * The type of clipboard to write to, can be 'clipboard' or 'selection'.
3275
3309
  * 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
+ * allowed: Enables all copy operations.
4108
+ * blocked: Disables all copy operations.
4109
+ * protected: Protects any copied content. Only URLs that have set paste.behavior: 'all-content' will be allowed to paste this content.
4110
+ */
4111
+ behavior: 'allowed' | 'blocked' | 'protected';
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_.
@@ -4905,7 +4973,7 @@ declare type Event_4 = (WebContentsEvents.Event<'view'> & {
4905
4973
  */
4906
4974
  declare type Event_5<Topic extends string> = {
4907
4975
  topic: Topic;
4908
- } & (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);
4976
+ } & (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);
4909
4977
 
4910
4978
  /**
4911
4979
  * [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
@@ -10212,6 +10280,9 @@ declare namespace OpenFin {
10212
10280
  ContentPermission,
10213
10281
  ScreenCaptureBehavior,
10214
10282
  PerDomainSettings,
10283
+ CopyPermissions,
10284
+ PastePermissions,
10285
+ ClipboardPermissions,
10215
10286
  DomainSettingsRule,
10216
10287
  FileDownloadBehavior,
10217
10288
  FileDownloadBehaviorNames,
@@ -10385,6 +10456,29 @@ declare type PageTitleUpdatedEvent = NamedEvent & {
10385
10456
  title: string;
10386
10457
  };
10387
10458
 
10459
+ /**
10460
+ * Reasons for a paste operation being blocked
10461
+ *
10462
+ * 'invalid-data': Copy protection is enabled and the pasted data is invalid.
10463
+ * '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.
10464
+ */
10465
+ declare type PasteBlockedEventReason = 'invalid-data' | 'disabled';
10466
+
10467
+ /**
10468
+ * Control copy operations for a matched URL.
10469
+ */
10470
+ declare type PastePermissions = {
10471
+ /**
10472
+ * @defaultValue 'non-protected-content'
10473
+ *
10474
+ * Controls the behavior for paste operations for a matched URL.
10475
+ *
10476
+ * non-protected-content: All matching URLs will be able to paste content copied from non-protected URLs.
10477
+ * all-content: All matching URLs will be able to paste content copied from both protected (copy.behavior = ‘protected') and non-protected (copy.behavior = 'allowed') URLs.
10478
+ */
10479
+ behavior: 'non-protected-content' | 'all-content';
10480
+ };
10481
+
10388
10482
  declare type Payload<Success extends boolean = boolean, Data = any> = {
10389
10483
  success: Success;
10390
10484
  data: Success extends true ? Data : never;
@@ -10528,7 +10622,11 @@ declare type PerDomainSettings = {
10528
10622
  /**
10529
10623
  * {@inheritdoc ScreenCaptureBehavior}
10530
10624
  */
10531
- screenCapture: ScreenCaptureBehavior;
10625
+ screenCapture?: ScreenCaptureBehavior;
10626
+ /**
10627
+ * {@inheritdoc ClipboardPermissions}
10628
+ */
10629
+ clipboard?: ClipboardPermissions;
10532
10630
  };
10533
10631
  };
10534
10632
 
@@ -18252,6 +18350,8 @@ declare namespace WebContentsEvents {
18252
18350
  FileDownloadProgressEvent,
18253
18351
  FileDownloadCompletedEvent,
18254
18352
  ContentBlockedEvent,
18353
+ ClipboardCopyBlockedEvent,
18354
+ ClipboardPasteBlockedEvent,
18255
18355
  Event_5 as Event,
18256
18356
  WebContentsEvent,
18257
18357
  WillPropagateWebContentsEvent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/fdc3-api",
3
- "version": "41.100.39",
3
+ "version": "41.100.42",
4
4
  "description": "OpenFin fdc3 module utilities and types.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "private": false,