webext-schema 5.2.6 → 5.2.7

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
@@ -20,21 +20,21 @@
20
20
  "sinon": "^17.0.1"
21
21
  },
22
22
  "devDependencies": {
23
- "@types/firefox-webext-browser": "^111.0.4",
24
- "@types/node": "^20.9.2",
25
- "@types/sinon": "^17.0.1",
23
+ "@types/firefox-webext-browser": "^120.0.0",
24
+ "@types/node": "^20.10.5",
25
+ "@types/sinon": "^17.0.2",
26
26
  "c8": "^8.0.1",
27
27
  "chai": "^4.3.10",
28
- "eslint": "^8.54.0",
28
+ "eslint": "^8.56.0",
29
29
  "eslint-config-standard": "^17.1.0",
30
- "eslint-plugin-import": "^2.29.0",
31
- "eslint-plugin-jsdoc": "^46.9.0",
32
- "eslint-plugin-regexp": "^2.1.1",
30
+ "eslint-plugin-import": "^2.29.1",
31
+ "eslint-plugin-jsdoc": "^46.9.1",
32
+ "eslint-plugin-regexp": "^2.1.2",
33
33
  "eslint-plugin-unicorn": "^49.0.0",
34
34
  "mocha": "^10.2.0",
35
35
  "npm-run-all": "^4.1.5",
36
- "typescript": "^5.3.2",
37
- "undici": "^5.27.2"
36
+ "typescript": "^5.3.3",
37
+ "undici": "^6.0.1"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "npm run tsc && npm run lint && npm run test",
@@ -54,5 +54,5 @@
54
54
  "update-mail": "node index update --channel=mail -i",
55
55
  "update-release": "node index update --channel=release -i"
56
56
  },
57
- "version": "5.2.6"
57
+ "version": "5.2.7"
58
58
  }
@@ -750,6 +750,7 @@
750
750
  },
751
751
  "params": {
752
752
  "optional": true,
753
+ "max_manifest_version": 2,
753
754
  "type": "array",
754
755
  "items": {
755
756
  "type": "object",
@@ -750,6 +750,7 @@
750
750
  },
751
751
  "params": {
752
752
  "optional": true,
753
+ "max_manifest_version": 2,
753
754
  "type": "array",
754
755
  "items": {
755
756
  "type": "object",
@@ -4114,7 +4114,7 @@
4114
4114
  "preprocess": "localize"
4115
4115
  },
4116
4116
  "default_icon": {
4117
- "$ref": "IconPath",
4117
+ "$ref": "manifest.IconPath",
4118
4118
  "description": "The paths to one or more icons for the action button.",
4119
4119
  "optional": true
4120
4120
  },
@@ -4213,7 +4213,7 @@
4213
4213
  "preprocess": "localize"
4214
4214
  },
4215
4215
  "default_icon": {
4216
- "$ref": "IconPath",
4216
+ "$ref": "manifest.IconPath",
4217
4217
  "description": "The paths to one or more icons for the browserAction button.",
4218
4218
  "optional": true
4219
4219
  },
@@ -5848,7 +5848,7 @@
5848
5848
  },
5849
5849
  "relatedMessageId": {
5850
5850
  "description": "The id of the original message (in case of draft, template, forward or reply). Read-only. Is <value>null</value> in all other cases or if the original message was opened from file.",
5851
- "type": "integer",
5851
+ "$ref": "messages.MessageId",
5852
5852
  "optional": true
5853
5853
  },
5854
5854
  "subject": {
@@ -6224,9 +6224,8 @@
6224
6224
  {
6225
6225
  "name": "messageId",
6226
6226
  "description": "If specified, the message or template to edit as a new message.",
6227
- "type": "integer",
6228
- "optional": true,
6229
- "minimum": 1
6227
+ "$ref": "messages.MessageId",
6228
+ "optional": true
6230
6229
  },
6231
6230
  {
6232
6231
  "name": "details",
@@ -6255,8 +6254,7 @@
6255
6254
  {
6256
6255
  "name": "messageId",
6257
6256
  "description": "The message to reply to, as retrieved using other APIs.",
6258
- "type": "integer",
6259
- "minimum": 1
6257
+ "$ref": "messages.MessageId"
6260
6258
  },
6261
6259
  {
6262
6260
  "name": "replyType",
@@ -6295,8 +6293,7 @@
6295
6293
  {
6296
6294
  "name": "messageId",
6297
6295
  "description": "The message to forward, as retrieved using other APIs.",
6298
- "type": "integer",
6299
- "minimum": 1
6296
+ "$ref": "messages.MessageId"
6300
6297
  },
6301
6298
  {
6302
6299
  "name": "forwardType",
@@ -6733,7 +6730,7 @@
6733
6730
  "preprocess": "localize"
6734
6731
  },
6735
6732
  "default_icon": {
6736
- "$ref": "IconPath",
6733
+ "$ref": "manifest.IconPath",
6737
6734
  "description": "The paths to one or more icons for the composeAction button.",
6738
6735
  "optional": true
6739
6736
  },
@@ -7819,6 +7816,12 @@
7819
7816
  }
7820
7817
  }
7821
7818
  ],
