webext-schema 5.2.5 → 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.
@@ -2337,7 +2337,7 @@
2337
2337
  "properties": {
2338
2338
  "stylesheet": {
2339
2339
  "optional": true,
2340
- "description": "URL to a stylesheet introducing additional CSS variables, extending the theme-able areas of Thunderbird. The `theme_experiment add-on in our example repository <https://github.com/thundernest/sample-extensions/tree/master/theme_experiment>`__ is using the stylesheet shown below, to add the <value>--chat-button-color</value> CSS color variable: <literalinclude>includes/theme/theme_experiment_style.css<lang>CSS</lang></literalinclude>The following <em>manifest.json</em> file maps the </value>--chat-button-color</value> CSS color variable to the theme color key <value>exp_chat_button</value> and uses it to set a color for the chat button: <literalinclude>includes/theme/theme_experiment_manifest.json<lang>JSON</lang></literalinclude>",
2340
+ "description": "URL to a stylesheet introducing additional CSS variables, extending the theme-able areas of Thunderbird. The `theme_experiment add-on in our example repository <https://github.com/thunderbird/sample-extensions/tree/master/theme_experiment>`__ is using the stylesheet shown below, to add the <value>--chat-button-color</value> CSS color variable: <literalinclude>includes/theme/theme_experiment_style.css<lang>CSS</lang></literalinclude>The following <em>manifest.json</em> file maps the </value>--chat-button-color</value> CSS color variable to the theme color key <value>exp_chat_button</value> and uses it to set a color for the chat button: <literalinclude>includes/theme/theme_experiment_manifest.json<lang>JSON</lang></literalinclude>",
2341
2341
  "$ref": "ExtensionURL"
2342
2342
  },
2343
2343
  "images": {
@@ -2872,7 +2872,7 @@
2872
2872
  "type": "object",
2873
2873
  "properties": {
2874
2874
  "id": {
2875
- "type": "string",
2875
+ "$ref": "MailAccountId",
2876
2876
  "description": "A unique identifier for this account."
2877
2877
  },
2878
2878
  "name": {
@@ -2884,6 +2884,7 @@
2884
2884
  "description": "What sort of account this is, e.g. <value>imap</value>, <value>nntp</value>, or <value>pop3</value>."
2885
2885
  },
2886
2886
  "folders": {
2887
+ "max_manifest_version": 2,
2887
2888
  "type": "array",
2888
2889
  "optional": true,
2889
2890
  "description": "The folders for this account are only included if requested.",
@@ -2891,6 +2892,11 @@
2891
2892
  "$ref": "folders.MailFolder"
2892
2893
  }
2893
2894
  },
2895
+ "rootFolder": {
2896
+ "$ref": "folders.MailFolder",
2897
+ "optional": true,
2898
+ "description": "The root folder associated with this account."
2899
+ },
2894
2900
  "identities": {
2895
2901
  "type": "array",
2896
2902
  "description": "The identities associated with this account. The default identity is listed first, others in no particular order.",
@@ -2899,6 +2905,11 @@
2899
2905
  }
2900
2906
  }
2901
2907
  }
2908
+ },
2909
+ {
2910
+ "id": "MailAccountId",
2911
+ "type": "string",
2912
+ "description": "A unique id representing a :ref:`accounts.MailAccount`."
2902
2913
  }
2903
2914
  ],
