Skip to content

Commit ee15d7f

Browse files
committed
regenerate declarations
1 parent 2f66576 commit ee15d7f

File tree

45 files changed

+3370
-3233
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3370
-3233
lines changed

declarations/src/main/kotlin/alarms/alarms.kt

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,34 @@ package alarms
33
import kotlin.js.Promise
44
import webextensions.Event
55

6+
/**
7+
* @param name Name of this alarm.
8+
* @param scheduledTime Time when the alarm is scheduled to fire, in milliseconds past the epoch.
9+
* @param periodInMinutes When present, signals that the alarm triggers periodically after so many minutes.
10+
*/
611
class Alarm(
7-
/**
8-
* Name of this alarm.
9-
*/
10-
var name: String,
11-
/**
12-
* Time when the alarm is scheduled to fire, in milliseconds past the epoch.
13-
*/
14-
var scheduledTime: Int,
15-
/**
16-
* When present, signals that the alarm triggers periodically after so many minutes.
17-
*/
18-
var periodInMinutes: Int? = null
12+
var name: String,
13+
var scheduledTime: Float,
14+
var periodInMinutes: Float? = null
1915
)
2016

2117
/**
2218
* Details about the alarm. The alarm first fires either at 'when' milliseconds past the epoch (if 'when' is provided), after 'delayInMinutes' minutes from the current time (if 'delayInMinutes' is provided instead), or after 'periodInMinutes' minutes from the current time (if only 'periodInMinutes' is provided). Users should never provide both 'when' and 'delayInMinutes'. If 'periodInMinutes' is provided, then the alarm recurs repeatedly after that many minutes.
19+
* @param when Time when the alarm is scheduled to first fire, in milliseconds past the epoch.
20+
* @param delayInMinutes Number of minutes from the current time after which the alarm should first fire.
21+
* @param periodInMinutes Number of minutes after which the alarm should recur repeatedly.
2322
*/
2423
class AlarmInfo(
25-
/**
26-
* Time when the alarm is scheduled to first fire, in milliseconds past the epoch.
27-
*/
28-
var `when`: Int? = null,
29-
/**
30-
* Number of minutes from the current time after which the alarm should first fire.
31-
*/
32-
var delayInMinutes: Int? = null,
33-
/**
34-
* Number of minutes after which the alarm should recur repeatedly.
35-
*/
36-
var periodInMinutes: Int? = null
24+
var `when`: Float? = null,
25+
var delayInMinutes: Float? = null,
26+
var periodInMinutes: Float? = null
3727
)
3828