7819
+ "properties": {
7820
+ "DEFAULT_MOST_RECENT_LIMIT": {
7821
+ "value": -1,
7822
+ "description": "The number of most recent folders used in Thunderbird's UI. Controled by the <value>mail.folder_widget.max_recent</value> preference."
7823
+ }
7824
+ },
7822
7825
  "functions": [
7823
7826
  {
7824
7827
  "name": "query",
@@ -7930,10 +7933,10 @@
7930
7933
  "optional": true,
7931
7934
  "description": "Whether the folder is a root folder, or not."
7932
7935
  },
7933
- "mostRecent": {
7934
- "type": "boolean",
7936
+ "limit": {
7937
+ "type": "integer",
7935
7938
  "optional": true,
7936
- "description": "Whether the folder (excluding subfolders) has been used within the last month. The returned folders will be sorted by their recentness and limited to the most recent ones, which is controlled by the <value>mail.folder_widget.max_recent</value> preference. A value of <value>false</value> is ignored."
7939
+ "description": "Limits the number of returned folders. If used together with <value>recent</value>, supports being set to :ref:`folders.DEFAULT_MOST_RECENT_LIMIT`"
7937
7940
  },
7938
7941
  "name": {
7939
7942
  "choices": [
@@ -7962,7 +7965,7 @@
7962
7965
  "recent": {
7963
7966
  "type": "boolean",
7964
7967
  "optional": true,
7965
- "description": "Whether the folder (excluding subfolders) has been used within the last month, or not. The returned folders will be sorted by their recentness. Ignored if <value>mostRecent</value> is specified."
7968
+ "description": "Whether the folder (excluding subfolders) has been used within the last month, or not. The returned folders will be sorted by their recentness."
7966
7969
  },
7967
7970
  "specialUse": {
7968
7971
  "type": "array",
@@ -9266,7 +9269,7 @@
9266
9269
  "type": "array",
9267
9270
  "description": "The IDs of the messages, which should be selected. The mail tab 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.",
9268
9271
  "items": {
9269
- "type": "integer"
9272
+ "$ref": "messages.MessageId"
9270
9273
  }
9271
9274
  }
9272
9275
  ]
@@ -9762,6 +9765,37 @@
9762
9765
  }
9763
9766
  }
9764
9767
  }
9768
+ },
9769
+ {
9770
+ "id": "SingleMenuIconPath",
9771
+ "choices": [
9772
+ {
9773
+ "type": "string",
9774
+ "format": "imageDataOrStrictRelativeUrl"
9775
+ },
9776
+ {
9777
+ "type": "string",
9778
+ "pattern": "^(moz-extension|blob):.*$"
9779
+ }
9780
+ ],
9781
+ "description": "The provided path may be a relative path to an icon file, an image <value>data:</value> URL, a <value>blob:</value> URL or a <value>moz-extension:<value> URL. The <value>data:</value> or <value>blob:</value> URLs can be retrieved as follows: <literalinclude>includes/DataBlobUrls.js<lang>JavaScript</lang></literalinclude>,"
9782
+ },
9783
+ {
9784
+ "id": "MenuIconPath",
9785
+ "choices": [
9786
+ {
9787
+ "$ref": "SingleMenuIconPath"
9788
+ },
9789
+ {
9790
+ "type": "object",
9791
+ "patternProperties": {
9792
+ "^[1-9]\\d*$": {
9793
+ "$ref": "SingleMenuIconPath"
9794
+ }
9795
+ }
9796
+ }
9797
+ ],
9798
+ "description": "Either a <em>string</em> to specify a single icon path to be used for all sizes, or a <em>dictionary object</em> to specify paths for multiple icons in different sizes, so the icon does not have to be scaled for a device with a different pixel density. Each entry is a <em>name-value</em> pair with <em>name</em> being a size and <em>value</em> being a path to the icon for the specified size. Example: <literalinclude>includes/MenuIconPath.json<lang>JSON</lang></literalinclude>See the `MDN documentation about choosing icon sizes <https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/browser_action#choosing_icon_sizes>`__ for more information on this. "
9765
9799
  }
9766
9800
  ],
9767
9801
  "functions": [
@@ -9796,7 +9830,7 @@
9796
9830
  "description": "The unique ID to assign to this item. Mandatory for event pages. Cannot be the same as another ID for this extension."
9797
9831
  },
