webext-schema 5.0.1 → 5.0.3

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/package.json CHANGED
@@ -38,15 +38,15 @@
38
38
  "devDependencies": {
39
39
  "c8": "^7.12.0",
40
40
  "chai": "^4.3.6",
41
- "eslint": "^8.22.0",
41
+ "eslint": "^8.23.1",
42
42
  "eslint-config-standard": "^17.0.0",
43
43
  "eslint-plugin-import": "^2.26.0",
44
44
  "eslint-plugin-jsdoc": "^39.3.6",
45
45
  "eslint-plugin-node": "^11.1.0",
46
- "eslint-plugin-promise": "^6.0.0",
46
+ "eslint-plugin-promise": "^6.0.1",
47
47
  "mocha": "^10.0.0",
48
48
  "nock": "^13.2.9",
49
49
  "npm-run-all": "^4.1.5"
50
50
  },
51
- "version": "5.0.1"
51
+ "version": "5.0.3"
52
52
  }
@@ -9699,9 +9699,297 @@
9699
9699
  "description": "ID of the Ruleset this rule belongs to."
9700
9700
  }
9701
9701
  }
9702
+ },
9703
+ {
9704
+ "id": "Rule",
9705
+ "type": "object",
9706
+ "properties": {
9707
+ "id": {
9708
+ "type": "integer",
9709
+ "description": "An id which uniquely identifies a rule. Mandatory and should be >= 1.",
9710
+ "minimum": 1
9711
+ },
9712
+ "priority": {
9713
+ "type": "integer",
9714
+ "optional": true,
9715
+ "description": "Rule priority. Defaults to 1. When specified, should be >= 1",
9716
+ "minimum": 1,
9717
+ "default": 1
9718
+ },
9719
+ "condition": {
9720
+ "type": "object",
9721
+ "description": "The condition under which this rule is triggered.",
9722
+ "properties": {
9723
+ "urlFilter": {
9724
+ "type": "string",
9725
+ "optional": true,
9726
+ "description": "TODO: link to doc explaining supported pattern. The pattern which is matched against the network request url. Only one of 'urlFilter' or 'regexFilter' can be specified."
9727
+ },
9728
+ "regexFilter": {
9729
+ "type": "string",
9730
+ "optional": true,
9731
+ "description": "Regular expression to match against the network request url. Only one of 'urlFilter' or 'regexFilter' can be specified."
9732
+ },
9733
+ "isUrlFilterCaseSensitive": {
9734
+ "type": "boolean",
9735
+ "optional": true,
9736
+ "description": "Whether 'urlFilter' or 'regexFilter' is case-sensitive. Defaults to true."
9737
+ },
9738
+ "initiatorDomains": {
9739
+ "type": "array",
9740
+ "optional": true,
9741
+ "description": "The rule will only match network requests originating from the list of 'initiatorDomains'. If the list is omitted, the rule is applied to requests from all domains.",
9742
+ "minItems": 1,
9743
+ "items": {
9744
+ "type": "string",
9745
+ "description": "TODO: describe domain format."
9746
+ }
9747
+ },
9748
+ "excludedInitiatorDomains": {
9749
+ "type": "array",
9750
+ "optional": true,
9751
+ "description": "The rule will not match network requests originating from the list of 'initiatorDomains'. If the list is empty or omitted, no domains are excluded. This takes precedence over 'initiatorDomains'.",
9752
+ "items": {
9753
+ "type": "string",
9754
+ "description": "TODO: describe domain format."
9755
+ }
9756
+ },
9757
+ "requestDomains": {
9758
+ "type": "array",
9759
+ "optional": true,
9760
+ "description": "The rule will only match network requests when the domain matches one from the list of 'requestDomains'. If the list is omitted, the rule is applied to requests from all domains.",
9761
+ "minItems": 1,
9762
+ "items": {
9763
+ "type": "string",
9764
+ "description": "TODO: describe domain format."
9765
+ }
9766
+ },
9767
+ "excludedRequestDomains": {
9768
+ "type": "array",
9769
+ "optional": true,
9770
+ "description": "The rule will not match network requests when the domains matches one from the list of 'excludedRequestDomains'. If the list is empty or omitted, no domains are excluded. This takes precedence over 'requestDomains'.",
9771
+ "items": {
9772
+ "type": "string",
9773
+ "description": "TODO: describe domain format."
9774
+ }
9775
+ },
9776
+ "resourceTypes": {
9777
+ "type": "array",
9778
+ "optional": true,
9779
+ "description": "List of resource types which the rule can match. When the rule action is 'allowAllRequests', this must be specified and may only contain 'main_frame' or 'sub_frame'. Cannot be specified if 'excludedResourceTypes' is specified. If neither of them is specified, all resource types except 'main_frame' are matched.",
9780
+ "minItems": 1,
9781
+ "items": {
9782
+ "$ref": "ResourceType"
9783
+ }
9784
+ },
9785
+ "excludedResourceTypes": {
9786
+ "type": "array",
9787
+ "optional": true,
9788
+ "description": "List of resource types which the rule won't match. Cannot be specified if 'resourceTypes' is specified. If neither of them is specified, all resource types except 'main_frame' are matched.",
9789
+ "minItems": 1,
9790
+ "items": {
9791
+ "$ref": "ResourceType"
9792
+ }
9793
+ },
9794
+ "requestMethods": {
9795
+ "type": "array",
9796
+ "optional": true,
9797
+ "description": "List of HTTP request methods which the rule can match. Should be a lower-case method such as 'connect', 'delete', 'get', 'head', 'options', 'patch', 'post', 'put'.'",
9798
+ "minItems": 1,
9799
+ "items": {
9800
+ "type": "string"
9801
+ }
9802
+ },
9803
+ "excludedRequestMethods": {
9804
+ "type": "array",
9805
+ "optional": true,
9806
+ "description": "List of request methods which the rule won't match. Cannot be specified if 'requestMethods' is specified. If neither of them is specified, all request methods are matched.",
9807
+ "minItems": 1,
9808
+ "items": {
9809
+ "type": "string"
9810
+ }
9811
+ },
9812
+ "domainType": {
9813
+ "type": "string",
9814
+ "optional": true,
9815
+ "description": "Specifies whether the network request is first-party or third-party to the domain from which it originated. If omitted, all requests are matched.",
9816
+ "enum": [
9817
+ "firstParty",
9818
+ "thirdParty"
9819
+ ]
9820
+ },
9821
+ "tabIds": {
9822
+ "type": "array",
9823
+ "optional": true,
9824
+ "description": "List of tabIds which the rule should match. An ID of -1 matches requests which don't originate from a tab. Only supported for session-scoped rules.",
9825
+ "minItems": 1,
9826
+ "items": {
9827
+ "type": "integer"
9828
+ }
9829
+ },
9830
+ "excludedTabIds": {
9831
+ "type": "array",
9832
+ "optional": true,
9833
+ "description": "List of tabIds which the rule should not match. An ID of -1 excludes requests which don't originate from a tab. Only supported for session-scoped rules.",
9834
+ "items": {
9835
+ "type": "integer"
9836
+ }
9837
+ }
9838
+ }
9839
+ },
9840
+ "action": {
9841
+ "type": "object",
9842
+ "description": "The action to take if this rule is matched.",
9843
+ "properties": {
9844
+ "type": {
9845
+ "type": "string",
9846
+ "enum": [
9847
+ "block",
9848
+ "redirect",
9849
+ "allow",
9850
+ "upgradeScheme",
9851
+ "modifyHeaders",
9852
+ "allowAllRequests"
9853
+ ]
9854
+ },
9855
+ "redirect": {
9856
+ "type": "object",
9857
+ "optional": true,
9858
+ "description": "Describes how the redirect should be performed. Only valid when type is 'redirect'.",
9859
+ "properties": {
9860
+ "extensionPath": {
9861
+ "type": "string",
9862
+ "optional": true,
9863
+ "description": "Path relative to the extension directory. Should start with '/'."
9864
+ },
9865
+ "transform": {
9866
+ "type": "object",
9867
+ "optional": true,
9868
+ "description": "TODO: URLTransform - Url transformations to perform."
9869
+ },
9870
+ "url": {
9871
+ "type": "string",
9872
+ "optional": true,
9873
+ "description": "The redirect url. Redirects to JavaScript urls are not allowed."
9874
+ },
9875
+ "regexSubstitution": {
9876
+ "type": "string",
9877
+ "optional": true,
9878
+ "description": "TODO with regexFilter + Substitution pattern for rules which specify a 'regexFilter'."
9879
+ }
9880
+ }
9881
+ },
9882
+ "requestHeaders": {
9883
+ "type": "object",
9884
+ "optional": true,
9885
+ "description": "The request headers to modify for the request. Only valid when type is 'modifyHeaders'.",
9886
+ "properties": {
9887
+ "header": {
9888
+ "type": "string",
9889
+ "description": "The name of the request header to be modified."
9890
+ },
9891
+ "operation": {
9892
+ "type": "string",
9893
+ "description": "The operation to be performed on a header. The 'append' operation is not supported for request headers.",
9894
+ "enum": [
9895
+ "set",
9896
+ "remove"
9897
+ ]
9898
+ },
9899
+ "value": {
9900
+ "type": "string",
9901
+ "optional": true,
9902
+ "description": "The new value for the header. Must be specified for the 'set' operation."
9903
+ }
9904
+ }
9905
+ },
9906
+ "responseHeaders": {
9907
+ "type": "object",
9908
+ "optional": true,
9909
+ "description": "The response headers to modify for the request. Only valid when type is 'modifyHeaders'.",
9910
+ "properties": {
9911
+ "header": {
9912
+ "type": "string",
9913
+ "description": "The name of the response header to be modified."
9914
+ },
9915
+ "operation": {
9916
+ "type": "string",
9917
+ "description": "The operation to be performed on a header.",
9918
+ "enum": [
9919
+ "append",
9920
+ "set",
9921
+ "remove"
9922
+ ]
9923
+ },
9924
+ "value": {
9925
+ "type": "string",
9926
+ "optional": true,
9927
+ "description": "The new value for the header. Must be specified for the 'append' and 'set' operations."
9928
+ }
9929
+ }
9930
+ }
9931
+ }
9932
+ }
9933
+ }
9702
9934
  }