2904
2915
  "functions": [
@@ -2938,7 +2949,7 @@
2938
2949
  "parameters": [
2939
2950
  {
2940
2951
  "name": "accountId",
2941
- "type": "string"
2952
+ "$ref": "MailAccountId"
2942
2953
  },
2943
2954
  {
2944
2955
  "name": "includeFolders",
@@ -2991,11 +3002,12 @@
2991
3002
  "type": "function",
2992
3003
  "description": "Sets the default identity for an account.",
2993
3004
  "async": true,
2994
- "deprecated": "This will be removed. Use :ref:`identities.setDefault` instead.",
3005
+ "max_manifest_version": 2,
3006
+ "deprecated": "Deprecated since Thunderbird 91 and removed in Manifest V3: accounts.setDefaultIdentity() is now available as identities.setDefault.",
2995
3007
  "parameters": [
2996
3008
  {
2997
3009
  "name": "accountId",
2998
- "type": "string"
3010
+ "$ref": "MailAccountId"
2999
3011
  },
3000
3012
  {
3001
3013
  "name": "identityId",
@@ -3008,11 +3020,12 @@
3008
3020
  "type": "function",
3009
3021
  "description": "Returns the default identity for an account, or <value>null</value> if it is not defined.",
3010
3022
  "async": "callback",
3011
- "deprecated": "This will be removed. Use :ref:`identities.getDefault` instead.",
3023
+ "max_manifest_version": 2,
3024
+ "deprecated": "Deprecated since Thunderbird 91 and removed in Manifest V3: accounts.getDefaultIdentity() is now available as identities.getDefault.",
3012
3025
  "parameters": [
3013
3026
  {
3014
3027
  "name": "accountId",
3015
- "type": "string"
3028
+ "$ref": "MailAccountId"
3016
3029
  },
3017
3030
  {
3018
3031
  "type": "function",
@@ -3034,8 +3047,8 @@
3034
3047
  "description": "Fired when a new account has been created.",
3035
3048
  "parameters": [
3036
3049
  {
3037
- "name": "id",
3038
- "type": "string"
3050
+ "name": "accountId",
3051
+ "$ref": "MailAccountId"
3039
3052
  },
3040
3053
  {
3041
3054
  "name": "account",
@@ -3049,8 +3062,8 @@
3049
3062
  "description": "Fired when an account has been removed.",
3050
3063
  "parameters": [
3051
3064
  {
3052
- "name": "id",
3053
- "type": "string"
3065
+ "name": "accountId",
3066
+ "$ref": "MailAccountId"
3054
3067
  }
3055
3068
  ]
3056
3069
  },
@@ -3060,8 +3073,8 @@
3060
3073
  "description": "Fired when a property of an account has been modified. Folders and identities of accounts are not monitored by this event, use the dedicated folder and identity events instead. A changed ``defaultIdentity`` is reported only after a different identity has been assigned as default identity, but not after a property of the default identity has been changed.",
3061
3074
  "parameters": [
3062
3075
  {
3063
- "name": "id",
3064
- "type": "string"
3076
+ "name": "accountId",
3077
+ "$ref": "MailAccountId"
3065
3078
  },
3066
3079
  {
3067
3080
  "name": "changedValues",
@@ -4101,7 +4114,7 @@
4101
4114
  "preprocess": "localize"
4102
4115
  },
4103
4116
  "default_icon": {
4104
- "$ref": "IconPath",
4117
+ "$ref": "manifest.IconPath",
4105
4118
  "description": "The paths to one or more icons for the action button.",
4106
4119
  "optional": true
4107
4120
  },
@@ -4200,7 +4213,7 @@
4200
4213
  "preprocess": "localize"
4201
4214
  },
4202
4215
  "default_icon": {
4203
- "$ref": "IconPath",
4216
+ "$ref": "manifest.IconPath",
4204
4217
  "description": "The paths to one or more icons for the browserAction button.",
4205
4218
  "optional": true
4206
4219
  },
@@ -5776,6 +5789,9 @@
5776
5789
  },
5777
5790
  "overrideDefaultFccFolder": {
5778
5791
  "choices": [
5792
+ {
5793
+ "$ref": "folders.MailFolderId"
5794
+ },
5779
5795
  {
5780
5796
  "$ref": "folders.MailFolder"
5781
5797
  },
@@ -5791,6 +5807,9 @@
5791
5807
  },
5792
5808
  "additionalFccFolder": {
5793
5809
  "choices": [
5810
+ {
5811
+ "$ref": "folders.MailFolderId"
5812
+ },
5794
5813
  {
5795
5814
  "$ref": "folders.MailFolder"
5796
5815
  },
@@ -5829,7 +5848,7 @@
5829
5848
  },
5830
5849
  "relatedMessageId": {
5831
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.",
5832
- "type": "integer",
5851
+ "$ref": "messages.MessageId",
5833
5852
  "optional": true
5834
5853
  },
5835
5854
  "subject": {
@@ -5907,7 +5926,7 @@
5907
5926
  "attachVCard": {
5908
5927
  "type": "boolean",
5909
5928
  "optional": true,
5910
- "description": "Wether or not the vCard of the used identity will be attached to the message during send. Note: If the value has not been modified, selecting a different identity will load the default value of the new identity."
5929
+ "description": "Whether or not the vCard of the used identity will be attached to the message during send. **Note:** If the value has not been modified, selecting a different identity will load the default value of the new identity."
5911
5930
  },
5912
5931
  "attachments": {
5913
5932
  "type": "array",
@@ -6205,9 +6224,8 @@
6205
6224
  {
6206
6225
  "name": "messageId",
6207
6226
  "description": "If specified, the message or template to edit as a new message.",
6208
- "type": "integer",
6209
- "optional": true,
6210
- "minimum": 1
6227
+ "$ref": "messages.MessageId",
6228
+ "optional": true
6211
6229
  },
6212
6230
  {
6213
6231
  "name": "details",
@@ -6236,8 +6254,7 @@
6236
6254
  {
6237
6255
  "name": "messageId",
6238
6256
  "description": "The message to reply to, as retrieved using other APIs.",
6239
- "type": "integer",
6240
- "minimum": 1
6257
+ "$ref": "messages.MessageId"
6241
6258
  },
6242
6259
  {
6243
6260
  "name": "replyType",
@@ -6276,8 +6293,7 @@
6276
6293
  {
6277
6294
  "name": "messageId",
6278
6295
  "description": "The message to forward, as retrieved using other APIs.",
6279
- "type": "integer",
6280
- "minimum": 1
6296
+ "$ref": "messages.MessageId"
6281
6297
  },
6282
6298
  {
6283
6299
  "name": "forwardType",
@@ -6714,7 +6730,7 @@
6714
6730
  "preprocess": "localize"
6715
6731
  },
6716
6732
  "default_icon": {
6717
- "$ref": "IconPath",
6733
+ "$ref": "manifest.IconPath",
6718
6734
  "description": "The paths to one or more icons for the composeAction button.",
6719
6735
  "optional": true
6720
6736
  },
@@ -7549,7 +7565,7 @@
7549
7565
  {
7550
7566
  "name": "register",
7551
7567
  "type": "function",
7552
- "description": "Register a message display script programmatically",
7568
+ "description": "Register a message display script programmatically. **Note:** Registered scripts will only be applied to newly opened messages. To apply the script to already open messages, manually inject your script by calling :ref:`tabs.executeScript` for each of the open <value>messageDisplay</value> tabs.",
7553
7569
  "async": true,
7554
7570
  "parameters": [
7555
7571
  {
@@ -7587,11 +7603,31 @@
7587
7603
  {
7588
7604
  "id": "MailFolder",
7589
7605
  "type": "object",
7590
- "description": "An object describing a mail folder, as returned for example by the :ref:`folders.getParentFolders` or :ref:`folders.getSubFolders` methods, or part of a :ref:`accounts.MailAccount` object, which is returned for example by the :ref:`accounts.list` and :ref:`accounts.get` methods. The ``subFolders`` property is only included if requested.",
7606
+ "description": "An object describing a folder. The ``subFolders`` property is only included if requested.",
7591
7607
  "properties": {
7592
7608
  "accountId": {
7593
- "type": "string",
7594
- "description": "The account this folder belongs to."
7609
+ "$ref": "accounts.MailAccountId",
7610
+ "description": "The id of the account this folder belongs to."
7611
+ },
7612
+ "id": {
7613
+ "$ref": "folders.MailFolderId",
7614
+ "optional": true,
7615
+ "description": "An identifier for the folder."
7616
+ },
7617
+ "isFavorite": {
7618
+ "type": "boolean",
7619
+ "optional": true,
7620
+ "description": "Whether this folder is a favorite folder."
7621
+ },
7622
+ "isRoot": {
7623
+ "type": "boolean",
7624
+ "optional": true,
7625
+ "description": "Whether this folder is a root folder."
7626
+ },
7627
+ "isVirtual": {
7628
+ "type": "boolean",
7629
+ "optional": true,
7630
+ "description": "Whether this folder is a virtual search folder."
7595
7631
  },
7596
7632
  "name": {
7597
7633
  "type": "string",
@@ -7602,42 +7638,63 @@
7602
7638
  "type": "string",
7603
7639
  "description": "Path to this folder in the account. Although paths look predictable, never guess a folder's path, as there are a number of reasons why it may not be what you think it is. Use :ref:`folders.getParentFolders` or :ref:`folders.getSubFolders` to obtain hierarchy information."
7604
7640
  },
7641
+ "specialUse": {
7642
+ "type": "array",
7643
+ "items": {
7644
+ "$ref": "folders.MailFolderSpecialUse"
7645
+ },
7646
+ "optional": true,
7647
+ "description": "The special use of this folder. A folder can have multiple special uses."
7648
+ },
7605
7649
  "subFolders": {
7606
7650
  "type": "array",
7607
7651
  "description": "Subfolders are only included if requested. They will be returned in the same order as used in Thunderbird's folder pane.",
7608
7652
  "items": {
7609
- "$ref": "MailFolder"
7653
+ "$ref": "folders.MailFolder"
7610
7654
  },
7611
7655
  "optional": true
7612
7656
  },
7613
7657
  "type": {
7614
- "choices": [
7615
- {
7616
- "max_manifest_version": 2,
7617
- "$ref": "folders.MailFolderType"
7618
- },
7619
- {
7620
- "min_manifest_version": 3,
7621
- "type": "array",
7622
- "items": {
7623
- "$ref": "folders.MailFolderType"
7624
- }
7625
- }
7626
- ],
7658
+ "max_manifest_version": 2,
7659
+ "$ref": "folders.MailFolderSpecialUse",
7627
7660
  "optional": true,
7628
- "description": "The type of folder."
7661
+ "description": "Deprecated. Was used to represent the type of this folder."
7629
7662
  }
7630
7663
  }
7631
7664
  },
7665
+ {
7666
+ "id": "MailFolderId",
7667
+ "type": "string",
7668
+ "description": "A unique id representing a :ref:`folders.MailFolder` throughout a session. Renaming or moving a folder will invalidate its id."
7669
+ },
7632
7670
  {
7633
7671
  "id": "MailFolderInfo",
7634
7672
  "type": "object",
7635
- "description": "An object containing additional information about a mail folder.",
7673
+ "description": "An object containing additional information about a folder.",
7636
7674
  "properties": {
7637
7675
  "favorite": {
7638
7676
  "type": "boolean",
7639
7677
  "optional": true,
7640
- "description": "Whether this folder is a favorite folder."
7678
+ "max_manifest_version": 2,
7679
+ "description": "Deprecated. This information is now available in :ref:`folders.MailFolder`."
7680
+ },
7681
+ "lastUsed": {
7682
+ "$ref": "extensionTypes.Date",
7683
+ "optional": true,
7684
+ "description": "Date the folder was last used (precision: seconds)."
7685
+ },
7686
+ "quota": {
7687
+ "type": "array",
7688
+ "items": {
7689
+ "$ref": "MailFolderQuota"
7690
+ },
7691
+ "optional": true,
7692
+ "description": "Quota information, if available."
7693
+ },
7694
+ "newMessageCount": {
7695
+ "type": "integer",
7696
+ "optional": true,
7697
+ "description": "Number of new messages in this folder."
7641
7698
  },
7642
7699
  "totalMessageCount": {
7643
7700
  "type": "integer",
@@ -7652,9 +7709,41 @@
7652
7709
  }
7653
7710
  },
7654
7711
  {
7655
- "id": "MailFolderType",
7712
+ "id": "MailFolderCapabilities",
7713
+ "type": "object",
7714
+ "description": "An object containing capability information about a folder.",
7715
+ "properties": {
7716
+ "canAddMessages": {
7717
+ "type": "boolean",
7718
+ "optional": true,
7719
+ "description": "Whether this folder supports adding new messages."
7720
+ },
7721
+ "canAddSubfolders": {
7722
+ "type": "boolean",
7723
+ "optional": true,
7724
+ "description": "Whether this folder supports adding new subfolders."
7725
+ },
7726
+ "canBeDeleted": {
7727
+ "type": "boolean",
7728
+ "optional": true,
7729
+ "description": "Whether this folder can be deleted."
7730
+ },
7731
+ "canBeRenamed": {
7732
+ "type": "boolean",
7733
+ "optional": true,
7734
+ "description": "Whether this folder can be renamed."
7735
+ },
7736
+ "canDeleteMessages": {
7737
+ "type": "boolean",
7738
+ "optional": true,
7739
+ "description": "Whether this folder supports deleting messages."
7740
+ }
7741
+ }
7742
+ },
7743
+ {
7744
+ "id": "MailFolderSpecialUse",
7656
7745
  "type": "string",
7657
- "description": "The type of folder",
7746
+ "description": "Supported values for the special use of a folder.",
7658
7747
  "enum": [
7659
7748
  "inbox",
7660
7749
  "drafts",
@@ -7665,148 +7754,467 @@
7665
7754
  "junk",
7666
7755
  "outbox"
7667
7756
  ]
7668
- }
7669
- ],
7670
- "functions": [
7757
+ },
7671
7758
  {
7672
- "name": "create",
7673
- "type": "function",
7674
- "permissions": [
7675
- "accountsFolders"
7676
- ],
7677
- "description": "Creates a new subfolder in the specified folder or at the root of the specified account.",
7678
- "async": "callback",
7679
- "parameters": [
7680
- {
7681
- "name": "parent",
7682
- "choices": [
7683
- {
7684
- "$ref": "folders.MailFolder"
7685
- },
7686
- {
7687
- "$ref": "accounts.MailAccount"
7688
- }
7689
- ]
7759
+ "id": "MailFolderQuota",
7760
+ "type": "object",
7761
+ "description": "An object containing quota information.",
7762
+ "properties": {
7763
+ "type": {
7764
+ "type": "string",
7765
+ "enum": [
7766
+ "STORAGE",
7767
+ "MESSAGE"
7768
+ ],
7769
+ "description": "The type of the quota as defined by RFC2087. A <value>STORAGE</value> quota is constraining the available storage in bytes, a <value>MESSAGE</value> quota is constraining the number of storable messages."
7690
7770
  },
7691
- {
7692
- "name": "childName",
7693
- "type": "string"
7771
+ "limit": {
7772
+ "type": "integer",
7773
+ "description": "The maximum available quota."
7694
7774
  },
7695
- {
7696
- "type": "function",
7697
- "name": "callback",
7698
- "optional": true,
7699
- "parameters": [
7700
- {
7701
- "$ref": "folders.MailFolder"
7702
- }
7703
- ]
7775
+ "used": {
7776
+ "type": "integer",
7777
+ "description": "The currently used quota."
7778
+ },
7779
+ "unused": {
7780
+ "type": "integer",
7781
+ "description": "The currently unused quota."
7704
7782
  }
7705
- ]
7783
+ }
7706
7784
  },
7707
7785
  {
7708
- "name": "rename",
7709
- "type": "function",
7710
- "permissions": [
7711
- "accountsFolders"
7712
- ],
7713
- "description": "Renames a folder.",
7714
- "async": "callback",
7715
- "parameters": [
7716
- {
7717
- "name": "folder",
7718
- "$ref": "folders.MailFolder"
7719
- },
7720
- {
7721
- "name": "newName",
7722
- "type": "string"
7786
+ "id": "QueryRange",
7787
+ "type": "object",
7788
+ "description": "An object defining a range.",
7789
+ "properties": {
7790
+ "min": {
7791
+ "type": "integer",
7792
+ "optional": true,
7793
+ "description": "The minimum value required to match the query."
7723
7794
  },
7724
- {
7725
- "type": "function",
7726
- "name": "callback",
7795
+ "max": {
7796
+ "type": "integer",
7727
7797
  "optional": true,
7728
- "parameters": [
7729
- {
7730
- "$ref": "folders.MailFolder"
7731
- }
7732
- ]
7798
+ "description": "The maximum value required to match the query."
7733
7799
  }
7734
- ]
7800
+ }
7735
7801
  },
7736
7802
  {
7737
- "name": "move",
7738
- "type": "function",
7739
- "permissions": [
7740
- "accountsFolders"
7741
- ],
7742
- "description": "Moves the given ``sourceFolder`` into the given ``destination``. Throws if the destination already contains a folder with the name of the source folder.",
7743
- "async": "callback",
7744
- "parameters": [
7745
- {
7746
- "name": "sourceFolder",
7747
- "$ref": "folders.MailFolder"
7748
- },
7749
- {
7750
- "name": "destination",
7751
- "choices": [
7752
- {
7753
- "$ref": "folders.MailFolder"
7754
- },
7755
- {
7756
- "$ref": "accounts.MailAccount"
7757
- }
7758
- ]
7803
+ "id": "RegularExpression",
7804
+ "type": "object",
7805
+ "properties": {
7806
+ "regexp": {
7807
+ "type": "string",
7808
+ "description": "A regular expression, for example <value>^Projects \\d{4}$</value>."
7759
7809
  },
7760
- {
7761
- "type": "function",
7762
- "name": "callback",
7763
- "optional": true,
7764
- "parameters": [
7765
- {
7766
- "$ref": "folders.MailFolder"
7767
- }
7768
- ]
7810
+ "flags": {
7811
+ "type": "string",
7812
+ "pattern": "^(i|u|v|iu|iv|ui|vi)$",
7813
+ "description": "Supported RegExp flags: <value>i</value> = case insensitive, and/or one of <value>u</value> = unicode support or <value>v</value> = extended unicode support",
7814
+ "optional": true
7769
7815
  }
7770
- ]
7771
- },
7816
+ }
7817
+ }
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
+ },
7825
+ "functions": [
7772
7826
  {
7773
- "name": "copy",
7827
+ "name": "query",
7774
7828
  "type": "function",
7775
- "permissions": [
7776
- "accountsFolders"
7777
- ],
7778
- "description": "Copies the given ``sourceFolder`` into the given ``destination``. Throws if the destination already contains a folder with the name of the source folder.",
7829
+ "description": "Gets folders that match the specified properties, or all folders if no properties are specified.",
7779
7830
  "async": "callback",
7780
7831
  "parameters": [
7781
7832
  {
7782
- "name": "sourceFolder",
7783
- "$ref": "folders.MailFolder"
7784
- },
7785
- {
7786
- "name": "destination",
7787
- "choices": [
7788
- {
7789
- "$ref": "folders.MailFolder"
7790
- },
7791
- {
7792
- "$ref": "accounts.MailAccount"
7793
- }
7794
- ]
7795
- },
7796
- {
7797
- "type": "function",
7798
- "name": "callback",
7833
+ "type": "object",
7834
+ "name": "queryInfo",
7799
7835
  "optional": true,
7800
- "parameters": [
7801
- {
7802
- "$ref": "folders.MailFolder"
7803
- }
7804
- ]
7805
- }
7806
- ]
7807
- },
7808
- {
7809
- "name": "delete",
7836
+ "default": {},
7837
+ "properties": {
7838
+ "accountId": {
7839
+ "$ref": "accounts.MailAccountId",
7840
+ "description": "Limits the search to folders of the account with the specified id.",
7841
+ "optional": true
7842
+ },
7843
+ "canAddMessages": {
7844
+ "type": "boolean",
7845
+ "optional": true,
7846
+ "description": "Whether the folder supports adding new messages, or not."
7847
+ },
7848
+ "canAddSubfolders": {
7849
+ "type": "boolean",
7850
+ "optional": true,
7851
+ "description": "Whether the folder supports adding new subfolders, or not."
7852
+ },
7853
+ "canBeDeleted": {
7854
+ "type": "boolean",
7855
+ "optional": true,
7856
+ "description": "Whether the folder can be deleted, or not."
7857
+ },
7858
+ "canBeRenamed": {
7859
+ "type": "boolean",
7860
+ "optional": true,
7861
+ "description": "Whether the folder can be renamed, or not."
7862
+ },
7863
+ "canDeleteMessages": {
7864
+ "type": "boolean",
7865
+ "optional": true,
7866
+ "description": "Whether the folder supports deleting messages, or not."
7867
+ },
7868
+ "folderId": {
7869
+ "$ref": "folders.MailFolderId",
7870
+ "description": "Limits the search to the folder with the specified id.",
7871
+ "optional": true
7872
+ },
7873
+ "hasMessages": {
7874
+ "choices": [
7875
+ {
7876
+ "type": "boolean"
7877
+ },
7878
+ {
7879
+ "$ref": "QueryRange"
7880
+ }
7881
+ ],
7882
+ "optional": true,
7883
+ "description": "Whether the folder (excluding subfolders) contains messages, or not. Supports to specify a :ref:`folders.QueryRange` (min/max) instead of a simple boolean value (none/some)."
7884
+ },
7885
+ "hasUnreadMessages": {
7886
+ "choices": [
7887
+ {
7888
+ "type": "boolean"
7889
+ },
7890
+ {
7891
+ "$ref": "QueryRange"
7892
+ }
7893
+ ],
7894
+ "optional": true,
7895
+ "description": "Whether the folder (excluding subfolders) contains unread messages, or not. Supports to specify a :ref:`folders.QueryRange` (min/max) instead of a simple boolean value (none/some)."
7896
+ },
7897
+ "hasNewMessages": {
7898
+ "choices": [
7899
+ {
7900
+ "type": "boolean"
7901
+ },
7902
+ {
7903
+ "$ref": "QueryRange"
7904
+ }
7905
+ ],
7906
+ "optional": true,
7907
+ "description": "Whether the folder (excluding subfolders) contains new messages, or not. Supports to specify a :ref:`folders.QueryRange` (min/max) instead of a simple boolean value (none/some)."
7908
+ },
7909
+ "hasSubFolders": {
7910
+ "choices": [
7911
+ {
7912
+ "type": "boolean"
7913
+ },
7914
+ {
7915
+ "$ref": "QueryRange"
7916
+ }
7917
+ ],
7918
+ "optional": true,
7919
+ "description": "Whether the folder has subfolders, or not. Supports to specify a :ref:`folders.QueryRange` (min/max) instead of a simple boolean value (none/some)."
7920
+ },
7921
+ "isFavorite": {
7922
+ "type": "boolean",
7923
+ "optional": true,
7924
+ "description": "Whether the folder is a favorite folder, or not."
7925
+ },
7926
+ "isVirtual": {
7927
+ "type": "boolean",
7928
+ "optional": true,
7929
+ "description": "Whether this folder is a virtual search folder, or not."
7930
+ },
7931
+ "isRoot": {
7932
+ "type": "boolean",
7933
+ "optional": true,
7934
+ "description": "Whether the folder is a root folder, or not."
7935
+ },
7936
+ "limit": {
7937
+ "type": "integer",
7938
+ "optional": true,
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`"
7940
+ },
7941
+ "name": {
7942
+ "choices": [
7943
+ {
7944
+ "$ref": "RegularExpression"
7945
+ },
7946
+ {
7947
+ "type": "string"
7948
+ }
7949
+ ],
7950
+ "optional": true,
7951
+ "description": "Return only folders whose name is matched by the provided string or regular expression."
7952
+ },
7953
+ "path": {
7954
+ "choices": [
7955
+ {
7956
+ "$ref": "RegularExpression"
7957
+ },
7958
+ {
7959
+ "type": "string"
7960
+ }
7961
+ ],
7962
+ "optional": true,
7963
+ "description": "Return only folders whose path is matched by the provided string or regular expression."
7964
+ },
7965
+ "recent": {
7966
+ "type": "boolean",
7967
+ "optional": true,
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."
7969
+ },
7970
+ "specialUse": {
7971
+ "type": "array",
7972
+ "items": {
7973
+ "$ref": "folders.MailFolderSpecialUse"
7974
+ },
7975
+ "minItems": 1,
7976
+ "optional": true,
7977
+ "description": "Match only folders with the specified special use (folders have to match all specified uses)."
7978
+ },
7979
+ "type": {
7980
+ "max_manifest_version": 2,
7981
+ "$ref": "folders.MailFolderSpecialUse",
7982
+ "optional": true,
7983
+ "description": "Deprecated. Match only folders with the specified special use."
7984
+ }
7985
+ }
7986
+ },
7987
+ {
7988
+ "type": "function",
7989
+ "name": "callback",
7990
+ "optional": true,
7991
+ "parameters": [
7992
+ {
7993
+ "type": "array",
7994
+ "items": {
7995
+ "$ref": "folders.MailFolder"
7996
+ }
7997
+ }
7998
+ ]
7999
+ }
8000
+ ]
8001
+ },
8002
+ {
8003
+ "name": "get",
8004
+ "type": "function",
8005
+ "description": "Returns the specified folder.",
8006
+ "async": "callback",
8007
+ "parameters": [
8008
+ {
8009
+ "name": "folder",
8010
+ "$ref": "folders.MailFolderId"
8011
+ },
8012
+ {
8013
+ "name": "includeSubFolders",
8014
+ "description": "Specifies whether the returned :ref:`folders.MailFolder` object should include all its nested subfolders . Defaults to <value>true</value>.",
8015
+ "optional": true,
8016
+ "default": true,
8017
+ "type": "boolean"
8018
+ },
8019
+ {
8020
+ "type": "function",
8021
+ "name": "callback",
8022
+ "optional": true,
8023
+ "parameters": [
8024
+ {
8025
+ "$ref": "folders.MailFolder"
8026
+ }
8027
+ ]
8028
+ }
8029
+ ]
8030
+ },
8031
+ {
8032
+ "name": "create",
8033
+ "type": "function",
8034
+ "permissions": [
8035
+ "accountsFolders"
8036
+ ],
8037
+ "description": "Creates a new subfolder in the specified folder or at the root of the specified account.",
8038
+ "async": "callback",
8039
+ "parameters": [
8040
+ {
8041
+ "name": "destination",
8042
+ "choices": [
8043
+ {
8044
+ "$ref": "folders.MailFolderId"
8045
+ },
8046
+ {
8047
+ "max_manifest_version": 2,
8048
+ "deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.create() requires to specify a MailFolderId instead of a full MailFolder object.",
8049
+ "$ref": "folders.MailFolder"
8050
+ },
8051
+ {
8052
+ "max_manifest_version": 2,
8053
+ "deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.create() requires to specify the MailFolderId of the account's rootFolder, instead of a full MailAccount object.",
8054
+ "$ref": "accounts.MailAccount"
8055
+ }
8056
+ ]
8057
+ },
8058
+ {
8059
+ "name": "childName",
8060
+ "type": "string"
8061
+ },
8062
+ {
8063
+ "type": "function",
8064
+ "name": "callback",
8065
+ "optional": true,
8066
+ "parameters": [
8067
+ {
8068
+ "$ref": "folders.MailFolder"
8069
+ }
8070
+ ]
8071
+ }
8072
+ ]
8073
+ },
8074
+ {
8075
+ "name": "rename",
8076
+ "type": "function",
8077
+ "permissions": [
8078
+ "accountsFolders"
8079
+ ],
8080
+ "description": "Renames a folder.",
8081
+ "async": "callback",
8082
+ "parameters": [
8083
+ {
8084
+ "name": "folder",
8085
+ "choices": [
8086
+ {
8087
+ "$ref": "folders.MailFolderId"
8088
+ },
8089
+ {
8090
+ "max_manifest_version": 2,
8091
+ "deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.rename() requires to specify a MailFolderId instead of a full MailFolder object.",
8092
+ "$ref": "folders.MailFolder"
8093
+ }
8094
+ ]
8095
+ },
8096
+ {
8097
+ "name": "newName",
8098
+ "type": "string"
8099
+ },
8100
+ {
8101
+ "type": "function",
8102
+ "name": "callback",
8103
+ "optional": true,
8104
+ "parameters": [
8105
+ {
8106
+ "$ref": "folders.MailFolder"
8107
+ }
8108
+ ]
8109
+ }
8110
+ ]
8111
+ },
8112
+ {
8113
+ "name": "move",
8114
+ "type": "function",
8115
+ "permissions": [
8116
+ "accountsFolders"
8117
+ ],
8118
+ "description": "Moves the given source folder into the given destination folder. Throws if the destination already contains a folder with the name of the source folder.",
8119
+ "async": "callback",
8120
+ "parameters": [
8121
+ {
8122
+ "name": "source",
8123
+ "choices": [
8124
+ {
8125
+ "$ref": "folders.MailFolderId"
8126
+ },
8127
+ {
8128
+ "max_manifest_version": 2,
8129
+ "deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.move() requires to specify a MailFolderId for its source parameter, instead of a full MailFolder object.",
8130
+ "$ref": "folders.MailFolder"
8131
+ }
8132
+ ]
8133
+ },
8134
+ {
8135
+ "name": "destination",
8136
+ "choices": [
8137
+ {
8138
+ "$ref": "folders.MailFolderId"
8139
+ },
8140
+ {
8141
+ "max_manifest_version": 2,
8142
+ "deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.move() requires to specify a MailFolderId for its destination parameter, instead of a full MailFolder object.",
8143
+ "$ref": "folders.MailFolder"
8144
+ },
8145
+ {
8146
+ "max_manifest_version": 2,
8147
+ "deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.move() requires to specify the MailFolderId of the account's rootFolder for its destination parameter, instead of a full MailAccount object.",
8148
+ "$ref": "accounts.MailAccount"
8149
+ }
8150
+ ]
8151
+ },
8152
+ {
8153
+ "type": "function",
8154
+ "name": "callback",
8155
+ "optional": true,
8156
+ "parameters": [
8157
+ {
8158
+ "$ref": "folders.MailFolder"
8159
+ }
8160
+ ]
8161
+ }
8162
+ ]
8163
+ },
8164
+ {
8165
+ "name": "copy",
8166
+ "type": "function",
8167
+ "permissions": [
8168
+ "accountsFolders"
8169
+ ],
8170
+ "description": "Copies the given source folder into the given destination folder. Throws if the destination already contains a folder with the name of the source folder.",
8171
+ "async": "callback",
8172
+ "parameters": [
8173
+ {
8174
+ "name": "source",
8175
+ "choices": [
8176
+ {
8177
+ "$ref": "folders.MailFolderId"
8178
+ },
8179
+ {
8180
+ "max_manifest_version": 2,
8181
+ "deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.copy() requires to specify a MailFolderId for its source parameter, instead of a full MailFolder object.",
8182
+ "$ref": "folders.MailFolder"
8183
+ }
8184
+ ]
8185
+ },
8186
+ {
8187
+ "name": "destination",
8188
+ "choices": [
8189
+ {
8190
+ "$ref": "folders.MailFolderId"
8191
+ },
8192
+ {
8193
+ "max_manifest_version": 2,
8194
+ "deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.copy() requires to specify a MailFolderId for its destination parameter, instead of a full MailFolder object.",
8195
+ "$ref": "folders.MailFolder"
8196
+ },
8197
+ {
8198
+ "max_manifest_version": 2,
8199
+ "deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.copy() requires to specify the MailFolderId of the account's rootFolder for its destination parameter, instead of a full MailAccount object.",
8200
+ "$ref": "accounts.MailAccount"
8201
+ }
8202
+ ]
8203
+ },
8204
+ {
8205
+ "type": "function",
8206
+ "name": "callback",
8207
+ "optional": true,
8208
+ "parameters": [
8209
+ {
8210
+ "$ref": "folders.MailFolder"
8211
+ }
8212
+ ]
8213
+ }
8214
+ ]
8215
+ },
8216
+ {
8217
+ "name": "delete",
7810
8218
  "permissions": [
7811
8219
  "accountsFolders",
7812
8220
  "messagesDelete"
@@ -7817,19 +8225,73 @@
7817
8225
  "parameters": [
7818
8226
  {
7819
8227
  "name": "folder",
7820
- "$ref": "folders.MailFolder"
8228
+ "choices": [
8229
+ {
8230
+ "$ref": "folders.MailFolderId"
8231
+ },
8232
+ {
8233
+ "max_manifest_version": 2,
8234
+ "deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.delete() requires to specify a MailFolderId instead of a full MailFolder object.",
8235
+ "$ref": "folders.MailFolder"
8236
+ }
8237
+ ]
8238
+ }
8239
+ ]
8240
+ },
8241
+ {
8242
+ "name": "update",
8243
+ "permissions": [
8244
+ "accountsFolders"
8245
+ ],
8246
+ "type": "function",
8247
+ "description": "Updates properties of a folder.",
8248
+ "async": true,
8249
+ "parameters": [
8250
+ {
8251
+ "name": "folder",
8252
+ "choices": [
8253
+ {
8254
+ "$ref": "folders.MailFolderId"
8255
+ },
8256
+ {
8257
+ "max_manifest_version": 2,
8258
+ "deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.update() requires to specify a MailFolderId instead of a full MailFolder object.",
8259
+ "$ref": "folders.MailFolder"
8260
+ }
8261
+ ]
8262
+ },
8263
+ {
8264
+ "name": "updateProperties",
8265
+ "type": "object",
8266
+ "description": "The properties to update.",
8267
+ "properties": {
8268
+ "isFavorite": {
8269
+ "type": "boolean",
8270
+ "optional": true,
8271
+ "description": "Sets or clears the favorite status."
8272
+ }
8273
+ }
7821
8274
  }
7822
8275
  ]
7823
8276
  },
7824
8277
  {
7825
8278
  "name": "getFolderInfo",
7826
8279
  "type": "function",
7827
- "description": "Get additional information about a mail folder.",
8280
+ "description": "Get additional information about a folder.",
7828
8281
  "async": "callback",
7829
8282
  "parameters": [
7830
8283
  {
7831
8284
  "name": "folder",
7832
- "$ref": "folders.MailFolder"
8285
+ "choices": [
8286
+ {
8287
+ "$ref": "folders.MailFolderId"
8288
+ },
8289
+ {
8290
+ "max_manifest_version": 2,
8291
+ "deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.getFolderInfo() requires to specify a MailFolderId instead of a full MailFolder object.",
8292
+ "$ref": "folders.MailFolder"
8293
+ }
8294
+ ]
7833
8295
  },
7834
8296
  {
7835
8297
  "type": "function",
@@ -7843,6 +8305,37 @@
7843
8305
  }
7844
8306
  ]
7845
8307
  },
8308
+ {
8309
+ "name": "getFolderCapabilities",
8310
+ "type": "function",
8311
+ "description": "Get capability information about a folder.",
8312
+ "async": "callback",
8313
+ "parameters": [
8314
+ {
8315
+ "name": "folder",
8316
+ "choices": [
8317
+ {
8318
+ "$ref": "folders.MailFolderId"
8319
+ },
8320
+ {
8321
+ "max_manifest_version": 2,
8322
+ "deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.getFolderCapabilities() requires to specify a MailFolderId instead of a full MailFolder object.",
8323
+ "$ref": "folders.MailFolder"
8324
+ }
8325
+ ]
8326
+ },
8327
+ {
8328
+ "type": "function",
8329
+ "name": "callback",
8330
+ "optional": true,
8331
+ "parameters": [
8332
+ {
8333
+ "$ref": "folders.MailFolderCapabilities"
8334
+ }
8335
+ ]
8336
+ }
8337
+ ]
8338
+ },
7846
8339
  {
7847
8340
  "name": "getParentFolders",
7848
8341
  "type": "function",
@@ -7851,7 +8344,16 @@
7851
8344
  "parameters": [
7852
8345
  {
7853
8346
  "name": "folder",
7854
- "$ref": "folders.MailFolder"
8347
+ "choices": [
8348
+ {
8349
+ "$ref": "folders.MailFolderId"
8350
+ },
8351
+ {
8352
+ "max_manifest_version": 2,
8353
+ "deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.getParentFolders() requires to specify a MailFolderId instead of a full MailFolder object.",
8354
+ "$ref": "folders.MailFolder"
8355
+ }
8356
+ ]
7855
8357
  },
7856
8358
  {
7857
8359
  "name": "includeSubFolders",
@@ -7882,12 +8384,19 @@
7882
8384
  "async": "callback",
7883
8385
  "parameters": [
7884
8386
  {
7885
- "name": "folderOrAccount",
8387
+ "name": "folder",
7886
8388
  "choices": [
7887
8389
  {
8390
+ "$ref": "folders.MailFolderId"
8391
+ },
8392
+ {
8393
+ "max_manifest_version": 2,
8394
+ "deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.getSubFolders() requires to specify a MailFolderId instead of a full MailFolder object.",
7888
8395
  "$ref": "folders.MailFolder"
7889
8396
  },
7890
8397
  {
8398
+ "max_manifest_version": 2,
8399
+ "deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.getSubFolders() requires to specify the MailFolderId of the account's rootFolder, instead of a full MailAccount object.",
7891
8400
  "$ref": "accounts.MailAccount"
7892
8401
  }
7893
8402
  ]
@@ -7913,6 +8422,30 @@
7913
8422
  ]
7914
8423
  }
7915
8424
  ]
8425
+ },
8426
+ {
8427
+ "name": "markAsRead",
8428
+ "permissions": [
8429
+ "accountsFolders"
8430
+ ],
8431
+ "type": "function",
8432
+ "description": "Marks all messages in a folder as read.",
8433
+ "async": false,
8434
+ "parameters": [
8435
+ {
8436
+ "name": "folder",
8437
+ "choices": [
8438
+ {
8439
+ "$ref": "folders.MailFolderId"
8440
+ },
8441
+ {
8442
+ "max_manifest_version": 2,
8443
+ "deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.markAsRead() requires to specify a MailFolderId instead of a full MailFolder object.",
8444
+ "$ref": "folders.MailFolder"
8445
+ }
8446
+ ]
8447
+ }
8448
+ ]
7916
8449
  }
7917
8450
  ],
7918
8451
  "events": [
@@ -7983,6 +8516,21 @@
7983
8516
  }
7984
8517
  ]
7985
8518
  },
8519
+ {
8520
+ "name": "onUpdated",
8521
+ "type": "function",
8522
+ "description": "Fired when properties of a folder have changed (<value>specialUse</value> and <value>isFavorite</value>).",
8523
+ "parameters": [
8524
+ {
8525
+ "name": "originalFolder",
8526
+ "$ref": "folders.MailFolder"
8527
+ },
8528
+ {
8529
+ "name": "updatedFolder",
8530
+ "$ref": "folders.MailFolder"
8531
+ }
8532
+ ]
8533
+ },
7986
8534
  {
7987
8535
  "name": "onFolderInfoChanged",
7988
8536
  "type": "function",
@@ -8029,7 +8577,7 @@
8029
8577
  "type": "object",
8030
8578
  "properties": {
8031
8579
  "accountId": {
8032
- "type": "string",
8580
+ "$ref": "accounts.MailAccountId",
8033
8581
  "optional": true,
8034
8582
  "description": "The id of the :ref:`accounts.MailAccount` this identity belongs to. The ``accountId`` property is read-only."
8035
8583
  },
@@ -8090,7 +8638,7 @@
8090
8638
  "parameters": [
8091
8639
  {
8092
8640
  "name": "accountId",
8093
- "type": "string",
8641
+ "$ref": "accounts.MailAccountId",
8094
8642
  "optional": true
8095
8643
  },
8096
8644
  {
@@ -8142,7 +8690,7 @@
8142
8690
  "parameters": [
8143
8691
  {
8144
8692
  "name": "accountId",
8145
- "type": "string"
8693
+ "$ref": "accounts.MailAccountId"
8146
8694
  },
8147
8695
  {
8148
8696
  "name": "details",
@@ -8212,7 +8760,7 @@
8212
8760
  "parameters": [
8213
8761
  {
8214
8762
  "name": "accountId",
8215
- "type": "string"
8763
+ "$ref": "accounts.MailAccountId"
8216
8764
  },
8217
8765
  {
8218
8766
  "type": "function",
@@ -8234,7 +8782,7 @@
8234
8782
  "parameters": [
8235
8783
  {
8236
8784
  "name": "accountId",
8237
- "type": "string"
8785
+ "$ref": "accounts.MailAccountId"
8238
8786
  },
8239
8787
  {
8240
8788
  "name": "identityId",
@@ -8253,61 +8801,134 @@
8253
8801
  "name": "identityId",
8254
8802
  "type": "string"
8255
8803
  },
8256
- {
8257
- "name": "identity",
8258
- "$ref": "MailIdentity"
8259
- }
8260
- ]
8261
- },
8262
- {
8263
- "name": "onDeleted",
8264
- "type": "function",
8265
- "description": "Fired when an identity has been removed from an account.",
8266
- "parameters": [
8267
- {
8268
- "name": "identityId",
8269
- "type": "string"
8270
- }
8271
- ]
8272
- },
8273
- {
8274
- "name": "onUpdated",
8275
- "type": "function",
8276
- "description": "Fired when one or more properties of an identity have been modified. The returned :ref:`identities.MailIdentity` includes only the changed values.",
8277
- "parameters": [
8278
- {
8279
- "name": "identityId",
8280
- "type": "string"
8804
+ {
8805
+ "name": "identity",
8806
+ "$ref": "MailIdentity"
8807
+ }
8808
+ ]
8809
+ },
8810
+ {
8811
+ "name": "onDeleted",
8812
+ "type": "function",
8813
+ "description": "Fired when an identity has been removed from an account.",
8814
+ "parameters": [
8815
+ {
8816
+ "name": "identityId",
8817
+ "type": "string"
8818
+ }
8819
+ ]
8820
+ },
8821
+ {
8822
+ "name": "onUpdated",
8823
+ "type": "function",
8824
+ "description": "Fired when one or more properties of an identity have been modified. The returned :ref:`identities.MailIdentity` includes only the changed values.",
8825
+ "parameters": [
8826
+ {
8827
+ "name": "identityId",
8828
+ "type": "string"
8829
+ },
8830
+ {
8831
+ "name": "changedValues",
8832
+ "$ref": "MailIdentity"
8833
+ }
8834
+ ]
8835
+ }
8836
+ ]
8837
+ }
8838
+ ],
8839
+ "mailTabs.json": [
8840
+ {
8841
+ "namespace": "mailTabs",
8842
+ "types": [
8843
+ {
8844
+ "id": "MailTab",
8845
+ "type": "object",
8846
+ "properties": {
8847
+ "id": {
8848
+ "type": "integer"
8849
+ },
8850
+ "windowId": {
8851
+ "type": "integer"
8852
+ },
8853
+ "active": {
8854
+ "type": "boolean"
8855
+ },
8856
+ "sortType": {
8857
+ "type": "string",
8858
+ "description": "**Note:** ``sortType`` and ``sortOrder`` depend on each other, so both should be present, or neither.",
8859
+ "optional": true,
8860
+ "enum": [
8861
+ "none",
8862
+ "date",
8863
+ "subject",
8864
+ "author",
8865
+ "id",
8866
+ "thread",
8867
+ "priority",
8868
+ "status",
8869
+ "size",
8870
+ "flagged",
8871
+ "unread",
8872
+ "recipient",
8873
+ "location",
8874
+ "tags",
8875
+ "junkStatus",
8876
+ "attachments",
8877
+ "account",
8878
+ "custom",
8879
+ "received",
8880
+ "correspondent"
8881
+ ]
8882
+ },
8883
+ "sortOrder": {
8884
+ "type": "string",
8885
+ "description": "**Note:** ``sortType`` and ``sortOrder`` depend on each other, so both should be present, or neither.",
8886
+ "optional": true,
8887
+ "enum": [
8888
+ "none",
8889
+ "ascending",
8890
+ "descending"
8891
+ ]
8892
+ },
8893
+ "viewType": {
8894
+ "type": "string",
8895
+ "optional": true,
8896
+ "enum": [
8897
+ "ungrouped",
8898
+ "groupedByThread",
8899
+ "groupedBySortType"
8900
+ ]
8901
+ },
8902
+ "layout": {
8903
+ "type": "string",
8904
+ "enum": [
8905
+ "standard",
8906
+ "wide",
8907
+ "vertical"
8908
+ ]
8909
+ },
8910
+ "folderPaneVisible": {
8911
+ "type": "boolean",
8912
+ "optional": true
8913
+ },
8914
+ "messagePaneVisible": {
8915
+ "type": "boolean",
8916
+ "optional": true
8281
8917
  },
8282
- {
8283
- "name": "changedValues",
8284
- "$ref": "MailIdentity"
8918
+ "displayedFolder": {
8919
+ "$ref": "folders.MailFolder",
8920
+ "optional": true,
8921
+ "description": "The <permission>accountsRead</permission> permission is required for this property to be included."
8285
8922
  }
8286
- ]
8287
- }
8288
- ]
8289
- }
8290
- ],
8291
- "mailTabs.json": [
8292
- {
8293
- "namespace": "mailTabs",
8294
- "types": [
8923
+ }
8924
+ },
8295
8925
  {
8296
- "id": "MailTab",
8926
+ "id": "MailTabProperties",
8297
8927
  "type": "object",
8298
8928
  "properties": {
8299
- "id": {
8300
- "type": "integer"
8301
- },
8302
- "windowId": {
8303
- "type": "integer"
8304
- },
8305
- "active": {
8306
- "type": "boolean"
8307
- },
8308
8929
  "sortType": {
8309
8930
  "type": "string",
8310
- "description": "**Note:** ``sortType`` and ``sortOrder`` depend on each other, so both should be present, or neither.",
8931
+ "description": "Sorts the list of messages. ``sortOrder`` must also be given.",
8311
8932
  "optional": true,
8312
8933
  "enum": [
8313
8934
  "none",
@@ -8334,7 +8955,7 @@
8334
8955
  },
8335
8956
  "sortOrder": {
8336
8957
  "type": "string",
8337
- "description": "**Note:** ``sortType`` and ``sortOrder`` depend on each other, so both should be present, or neither.",
8958
+ "description": "Sorts the list of messages. ``sortType`` must also be given.",
8338
8959
  "optional": true,
8339
8960
  "enum": [
8340
8961
  "none",
@@ -8353,6 +8974,8 @@
8353
8974
  },
8354
8975
  "layout": {
8355
8976
  "type": "string",
8977
+ "description": "Sets the arrangement of the folder pane, message list pane, and message display pane. Note that setting this applies it to all mail tabs.",
8978
+ "optional": true,
8356
8979
  "enum": [
8357
8980
  "standard",
8358
8981
  "wide",
@@ -8361,16 +8984,27 @@
8361
8984
  },
8362
8985
  "folderPaneVisible": {
8363
8986
  "type": "boolean",
8987
+ "description": "Shows or hides the folder pane.",
8364
8988
  "optional": true
8365
8989
  },
8366
8990
  "messagePaneVisible": {
8367
8991
  "type": "boolean",
8992
+ "description": "Shows or hides the message display pane.",
8368
8993
  "optional": true
8369
8994
  },
8370
8995
  "displayedFolder": {
8371
- "$ref": "folders.MailFolder",
8372
- "optional": true,
8373
- "description": "The <permission>accountsRead</permission> permission is required for this property to be included."
8996
+ "choices": [
8997
+ {
8998
+ "$ref": "folders.MailFolderId"
8999
+ },
9000
+ {
9001
+ "max_manifest_version": 2,
9002
+ "deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: MailTabProperties.displayedFolder needs to be specified as a MailFolderId instead of as a full MailFolder object.",
9003
+ "$ref": "folders.MailFolder"
9004
+ }
9005
+ ],
9006
+ "description": "Sets the folder displayed in the mail tab. Requires the <permission>accountsRead</permission> permission. The previous message selection in the given folder will be restored, if any. This property is ignored, if <value>selectedMessages</value> is specified.",
9007
+ "optional": true
8374
9008
  }
8375
9009
  }
8376
9010
  },
@@ -8498,11 +9132,38 @@
8498
9132
  }
8499
9133
  ]
8500
9134
  },
9135
+ {
9136
+ "name": "create",
9137
+ "type": "function",
9138
+ "description": "Creates a new mail tab. Standard tab properties can be adjusted via :ref:`tabs.update` after the mail tab has been created. **Note:** A new mail window can be created via :ref:`windows.create`.",
9139
+ "async": "callback",
9140
+ "parameters": [
9141
+ {
9142
+ "name": "createProperties",
9143
+ "$ref": "MailTabProperties",
9144
+ "optional": true,
9145
+ "default": {}
9146
+ },
9147
+ {
9148
+ "type": "function",
9149
+ "name": "callback",
9150
+ "optional": true,
9151
+ "parameters": [
9152
+ {
9153
+ "name": "mailTab",
9154
+ "$ref": "MailTab",
9155
+ "optional": true,
9156
+ "description": "Details about the created mail tab. Will contain the ID of the new tab."
9157
+ }
9158
+ ]
9159
+ }
9160
+ ]
9161
+ },
8501
9162
  {
8502
9163
  "name": "update",
8503
9164
  "type": "function",
8504
9165
  "description": "Modifies the properties of a mail tab. Properties that are not specified in ``updateProperties`` are not modified.",
8505
- "async": true,
9166
+ "async": "callback",
8506
9167
  "parameters": [
8507
9168
  {
8508
9169
  "name": "tabId",
@@ -8513,80 +9174,48 @@
8513
9174
  },
8514
9175
  {
8515
9176
  "name": "updateProperties",
8516
- "type": "object",
8517
- "properties": {
8518
- "displayedFolder": {
8519
- "$ref": "folders.MailFolder",
8520
- "description": "Sets the folder displayed in the tab. The extension must have the <permission>accountsRead</permission> permission to do this. The previous message selection in the given folder will be restored.",
8521
- "optional": true
8522
- },
8523
- "sortType": {
8524
- "type": "string",
8525
- "description": "Sorts the list of messages. ``sortOrder`` must also be given.",
8526
- "optional": true,
8527
- "enum": [
8528
- "none",
8529
- "date",
8530
- "subject",
8531
- "author",
8532
- "id",
8533
- "thread",
8534
- "priority",
8535
- "status",
8536
- "size",
8537
- "flagged",
8538
- "unread",
8539
- "recipient",
8540
- "location",
8541
- "tags",
8542
- "junkStatus",
8543
- "attachments",
8544
- "account",
8545
- "custom",
8546
- "received",
8547
- "correspondent"
8548
- ]
8549
- },
8550
- "sortOrder": {
8551
- "type": "string",
8552
- "description": "Sorts the list of messages. ``sortType`` must also be given.",
8553
- "optional": true,
8554
- "enum": [
8555
- "none",
8556
- "ascending",
8557
- "descending"
8558
- ]
8559
- },
8560
- "viewType": {
8561
- "type": "string",
8562
- "optional": true,
8563
- "enum": [
8564
- "ungrouped",
8565
- "groupedByThread",
8566
- "groupedBySortType"
8567
- ]
8568
- },
8569
- "layout": {
8570
- "type": "string",
8571
- "description": "Sets the arrangement of the folder pane, message list pane, and message display pane. Note that setting this applies it to all mail tabs.",
9177
+ "$ref": "MailTabProperties"
9178
+ },
9179
+ {
9180
+ "type": "function",
9181
+ "name": "callback",
9182
+ "optional": true,
9183
+ "parameters": [
9184
+ {
9185
+ "name": "mailTab",
9186
+ "$ref": "MailTab",
8572
9187
  "optional": true,
8573
- "enum": [
8574
- "standard",
8575
- "wide",
8576
- "vertical"
8577
- ]
8578
- },
8579
- "folderPaneVisible": {
8580
- "type": "boolean",
8581
- "description": "Shows or hides the folder pane.",
8582
- "optional": true
8583
- },
8584
- "messagePaneVisible": {
8585
- "type": "boolean",
8586
- "description": "Shows or hides the message display pane.",
8587
- "optional": true
9188
+ "description": "Details about the updated mail tab."
8588
9189
  }
8589
- }
9190
+ ]
9191
+ }
9192
+ ]
9193
+ },
9194
+ {
9195
+ "name": "getListedMessages",
9196
+ "type": "function",
9197
+ "description": "Lists the messages in the current view, honoring sort order and filters.",
9198
+ "permissions": [
9199
+ "messagesRead"
9200
+ ],
9201
+ "async": "callback",
9202
+ "parameters": [
9203
+ {
9204
+ "name": "tabId",
9205
+ "type": "integer",
9206
+ "description": "Defaults to the active tab of the current window.",
9207
+ "optional": true,
9208
+ "minimum": 1
9209
+ },
9210
+ {
9211
+ "type": "function",
9212
+ "name": "callback",
9213
+ "optional": true,
9214
+ "parameters": [
9215
+ {
9216
+ "$ref": "messages.MessageList"
9217
+ }
9218
+ ]
8590
9219
  }
8591
9220
  ]
8592
9221
  },
@@ -8638,9 +9267,9 @@
8638
9267
  {
8639
9268
  "name": "messageIds",
8640
9269
  "type": "array",
8641
- "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.",
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.",
8642
9271
  "items": {
8643
- "type": "integer"
9272
+ "$ref": "messages.MessageId"
8644
9273
  }
8645
9274
  }
8646
9275
  ]
@@ -8689,7 +9318,7 @@
8689
9318
  "type": "boolean"
8690
9319
  },
8691
9320
  {
8692
- "$ref": "messages.TagsDetail"
9321
+ "$ref": "messages.tags.TagsDetail"
8693
9322
  }
8694
9323
  ],
8695
9324
  "description": "Shows only messages with tags on them."
@@ -9136,6 +9765,37 @@
9136
9765
  }
9137
9766
  }
9138
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. "
9139
9799
  }
9140
9800
  ],
9141
9801
  "functions": [
@@ -9170,7 +9830,7 @@
9170
9830
  "description": "The unique ID to assign to this item. Mandatory for event pages. Cannot be the same as another ID for this extension."
9171
9831
  },
9172
9832
  "icons": {
9173
- "$ref": "manifest.IconPath",
9833
+ "$ref": "MenuIconPath",
9174
9834
  "optional": true,
9175
9835
  "description": "Custom icons to display next to the menu item. Custom icons can only be set for items appearing in submenus."
9176
9836
  },
@@ -9311,7 +9971,7 @@
9311
9971
  "optional": true
9312
9972
  },
9313
9973
  "icons": {
9314
- "$ref": "manifest.IconPath",
9974
+ "$ref": "MenuIconPath",
9315
9975
  "optional": "omit-key-if-missing"
9316
9976
  },
9317
9977
  "title": {
@@ -9686,9 +10346,8 @@
9686
10346
  "description": "The DOM file object of a message to be opened."
9687
10347
  },
9688
10348
  "messageId": {
9689
- "type": "integer",
10349
+ "$ref": "messages.MessageId",
9690
10350
  "optional": true,
9691
- "minimum": 1,
9692
10351
  "description": "The id of a message to be opened. Will throw an <em>ExtensionError</em>, if the provided ``messageId`` is unknown or invalid."
9693
10352
  },
9694
10353
  "headerMessageId": {
@@ -9759,7 +10418,7 @@
9759
10418
  "preprocess": "localize"
9760
10419
  },
9761
10420
  "default_icon": {
9762
- "$ref": "IconPath",
10421
+ "$ref": "manifest.IconPath",
9763
10422
  "description": "The paths to one or more icons for the messageDisplayAction button.",
9764
10423
  "optional": true
9765
10424
  },
@@ -10480,6 +11139,8 @@
10480
11139
  "messagesMove",
10481
11140
  "messagesRead",
10482
11141
  "messagesTags",
11142
+ "messagesTagsList",
11143
+ "messagesUpdate",
10483
11144
  "sensitiveDataUpload"
10484
11145
  ]
10485
11146
  }
@@ -10493,6 +11154,12 @@
10493
11154
  "messagesRead"
10494
11155
  ],
10495
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
+ },
10496
11163
  {
10497
11164
  "id": "MessageHeader",
10498
11165
  "type": "object",
@@ -10540,8 +11207,7 @@
10540
11207
  "type": "boolean"
10541
11208
  },
10542
11209
  "id": {
10543
- "type": "integer",
10544
- "minimum": 1
11210
+ "$ref": "messages.MessageId"
10545
11211
  },
10546
11212
  "junk": {
10547
11213
  "description": "Whether the message has been marked as junk. Always <value>false</value> for news/nntp messages and external messages.",
@@ -10582,7 +11248,7 @@
10582
11248
  "items": {
10583
11249
  "type": "string"
10584
11250
  },
10585
- "description": "Tags associated with this message. For a list of available tags, call the listTags method."
11251
+ "description": "Tags associated with this message. For a list of available tags, use :ref:`messages.tags.list`."
10586
11252
  }
10587
11253
  }
10588
11254
  },
@@ -10680,7 +11346,7 @@
10680
11346
  },
10681
11347
  "tags": {
10682
11348
  "type": "array",
10683
- "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.",
10684
11350
  "optional": true,
10685
11351
  "items": {
10686
11352
  "type": "string"
@@ -10688,52 +11354,6 @@
10688
11354
  }
10689
11355
  }
10690
11356
  },
10691
- {
10692
- "id": "MessageTag",
10693
- "type": "object",
10694
- "properties": {
10695
- "key": {
10696
- "type": "string",
10697
- "description": "Unique tag identifier."
10698
- },
10699
- "tag": {
10700
- "type": "string",
10701
- "description": "Human-readable tag name."
10702
- },
10703
- "color": {
10704
- "type": "string",
10705
- "description": "Tag color."
10706
- },
10707
- "ordinal": {
10708
- "type": "string",
10709
- "description": "Custom sort string (usually empty)."
10710
- }
10711
- }
10712
- },
10713
- {
10714
- "id": "TagsDetail",
10715
- "type": "object",
10716
- "description": "Used for filtering messages by tag in various methods. Note that functions using this type may have a partial implementation.",
10717
- "properties": {
10718
- "tags": {
10719
- "type": "object",
10720
- "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.",
10721
- "patternProperties": {
10722
- ".*": {
10723
- "type": "boolean"
10724
- }
10725
- }
10726
- },
10727
- "mode": {
10728
- "type": "string",
10729
- "description": "Whether all of the tag filters must apply, or any of them.",
10730
- "enum": [
10731
- "all",
10732
- "any"
10733
- ]
10734
- }
10735
- }
10736
- },
10737
11357
  {
10738
11358
  "id": "MessageAttachment",
10739
11359
  "type": "object",
@@ -10761,6 +11381,23 @@
10761
11381
  "description": "A MessageHeader, if this attachment is a message."
10762
11382
  }
10763
11383
  }
11384
+ },
11385
+ {
11386
+ "id": "QueryRange",
11387
+ "type": "object",
11388
+ "description": "An object defining a range.",
11389
+ "properties": {
11390
+ "min": {
11391
+ "type": "integer",
11392
+ "optional": true,
11393
+ "description": "The minimum value required to match the query."
11394
+ },
11395
+ "max": {
11396
+ "type": "integer",
11397
+ "optional": true,
11398
+ "description": "The maximum value required to match the query."
11399
+ }
11400
+ }
10764
11401
  }
10765
11402
  ],
10766
11403
  "events": [
@@ -10845,6 +11482,14 @@
10845
11482
  "name": "messages",
10846
11483
  "$ref": "messages.MessageList"
10847
11484
  }
11485
+ ],
11486
+ "extraParameters": [
11487
+ {
11488
+ "name": "monitorAllFolders",
11489
+ "description": "Monitor all folders (including all special use folders as defined by :ref:`folders.MailFolderSpecialUse`) instead of just inbox folders and normal folders.",
11490
+ "type": "boolean",
11491
+ "optional": true
11492
+ }
10848
11493
  ]
10849
11494
  }
10850
11495
  ],
@@ -10860,7 +11505,16 @@
10860
11505
  "parameters": [
10861
11506
  {
10862
11507
  "name": "folder",
10863
- "$ref": "folders.MailFolder"
11508
+ "choices": [
11509
+ {
11510
+ "$ref": "folders.MailFolderId"
11511
+ },
11512
+ {
11513
+ "max_manifest_version": 2,
11514
+ "deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: messages.list() requires to specify a MailFolderId instead of a full MailFolder object.",
11515
+ "$ref": "folders.MailFolder"
11516
+ }
11517
+ ]
10864
11518
  },
10865
11519
  {
10866
11520
  "type": "function",
@@ -10911,12 +11565,12 @@
10911
11565
  {
10912
11566
  "name": "get",
10913
11567
  "type": "function",
10914
- "description": "Returns a specified message.",
11568
+ "description": "Returns the specified message.",
10915
11569
  "async": "callback",
10916
11570
  "parameters": [
10917
11571
  {
10918
11572
  "name": "messageId",
10919
- "type": "integer"
11573
+ "$ref": "messages.MessageId"
10920
11574
  },
10921
11575
  {
10922
11576
  "type": "function",
@@ -10933,12 +11587,12 @@
10933
11587
  {
10934
11588
  "name": "getFull",
10935
11589
  "type": "function",
10936
- "description": "Returns a specified message, including all headers and MIME parts. Throws if the message could not be read, for example due to network issues.",
11590
+ "description": "Returns the specified message, including all headers and MIME parts. Throws if the message could not be read, for example due to network issues.",
10937
11591
  "async": "callback",
10938
11592
  "parameters": [
10939
11593
  {
10940
11594
  "name": "messageId",
10941
- "type": "integer"
11595
+ "$ref": "messages.MessageId"
10942
11596
  },
10943
11597
  {
10944
11598
  "type": "function",
@@ -10960,7 +11614,7 @@
10960
11614
  "parameters": [
10961
11615
  {
10962
11616
  "name": "messageId",
10963
- "type": "integer"
11617
+ "$ref": "messages.MessageId"
10964
11618
  },
10965
11619
  {
10966
11620
  "name": "options",
@@ -11020,7 +11674,7 @@
11020
11674
  "parameters": [
11021
11675
  {
11022
11676
  "name": "messageId",
11023
- "type": "integer"
11677
+ "$ref": "messages.MessageId"
11024
11678
  },
11025
11679
  {
11026
11680
  "type": "function",
@@ -11045,7 +11699,7 @@
11045
11699
  "parameters": [
11046
11700
  {
11047
11701
  "name": "messageId",
11048
- "type": "integer"
11702
+ "$ref": "messages.MessageId"
11049
11703
  },
11050
11704
  {
11051
11705
  "name": "partName",
@@ -11074,7 +11728,7 @@
11074
11728
  "parameters": [
11075
11729
  {
11076
11730
  "name": "messageId",
11077
- "type": "integer"
11731
+ "$ref": "messages.MessageId"
11078
11732
  },
11079
11733
  {
11080
11734
  "name": "partName",
@@ -11100,10 +11754,22 @@
11100
11754
  "optional": true,
11101
11755
  "default": {},
11102
11756
  "properties": {
11757
+ "accountId": {
11758
+ "$ref": "accounts.MailAccountId",
11759
+ "description": "Limits the search to folders of the account with the specified id.",
11760
+ "optional": true
11761
+ },
11103
11762
  "attachment": {
11104
- "type": "boolean",
11763
+ "choices": [
11764
+ {
11765
+ "type": "boolean"
11766
+ },
11767
+ {
11768
+ "$ref": "QueryRange"
11769
+ }
11770
+ ],
11105
11771
  "optional": true,
11106
- "description": "If specified, returns only messages with or without attachments."
11772
+ "description": "Whether the message has attachments, or not. Supports to specify a :ref:`messages.QueryRange` (min/max) instead of a simple boolean value (none/some)."
11107
11773
  },
11108
11774
  "author": {
11109
11775
  "type": "string",
@@ -11120,8 +11786,15 @@
11120
11786
  "optional": true,
11121
11787
  "description": "Returns only flagged (or unflagged if false) messages."
11122
11788
  },
11789
+ "folderId": {
11790
+ "$ref": "folders.MailFolderId",
11791
+ "optional": true,
11792
+ "description": "Returns only messages from the folder with the specified id. The <permission>accountsRead</permission> permission is required."
11793
+ },
11123
11794
  "folder": {
11124
11795
  "$ref": "folders.MailFolder",
11796
+ "max_manifest_version": 2,
11797
+ "deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: messages.queryInfo.folder has been replaced by messages.queryInfo.folderId.",
11125
11798
  "optional": true,
11126
11799
  "description": "Returns only messages from the specified folder. The <permission>accountsRead</permission> permission is required."
11127
11800
  },
@@ -11148,22 +11821,27 @@
11148
11821
  "includeSubFolders": {
11149
11822
  "type": "boolean",
11150
11823
  "optional": true,
11151
- "description": "Search the folder specified by ``queryInfo.folder`` recursively."
11824
+ "description": "Search the specified folder recursively."
11152
11825
  },
11153
11826
  "recipients": {
11154
11827
  "type": "string",
11155
11828
  "optional": true,
11156
11829
  "description": "Returns only messages whose recipients match all specified addresses. The search value is a semicolon separated list of email addresses, names or combinations (e.g.: <value>Name <user@domain.org></value>). For a match, all specified addresses must equal a recipient's address completely and all specified names must match a recipient's name partially. All matches are done case-insensitive."
11157
11830
  },
11831
+ "size": {
11832
+ "$ref": "QueryRange",
11833
+ "optional": true,
11834
+ "description": "Returns only messages with a size in the specified byte range."
11835
+ },
11158
11836
  "subject": {
11159
11837
  "type": "string",
11160
11838
  "optional": true,
11161
- "description": "Returns only messages with this value matching the subject."
11839
+ "description": "Returns only messages whose subject contains the provided string."
11162
11840
  },
11163
11841
  "tags": {
11164
- "$ref": "TagsDetail",
11842
+ "$ref": "messages.tags.TagsDetail",
11165
11843
  "optional": true,
11166
- "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."
11167
11845
  },
11168
11846
  "toDate": {
11169
11847
  "$ref": "extensionTypes.Date",
@@ -11175,11 +11853,33 @@
11175
11853
  "optional": true,
11176
11854
  "description": "Returns only messages with at least one recipient address matching any configured identity."
11177
11855
  },
11856
+ "junk": {
11857
+ "type": "boolean",
11858
+ "optional": true,
11859
+ "description": "Returns only messages whith the specified junk state."
11860
+ },
11861
+ "junkScore": {
11862
+ "$ref": "QueryRange",
11863
+ "optional": true,
11864
+ "description": "Returns only messages with a junk score in the specified range."
11865
+ },
11866
+ "new": {
11867
+ "type": "boolean",
11868
+ "optional": true,
11869
+ "description": "Returns only messages with the specified new state."
11870
+ },
11178
11871
  "unread": {
11179
11872
  "type": "boolean",
11180
11873
  "optional": true,
11874
+ "max_manifest_version": 2,
11181
11875
  "description": "Returns only unread (or read if false) messages."
11182
11876
  },
11877
+ "read": {
11878
+ "type": "boolean",
11879
+ "optional": true,
11880
+ "description": "Returns only messages with the specified read state.",
11881
+ "min_manifest_version": 3
11882
+ },
11183
11883
  "autoPaginationTimeout": {
11184
11884
  "type": "integer",
11185
11885
  "optional": true,
@@ -11219,13 +11919,15 @@
11219
11919
  {
11220
11920
  "name": "update",
11221
11921
  "type": "function",
11222
- "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>.",
11223
11923
  "async": true,
11924
+ "permissions": [
11925
+ "messagesUpdate"
11926
+ ],
11224
11927
  "parameters": [
11225
11928
  {
11226
11929
  "name": "messageId",
11227
- "type": "integer",
11228
- "minimum": 1
11930
+ "$ref": "messages.MessageId"
11229
11931
  },
11230
11932
  {
11231
11933
  "name": "newProperties",
@@ -11248,13 +11950,21 @@
11248
11950
  "type": "array",
11249
11951
  "description": "The IDs of the messages to move.",
11250
11952
  "items": {
11251
- "type": "integer",
11252
- "minimum": 1
11953
+ "$ref": "messages.MessageId"
11253
11954
  }
11254
11955
  },
11255
11956
  {
11256
11957
  "name": "destination",
11257
- "$ref": "folders.MailFolder",
11958
+ "choices": [
11959
+ {
11960
+ "$ref": "folders.MailFolderId"
11961
+ },
11962
+ {
11963
+ "max_manifest_version": 2,
11964
+ "deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: messages.move() requires to specify a MailFolderId instead of a full MailFolder object.",
11965
+ "$ref": "folders.MailFolder"
11966
+ }
11967
+ ],
11258
11968
  "description": "The folder to move the messages to."
11259
11969
  }
11260
11970
  ]
@@ -11274,13 +11984,21 @@
11274
11984
  "type": "array",
11275
11985
  "description": "The IDs of the messages to copy.",
11276
11986
  "items": {
11277
- "type": "integer",
11278
- "minimum": 1
11987
+ "$ref": "messages.MessageId"
11279
11988
  }
11280
11989
  },
11281
11990
  {
11282
11991
  "name": "destination",
11283
- "$ref": "folders.MailFolder",
11992
+ "choices": [
11993
+ {
11994
+ "$ref": "folders.MailFolderId"
11995
+ },
11996
+ {
11997
+ "max_manifest_version": 2,
11998
+ "deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: messages.copy() requires to specify a MailFolderId instead of a full MailFolder object.",
11999
+ "$ref": "folders.MailFolder"
12000
+ }
12001
+ ],
11284
12002
  "description": "The folder to copy the messages to."
11285
12003
  }
11286
12004
  ]
@@ -11299,8 +12017,7 @@
11299
12017
  "type": "array",
11300
12018
  "description": "The IDs of the messages to delete.",
11301
12019
  "items": {
11302
- "type": "integer",
11303
- "minimum": 1
12020
+ "$ref": "messages.MessageId"
11304
12021
  }
11305
12022
  },
11306
12023
  {
@@ -11329,7 +12046,16 @@
11329
12046
  },
11330
12047
  {
11331
12048
  "name": "destination",
11332
- "$ref": "folders.MailFolder",
12049
+ "choices": [
12050
+ {
12051
+ "$ref": "folders.MailFolderId"
12052
+ },
12053
+ {
12054
+ "max_manifest_version": 2,
12055
+ "deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: messages.import() requires to specify a MailFolderId instead of a full MailFolder object.",
12056
+ "$ref": "folders.MailFolder"
12057
+ }
12058
+ ],
11333
12059
  "description": "The folder to import the messages into."
11334
12060
  },
11335
12061
  {
@@ -11363,8 +12089,7 @@
11363
12089
  "type": "array",
11364
12090
  "description": "The IDs of the messages to archive.",
11365
12091
  "items": {
11366
- "type": "integer",
11367
- "minimum": 1
12092
+ "$ref": "messages.MessageId"
11368
12093
  }
11369
12094
  }
11370
12095
  ]
@@ -11374,6 +12099,8 @@
11374
12099
  "type": "function",
11375
12100
  "description": "Returns a list of tags that can be set on messages, and their human-friendly name, colour, and sort order.",
11376
12101
  "async": "callback",
12102
+ "max_manifest_version": 2,
12103
+ "deprecated": "Deprecated since Thunderbird 121 and removed in Manifest V3: messages.listTags() is now available as messages.tags.list().",
11377
12104
  "parameters": [
11378
12105
  {
11379
12106
  "type": "function",
@@ -11383,7 +12110,7 @@
11383
12110
  {
11384
12111
  "type": "array",
11385
12112
  "items": {
11386
- "$ref": "MessageTag"
12113
+ "$ref": "messages.tags.MessageTag"
11387
12114
  }
11388
12115
  }
11389
12116
  ]
@@ -11398,6 +12125,8 @@
11398
12125
  "permissions": [
11399
12126
  "messagesTags"
11400
12127
  ],
12128
+ "max_manifest_version": 2,
12129
+ "deprecated": "Deprecated since Thunderbird 121 and removed in Manifest V3: messages.createTag() is now available as messages.tags.create().",
11401
12130
  "parameters": [
11402
12131
  {
11403
12132
  "type": "string",
@@ -11413,7 +12142,7 @@
11413
12142
  {
11414
12143
  "type": "string",
11415
12144
  "name": "color",
11416
- "description": "Tag color in hex format (i.e.: #000080 for navy blue)",
12145
+ "description": "Tag color in hex format (i.e.: <value>#000080</value> for navy blue)",
11417
12146
  "pattern": "^#[0-9a-f]{6}"
11418
12147
  }
11419
12148
  ]
@@ -11426,6 +12155,8 @@
11426
12155
  "permissions": [
11427
12156
  "messagesTags"
11428
12157
  ],
12158
+ "max_manifest_version": 2,
12159
+ "deprecated": "Deprecated since Thunderbird 121 and removed in Manifest V3: messages.updateTag() is now available as messages.tags.update().",
11429
12160
  "parameters": [
11430
12161
  {
11431
12162
  "type": "string",
@@ -11460,6 +12191,164 @@
11460
12191
  "permissions": [
11461
12192
  "messagesTags"
11462
12193
  ],
12194
+ "max_manifest_version": 2,
12195
+ "deprecated": "Deprecated since Thunderbird 121 and removed in Manifest V3: messages.deleteTag() is now available as messages.tags.delete().",
12196
+ "parameters": [
12197
+ {
12198
+ "type": "string",
12199
+ "name": "key",
12200
+ "description": "Unique tag identifier (will be converted to lower case). Must not include <value>()<>{/%*\"</value> or spaces.",
12201
+ "pattern": "^[^ ()/{%*<>\"]+$"
12202
+ }
12203
+ ]
12204
+ }
12205
+ ]
12206
+ },
12207
+ {
12208
+ "namespace": "messages.tags",
12209
+ "types": [
12210
+ {
12211
+ "id": "MessageTag",
12212
+ "type": "object",
12213
+ "properties": {
12214
+ "key": {
12215
+ "type": "string",
12216
+ "description": "Unique tag identifier."
12217
+ },
12218
+ "tag": {
12219
+ "type": "string",
12220
+ "description": "Human-readable tag name."
12221
+ },
12222
+ "color": {
12223
+ "type": "string",
12224
+ "description": "Tag color."
12225
+ },
12226
+ "ordinal": {
12227
+ "type": "string",
12228
+ "description": "Custom sort string (usually empty)."
12229
+ }
12230
+ }
12231
+ },
12232
+ {
12233
+ "id": "TagsDetail",
12234
+ "type": "object",
12235
+ "description": "Used for filtering messages by tag in various methods. Note that functions using this type may have a partial implementation.",
12236
+ "properties": {
12237
+ "tags": {
12238
+ "type": "object",
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.",
12240
+ "patternProperties": {
12241
+ ".*": {
12242
+ "type": "boolean"
12243
+ }
12244
+ }
12245
+ },
12246
+ "mode": {
12247
+ "type": "string",
12248
+ "description": "Whether all of the tag filters must apply, or any of them.",
12249
+ "enum": [
12250
+ "all",
12251
+ "any"
12252
+ ]
12253
+ }
12254
+ }
12255
+ }
12256
+ ],
12257
+ "functions": [
12258
+ {
12259
+ "name": "list",
12260
+ "type": "function",
12261
+ "description": "Returns a list of tags that can be set on messages, and their human-friendly name, colour, and sort order.",
12262
+ "async": "callback",
12263
+ "permissions": [
12264
+ "messagesTagsList"
12265
+ ],
12266
+ "parameters": [
12267
+ {
12268
+ "type": "function",
12269
+ "name": "callback",
12270
+ "optional": true,
12271
+ "parameters": [
12272
+ {
12273
+ "type": "array",
12274
+ "items": {
12275
+ "$ref": "messages.tags.MessageTag"
12276
+ }
12277
+ }
12278
+ ]
12279
+ }
12280
+ ]
12281
+ },
12282
+ {
12283
+ "name": "create",
12284
+ "type": "function",
12285
+ "description": "Creates a new message tag. Tagging a message will store the tag's key in the user's message. Throws if the specified tag key is used already.",
12286
+ "async": true,
12287
+ "permissions": [
12288
+ "messagesTags"
12289
+ ],
12290
+ "parameters": [
12291
+ {
12292
+ "type": "string",
12293
+ "name": "key",
12294
+ "description": "Unique tag identifier (will be converted to lower case). Must not include <value>()<>{/%*\"</value> or spaces.",
12295
+ "pattern": "^[^ ()/{%*<>\"]+$"
12296
+ },
12297
+ {
12298
+ "type": "string",
12299
+ "name": "tag",
12300
+ "description": "Human-readable tag name."
12301
+ },
12302
+ {
12303
+ "type": "string",
12304
+ "name": "color",
12305
+ "description": "Tag color in hex format (i.e.: #000080 for navy blue)",
12306
+ "pattern": "^#[0-9a-f]{6}"
12307
+ }
12308
+ ]
12309
+ },
12310
+ {
12311
+ "name": "update",
12312
+ "type": "function",
12313
+ "description": "Updates a message tag.",
12314
+ "async": true,
12315
+ "permissions": [
12316
+ "messagesTags"
12317
+ ],
12318
+ "parameters": [
12319
+ {
12320
+ "type": "string",
12321
+ "name": "key",
12322
+ "description": "Unique tag identifier (will be converted to lower case). Must not include <value>()<>{/%*\"</value> or spaces.",
12323
+ "pattern": "^[^ ()/{%*<>\"]+$"
12324
+ },
12325
+ {
12326
+ "type": "object",
12327
+ "name": "updateProperties",
12328
+ "properties": {
12329
+ "tag": {
12330
+ "type": "string",
12331
+ "optional": "true",
12332
+ "description": "Human-readable tag name."
12333
+ },
12334
+ "color": {
12335
+ "type": "string",
12336
+ "pattern": "^#[0-9a-f]{6}",
12337
+ "description": "Tag color in hex format (i.e.: #000080 for navy blue).",
12338
+ "optional": "true"
12339
+ }
12340
+ }
12341
+ }
12342
+ ]
12343
+ },
12344
+ {
12345
+ "name": "delete",
12346
+ "type": "function",
12347
+ "description": "Deletes a message tag, removing it from the list of known tags. Its key will not be removed from tagged messages, but they will appear untagged. Recreating a deleted tag, will make all former tagged messages appear tagged again.",
12348
+ "async": true,
12349
+ "permissions": [
12350
+ "messagesTags"
12351
+ ],
11463
12352
  "parameters": [
11464
12353
  {
11465
12354
  "type": "string",
@@ -12126,20 +13015,7 @@
12126
13015
  "description": "The `CookieStore <|link-cookieStore|>`__ id used by the tab. Either a custom id created using the `contextualIdentities API <|link-contextualIdentity|>`__, or a built-in one: <value>firefox-default</value>, <value>firefox-container-1</value>, <value>firefox-container-2</value>, <value>firefox-container-3</value>, <value>firefox-container-4</value>, <value>firefox-container-5</value>. **Note:** The naming pattern was deliberately not changed for Thunderbird, but kept for compatibility reasons."
12127
13016
  },
12128
13017
  "type": {
12129
- "type": "string",
12130
- "enum": [
12131
- "addressBook",
12132
- "calendar",
12133
- "calendarEvent",
12134
- "calendarTask",
12135
- "chat",
12136
- "content",
12137
- "mail",
12138
- "messageCompose",
12139
- "messageDisplay",
12140
- "special",
12141
- "tasks"
12142
- ],
13018
+ "$ref": "TabType",
12143
13019
  "optional": true
12144
13020
  },
12145
13021
  "mailTab": {
@@ -12164,6 +13040,24 @@
12164
13040
  ],
12165
13041
  "description": "Whether the tabs have completed loading."
12166
13042
  },
13043
+ {
13044
+ "id": "TabType",
13045
+ "type": "string",
13046
+ "enum": [
13047
+ "addressBook",
13048
+ "calendar",
13049
+ "calendarEvent",
13050
+ "calendarTask",
13051
+ "chat",
13052
+ "content",
13053
+ "mail",
13054
+ "messageCompose",
13055
+ "messageDisplay",
13056
+ "special",
13057
+ "tasks"
13058
+ ],
13059
+ "description": "Tab types supported by the tabs API."
13060
+ },
12167
13061
  {
12168
13062
  "id": "WindowType",
12169
13063
  "type": "string",
@@ -12460,9 +13354,19 @@
12460
13354
  "optional": true
12461
13355
  },
12462
13356
  "type": {
12463
- "type": "string",
13357
+ "choices": [
13358
+ {
13359
+ "$ref": "TabType"
13360
+ },
13361
+ {
13362
+ "type": "array",
13363
+ "items": {
13364
+ "$ref": "TabType"
13365
+ }
13366
+ }
13367
+ ],
12464
13368
  "optional": true,
12465
- "description": "Match tabs against the given Tab.type (see :ref:`tabs.Tab`). Ignored if ``queryInfo.mailTab`` is specified."
13369
+ "description": "Match tabs against the given tab type or types. Ignored if ``queryInfo.mailTab`` is specified."
12466
13370
  },
12467
13371
  "active": {
12468
13372
  "type": "boolean",
@@ -12579,7 +13483,7 @@
12579
13483
  "url": {
12580
13484
  "type": "string",
12581
13485
  "optional": true,
12582
- "description": "A URL of a page to load. If the URL points to a content page (a web page, an extension page or a registered WebExtension protocol handler page), the tab will navigate to the requested page. All other URLs will be opened externally without changing the tab. Note: This function will throw an error, if a content page is loaded into a non-content tab (its type must be either <value>content</value> or <value>mail</value>)."
13486
+ "description": "A URL of a page to load. If the URL points to a content page (a web page, an extension page or a registered WebExtension protocol handler page), the tab will navigate to the requested page. All other URLs will be opened externally without changing the tab. **Note:** This function will throw an error, if a content page is loaded into a non-content tab (its type must be either <value>content</value> or <value>mail</value>)."
12583
13487
  },
12584
13488
  "active": {
12585
13489
  "type": "boolean",