9798
9832
  "icons": {
9799
- "$ref": "manifest.IconPath",
9833
+ "$ref": "MenuIconPath",
9800
9834
  "optional": true,
9801
9835
  "description": "Custom icons to display next to the menu item. Custom icons can only be set for items appearing in submenus."
9802
9836
  },
@@ -9937,7 +9971,7 @@
9937
9971
  "optional": true
9938
9972
  },
9939
9973
  "icons": {
9940
- "$ref": "manifest.IconPath",
9974
+ "$ref": "MenuIconPath",
9941
9975
  "optional": "omit-key-if-missing"
9942
9976
  },
9943
9977
  "title": {
@@ -10312,9 +10346,8 @@
10312
10346
  "description": "The DOM file object of a message to be opened."
10313
10347
  },
10314
10348
  "messageId": {
10315
- "type": "integer",
10349
+ "$ref": "messages.MessageId",
10316
10350
  "optional": true,
10317
- "minimum": 1,
10318
10351
  "description": "The id of a message to be opened. Will throw an <em>ExtensionError</em>, if the provided ``messageId`` is unknown or invalid."
10319
10352
  },
10320
10353
  "headerMessageId": {
@@ -10385,7 +10418,7 @@
10385
10418
  "preprocess": "localize"
10386
10419
  },
10387
10420
  "default_icon": {
10388
- "$ref": "IconPath",
10421
+ "$ref": "manifest.IconPath",
10389
10422
  "description": "The paths to one or more icons for the messageDisplayAction button.",
10390
10423
  "optional": true
10391
10424
  },
@@ -11106,6 +11139,8 @@
11106
11139
  "messagesMove",
11107
11140
  "messagesRead",
11108
11141
  "messagesTags",
11142
+ "messagesTagsList",
11143
+ "messagesUpdate",
11109
11144
  "sensitiveDataUpload"
11110
11145
  ]
11111
11146
  }
@@ -11119,6 +11154,12 @@
11119
11154
  "messagesRead"
11120
11155
  ],
