webext-schema 5.2.9 → 5.2.10

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": "^120.0.0",
24
- "@types/node": "^20.11.19",
23
+ "@types/firefox-webext-browser": "^120.0.3",
24
+ "@types/node": "^20.11.30",
25
25
  "@types/sinon": "^17.0.3",
26
26
  "c8": "^9.1.0",
27
27
  "chai": "^5.1.0",
28
- "eslint": "^8.56.0",
28
+ "eslint": "^8.57.0",
29
29
  "eslint-config-standard": "^17.1.0",
30
30
  "eslint-plugin-import": "^2.29.1",
31
- "eslint-plugin-jsdoc": "^48.1.0",
32
- "eslint-plugin-regexp": "^2.2.0",
31
+ "eslint-plugin-jsdoc": "^48.2.1",
32
+ "eslint-plugin-regexp": "^2.3.0",
33
33
  "eslint-plugin-unicorn": "^51.0.1",
34
34
  "mocha": "^10.3.0",
35
35
  "npm-run-all": "^4.1.5",
36
- "typescript": "^5.3.3",
37
- "undici": "^6.6.2"
36
+ "typescript": "^5.4.2",
37
+ "undici": "^6.9.0"
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.9"
57
+ "version": "5.2.10"
58
58
  }
@@ -5808,51 +5808,6 @@
5808
5808
  "type": "object",
5809
5809
  "description": "Used by various functions to represent the state of a message being composed. Note that functions using this type may have a partial implementation.",