9703
9935
  ],
9704
9936
  "functions": [
9937
+ {
9938
+ "name": "updateSessionRules",
9939
+ "type": "function",
9940
+ "description": "Modifies the current set of session scoped rules for the extension. The rules with IDs listed in options.removeRuleIds are first removed, and then the rules given in options.addRules are added. These rules are not persisted across sessions and are backed in memory.",
9941
+ "async": "callback",
9942
+ "parameters": [
9943
+ {
9944
+ "name": "options",
9945
+ "type": "object",
9946
+ "properties": {
9947
+ "removeRuleIds": {
9948
+ "type": "array",
9949
+ "optional": true,
9950
+ "description": "IDs of the rules to remove. Any invalid IDs will be ignored.",
9951
+ "items": {
9952
+ "type": "integer"
9953
+ }
9954
+ },
9955
+ "addRules": {
9956
+ "type": "array",
9957
+ "optional": true,
9958
+ "description": "Rules to add.",
9959
+ "items": {
9960
+ "$ref": "Rule"
9961
+ }
9962
+ }
9963
+ }
9964
+ },
9965
+ {
9966
+ "name": "callback",
9967
+ "type": "function",
9968
+ "description": "Called when the session rules have been updated",
9969
+ "parameters": []
9970
+ }
9971
+ ]
9972
+ },
9973
+ {
9974
+ "name": "getSessionRules",
9975
+ "type": "function",
9976
+ "description": "Returns the current set of session scoped rules for the extension.",
9977
+ "async": "callback",
9978
+ "parameters": [
9979
+ {
9980
+ "name": "callback",
9981
+ "type": "function",
9982
+ "parameters": [
9983
+ {
9984
+ "type": "array",
9985
+ "items": {
9986
+ "$ref": "Rule"
9987
+ }
9988
+ }
9989
+ ]
9990
+ }
9991
+ ]
9992
+ },
9705
9993
  {
9706
9994
  "name": "testMatchOutcome",
9707
9995
  "type": "function",
@@ -19420,21 +19708,34 @@
19420
19708
  "$ref": "CertificateInfo"
19421
19709
  }
19422
19710
  },
