Skip to content

Commit 6ee5f05

Browse files
fix: re-generate types based on specifciation updates (GoogleChromeLabs#178)
1 parent 28644be commit 6ee5f05

File tree

2 files changed

+258
-4
lines changed

2 files changed

+258
-4
lines changed

out/gen/main.d.ts

Lines changed: 129 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,13 @@ export declare const enum ErrorCode {
6363
InvalidWebExtension = 'invalid web extension',
6464
MoveTargetOutOfBounds = 'move target out of bounds',
6565
NoSuchAlert = 'no such alert',
66+
NoSuchNetworkCollector = 'no such network collector',
6667
NoSuchElement = 'no such element',
6768
NoSuchFrame = 'no such frame',
6869
NoSuchHandle = 'no such handle',
6970
NoSuchHistoryEntry = 'no such history entry',
7071
NoSuchIntercept = 'no such intercept',
72+
NoSuchNetworkData = 'no such network data',
7173
NoSuchNode = 'no such node',
7274
NoSuchRequest = 'no such request',
7375
NoSuchScript = 'no such script',
@@ -79,6 +81,7 @@ export declare const enum ErrorCode {
7981
UnableToCloseBrowser = 'unable to close browser',
8082
UnableToSetCookie = 'unable to set cookie',
8183
UnableToSetFileInput = 'unable to set file input',
84+
UnavailableNetworkData = 'unavailable network data',
8285
UnderspecifiedStoragePartition = 'underspecified storage partition',
8386
UnknownCommand = 'unknown command',
8487
UnknownError = 'unknown error',
@@ -131,7 +134,6 @@ export declare namespace Session {
131134
export declare namespace Session {
132135
type ManualProxyConfiguration = {
133136
proxyType: 'manual';
134-
ftpProxy?: string;
135137
httpProxy?: string;
136138
sslProxy?: string;
137139
} & ({} | Session.SocksProxyConfiguration) & {
@@ -946,7 +948,9 @@ export declare namespace BrowsingContext {
946948
defaultValue?: string;
947949
};
948950
}
949-
export type EmulationCommand = Emulation.SetGeolocationOverride;
951+
export type EmulationCommand =
952+
| Emulation.SetGeolocationOverride
953+
| Emulation.SetScreenOrientationOverride;
950954
export declare namespace Emulation {
951955
type SetGeolocationOverride = {
952956
method: 'emulation.setGeolocationOverride';
@@ -1014,13 +1018,51 @@ export declare namespace Emulation {
10141018
type: 'positionUnavailable';
10151019
};
10161020
}
1021+
export declare namespace Emulation {
1022+
type SetScreenOrientationOverride = {
1023+
method: 'emulation.setScreenOrientationOverride';
1024+
params: Emulation.SetScreenOrientationOverrideParameters;
1025+
};
1026+
}
1027+
export declare namespace Emulation {
1028+
const enum ScreenOrientationNatural {
1029+
Portrait = 'portrait',
1030+
Landscape = 'landscape',
1031+
}
1032+
}
1033+
export declare namespace Emulation {
1034+
type ScreenOrientationType =
1035+
| 'portrait-primary'
1036+
| 'portrait-secondary'
1037+
| 'landscape-primary'
1038+
| 'landscape-secondary';
1039+
}
1040+
export declare namespace Emulation {
1041+
type ScreenOrientation = {
1042+
natural: Emulation.ScreenOrientationNatural;
1043+
type: Emulation.ScreenOrientationType;
1044+
};
1045+
}
1046+
export declare namespace Emulation {
1047+
type SetScreenOrientationOverrideParameters = {
1048+
screenOrientation: Emulation.ScreenOrientation | null;
1049+
contexts?: [
1050+
BrowsingContext.BrowsingContext,
1051+
...BrowsingContext.BrowsingContext[],
1052+
];
1053+
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
1054+
};
1055+
}
10171056
export type NetworkCommand =
1057+
| Network.AddDataCollector
10181058
| Network.AddIntercept
10191059
| Network.ContinueRequest
10201060
| Network.ContinueResponse
10211061
| Network.ContinueWithAuth
10221062
| Network.FailRequest
1063+
| Network.GetData
10231064
| Network.ProvideResponse
1065+
| Network.RemoveDataCollector
10241066
| Network.RemoveIntercept
10251067
| Network.SetCacheBehavior;
10261068
export type NetworkEvent =
@@ -1054,6 +1096,11 @@ export declare namespace Network {
10541096
intercepts?: [Network.Intercept, ...Network.Intercept[]];
10551097
};
10561098
}
1099+
export declare namespace Network {
1100+
const enum DataType {
1101+
Response = 'response',
1102+
}
1103+
}
10571104
export declare namespace Network {
10581105
type BytesValue = Network.StringValue | Network.Base64Value;
10591106
}
@@ -1069,6 +1116,14 @@ export declare namespace Network {
10691116
value: string;
10701117
};
10711118
}
1119+
export declare namespace Network {
1120+
type Collector = string;
1121+
}
1122+
export declare namespace Network {
1123+
const enum CollectorType {
1124+
Blob = 'blob',
1125+
}
1126+
}
10721127
export declare namespace Network {
10731128
const enum SameSite {
10741129
Strict = 'strict',
@@ -1200,6 +1255,32 @@ export declare namespace Network {
12001255
pattern: string;
12011256
};
12021257
}
1258+
export declare namespace Network {
1259+
type AddDataCollector = {
1260+
method: 'network.addDataCollector';
1261+
params: Network.AddDataCollectorParameters;
1262+
};
1263+
}
1264+
export declare namespace Network {
1265+
type AddDataCollectorParameters = {
1266+
dataTypes: [Network.DataType, ...Network.DataType[]];
1267+
maxEncodedDataSize: JsUint;
1268+
/**
1269+
* @defaultValue `"blob"`
1270+
*/
1271+
collectorType?: Network.CollectorType;
1272+
contexts?: [
1273+
BrowsingContext.BrowsingContext,
1274+
...BrowsingContext.BrowsingContext[],
1275+
];
1276+
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
1277+
};
1278+
}
1279+
export declare namespace Network {
1280+
type AddDataCollectorResult = {
1281+
collector: Network.Collector;
1282+
};
1283+
}
12031284
export declare namespace Network {
12041285
type AddInterceptParameters = {
12051286
phases: [Network.InterceptPhase, ...Network.InterceptPhase[]];
@@ -1285,6 +1366,19 @@ export declare namespace Network {
12851366
action: 'default' | 'cancel';
12861367
};
12871368
}
1369+
export declare namespace Network {
1370+
type DisownData = {
1371+
method: 'network.disownData';
1372+
params: Network.DisownDataParameters;
1373+
};
1374+
}
1375+
export declare namespace Network {
1376+
type DisownDataParameters = {
1377+
dataType: Network.DataType;
1378+
collector: Network.Collector;
1379+
request: Network.Request;
1380+
};
1381+
}
12881382
export declare namespace Network {
12891383
type FailRequest = {
12901384
method: 'network.failRequest';
@@ -1296,6 +1390,28 @@ export declare namespace Network {
12961390
request: Network.Request;
12971391
};
12981392
}
1393+
export declare namespace Network {
1394+
type GetData = {
1395+
method: 'network.getData';
1396+
params: Network.GetDataParameters;
1397+
};
1398+
}
1399+
export declare namespace Network {
1400+
type GetDataParameters = {
1401+
dataType: Network.DataType;
1402+
collector?: Network.Collector;
1403+
/**
1404+
* @defaultValue `false`
1405+
*/
1406+
disown?: boolean;
1407+
request: Network.Request;
1408+
};
1409+
}
1410+
export declare namespace Script {
1411+
type GetDataResult = {
1412+
bytes: Network.BytesValue;
1413+
};
1414+
}
12991415
export declare namespace Network {
13001416
type ProvideResponse = {
13011417
method: 'network.provideResponse';
@@ -1312,6 +1428,17 @@ export declare namespace Network {
13121428
statusCode?: JsUint;
13131429
};
13141430
}
1431+
export declare namespace Network {
1432+
type RemoveDataCollector = {
1433+
method: 'network.removeDataCollector';
1434+
params: Network.RemoveDataCollectorParameters;
1435+
};
1436+
}
1437+
export declare namespace Network {
1438+
type RemoveDataCollectorParameters = {
1439+
collector: Network.Collector;
1440+
};
1441+
}
13151442
export declare namespace Network {
13161443
type RemoveIntercept = {
13171444
method: 'network.removeIntercept';

0 commit comments

Comments
 (0)