Skip to content

Commit fabca51

Browse files
committed
docs for confirm burn
1 parent 1d80f8b commit fabca51

File tree

5 files changed

+70
-1
lines changed

5 files changed

+70
-1
lines changed

special-pages/pages/new-tab/app/activity/activity.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ title: Activity
3737
"title": "youtube.com",
3838
"etldPlusOne": "youtube.com",
3939
"favorite": true,
40+
"fireproof": true,
41+
"trackersFound": true,
4042
"trackingStatus": {
4143
"trackerCompanies": [{ "displayName": "Adobe Analytics" }],
4244
"totalCount": 0
@@ -61,6 +63,27 @@ Notes:
6163
- {@link "NewTab Messages".ActivityGetConfigRequest}
6264
- Used to fetch the initial config data (eg: expanded vs collapsed)
6365
- returns {@link "NewTab Messages".ActivityConfig}
66+
-
67+
### `activity_confirmBurn`
68+
- {@link "NewTab Messages".ActivityConfirmBurnRequest}
69+
- Used when an item is fireproof to confirm the action is desired
70+
- sends {@link "NewTab Messages".ConfirmBurnParams}
71+
- returns {@link "NewTab Messages".ConfirmBurnResponse}
72+
73+
Sends
74+
```json
75+
{ "url": "..." }
76+
```
77+
78+
Response:
79+
```json
80+
{ "action": "burn" }
81+
```
82+
83+
Response (do nothing)
84+
```json
85+
{ "action": "none" }
86+
```
6487

6588
## Subscriptions:
6689
### `activity_onDataUpdate`
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"type": "object",
4+
"required": ["url"],
5+
"title": "Confirm Burn Params",
6+
"properties": {
7+
"url": {
8+
"description": "The History Entry url that will be burned",
9+
"type": "string"
10+
}
11+
}
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"type": "object",
4+
"required": ["action"],
5+
"title": "Confirm Burn Response",
6+
"properties": {
7+
"action": {
8+
"type": "string",
9+
"enum": ["burn", "none"]
10+
}
11+
}
12+
}

special-pages/pages/new-tab/messages/types/activity.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,12 @@
4545
},
4646
"favorite": {
4747
"type": "boolean"
48+
},
49+
"fireproof": {
50+
"type": "boolean"
4851
}
4952
},
50-
"required": ["etldPlusOne", "title", "url", "trackingStatus", "trackersFound", "history", "favorite", "favicon"]
53+
"required": ["etldPlusOne", "title", "url", "trackingStatus", "trackersFound", "history", "favorite", "fireproof", "favicon"]
5154
},
5255
"TrackingStatus": {
5356
"type": "object",

special-pages/pages/new-tab/types/new-tab.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ export interface NewTabMessages {
125125
| UpdateNotificationDismissNotification
126126
| WidgetsSetConfigNotification;
127127
requests:
128+
| ActivityConfirmBurnRequest
128129
| ActivityGetConfigRequest
129130
| ActivityGetDataRequest
130131
| FavoritesGetConfigRequest
@@ -576,6 +577,23 @@ export interface WidgetConfigItem {
576577
id: string;
577578
visibility: WidgetVisibility;
578579
}
580+
/**
581+
* Generated from @see "../messages/activity_confirmBurn.request.json"
582+
*/
583+
export interface ActivityConfirmBurnRequest {
584+
method: "activity_confirmBurn";
585+
params: ConfirmBurnParams;
586+
result: ConfirmBurnResponse;
587+
}
588+
export interface ConfirmBurnParams {
589+
/**
590+
* The History Entry url that will be burned
591+
*/
592+
url: string;
593+
}
594+
export interface ConfirmBurnResponse {
595+
action: "burn" | "none";
596+
}
579597
/**
580598
* Generated from @see "../messages/activity_getConfig.request.json"
581599
*/
@@ -614,6 +632,7 @@ export interface DomainActivity {
614632
trackersFound: boolean;
615633
history: HistoryEntry[];
616634
favorite: boolean;
635+
fireproof: boolean;
617636
}
618637
export interface TrackingStatus {
619638
trackerCompanies: {

0 commit comments

Comments
 (0)