19423
- "isDomainMismatch": {
19424
- "description": "The domain name does not match the certificate domain.",
19425
- "type": "boolean",
19711
+ "overridableErrorCategory": {
19712
+ "description": "The type of certificate error that was overridden for this connection, if any.",
19713
+ "type": "string",
19714
+ "enum": [
19715
+ "trust_error",
19716
+ "domain_mismatch",
19717
+ "expired_or_not_yet_valid"
19718
+ ],
19426
19719
  "optional": true
19427
19720
  },
19428
- "isExtendedValidation": {
19721
+ "isDomainMismatch": {
19722
+ "description": "The domain name does not match the certificate domain.",
19429
19723
  "type": "boolean",
19430
- "optional": true
19724
+ "optional": true,
19725
+ "deprecated": "Please use $(ref:SecurityInfo.overridableErrorCategory)."
19431
19726
  },
19432
19727
  "isNotValidAtThisTime": {
19433
19728
  "description": "The certificate is either expired or is not yet valid. See <code>CertificateInfo.validity</code> for start and end dates.",
19434
19729
  "type": "boolean",
19435
- "optional": true
19730
+ "optional": true,
19731
+ "deprecated": "Please use $(ref:SecurityInfo.overridableErrorCategory)."
19436
19732
  },
19437
19733
  "isUntrusted": {
19734
+ "type": "boolean",
19735
+ "optional": true,
19736
+ "deprecated": "Please use $(ref:SecurityInfo.overridableErrorCategory)."
19737
+ },
19738
+ "isExtendedValidation": {
19438
19739
  "type": "boolean",
19439
19740
  "optional": true
19440
19741
  },
@@ -19708,21 +19708,34 @@
19708
19708
  "$ref": "CertificateInfo"
19709
19709
  }
19710
19710
  },