11121
11156
  "types": [
11157
+ {
11158
+ "id": "MessageId",
11159
+ "type": "integer",
11160
+ "minimum": 1,
11161
+ "description": "A unique id representing a :ref:`messages.MessageHeader` and the associated message. This id doesn’t refer to the Message-ID email header. It is an internal tracking number that does not remain after a restart. Nor does it follow an email that has been moved to a different folder."
11162
+ },
11122
11163
  {
11123
11164
  "id": "MessageHeader",
11124
11165
  "type": "object",
@@ -11166,8 +11207,7 @@
11166
11207
  "type": "boolean"
11167
11208
  },
11168
11209
  "id": {
11169
- "type": "integer",
11170
- "minimum": 1
11210
+ "$ref": "messages.MessageId"
11171
11211
  },
11172
11212
  "junk": {
11173
11213
  "description": "Whether the message has been marked as junk. Always <value>false</value> for news/nntp messages and external messages.",
@@ -11306,7 +11346,7 @@
11306
11346
  },
11307
11347
  "tags": {
11308
11348
  "type": "array",
11309
- "description": "Tags associated with this message. For a list of available tags, call the listTags method.",
11349
+ "description": "Tags associated with this message. For a list of available tags, call the :ref:`messages.tags.list` method.",
11310
11350
  "optional": true,
11311
11351
  "items": {
11312
11352
  "type": "string"
@@ -11530,7 +11570,7 @@
11530
11570
  "parameters": [
11531
11571
  {
11532
11572
  "name": "messageId",
11533
- "type": "integer"
11573
+ "$ref": "messages.MessageId"
11534
11574
  },
11535
11575
  {
11536
11576
  "type": "function",
@@ -11552,7 +11592,7 @@
11552
11592
  "parameters": [
11553
11593
  {
11554
11594
  "name": "messageId",
11555
- "type": "integer"
11595
+ "$ref": "messages.MessageId"
11556
11596
  },
11557
11597
  {
11558
11598
  "type": "function",
@@ -11574,7 +11614,7 @@
11574
11614
  "parameters": [
11575
11615
  {
11576
11616
  "name": "messageId",
11577
- "type": "integer"
11617
+ "$ref": "messages.MessageId"
11578
11618
  },
11579
11619
  {
11580
11620
  "name": "options",
@@ -11634,7 +11674,7 @@
11634
11674
  "parameters": [
11635
11675
  {
11636
11676
  "name": "messageId",
11637
- "type": "integer"
11677
+ "$ref": "messages.MessageId"
11638
11678
  },
11639
11679
  {
11640
11680
  "type": "function",
@@ -11659,7 +11699,7 @@
11659
11699
  "parameters": [
11660
11700
  {
11661
11701
  "name": "messageId",
11662
- "type": "integer"
11702
+ "$ref": "messages.MessageId"
11663
11703
  },
11664
11704
  {
11665
11705
  "name": "partName",
@@ -11688,7 +11728,7 @@
11688
11728
  "parameters": [
11689
11729
  {
11690
11730
  "name": "messageId",
11691
- "type": "integer"
11731
+ "$ref": "messages.MessageId"
11692
11732
  },
11693
11733
  {
11694
11734
  "name": "partName",
@@ -11801,7 +11841,7 @@
11801
11841
  "tags": {
11802
11842
  "$ref": "messages.tags.TagsDetail",
11803
11843
  "optional": true,
11804
- "description": "Returns only messages with the specified tags. For a list of available tags, call the :ref:`messages.listTags` method."
11844
+ "description": "Returns only messages with the specified tags. For a list of available tags, call the :ref:`messages.tags.list` method."
11805
11845
  },
11806
11846
  "toDate": {
11807
11847
  "$ref": "extensionTypes.Date",
@@ -11879,13 +11919,15 @@
11879
11919
  {
11880
11920
  "name": "update",
11881
11921
  "type": "function",
11882
- "description": "Marks or unmarks a message as junk, read, flagged, or tagged. Updating external messages will throw an <em>ExtensionError</em>.",
11922
+ "description": "Updates message properties and tags. Updating external messages will throw an <em>ExtensionError</em>.",
11883
11923
  "async": true,
11924
+ "permissions": [
11925
+ "messagesUpdate"
11926
+ ],
11884
11927
  "parameters": [
11885
11928
  {
11886
11929
  "name": "messageId",
11887
- "type": "integer",
11888
- "minimum": 1
11930
+ "$ref": "messages.MessageId"
11889
11931
  },
11890
11932
  {
11891
11933
  "name": "newProperties",
@@ -11908,8 +11950,7 @@
11908
11950
  "type": "array",
11909
11951
  "description": "The IDs of the messages to move.",
11910
11952
  "items": {
11911
- "type": "integer",
11912
- "minimum": 1
11953
+ "$ref": "messages.MessageId"
11913
11954
  }
11914
11955
  },
11915
11956
  {
@@ -11943,8 +11984,7 @@
11943
11984
  "type": "array",
11944
11985
  "description": "The IDs of the messages to copy.",
11945
11986
  "items": {
11946
- "type": "integer",
11947
- "minimum": 1
11987
+ "$ref": "messages.MessageId"
11948
11988
  }
11949
11989
  },
11950
11990
  {
@@ -11977,8 +12017,7 @@
11977
12017
  "type": "array",
11978
12018
  "description": "The IDs of the messages to delete.",
11979
12019
  "items": {
11980
- "type": "integer",
11981
- "minimum": 1
12020
+ "$ref": "messages.MessageId"
11982
12021
  }
11983
12022
  },
11984
12023
  {
@@ -12050,8 +12089,7 @@
12050
12089
  "type": "array",
12051
12090
  "description": "The IDs of the messages to archive.",
12052
12091
  "items": {
12053
- "type": "integer",
12054
- "minimum": 1
12092
+ "$ref": "messages.MessageId"
12055
12093
  }
12056
12094
  }
12057
12095
  ]
@@ -12168,9 +12206,6 @@
12168
12206
  },
12169
12207
  {
12170
12208
  "namespace": "messages.tags",
12171
- "permissions": [
12172
- "messagesRead"
12173
- ],
12174
12209
  "types": [
12175
12210
  {
12176
12211
  "id": "MessageTag",
@@ -12201,7 +12236,7 @@
12201
12236
  "properties": {
12202
12237
  "tags": {
12203
12238
  "type": "object",
12204
- "description": "A <em>dictionary object</em> with one or more filter condition as <em>key-value</em> pairs, the <em>key</em> being the tag to filter on, and the <em>value</em> being a boolean expression, requesting whether a message must include (<value>true</value>) or exclude (<value>false</value>) the tag. For a list of available tags, call the :ref:`messages.listTags` method.",
12239
+ "description": "A <em>dictionary object</em> with one or more filter condition as <em>key-value</em> pairs, the <em>key</em> being the tag to filter on, and the <em>value</em> being a boolean expression, requesting whether a message must include (<value>true</value>) or exclude (<value>false</value>) the tag. For a list of available tags, call the :ref:`messages.tags.list` method.",
12205
12240
  "patternProperties": {
12206
12241
  ".*": {
12207
12242
  "type": "boolean"
@@ -12225,6 +12260,9 @@
12225
12260
  "type": "function",
12226
12261
  "description": "Returns a list of tags that can be set on messages, and their human-friendly name, colour, and sort order.",
12227
12262
  "async": "callback",
12263
+ "permissions": [
12264
+ "messagesTagsList"
12265
+ ],
12228
12266
  "parameters": [
12229
12267
  {
12230
12268
  "type": "function",