3929
external class AlarmsNamespace {
30+
/**
31+
* Fired when an alarm has expired. Useful for transient background pages.
32+
*
33+
* @param name The alarm that has expired. */
4034
val onAlarm: Event<(name: Alarm) -> Unit>
4135

4236
/**

declarations/src/main/kotlin/bookmarks/bookmarks.kt

Lines changed: 60 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -13,65 +13,41 @@ typealias BookmarkTreeNodeType = String
1313

1414
/**
1515
* A node (either a bookmark or a folder) in the bookmark tree. Child nodes are ordered within their parent folder.
16+
* @param id The unique identifier for the node. IDs are unique within the current profile, and they remain valid even after the browser is restarted.
17+
* @param parentId The <code>id</code> of the parent folder. Omitted for the root node.
18+
* @param index The 0-based position of this node within its parent folder.
19+
* @param url The URL navigated to when a user clicks the bookmark. Omitted for folders.
20+
* @param title The text displayed for the node.
21+
* @param dateAdded When this node was created, in milliseconds since the epoch (<code>new Date(dateAdded)</code>).
22+
* @param dateGroupModified When the contents of this folder last changed, in milliseconds since the epoch.
23+
* @param unmodifiable Indicates the reason why this node is unmodifiable. The <var>managed</var> value indicates that this node was configured by the system administrator or by the custodian of a supervised user. Omitted if the node can be modified by the user and the extension (default).
24+
* @param type Indicates the type of the BookmarkTreeNode, which can be one of bookmark, folder or separator.
25+
* @param children An ordered list of children of this node.
1626
*/
1727
class BookmarkTreeNode(
18-
/**
19-
* The unique identifier for the node. IDs are unique within the current profile, and they remain valid even after the browser is restarted.
20-
*/
21-
var id: String,
22-
/**
23-
* The <code>id</code> of the parent folder. Omitted for the root node.
24-
*/
25-
var parentId: String? = null,
26-
/**
27-
* The 0-based position of this node within its parent folder.
28-
*/
29-
var index: Int? = null,
30-
/**
31-
* The URL navigated to when a user clicks the bookmark. Omitted for folders.
32-
*/
33-
var url: String? = null,
34-
/**
35-
* The text displayed for the node.
36-
*/
37-
var title: String,
38-
/**
39-
* When this node was created, in milliseconds since the epoch (<code>new Date(dateAdded)</code>).
40-
*/
41-
var dateAdded: Int? = null,
42-
/**
43-
* When the contents of this folder last changed, in milliseconds since the epoch.
44-
*/
45-
var dateGroupModified: Int? = null,
46-
/**
47-
* Indicates the reason why this node is unmodifiable. The <var>managed</var> value indicates that this node was configured by the system administrator or by the custodian of a supervised user. Omitted if the node can be modified by the user and the extension (default).
48-
*/
49-
var unmodifiable: BookmarkTreeNodeUnmodifiable? = null,
50-
/**
51-
* Indicates the type of the BookmarkTreeNode, which can be one of bookmark, folder or separator.
52-
*/
53-
var type: BookmarkTreeNodeType? = null,
54-
/**
55-
* An ordered list of children of this node.
56-
*/
57-
var children: Array<BookmarkTreeNode>? = null
28+
var id: String,
29+
var parentId: String? = null,
30+
var index: Int? = null,
31+
var url: String? = null,
32+
var title: String,
33+
var dateAdded: Float? = null,
34+
var dateGroupModified: Float? = null,
35+
var unmodifiable: BookmarkTreeNodeUnmodifiable? = null,
36+
var type: BookmarkTreeNodeType? = null,
37+
var children: Array<BookmarkTreeNode>? = null
5838
)
5939

6040
/**
6141
* Object passed to the create() function.
42+
* @param parentId Defaults to the Other Bookmarks folder.
43+
* @param type Indicates the type of BookmarkTreeNode to create, which can be one of bookmark, folder or separator.
6244
*/
6345
class CreateDetails(
64-
/**
65-
* Defaults to the Other Bookmarks folder.
66-
*/
67-
var parentId: String? = null,
68-
var index: Int? = null,
69-
var title: String? = null,
70-
var url: String? = null,
71-
/**
72-
* Indicates the type of BookmarkTreeNode to create, which can be one of bookmark, folder or separator.
73-
*/
74-
var type: BookmarkTreeNodeType? = null
46+
var parentId: String? = null,
47+
var index: Int? = null,
48+
var title: String? = null,
49+
var url: String? = null,
50+
var type: BookmarkTreeNodeType? = null
7551
)
7652

7753
/**
@@ -80,20 +56,14 @@ typealias IdOrIdList = Any
8056

8157
/**
8258
* An object specifying properties and values to match when searching. Produces bookmarks matching all properties.
59+
* @param query A string of words and quoted phrases that are matched against bookmark URLs and titles.
60+
* @param url The URL of the bookmark; matches verbatim. Note that folders have no URL.
61+
* @param title The title of the bookmark; matches verbatim.
8362
*/
8463
class Query(
85-
/**
86-
* A string of words and quoted phrases that are matched against bookmark URLs and titles.
87-
*/
88-
var query: String? = null,
89-
/**
90-
* The URL of the bookmark; matches verbatim. Note that folders have no URL.
91-
*/
92-
var url: String? = null,
93-
/**
94-
* The title of the bookmark; matches verbatim.
95-
*/
96-
var title: String? = null
64+
var query: String? = null,
65+
var url: String? = null,
66+
var title: String? = null
9767
)
9868

9969
/**
@@ -105,29 +75,49 @@ class Destination(var parentId: String? = null, var index: Int? = null)
10575
class Changes(var title: String? = null, var url: String? = null)
10676

10777
class RemoveInfo(
108-
var parentId: String,
109-
var index: Int,
110-
var node: BookmarkTreeNode
78+
var parentId: String,
79+
var index: Int,
80+
var node: BookmarkTreeNode
11181
)
11282

11383
class ChangeInfo(var title: String, var url: String? = null)
11484

11585
class MoveInfo(
116-
var parentId: String,
117-
var index: Int,
118-
var oldParentId: String,
119-
var oldIndex: Int
86+
var parentId: String,
87+
var index: Int,
88+
var oldParentId: String,
89+
var oldIndex: Int
12090
)
12191

12292
class ReorderInfo(var childIds: Array<String>)
12393

12494
external class BookmarksNamespace {
95+
/**
96+
* Fired when a bookmark or folder is created.
97+
*
98+
* @param id null
99+
* @param bookmark null */
125100
val onCreated: Event<(id: String, bookmark: BookmarkTreeNode) -> Unit>
126101

102+
/**
103+
* Fired when a bookmark or folder is removed. When a folder is removed recursively, a single notification is fired for the folder, and none for its contents.
104+
*
105+
* @param id null
106+
* @param removeInfo null */
127107
val onRemoved: Event<(id: String, removeInfo: RemoveInfo) -> Unit>
128108

109+
/**
110+
* Fired when a bookmark or folder changes. <b>Note:</b> Currently, only title and url changes trigger this.
111+
*
112+
* @param id null
113+
* @param changeInfo null */
129114
val onChanged: Event<(id: String, changeInfo: ChangeInfo) -> Unit>
130115

116+
/**
117+
* Fired when a bookmark or folder is moved to a different parent folder.
118+
*
119+
* @param id null
120+
* @param moveInfo null */
131121
val onMoved: Event<(id: String, moveInfo: MoveInfo) -> Unit>
132122

133123
/**

0 commit comments

Comments
 (0)