19711
- "isDomainMismatch": {
19712
- "description": "The domain name does not match the certificate domain.",
19713
- "type": "boolean",
19711
+ "overridableErrorCategory": {
19712
+ "description": "The type of certificate error that was overridden for this connection, if any.",
19713
+ "type": "string",
19714
+ "enum": [
19715
+ "trust_error",
19716
+ "domain_mismatch",
19717
+ "expired_or_not_yet_valid"
19718
+ ],
19714
19719
  "optional": true
19715
19720
  },
19716
- "isExtendedValidation": {
19721
+ "isDomainMismatch": {
19722
+ "description": "The domain name does not match the certificate domain.",
19717
19723
  "type": "boolean",
19718
- "optional": true
19724
+ "optional": true,
19725
+ "deprecated": "Please use $(ref:SecurityInfo.overridableErrorCategory)."
19719
19726
  },
19720
19727
  "isNotValidAtThisTime": {
19721
19728
  "description": "The certificate is either expired or is not yet valid. See <code>CertificateInfo.validity</code> for start and end dates.",
19722
19729
  "type": "boolean",
19723
- "optional": true
19730
+ "optional": true,
19731
+ "deprecated": "Please use $(ref:SecurityInfo.overridableErrorCategory)."
19724
19732
  },
19725
19733
  "isUntrusted": {
19734
+ "type": "boolean",
19735
+ "optional": true,
19736
+ "deprecated": "Please use $(ref:SecurityInfo.overridableErrorCategory)."
19737
+ },
19738
+ "isExtendedValidation": {
19726
19739
  "type": "boolean",
19727
19740
  "optional": true
19728
19741
  },
@@ -3567,6 +3567,31 @@
3567
3567
  ],
3568
3568
  "description": "Gets a single contact."
3569
3569
  },
3570
+ {
3571
+ "name": "getPhoto",
3572
+ "type": "function",
3573
+ "async": "callback",
3574
+ "parameters": [
3575
+ {
3576
+ "name": "id",
3577
+ "type": "string"
3578
+ },
3579
+ {
3580
+ "type": "function",
3581
+ "name": "callback",
3582
+ "optional": true,
3583
+ "parameters": [
3584
+ {
3585
+ "type": "object",
3586
+ "optional": true,
3587
+ "isInstanceOf": "File",
3588
+ "additionalProperties": true
3589
+ }
3590
+ ]
3591
+ }
3592
+ ],
3593
+ "description": "Gets the photo associated with this contact, if any."
3594
+ },
3570
3595
  {
3571
3596
  "name": "create",
3572
3597
  "type": "function",
@@ -4045,6 +4070,21 @@
4045
4070
  "tabstoolbar"
4046
4071
  ],
4047
4072
  "optional": true
4073
+ },
4074
+ "default_windows": {
4075
+ "description": "Defines the windows, the action should appear in. Defaults to showing it only in the ``normal`` Thunderbird window, but can also be shown in the ``messageDisplay`` window.",
4076
+ "type": "array",
4077
+ "items": {
4078
+ "type": "string",
4079
+ "enum": [
4080
+ "normal",
4081
+ "messageDisplay"
4082
+ ]
4083
+ },
4084
+ "default": [
4085
+ "normal"
4086
+ ],
4087
+ "optional": true
4048
4088
  }
4049
4089
  }
4050
4090
  },
@@ -5393,7 +5433,7 @@
5393
5433
  "overrideDefaultFcc": {
5394
5434
  "type": "boolean",
5395
5435
  "optional": true,
5396
- "description": "Indicates whether the default fcc setting (defined by the used identity) is being overridden for this message. Setting ``false`` will clear the override. Setting ``true`` will throw an exception, if ``overrideDefaultFccFolder`` is not set as well."
5436
+ "description": "Indicates whether the default fcc setting (defined by the used identity) is being overridden for this message. Setting ``false`` will clear the override. Setting ``true`` will throw an ``ExtensionError``, if ``overrideDefaultFccFolder`` is not set as well."
5397
5437
  },
5398
5438
  "overrideDefaultFccFolder": {
5399
5439
  "choices": [
@@ -8049,6 +8089,33 @@
8049
8089
  }
8050
8090
  ]
8051
8091
  },
8092
+ {
8093
+ "name": "setSelectedMessages",
8094
+ "type": "function",
8095
+ "description": "Selects none, one or multiple messages.",
8096
+ "permissions": [
8097
+ "messagesRead",
8098
+ "accountsRead"
8099
+ ],
8100
+ "async": true,
8101
+ "parameters": [
8102
+ {
8103
+ "name": "tabId",
8104
+ "type": "integer",
8105
+ "description": "Defaults to the active tab of the current window.",
8106
+ "optional": true,
8107
+ "minimum": 1
8108
+ },
8109
+ {
8110
+ "name": "messageIds",
8111
+ "type": "array",
8112
+ "description": "The IDs of the messages, which should be selected. The mailTab will switch to the folder of the selected messages. Throws if they belong to different folders. Array can be empty to deselect any currently selected message.",
8113
+ "items": {
8114
+ "type": "integer"
8115
+ }
8116
+ }
8117
+ ]
8118
+ },
8052
8119
  {
8053
8120
  "name": "setQuickFilter",
8054
8121
  "type": "function",
@@ -9063,12 +9130,12 @@
9063
9130
  "type": "integer",
9064
9131
  "optional": true,
9065
9132
  "minimum": 1,
9066
- "description": "The id of a message to be opened. Will throw, if the provided ``messageId`` is unknown or invalid."
9133
+ "description": "The id of a message to be opened. Will throw an ``ExtensionError``, if the provided ``messageId`` is unknown or invalid."
9067
9134
  },