5810
5810
  "properties": {
5811
- "identityId": {
5812
- "type": "string",
5813
- "description": "The ID of an identity from the :doc:`accounts`. The settings from the identity will be used in the composed message. If ``replyTo`` is also specified, the ``replyTo`` property of the identity is overridden. The permission <permission>accountsRead</permission> is required to include the ``identityId``.",
5814
- "optional": true
5815
- },
5816
- "from": {
5817
- "$ref": "ComposeRecipient",
5818
- "description": "*Caution*: Setting a value for ``from`` does not change the used identity, it overrides the FROM header. Many email servers do not accept emails where the FROM header does not match the sender identity. Must be set to exactly one valid email address.",
5819
- "optional": true
5820
- },
5821
- "to": {
5822
- "$ref": "ComposeRecipientList",
5823
- "optional": true
5824
- },
5825
- "cc": {
5826
- "$ref": "ComposeRecipientList",
5827
- "optional": true
5828
- },
5829
- "bcc": {
5830
- "$ref": "ComposeRecipientList",
5831
- "optional": true
5832
- },
5833
- "overrideDefaultFcc": {
5834
- "type": "boolean",
5835
- "optional": true,
5836
- "description": "Indicates whether the default fcc setting (defined by the used identity) is being overridden for this message. Setting <value>false</value> will clear the override. Setting <value>true</value> will throw an <em>ExtensionError</em>, if ``overrideDefaultFccFolder`` is not set as well."
5837
- },
5838
- "overrideDefaultFccFolder": {
5839
- "choices": [
5840
- {
5841
- "$ref": "folders.MailFolderId"
5842
- },
5843
- {
5844
- "$ref": "folders.MailFolder"
5845
- },
5846
- {
5847
- "type": "string",
5848
- "enum": [
5849
- ""
5850
- ]
5851
- }
5852
- ],
5853
- "optional": true,
5854
- "description": " This value overrides the default fcc setting (defined by the used identity) for this message only. Either a :ref:`folders.MailFolder` specifying the folder for the copy of the sent message, or an empty string to not save a copy at all."
5855
- },
5856
5811
  "additionalFccFolder": {
5857
5812
  "choices": [
5858
5813
  {
@@ -5871,58 +5826,80 @@
5871
5826
  "description": "An additional fcc folder which can be selected while composing the message, an empty string if not used.",
5872
5827
  "optional": true
5873
5828
  },
5874
- "replyTo": {
5875
- "$ref": "ComposeRecipientList",
5829
+ "attachVCard": {
5830
+ "type": "boolean",
5831
+ "optional": true,
5832
+ "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."
5833
+ },
5834
+ "attachments": {
5835
+ "type": "array",
5836
+ "items": {
5837
+ "choices": [
5838
+ {
5839
+ "$ref": "FileAttachment"
5840
+ },
5841
+ {
5842
+ "$ref": "ComposeAttachment"
5843
+ }
5844
+ ]
5845
+ },
5846
+ "description": "Only used in the begin* functions. Attachments to add to the message.",
5876
5847
  "optional": true
5877
5848
  },
5878
- "followupTo": {
5849
+ "bcc": {
5879
5850
  "$ref": "ComposeRecipientList",
5880
5851
  "optional": true
5881
5852
  },
5882
- "newsgroups": {
5883
- "description": "A single newsgroup name or an array of newsgroup names.",
5884
- "choices": [
5885
- {
5886
- "type": "string"
5887
- },
5888
- {
5889
- "type": "array",
5890
- "items": {
5891
- "type": "string"
5892
- }
5893
- }
5894
- ],
5853
+ "body": {
5854
+ "type": "string",
5855
+ "description": "The HTML content of the message.",
5895
5856
  "optional": true
5896
5857
  },
5897
- "relatedMessageId": {
5898
- "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.",
5899
- "$ref": "messages.MessageId",
5858
+ "cc": {
5859
+ "$ref": "ComposeRecipientList",
5900
5860
  "optional": true
5901
5861
  },
5902
- "subject": {
5903
- "type": "string",
5862
+ "customHeaders": {
5863
+ "type": "array",
5864
+ "items": {
5865
+ "$ref": "CustomHeader"
5866
+ },
5867
+ "description": "Array of custom headers. Headers will be returned in <em>Http-Header-Case</em> (a.k.a. <em>Train-Case</em>). Set an empty array to clear all custom headers.",
5904
5868
  "optional": true
5905
5869
  },
5906
- "type": {
5870
+ "deliveryFormat": {
5907
5871
  "type": "string",
5908
- "description": "Read-only. The type of the message being composed, depending on how the compose window was opened by the user.",
5909
5872
  "enum": [
5910
- "draft",
5911
- "new",
5912
- "redirect",
5913
- "reply",
5914
- "forward"
5873
+ "auto",
5874
+ "plaintext",
5875
+ "html",
5876
+ "both"
5915
5877
  ],
5878
+ "description": "Defines the MIME format of the sent message (ignored on plain text messages). Defaults to <value>auto</value>, which will send html messages as plain text, if they do not include any formatting, and as <value>both</value> otherwise (a multipart/mixed message).",
5916
5879
  "optional": true
5917
5880
  },
5918
- "body": {
5919
- "type": "string",
5920
- "description": "The HTML content of the message.",
5881
+ "deliveryStatusNotification": {
5882
+ "type": "boolean",
5883
+ "optional": true,
5884
+ "description": "Let the sender know when the recipient's server received the message. Not supported by all servers."
5885
+ },
5886
+ "followupTo": {
5887
+ "$ref": "ComposeRecipientList",
5921
5888
  "optional": true
5922
5889
  },
5923
- "plainTextBody": {
5890
+ "from": {
5891
+ "$ref": "ComposeRecipient",
5892
+ "description": "*Caution*: Setting a value for ``from`` does not change the used identity, it overrides the <value>From</value> header. Many email servers do not accept emails where the <value>From</value> header does not match the sender identity. Must be set to exactly one valid email address.",
5893
+ "optional": true
5894
+ },
5895
+ "identityId": {
5924
5896
  "type": "string",
5925
- "description": "The plain text content of the message.",
5897
+ "description": "The ID of an identity from the :doc:`accounts`. The settings from the identity will be used in the composed message. If ``replyTo`` is also specified, the ``replyTo`` property of the identity is overridden. The permission <permission>accountsRead</permission> is required to include the ``identityId``.",
5898
+ "optional": true
5899
+ },
5900
+ "isModified": {
5901
+ "type": "boolean",
5902
+ "description": "Whether the composer is considered modified by the user. A modified composer asks for confirmation, when it is closed.",
5926
5903
  "optional": true
5927
5904
  },
5928
5905
  "isPlainText": {
@@ -5930,23 +5907,47 @@
5930
5907
  "description": "Whether the message is an HTML message or a plain text message.",
5931
5908
  "optional": true
5932
5909
  },
5933
- "deliveryFormat": {
5934
- "type": "string",
5935
- "enum": [
5936
- "auto",
5937
- "plaintext",
5938
- "html",
5939
- "both"
5910
+ "newsgroups": {
5911
+ "description": "A single newsgroup name or an array of newsgroup names.",
5912
+ "choices": [
5913
+ {
5914
+ "type": "string"
5915
+ },
5916
+ {
5917
+ "type": "array",
5918
+ "items": {
5919
+ "type": "string"
5920
+ }
5921
+ }
5940
5922
  ],
5941
- "description": "Defines the mime format of the sent message (ignored on plain text messages). Defaults to <value>auto</value>, which will send html messages as plain text, if they do not include any formatting, and as <value>both</value> otherwise (a multipart/mixed message).",
5942
5923
  "optional": true
5943
5924
  },
5944
- "customHeaders": {
5945
- "type": "array",
5946
- "items": {
5947
- "$ref": "CustomHeader"
5948
- },
5949
- "description": "Array of custom headers. Headers will be returned in <em>Http-Header-Case</em> (a.k.a. <em>Train-Case</em>). Set an empty array to clear all custom headers.",
5925
+ "overrideDefaultFcc": {
5926
+ "type": "boolean",
5927
+ "optional": true,
5928
+ "description": "Indicates whether the default fcc setting (defined by the used identity) is being overridden for this message. Setting <value>false</value> will clear the override. Setting <value>true</value> will throw an <em>ExtensionError</em>, if ``overrideDefaultFccFolder`` is not set as well."
5929
+ },
5930
+ "overrideDefaultFccFolder": {
5931
+ "choices": [
5932
+ {
5933
+ "$ref": "folders.MailFolderId"
5934
+ },
5935
+ {
5936
+ "$ref": "folders.MailFolder"
5937
+ },
5938
+ {
5939
+ "type": "string",
5940
+ "enum": [
5941
+ ""
5942
+ ]
5943
+ }
5944
+ ],
5945
+ "optional": true,
5946
+ "description": " This value overrides the default fcc setting (defined by the used identity) for this message only. Either a :ref:`folders.MailFolder` specifying the folder for the copy of the sent message, or an empty string to not save a copy at all."
5947
+ },
5948
+ "plainTextBody": {
5949
+ "type": "string",
5950
+ "description": "The plain text content of the message.",
5950
5951
  "optional": true
5951
5952
  },
5952
5953
  "priority": {
@@ -5961,34 +5962,38 @@
5961
5962
  "description": "The priority of the message.",
5962
5963
  "optional": true
5963
5964
  },
5965
+ "relatedMessageId": {
5966
+ "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.",
5967
+ "$ref": "messages.MessageId",
5968
+ "optional": true
5969
+ },
5970
+ "replyTo": {
5971
+ "$ref": "ComposeRecipientList",
5972
+ "optional": true
5973
+ },
5964
5974
  "returnReceipt": {
5965
5975
  "type": "boolean",
5966
5976
  "optional": true,
5967
5977
  "description": "Add the <em>Disposition-Notification-To</em> header to the message to requests the recipients email client to send a reply once the message has been received. Recipient server may strip the header and the recipient might ignore the request."
5968
5978
  },
5969
- "deliveryStatusNotification": {
5970
- "type": "boolean",
5971
- "optional": true,
5972
- "description": "Let the sender know when the recipient's server received the message. Not supported by all servers."
5979
+ "subject": {
5980
+ "type": "string",
5981
+ "optional": true
5973
5982
  },
5974
- "attachVCard": {
5975
- "type": "boolean",
5976
- "optional": true,
5977
- "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."
5983
+ "to": {
5984
+ "$ref": "ComposeRecipientList",
5985
+ "optional": true
5978
5986
  },
5979
- "attachments": {
5980
- "type": "array",
5981
- "items": {
5982
- "choices": [
5983
- {
5984
- "$ref": "FileAttachment"
5985
- },
5986
- {
5987
- "$ref": "ComposeAttachment"
5988
- }
5989
- ]
5990
- },
5991
- "description": "Only used in the begin* functions. Attachments to add to the message.",
5987
+ "type": {
5988
+ "type": "string",
5989
+ "description": "Read-only. The type of the message being composed, depending on how the compose window was opened by the user.",
5990
+ "enum": [
5991
+ "draft",
5992
+ "new",
5993
+ "redirect",
5994
+ "reply",
5995
+ "forward"
5996
+ ],
5992
5997
  "optional": true
5993
5998
  }
5994
5999
  }
@@ -6040,8 +6045,7 @@
6040
6045
  "properties": {
6041
6046
  "name": {
6042
6047
  "type": "string",
6043
- "description": "Name of a custom header, must have a <value>X-</value> prefix.",
6044
- "pattern": "^X-.*$"
6048
+ "description": "Name of a custom header, must be prefixed by <value>X-</value> (but not by <value>X-Mozilla-</value>) or be one of the explicitly allowed headers (<value>MSIP_Labels</value>)"
6045
6049
  },
6046
6050
  "value": {
6047
6051
  "type": "string"
@@ -6157,6 +6161,7 @@
6157
6161
  "type": "string",
6158
6162
  "description": "The used save mode.",
6159
6163
  "enum": [
6164
+ "autoSave",
6160
6165
  "draft",
6161
6166
  "template"
6162
6167
  ]
@@ -11339,9 +11344,20 @@
11339
11344
  "type": "string",
11340
11345
  "optional": true
11341
11346
  },
11347
+ "decryptionStatus": {
11348
+ "type": "string",
11349
+ "optional": true,
11350
+ "description": "The decryption status, only available for the root part.",
11351
+ "enum": [
11352
+ "none",
11353
+ "skipped",
11354
+ "success",
11355
+ "fail"
11356
+ ]
11357
+ },
11342
11358
  "headers": {
11343
11359
  "type": "object",
11344
- "description": "A <em>dictionary object</em> of part headers as <em>key-value</em> pairs, with the header name as <em>key</em>, and an array of headers as <em>value</em>",
11360
+ "description": "A <em>dictionary object</em> of part headers as <em>key-value</em> pairs, with the header name as <em>key</em>, and an array of headers as <em>value</em>.",
11345
11361
  "optional": true,
11346
11362
  "additionalProperties": {
11347
11363
  "type": "array",
@@ -11650,6 +11666,18 @@
11650
11666
  "name": "messageId",
11651
11667
  "$ref": "messages.MessageId"
11652
11668
  },
11669
+ {
11670
+ "name": "options",
11671
+ "type": "object",
11672
+ "properties": {
11673
+ "decrypt": {
11674
+ "type": "boolean",
11675
+ "description": "Whether the message should be decrypted. If the message could not be decrypted, its parts are omitted. Defaults to true.",
11676
+ "optional": true
11677
+ }
11678
+ },
11679
+ "optional": true
11680
+ },
11653
11681
  {
11654
11682
  "type": "function",
11655
11683
  "name": "callback",
@@ -11676,6 +11704,11 @@
11676
11704
  "name": "options",
11677
11705
  "type": "object",
11678
11706
  "properties": {
11707
+ "decrypt": {
11708
+ "type": "boolean",
11709
+ "description": "Whether the message should be decrypted. Throws, if the message could not be decrypted.",
11710
+ "optional": true
11711
+ },
11679
11712
  "data_format": {
11680
11713
  "choices": [
11681
11714
  {
@@ -11696,7 +11729,8 @@
11696
11729
  "BinaryString"
11697
11730
  ]
11698
11731
  }
11699
- ]
11732
+ ],
11733
+ "optional": true
11700
11734
  }
11701
11735
  },
11702
11736
  "optional": true
@@ -12087,7 +12121,7 @@
12087
12121
  {
12088
12122
  "name": "delete",
12089
12123
  "type": "function",
12090
- "description": "Deletes messages permanently, or moves them to the trash folder (honoring the account's deletion behavior settings). Deleting external messages will throw an <em>ExtensionError</em>. The ``skipTrash`` parameter allows immediate permanent deletion, bypassing the trash folder.\n**Note**: Consider using :ref:`messages.move` to manually move messages to the account's trash folder, instead of requesting the overly powerful permission to actually delete messages. The account's trash folder can be extracted as follows: <literalinclude>includes/messages/getTrash.js<lang>JavaScript</lang></literalinclude>",
12124
+ "description": "Deletes messages permanently, or moves them to the trash folder (honoring the account's deletion behavior settings). Deleting external messages will throw an <em>ExtensionError</em>. The ``skipTrash`` parameter allows immediate permanent deletion, bypassing the trash folder.",
12091
12125
  "async": true,
12092
12126
  "permissions": [
12093
12127
  "messagesDelete"
@@ -14002,6 +14036,95 @@
14002
14036
  ]
14003
14037
  }
14004
14038
  ],
14039
+ "utilities.json": [
14040
+ {
14041
+ "namespace": "messengerUtilities",
14042
+ "types": [
14043
+ {
14044
+ "id": "ParsedMailbox",
14045
+ "type": "object",
14046
+ "description": "Representation of a parsed mailbox string (see RFC 5322, section 3.4).",
14047
+ "properties": {
14048
+ "name": {
14049
+ "type": "string",
14050
+ "optional": true,
14051
+ "description": "The <value>display-name</value> associated with the provided address or group, if available."
14052
+ },
14053
+ "email": {
14054
+ "type": "string",
14055
+ "optional": true,
14056
+ "description": "The <value>addr-spec</value> associated with the provided address, if available."
14057
+ },
14058
+ "group": {
14059
+ "type": "array",
14060
+ "optional": true,
14061
+ "items": {
14062
+ "$ref": "messengerUtilities.ParsedMailbox"
14063
+ },
14064
+ "description": "The members of the group, if available."
14065
+ }
14066
+ }
14067
+ }
14068
+ ],
14069
+ "functions": [
14070
+ {
14071
+ "name": "formatFileSize",
14072
+ "type": "function",
14073
+ "description": "Returns the provided file size in a human readable format (e.g. <value>12 bytes</value> or <value>11,4 GB</value>).",
14074
+ "async": "callback",
14075
+ "parameters": [
14076
+ {
14077
+ "type": "integer",
14078
+ "name": "sizeInBytes",
14079
+ "description": "The size in bytes."
14080
+ },
14081
+ {
14082
+ "type": "function",
14083
+ "name": "callback",
14084
+ "optional": true,
14085
+ "parameters": [
14086
+ {
14087
+ "type": "string"
14088
+ }
14089
+ ]
14090
+ }
14091
+ ]
14092
+ },
14093
+ {
14094
+ "name": "parseMailboxString",
14095
+ "type": "function",
14096
+ "description": "Parse a mailbox string containing one or more email addresses (see RFC 5322, section 3.4).",
14097
+ "async": "callback",
14098
+ "parameters": [
14099
+ {
14100
+ "type": "string",
14101
+ "name": "mailboxString",
14102
+ "description": "The string to be parsed (e.g. <value>User <user@example.com>, other-user@example.com</value>)"
14103
+ },
14104
+ {
14105
+ "type": "boolean",
14106
+ "name": "preserveGroups",
14107
+ "optional": true,
14108
+ "description": "Keep grouped hierachies. Groups may be specified in a mailbox string as follows: <value>GroupName : user1 <user1@example.com>, user2@example,com ;</value>."
14109
+ },
14110
+ {
14111
+ "type": "function",
14112
+ "name": "callback",
14113
+ "optional": true,
14114
+ "parameters": [
14115
+ {
14116
+ "type": "array",
14117
+ "items": {
14118
+ "$ref": "messengerUtilities.ParsedMailbox"
14119
+ }
14120
+ }
14121
+ ]
14122
+ }
14123
+ ]
14124
+ }
14125
+ ]
14126
+ }
14127
+ ],
14005
14128
  "windows.json": [
14006
14129
  {
14007
14130
  "namespace": "windows",
@@ -6543,307 +6543,6 @@
6543
6543
  ]
6544
6544
  }
6545
6545
  ],
6546
- "urlbar.json": [
6547
- {
6548
- "namespace": "manifest",
6549
- "types": [
6550
- {
6551
- "$extend": "PermissionPrivileged",
6552
- "choices": [
6553
- {
6554
- "type": "string",
6555
- "enum": [
6556
- "urlbar"
6557
- ]
6558
- }
6559
- ]
6560
- }
6561
- ]
6562
- },
6563
- {
6564
- "namespace": "urlbar",
6565
- "description": "Use the <code>browser.urlbar</code> API to experiment with new features in the URLBar. Restricted to Mozilla privileged WebExtensions.",
6566
- "permissions": [
6567
- "urlbar"
6568
- ],
6569
- "types": [
6570
- {
6571
- "id": "EngagementState",
6572
- "type": "string",
6573
- "enum": [
6574
- "start",
6575
- "engagement",
6576
- "abandonment",
6577
- "discard"
6578
- ],
6579
- "description": "The state of an engagement made with the urlbar by the user. <code>start</code>: The user has started an engagement. <code>engagement</code>: The user has completed an engagement by picking a result. <code>abandonment</code>: The user has abandoned their engagement, for example by blurring the urlbar. <code>discard</code>: The engagement ended in a way that should be ignored by listeners."
6580
- },
6581
- {
6582
- "id": "Query",
6583
- "type": "object",
6584
- "description": "A query performed in the urlbar.",
6585
- "properties": {
6586
- "isPrivate": {
6587
- "type": "boolean",
6588
- "description": "Whether the query's browser context is private."
6589
- },
6590
- "maxResults": {
6591
- "type": "integer",
6592
- "description": "The maximum number of results shown to the user."
6593
- },
6594
- "searchString": {
6595
- "type": "string",
6596
- "description": "The query's search string."
6597
- },
6598
- "sources": {
6599
- "type": "array",
6600
- "description": "List of acceptable source types to return.",
6601
- "items": {
6602
- "$ref": "SourceType"
6603
- }
6604
- }
6605
- }
6606
- },
6607
- {
6608
- "id": "Result",
6609
- "type": "object",
6610
- "description": "A result of a query. Queries can have many results. Each result is created by a provider.",
6611
- "properties": {
6612
- "payload": {
6613
- "type": "object",
6614
- "description": "An object with arbitrary properties depending on the result's type."
6615
- },
6616
- "source": {
6617
- "$ref": "SourceType",
6618
- "description": "The result's source."
6619
- },
6620
- "type": {
6621
- "$ref": "ResultType",
6622
- "description": "The result's type."
6623
- },
6624
- "suggestedIndex": {
6625
- "type": "integer",
6626
- "description": "Suggest a preferred position for this result within the result set.",
6627
- "optional": true,
6628
- "default": -1
6629
- }
6630
- }
6631
- },
6632
- {
6633
- "id": "ResultType",
6634
- "type": "string",
6635
- "enum": [
6636
- "dynamic",
6637
- "remote_tab",
6638
- "search",
6639
- "tab",
6640
- "tip",
6641
- "url"
6642
- ],
6643
- "description": "Possible types of results. <code>dynamic</code>: A result whose view and payload are specified by the extension. <code>remote_tab</code>: A synced tab from another device. <code>search</code>: A search suggestion from a search engine. <code>tab</code>: An open tab in the browser. <code>tip</code>: An actionable message to help the user with their query. <code>url</code>: A URL that's not one of the other types."
6644
- },
6645
- {
6646
- "id": "SearchOptions",
6647
- "type": "object",
6648
- "description": "Options to the <code>search</code> function.",
6649
- "properties": {
6650
- "focus": {
6651
- "type": "boolean",
6652
- "optional": true,
6653
- "default": true,
6654
- "description": "Whether to focus the input field and select its contents."
6655
- }
6656
- }
6657
- },
6658
- {
6659
- "id": "SourceType",
6660
- "type": "string",
6661
- "enum": [
6662
- "bookmarks",
6663
- "history",
6664
- "local",
6665
- "network",
6666
- "search",
6667
- "tabs"
6668
- ],
6669
- "description": "Possible sources of results. <code>bookmarks</code>: The result comes from the user's bookmarks. <code>history</code>: The result comes from the user's history. <code>local</code>: The result comes from some local source not covered by another source type. <code>network</code>: The result comes from some network source not covered by another source type. <code>search</code>: The result comes from a search engine. <code>tabs</code>: The result is an open tab in the browser or a synced tab from another device."
6670
- }
6671
- ],
6672
- "properties": {
6673
- "engagementTelemetry": {
6674
- "$ref": "types.Setting",
6675
- "description": "Enables or disables the engagement telemetry."
6676
- }
6677
- },
6678
- "functions": [
6679
- {
6680
- "name": "closeView",
6681
- "type": "function",
6682
- "async": true,
6683
- "description": "Closes the urlbar view in the current window.",
6684
- "parameters": []
6685
- },
6686
- {
6687
- "name": "focus",
6688
- "type": "function",
6689
- "async": true,
6690
- "description": "Focuses the urlbar in the current window.",
6691
- "parameters": [
6692
- {
6693
- "name": "select",
6694
- "type": "boolean",
6695
- "optional": true,
6696
- "default": false,
6697
- "description": "If true, the text in the urlbar will also be selected."
6698
- }
6699
- ]
6700
- },
6701
- {
6702
- "name": "search",
6703
- "type": "function",
6704
- "async": true,
6705
- "description": "Starts a search in the urlbar in the current window.",
6706
- "parameters": [
6707
- {
6708
- "name": "searchString",
6709
- "type": "string",
6710
- "description": "The search string."
6711
- },
6712
- {
6713
- "name": "options",
6714
- "$ref": "SearchOptions",
6715
- "optional": true,
6716
- "default": {},
6717
- "description": "Options for the search."
6718
- }
6719
- ]
6720
- }
6721
- ],
6722
- "events": [
6723
- {
6724
- "name": "onBehaviorRequested",
6725
- "type": "function",
6726
- "description": "Before a query starts, this event is fired for the given provider. Its purpose is to request the provider's behavior for the query. The listener should return a behavior in response. By default, providers are inactive, so if your provider should always be inactive, you don't need to listen for this event.",
6727
- "parameters": [
6728
- {
6729
- "name": "query",
6730
- "$ref": "Query",
6731
- "description": "The query for which the behavior is requested."
6732
- }
6733
- ],
6734
- "extraParameters": [
6735
- {
6736
- "name": "providerName",
6737
- "type": "string",
6738
- "pattern": "^[a-zA-Z0-9_-]+$",
6739
- "description": "The name of the provider whose behavior the listener returns."
6740
- }
6741
- ],
6742
- "returns": {
6743
- "type": "string",
6744
- "enum": [
6745
- "active",
6746
- "inactive",
6747
- "restricting"
6748
- ],
6749
- "description": "The behavior of the provider for the query."
6750
- }
6751
- },
6752
- {
6753
- "name": "onEngagement",
6754
- "type": "function",
6755
- "description": "This event is fired when the user starts and ends an engagement with the urlbar.",
6756
- "parameters": [
6757
- {
6758
- "name": "state",
6759
- "$ref": "EngagementState",
6760
- "description": "The state of the engagement."
6761
- }
6762
- ],
6763
- "extraParameters": [
6764
- {
6765
- "name": "providerName",
6766
- "type": "string",
6767
- "pattern": "^[a-zA-Z0-9_-]+$",
6768
- "description": "The name of the provider that will listen for engagement events."
6769
- }
6770
- ]
6771
- },
6772
- {
6773
- "name": "onQueryCanceled",
6774
- "type": "function",
6775
- "description": "This event is fired for the given provider when a query is canceled. The listener should stop any ongoing fetch or creation of results and clean up its resources.",
6776
- "parameters": [
6777
- {
6778
- "name": "query",
6779
- "$ref": "Query",
6780
- "description": "The query that was canceled."
6781
- }
6782
- ],
6783
- "extraParameters": [
6784
- {
6785
- "name": "providerName",
6786
- "type": "string",
6787
- "pattern": "^[a-zA-Z0-9_-]+$",
6788
- "description": "The name of the provider that is creating results for the query."
6789
- }
6790
- ]
6791
- },
6792
- {
6793
- "name": "onResultsRequested",
6794
- "type": "function",
6795
- "description": "When a query starts, this event is fired for the given provider if the provider is active for the query and there are no other providers that are restricting. Its purpose is to request the provider's results for the query. The listener should return a list of results in response.",
6796
- "parameters": [
6797
- {
6798
- "name": "query",
6799
- "$ref": "Query",
6800
- "description": "The query for which results are requested."
6801
- }
6802
- ],
6803
- "extraParameters": [
6804
- {
6805
- "name": "providerName",
6806
- "type": "string",
6807
- "pattern": "^[a-zA-Z0-9_-]+$",
6808
- "description": "The name of the provider whose results the listener returns."
6809
- }
6810
- ],
6811
- "returns": {
6812
- "type": "array",
6813
- "items": {
6814
- "$ref": "Result"
6815
- },
6816
- "description": "The results that the provider fetched for the query."
6817
- }
6818
- },
6819
- {
6820
- "name": "onResultPicked",
6821
- "type": "function",
6822
- "description": "Typically, a provider includes a <code>url</code> property in its results' payloads. When the user picks a result with a URL, Firefox automatically loads the URL. URLs don't make sense for every result type, however. When the user picks a result without a URL, this event is fired. The provider should take an appropriate action in response. Currently the only applicable <code>ResultTypes</code> are <code>dynamic</code> and <code>tip</code>.",
6823
- "parameters": [
6824
- {
6825
- "name": "payload",
6826
- "type": "object",
6827
- "description": "The payload of the result that was picked."
6828
- },
6829
- {
6830
- "name": "elementName",
6831
- "type": "string",
6832
- "description": "If the result is a dynamic type, this is the name of the element in the result view that was picked. If the result is not a dynamic type, this is an empty string."
6833
- }
6834
- ],
6835
- "extraParameters": [
6836
- {
6837
- "name": "providerName",
6838
- "type": "string",
6839
- "pattern": "^[a-zA-Z0-9_-]+$",
6840
- "description": "The listener will be called for the results of the provider with this name."
6841
- }
6842
- ]
6843
- }
6844
- ]
6845
- }
6846
- ],
6847
6546
  "windows.json": [
6848
6547
  {
6849
6548
  "namespace": "windows",
@@ -16209,6 +15908,24 @@
16209
15908
  "os_update",
16210
15909
  "periodic"
16211
15910
  ]
15911
+ },
15912
+ {
15913
+ "id": "OnPerformanceWarningCategory",
15914
+ "type": "string",
15915
+ "enum": [
15916
+ "content_script"
15917
+ ],
15918
+ "description": "The performance warning event category, e.g. 'content_script'."
15919
+ },
15920
+ {
15921
+ "id": "OnPerformanceWarningSeverity",
15922
+ "type": "string",
15923
+ "enum": [
15924
+ "low",
15925
+ "medium",
15926
+ "high"
15927
+ ],
15928
+ "description": "The performance warning event severity. Will be 'high' for serious and user-visible issues."
16212
15929
  }
16213
15930
  ],
16214
15931
  "properties": {
@@ -16786,6 +16503,36 @@
16786
16503
  "description": "The reason that the event is being dispatched."
16787
16504
  }
16788
16505
  ]
16506
+ },
16507
+ {
16508
+ "name": "onPerformanceWarning",
16509
+ "type": "function",
16510
+ "description": "Fired when a runtime performance issue is detected with the extension. Observe this event to be proactively notified of runtime performance problems with the extension.",
16511
+ "parameters": [
16512
+ {
16513
+ "type": "object",
16514
+ "name": "details",
16515
+ "properties": {
16516
+ "category": {
16517
+ "$ref": "OnPerformanceWarningCategory",
16518
+ "description": "The performance warning event category, e.g. 'content_script'."
16519
+ },
16520
+ "severity": {
16521
+ "$ref": "OnPerformanceWarningSeverity",
16522
+ "description": "The performance warning event severity, e.g. 'high'."
16523
+ },
16524
+ "tabId": {
16525
+ "type": "integer",
16526
+ "optional": true,
16527
+ "description": "The $(ref:tabs.Tab) that the performance warning relates to, if any."
16528
+ },
16529
+ "description": {
16530
+ "type": "string",
16531
+ "description": "An explanation of what the warning means, and hopefully how to address it."
16532
+ }
16533
+ }
16534
+ }
16535
+ ]
16789
16536
  }
16790
16537
  ]
16791
16538
  }