Skip to content

Commit 46a03c6

Browse files
committed
Update types
1 parent 6c1fc56 commit 46a03c6

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,15 @@
4747
"type": "boolean"
4848
},
4949
"cookiePopUpBlocked": {
50-
"type": ["boolean", "null"],
51-
"description": "A cookie pop-up has been blocked for the specific domain"
50+
"description": "A cookie pop-up has been blocked for the specific domain",
51+
"oneOf": [
52+
{
53+
"type": "null"
54+
},
55+
{
56+
"type": "boolean"
57+
}
58+
]
5259
}
5360
},
5461
"required": ["etldPlusOne", "title", "url", "trackingStatus", "trackersFound", "history", "favorite", "favicon"]

special-pages/pages/new-tab/messages/types/protections-data.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,14 @@
1313
},
1414
"totalCookiePopUpsBlocked": {
1515
"description": "Total number of cookie pop-ups blocked since install",
16-
"type": "number"
16+
"oneOf": [
17+
{
18+
"type": "null"
19+
},
20+
{
21+
"type": "number"
22+
}
23+
]
1724
}
1825
}
1926
}

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,10 @@ export interface DomainActivity {
745745
trackersFound: boolean;
746746
history: HistoryEntry[];
747747
favorite: boolean;
748+
/**
749+
* A cookie pop-up has been blocked for the specific domain
750+
*/
751+
cookiePopUpBlocked?: null | boolean;
748752
}
749753
export interface TrackingStatus {
750754
trackerCompanies: {
@@ -971,7 +975,7 @@ export interface ProtectionsData {
971975
/**
972976
* Total number of cookie pop-ups blocked since install
973977
*/
974-
totalCookiePopUpsBlocked: number;
978+
totalCookiePopUpsBlocked?: null | number;
975979
}
976980
/**
977981
* Generated from @see "../messages/rmf_getData.request.json"
@@ -1234,4 +1238,4 @@ declare module "../src/index.js" {
12341238
request: import("@duckduckgo/messaging/lib/shared-types").MessagingBase<NewTabMessages>['request'],
12351239
subscribe: import("@duckduckgo/messaging/lib/shared-types").MessagingBase<NewTabMessages>['subscribe']
12361240
}
1237-
}
1241+
}

0 commit comments

Comments
 (0)