9068
9135
  "headerMessageId": {
9069
9136
  "type": "string",
9070
9137
  "optional": true,
9071
- "description": "The headerMessageId of a message to be opened. Will throw, if the provided ``headerMessageId`` is unknown or invalid."
9138
+ "description": "The headerMessageId of a message to be opened. Will throw an ``ExtensionError``, if the provided ``headerMessageId`` is unknown or invalid. Not supported for external messages."
9072
9139
  },
9073
9140
  "location": {
9074
9141
  "type": "string",
@@ -9077,7 +9144,7 @@
9077
9144
  "window"
9078
9145
  ],
9079
9146
  "optional": true,
9080
- "description": "Where to open the message. If not specified, the users preference is honoured."
9147
+ "description": "Where to open the message. If not specified, the users preference is honoured. Ignored for external messages, which are always opened in a new window."
9081
9148
  },
9082
9149
  "active": {
9083
9150
  "type": "boolean",
@@ -9678,9 +9745,10 @@
9678
9745
  {
9679
9746
  "type": "string",
9680
9747
  "enum": [
9748
+ "messagesDelete",
9749
+ "messagesImport",
9681
9750
  "messagesMove",
9682
9751
  "messagesRead",
9683
- "messagesDelete",
9684
9752
  "messagesTags"
9685
9753
  ]
9686
9754
  }
@@ -9719,12 +9787,17 @@
9719
9787
  "date": {
9720
9788
  "$ref": "extensionTypes.Date"
9721
9789
  },
9790
+ "external": {
9791
+ "type": "boolean",
9792
+ "description": "Whether this message is a real message or an external message (opened from a file or from an attachment)."
9793
+ },
9722
9794
  "flagged": {
9723
- "type": "boolean"
9795
+ "type": "boolean",
9796
+ "description": "Whether this message is flagged (a.k.a. 'starred')."
9724
9797
  },
9725
9798
  "folder": {
9726
9799
  "$ref": "folders.MailFolder",
9727
- "description": "The <permission>accountsRead</permission> permission is required for this property to be included.",
9800
+ "description": "The <permission>accountsRead</permission> permission is required for this property to be included. Not available for external or attached messages.",
9728
9801
  "optional": true
9729
9802
  },
9730
9803
  "headerMessageId": {
@@ -9740,16 +9813,23 @@
9740
9813
  "minimum": 1
9741
9814
  },
9742
9815
  "junk": {
9743
- "description": "Not populated for news/nntp messages.",
9816
+ "description": "Whether the message has been marked as junk. Always ``false`` for news/nntp messages and external messages.",
9744
9817
  "type": "boolean"
9745
9818
  },
9746
9819
  "junkScore": {
9747
9820
  "type": "integer",
9821
+ "description": "The junk score associated with the message. Always ``0`` for news/nntp messages and external messages.",
9748
9822
  "minimum": 0,
9749
9823
  "maximum": 100
9750
9824
  },
9751
9825
  "read": {
9752
- "type": "boolean"
9826
+ "type": "boolean",
9827
+ "optional": true,
9828
+ "description": "Whether the message has been marked as read. Not available for external or attached messages."
9829
+ },
9830
+ "new": {
9831
+ "type": "boolean",
9832
+ "description": "Whether the message has been received recently and is marked as new."
9753
9833
  },
9754
9834
  "recipients": {
9755
9835
  "description": "The To recipients. Not populated for news/nntp messages.",
@@ -9763,13 +9843,15 @@
9763
9843
  "type": "integer"
9764
9844
  },
9765
9845
  "subject": {
9766
- "type": "string"
9846
+ "type": "string",
9847
+ "description": "The subject of the message."
9767
9848
  },
9768
9849
  "tags": {
9769
9850
  "type": "array",
9770
9851
  "items": {
9771
9852
  "type": "string"
9772
- }
9853
+ },
9854
+ "description": "Tags associated with this message. For a list of available tags, call the listTags method."
9773
9855
  }
9774
9856
  }
9775
9857
  },
@@ -9822,7 +9904,8 @@
9822
9904
  },
9823
9905
  "partName": {
9824
9906
  "type": "string",
9825
- "optional": true
9907
+ "optional": true,
9908
+ "description": "The identifier of this part, used in :ref:`messages.getAttachmentFile"
9826
9909
  },
9827
9910
  "parts": {
9828
9911
  "type": "array",
@@ -9834,28 +9917,34 @@
9834
9917
  },
9835
9918
  "size": {
9836
9919
  "type": "integer",
9837
- "optional": true
9920
+ "optional": true,
9921
+ "description": "The size of this part. The size of ``message/*`` parts is not the actual message size (on disc), but the total size of its decoded body parts, excluding headers."
9838
9922
  }
9839
9923
  }
9840
9924
  },
9841
9925
  {
9842
- "id": "MessageChangeProperties",
9926
+ "id": "MessageProperties",
9843
9927
  "type": "object",
9844
- "description": "Message properties that can be updated by the :ref:`messages.update` and that are monitored by :ref:`messages.onUpdated`.",
9928
+ "description": "Message properties used in :ref:`messages.update` and :ref:`messages.import`. They can also be monitored by :ref:`messages.onUpdated`.",
9845
9929
  "properties": {
9846
- "read": {
9930
+ "flagged": {
9847
9931
  "type": "boolean",
9848
- "description": "Message is read.",
9932
+ "description": "Whether the message is flagged (a.k.a 'starred').",
9849
9933
  "optional": true
9850
9934
  },
9851
9935
  "junk": {
9852
9936
  "type": "boolean",
9853
9937
  "optional": true,
9854
- "description": "Message is junk."
9938
+ "description": "Whether the message is marked as junk. Only supported in :ref:`messages.update`"
9855
9939
  },
9856
- "flagged": {
9940
+ "new": {
9941
+ "type": "boolean",
9942
+ "description": "Whether the message is marked as new. Only supported in :ref:`messages.import`",
9943
+ "optional": true
9944
+ },
9945
+ "read": {
9857
9946
  "type": "boolean",
9858
- "description": "Message is flagged.",
9947
+ "description": "Whether the message is marked as read.",
9859
9948
  "optional": true
9860
9949
  },
9861
9950
  "tags": {
@@ -9934,6 +10023,11 @@
9934
10023
  "size": {
9935
10024
  "type": "integer",
9936
10025
  "description": "The size in bytes of this attachment."
10026
+ },
10027
+ "message": {
10028
+ "$ref": "messages.MessageHeader",
10029
+ "optional": true,
10030
+ "description": "A MessageHeader, if this attachment is a message."
9937
10031
  }
9938
10032
  }
9939
10033
  }
@@ -9950,7 +10044,7 @@
9950
10044
  },
9951
10045
  {
9952
10046
  "name": "changedProperties",
9953
- "$ref": "messages.MessageChangeProperties"
10047
+ "$ref": "messages.MessageProperties"
9954
10048
  }
9955
10049
  ]
9956
10050
  },
@@ -10140,7 +10234,7 @@
10140
10234
  {
10141
10235
  "name": "listAttachments",
10142
10236
  "type": "function",
10143
- "description": "Lists all of the attachments of a message.",
10237
+ "description": "Lists the attachments of a message.",
10144
10238
  "async": "callback",
10145
10239
  "parameters": [
10146
10240
  {
@@ -10298,7 +10392,7 @@
10298
10392
  {
10299
10393
  "name": "update",
10300
10394
  "type": "function",
10301
- "description": "Marks or unmarks a message as junk, read, flagged, or tagged.",
10395
+ "description": "Marks or unmarks a message as junk, read, flagged, or tagged. Updating external messages will throw an ``ExtensionError``.",
10302
10396
  "async": true,
10303
10397
  "parameters": [
10304
10398
  {
@@ -10308,14 +10402,14 @@
10308
10402
  },
10309
10403
  {
10310
10404
  "name": "newProperties",
10311
- "$ref": "MessageChangeProperties"
10405
+ "$ref": "MessageProperties"
10312
10406
  }
10313
10407
  ]
10314
10408
  },
10315
10409
  {
10316
10410
  "name": "move",
10317
10411
  "type": "function",
10318
- "description": "Moves messages to a specified folder.",
10412
+ "description": "Moves messages to a specified folder. If the messages cannot be removed from the source folder, they will be copied instead of moved. Moving external messages will throw an ``ExtensionError``.",
10319
10413
  "async": true,
10320
10414
  "permissions": [
10321
10415
  "accountsRead",
@@ -10367,7 +10461,7 @@
10367
10461
  {
10368
10462
  "name": "delete",
10369
10463
  "type": "function",
10370
- "description": "Deletes messages permanently, or moves them to the trash folder (honoring the account's deletion behavior settings). The ``skipTrash`` parameter allows immediate permanent deletion, bypassing the trash folder.\n**Note**: Consider using :ref:`messages.move` to manually move messages to the account's trash folder, instead of requesting the overly powerful permission to actually delete messages. The account's trash folder can be extracted as follows: <literalinclude>includes/messages/getTrash.js<lang>JavaScript</lang></literalinclude>",
10464
+ "description": "Deletes messages permanently, or moves them to the trash folder (honoring the account's deletion behavior settings). Deleting external messages will throw an ``ExtensionError``. The ``skipTrash`` parameter allows immediate permanent deletion, bypassing the trash folder.\n**Note**: Consider using :ref:`messages.move` to manually move messages to the account's trash folder, instead of requesting the overly powerful permission to actually delete messages. The account's trash folder can be extracted as follows: <literalinclude>includes/messages/getTrash.js<lang>JavaScript</lang></literalinclude>",
10371
10465
  "async": true,
10372
10466
  "permissions": [
10373
10467
  "messagesDelete"
@@ -10390,10 +10484,48 @@
10390
10484
  }
10391
10485
  ]
10392
10486
  },
10487
+ {
10488
+ "name": "import",
10489
+ "type": "function",
10490
+ "description": "Imports a message into a local Thunderbird folder. To import a message into an IMAP folder, add it to a local folder first and then move it to the IMAP folder.",
10491
+ "async": "callback",
10492
+ "permissions": [
10493
+ "accountsRead",
10494
+ "messagesImport"
10495
+ ],
10496
+ "parameters": [
10497
+ {
10498
+ "name": "file",
10499
+ "type": "object",
10500
+ "isInstanceOf": "File",
10501
+ "additionalProperties": true
10502
+ },
10503
+ {
10504
+ "name": "destination",
10505
+ "$ref": "folders.MailFolder",
10506
+ "description": "The folder to import the messages into."
10507
+ },
10508
+ {
10509
+ "name": "properties",
10510
+ "$ref": "messages.MessageProperties",
10511
+ "optional": true
10512
+ },
10513
+ {
10514
+ "type": "function",
10515
+ "name": "callback",
10516
+ "optional": true,
10517
+ "parameters": [
10518
+ {
10519
+ "$ref": "messages.MessageHeader"
10520
+ }
10521
+ ]
10522
+ }
10523
+ ]
10524
+ },
10393
10525
  {
10394
10526
  "name": "archive",
10395
10527
  "type": "function",
10396
- "description": "Archives messages using the current settings.",
10528
+ "description": "Archives messages using the current settings. Archiving external messages will throw an ``ExtensionError``.",
10397
10529
  "async": true,
10398
10530
  "permissions": [
10399
10531
  "messagesMove"
@@ -7000,14 +7000,12 @@
7000
7000
  "optional": true,
7001
7001
  "choices": [
7002
7002
  {
7003
- "type": "string",
7004
- "format": "relativeUrl"
7003
+ "type": "string"
7005
7004
  },
7006
7005
  {
7007
7006
  "type": "array",
7008
7007
  "items": {
7009
- "type": "string",
7010
- "format": "relativeUrl"
7008
+ "type": "string"
7011
7009
  }
7012
7010
  }
7013
7011
  ]
@@ -9622,6 +9620,154 @@
9622
9620
  ]
9623
9621
  }
9624
9622
  ],
9623
+ "declarative_net_request.json": [
9624
+ {
9625
+ "namespace": "manifest",
9626
+ "types": [
9627
+ {
9628
+ "$extend": "Permission",
9629
+ "choices": [
9630
+ {
9631
+ "type": "string",
9632
+ "enum": [
9633
+ "declarativeNetRequest"
9634
+ ],
9635
+ "min_manifest_version": 3
9636
+ }
9637
+ ]
9638
+ },
9639
+ {
9640
+ "$extend": "PermissionNoPrompt",
9641
+ "choices": [
9642
+ {
9643
+ "type": "string",
9644
+ "enum": [
9645
+ "declarativeNetRequestFeedback",
9646
+ "declarativeNetRequestWithHostAccess"
9647
+ ],
9648
+ "min_manifest_version": 3
9649
+ }
9650
+ ]
9651
+ }
9652
+ ]
9653
+ },
9654
+ {
9655
+ "namespace": "declarativeNetRequest",
9656
+ "description": "Use the declarativeNetRequest API to block or modify network requests by specifying declarative rules.",
9657
+ "permissions": [
9658
+ "declarativeNetRequest",
9659
+ "declarativeNetRequestWithHostAccess"
9660
+ ],
9661
+ "types": [
9662
+ {
9663
+ "id": "ResourceType",
9664
+ "type": "string",
9665
+ "description": "How the requested resource will be used. Comparable to the webRequest.ResourceType type.",
9666
+ "enum": [
9667
+ "main_frame",
9668
+ "sub_frame",
9669
+ "stylesheet",
9670
+ "script",
9671
+ "image",
9672
+ "object",
9673
+ "object_subrequest",
9674
+ "xmlhttprequest",
9675
+ "xslt",
9676
+ "ping",
9677
+ "beacon",
9678
+ "xml_dtd",
9679
+ "font",
9680
+ "media",
9681
+ "websocket",
9682
+ "csp_report",
9683
+ "imageset",
9684
+ "web_manifest",
9685
+ "speculative",
9686
+ "other"
9687
+ ]
9688
+ },
9689
+ {
9690
+ "id": "MatchedRule",
9691
+ "type": "object",
9692
+ "properties": {
9693
+ "ruleId": {
9694
+ "type": "integer",
9695
+ "description": "A matching rule's ID."
9696
+ },
9697
+ "rulesetId": {
9698
+ "type": "string",
9699
+ "description": "ID of the Ruleset this rule belongs to."
9700
+ }
9701
+ }
9702
+ }
9703
+ ],
9704
+ "functions": [
9705
+ {
9706
+ "name": "testMatchOutcome",
9707
+ "type": "function",
9708
+ "description": "Checks if any of the extension's declarativeNetRequest rules would match a hypothetical request.",
9709
+ "permissions": [
9710
+ "declarativeNetRequestFeedback"
9711
+ ],
9712
+ "async": "callback",
9713
+ "parameters": [
9714
+ {
9715
+ "name": "request",
9716
+ "type": "object",
9717
+ "description": "The details of the request to test.",
9718
+ "properties": {
9719
+ "url": {
9720
+ "type": "string",
9721
+ "description": "The URL of the hypothetical request."
9722
+ },
9723
+ "initiator": {
9724
+ "type": "string",
9725
+ "description": "The initiator URL (if any) for the hypothetical request.",
9726
+ "optional": true
9727
+ },
9728
+ "method": {
9729
+ "type": "string",
9730
+ "description": "Standard HTTP method of the hypothetical request.",
9731
+ "optional": true,
9732
+ "default": "get"
9733
+ },
9734
+ "type": {
9735
+ "$ref": "ResourceType",
9736
+ "description": "The resource type of the hypothetical request."
9737
+ },
9738
+ "tabId": {
9739
+ "type": "integer",
9740
+ "description": "The ID of the tab in which the hypothetical request takes place. Does not need to correspond to a real tab ID. Default is -1, meaning that the request isn't related to a tab.",
9741
+ "optional": true,
9742
+ "default": -1
9743
+ }
9744
+ }
9745
+ },
9746
+ {
9747
+ "name": "callback",
9748
+ "type": "function",
9749
+ "description": "Called with the details of matched rules.",
9750
+ "parameters": [
9751
+ {
9752
+ "name": "result",
9753
+ "type": "object",
9754
+ "properties": {
9755
+ "matchedRules": {
9756
+ "type": "array",
9757
+ "description": "The rules (if any) that match the hypothetical request.",
9758
+ "items": {
9759
+ "$ref": "MatchedRule"
9760
+ }
9761
+ }
9762
+ }
9763
+ }
9764
+ ]
9765
+ }
9766
+ ]
9767
+ }
9768
+ ]
9769
+ }
9770
+ ],
9625
9771
  "dns.json": [
9626
9772
  {
9627
9773
  "namespace": "manifest",
@@ -11579,7 +11725,6 @@
11579
11725
  "enum": [
11580
11726
  "java",
11581
11727
  "js",
11582
- "leaf",
11583
11728
  "mainthreadio",
11584
11729
  "fileio",
11585
11730
  "fileioall",
@@ -12880,20 +13025,43 @@
12880
13025
  {
12881
13026
  "min_manifest_version": 3,
12882
13027
  "type": "array",
13028
+ "postprocess": "webAccessibleMatching",
13029
+ "minItems": 1,
12883
13030
  "items": {
12884
13031
  "type": "object",
12885
13032
  "properties": {
12886
13033
  "resources": {
12887
13034
  "type": "array",
13035
+ "minItems": 1,
12888
13036
  "items": {
12889
13037
  "type": "string"
12890
13038
  }
12891
13039
  },
12892
13040
  "matches": {
13041
+ "optional": true,
12893
13042
  "type": "array",
13043
+ "minItems": 1,
12894
13044
  "items": {
12895
13045
  "$ref": "MatchPattern"
12896
13046
  }
13047
+ },
13048
+ "extension_ids": {
13049
+ "optional": true,
13050
+ "type": "array",
13051
+ "minItems": 1,
13052
+ "items": {
13053
+ "choices": [
13054
+ {
13055
+ "$ref": "ExtensionID"
13056
+ },
13057
+ {
13058
+ "type": "string",
13059
+ "enum": [
13060
+ "*"
13061
+ ]
13062
+ }
13063
+ ]
13064
+ }
12897
13065
  }
12898
13066
  }
12899
13067
  }
@@ -15941,10 +16109,9 @@
15941
16109
  },
15942
16110
  "persistAcrossSessions": {
15943
16111
  "type": "boolean",
15944
- "enum": [
15945
- false
15946
- ],
15947
- "description": "Specifies if this content script will persist into future sessions. This is currently NOT supported."
16112
+ "optional": true,
16113
+ "default": true,
16114
+ "description": "Specifies if this content script will persist into future sessions. Defaults to true."
15948
16115
  },
15949
16116
  "css": {
15950
16117
  "type": "array",
@@ -16110,10 +16277,7 @@
16110
16277
  "persistAcrossSessions": {
16111
16278
  "type": "boolean",
16112
16279
  "optional": true,
16113
- "enum": [
16114
- false
16115
- ],
16116
- "description": "Specifies if this content script will persist into future sessions. This is currently NOT supported."
16280
+ "description": "Specifies if this content script will persist into future sessions."
16117
16281
  }
16118
16282
  }
16119
16283
  }
@@ -17264,9 +17428,8 @@
17264
17428
  ]
17265
17429
  },
17266
17430
  {
17267
- "name": "checkDeepEq",
17431
+ "name": "assertDeepEq",
17268
17432
  "type": "function",
17269
- "unsupported": true,
17270
17433
  "allowAmbiguousOptionalArguments": true,
17271
17434
  "parameters": [
17272
17435
  {
@@ -17276,6 +17439,11 @@
17276
17439
  {
17277
17440
  "type": "any",
17278
17441
  "name": "actual"
17442
+ },
17443
+ {
17444
+ "type": "string",
17445
+ "name": "message",
17446
+ "optional": true
17279
17447
  }
17280
17448
  ]
17281
17449
  },