@maxim_mazurok/gapi.client.adexperiencereport-v1 0.0.20231106 → 0.0.20240205
Sign up to get free protection for your applications and to get access to all the features.
- package/index.d.ts +101 -132
- package/package.json +6 -6
- package/readme.md +9 -9
- package/tests.ts +0 -25
- package/tsconfig.json +0 -18
- package/tslint.json +0 -6
package/index.d.ts
CHANGED
@@ -9,143 +9,112 @@
|
|
9
9
|
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
10
10
|
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
11
11
|
// Generated from: https://adexperiencereport.googleapis.com/$discovery/rest?version=v1
|
12
|
-
// Revision:
|
12
|
+
// Revision: 20240205
|
13
13
|
|
14
14
|
/// <reference types="gapi.client" />
|
15
15
|
|
16
16
|
declare namespace gapi.client {
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
17
|
+
/** Load Ad Experience Report API v1 */
|
18
|
+
function load(
|
19
|
+
urlOrObject: 'https://adexperiencereport.googleapis.com/$discovery/rest?version=v1'
|
20
|
+
): Promise<void>;
|
21
|
+
/** @deprecated Please load APIs with discovery documents. */
|
22
|
+
function load(name: 'adexperiencereport', version: 'v1'): Promise<void>;
|
23
|
+
/** @deprecated Please load APIs with discovery documents. */
|
24
|
+
function load(
|
25
|
+
name: 'adexperiencereport',
|
26
|
+
version: 'v1',
|
27
|
+
callback: () => any
|
28
|
+
): void;
|
23
29
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
/** Lists sites that are failing in the Ad Experience Report on at least one platform. */
|
110
|
-
list(request?: {
|
111
|
-
/** V1 error format. */
|
112
|
-
"$.xgafv"?:
|
113
|
-
string;
|
114
|
-
/** OAuth access token. */
|
115
|
-
access_token?:
|
116
|
-
string;
|
117
|
-
/** Data format for response. */
|
118
|
-
alt?:
|
119
|
-
string;
|
120
|
-
/** JSONP */
|
121
|
-
callback?:
|
122
|
-
string;
|
123
|
-
/** Selector specifying which fields to include in a partial response. */
|
124
|
-
fields?:
|
125
|
-
string;
|
126
|
-
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
127
|
-
key?:
|
128
|
-
string;
|
129
|
-
/** OAuth 2.0 token for the current user. */
|
130
|
-
oauth_token?:
|
131
|
-
string;
|
132
|
-
/** Returns response with indentations and line breaks. */
|
133
|
-
prettyPrint?:
|
134
|
-
boolean;
|
135
|
-
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
136
|
-
quotaUser?:
|
137
|
-
string;
|
138
|
-
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
139
|
-
upload_protocol?:
|
140
|
-
string;
|
141
|
-
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
142
|
-
uploadType?:
|
143
|
-
string;
|
144
|
-
}): Request<ViolatingSitesResponse>;
|
145
|
-
}
|
30
|
+
namespace adexperiencereport {
|
31
|
+
interface PlatformSummary {
|
32
|
+
/** The site's Ad Experience Report status on this platform. */
|
33
|
+
betterAdsStatus?: string;
|
34
|
+
/** The time at which [enforcement](https://support.google.com/webtools/answer/7308033) against the site began or will begin on this platform. Not set when the filter_status is OFF. */
|
35
|
+
enforcementTime?: string;
|
36
|
+
/** The site's [enforcement status](https://support.google.com/webtools/answer/7308033) on this platform. */
|
37
|
+
filterStatus?: string;
|
38
|
+
/** The time at which the site's status last changed on this platform. */
|
39
|
+
lastChangeTime?: string;
|
40
|
+
/** The site's regions on this platform. No longer populated, because there is no longer any semantic difference between sites in different regions. */
|
41
|
+
region?: string[];
|
42
|
+
/** A link to the full Ad Experience Report for the site on this platform.. Not set in ViolatingSitesResponse. Note that you must complete the [Search Console verification process](https://support.google.com/webmasters/answer/9008080) for the site before you can access the full report. */
|
43
|
+
reportUrl?: string;
|
44
|
+
/** Whether the site is currently under review on this platform. */
|
45
|
+
underReview?: boolean;
|
46
|
+
}
|
47
|
+
interface SiteSummaryResponse {
|
48
|
+
/** The site's Ad Experience Report summary on desktop. */
|
49
|
+
desktopSummary?: PlatformSummary;
|
50
|
+
/** The site's Ad Experience Report summary on mobile. */
|
51
|
+
mobileSummary?: PlatformSummary;
|
52
|
+
/** The name of the reviewed site, e.g. `google.com`. */
|
53
|
+
reviewedSite?: string;
|
54
|
+
}
|
55
|
+
interface ViolatingSitesResponse {
|
56
|
+
/** The list of violating sites. */
|
57
|
+
violatingSites?: SiteSummaryResponse[];
|
58
|
+
}
|
59
|
+
interface SitesResource {
|
60
|
+
/** Gets a site's Ad Experience Report summary. */
|
61
|
+
get(request?: {
|
62
|
+
/** V1 error format. */
|
63
|
+
'$.xgafv'?: string;
|
64
|
+
/** OAuth access token. */
|
65
|
+
access_token?: string;
|
66
|
+
/** Data format for response. */
|
67
|
+
alt?: string;
|
68
|
+
/** JSONP */
|
69
|
+
callback?: string;
|
70
|
+
/** Selector specifying which fields to include in a partial response. */
|
71
|
+
fields?: string;
|
72
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
73
|
+
key?: string;
|
74
|
+
/** Required. The name of the site whose summary to get, e.g. `sites/http%3A%2F%2Fwww.google.com%2F`. Format: `sites/{site}` */
|
75
|
+
name: string;
|
76
|
+
/** OAuth 2.0 token for the current user. */
|
77
|
+
oauth_token?: string;
|
78
|
+
/** Returns response with indentations and line breaks. */
|
79
|
+
prettyPrint?: boolean;
|
80
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
81
|
+
quotaUser?: string;
|
82
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
83
|
+
upload_protocol?: string;
|
84
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
85
|
+
uploadType?: string;
|
86
|
+
}): Request<SiteSummaryResponse>;
|
87
|
+
}
|
88
|
+
interface ViolatingSitesResource {
|
89
|
+
/** Lists sites that are failing in the Ad Experience Report on at least one platform. */
|
90
|
+
list(request?: {
|
91
|
+
/** V1 error format. */
|
92
|
+
'$.xgafv'?: string;
|
93
|
+
/** OAuth access token. */
|
94
|
+
access_token?: string;
|
95
|
+
/** Data format for response. */
|
96
|
+
alt?: string;
|
97
|
+
/** JSONP */
|
98
|
+
callback?: string;
|
99
|
+
/** Selector specifying which fields to include in a partial response. */
|
100
|
+
fields?: string;
|
101
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
102
|
+
key?: string;
|
103
|
+
/** OAuth 2.0 token for the current user. */
|
104
|
+
oauth_token?: string;
|
105
|
+
/** Returns response with indentations and line breaks. */
|
106
|
+
prettyPrint?: boolean;
|
107
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
108
|
+
quotaUser?: string;
|
109
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
110
|
+
upload_protocol?: string;
|
111
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
112
|
+
uploadType?: string;
|
113
|
+
}): Request<ViolatingSitesResponse>;
|
114
|
+
}
|
146
115
|
|
147
|
-
|
116
|
+
const sites: SitesResource;
|
148
117
|
|
149
|
-
|
150
|
-
|
118
|
+
const violatingSites: ViolatingSitesResource;
|
119
|
+
}
|
151
120
|
}
|
package/package.json
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
{
|
2
2
|
"name": "@maxim_mazurok/gapi.client.adexperiencereport-v1",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.20240205",
|
4
4
|
"description": "TypeScript typings for Ad Experience Report API v1",
|
5
|
+
"repository": {
|
6
|
+
"type": "git",
|
7
|
+
"url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
|
8
|
+
},
|
5
9
|
"license": "MIT",
|
6
10
|
"author": {
|
7
|
-
"email": "maxim@mazurok.com",
|
8
11
|
"name": "Maxim Mazurok",
|
12
|
+
"email": "maxim@mazurok.com",
|
9
13
|
"url": "https://maxim.mazurok.com"
|
10
14
|
},
|
11
|
-
"repository": {
|
12
|
-
"type": "git",
|
13
|
-
"url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
|
14
|
-
},
|
15
15
|
"types": "index.d.ts",
|
16
16
|
"dependencies": {
|
17
17
|
"@types/gapi.client": "*",
|
package/readme.md
CHANGED
@@ -25,10 +25,13 @@ gapi.load('client', () => {
|
|
25
25
|
Then load api client wrapper:
|
26
26
|
|
27
27
|
```typescript
|
28
|
-
gapi.client.load(
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
gapi.client.load(
|
29
|
+
'https://adexperiencereport.googleapis.com/$discovery/rest?version=v1',
|
30
|
+
() => {
|
31
|
+
// now we can use:
|
32
|
+
// gapi.client.adexperiencereport
|
33
|
+
}
|
34
|
+
);
|
32
35
|
```
|
33
36
|
|
34
37
|
```typescript
|
@@ -39,19 +42,16 @@ gapi.client.load('adexperiencereport', 'v1', () => {
|
|
39
42
|
});
|
40
43
|
```
|
41
44
|
|
42
|
-
|
43
|
-
|
44
45
|
After that you can use Ad Experience Report API resources: <!-- TODO: make this work for multiple namespaces -->
|
45
46
|
|
46
47
|
```typescript
|
47
|
-
|
48
48
|
/*
|
49
49
|
Gets a site's Ad Experience Report summary.
|
50
50
|
*/
|
51
|
-
await gapi.client.adexperiencereport.sites.get({
|
51
|
+
await gapi.client.adexperiencereport.sites.get({name: 'name'});
|
52
52
|
|
53
53
|
/*
|
54
54
|
Lists sites that are failing in the Ad Experience Report on at least one platform.
|
55
55
|
*/
|
56
|
-
await gapi.client.adexperiencereport.violatingSites.list({
|
56
|
+
await gapi.client.adexperiencereport.violatingSites.list({});
|
57
57
|
```
|
package/tests.ts
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
/* This is stub file for gapi.client.adexperiencereport-v1 definition tests */
|
2
|
-
// IMPORTANT
|
3
|
-
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
4
|
-
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
5
|
-
|
6
|
-
// Revision: 20231106
|
7
|
-
|
8
|
-
gapi.load('client', async () => {
|
9
|
-
/** now we can use gapi.client */
|
10
|
-
|
11
|
-
await gapi.client.load('https://adexperiencereport.googleapis.com/$discovery/rest?version=v1');
|
12
|
-
/** now we can use gapi.client.adexperiencereport */
|
13
|
-
|
14
|
-
run();
|
15
|
-
|
16
|
-
async function run() {
|
17
|
-
/** Gets a site's Ad Experience Report summary. */
|
18
|
-
await gapi.client.adexperiencereport.sites.get({
|
19
|
-
name: "Test string",
|
20
|
-
});
|
21
|
-
/** Lists sites that are failing in the Ad Experience Report on at least one platform. */
|
22
|
-
await gapi.client.adexperiencereport.violatingSites.list({
|
23
|
-
});
|
24
|
-
}
|
25
|
-
});
|
package/tsconfig.json
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"compilerOptions": {
|
3
|
-
"module": "commonjs",
|
4
|
-
"lib": ["es6", "dom"],
|
5
|
-
"noImplicitAny": true,
|
6
|
-
"noImplicitThis": true,
|
7
|
-
"strictNullChecks": true,
|
8
|
-
"baseUrl": "../",
|
9
|
-
"typeRoots": [
|
10
|
-
"../"
|
11
|
-
],
|
12
|
-
"types": [],
|
13
|
-
"noEmit": true,
|
14
|
-
"forceConsistentCasingInFileNames": true,
|
15
|
-
"strictFunctionTypes": true
|
16
|
-
},
|
17
|
-
"files": ["index.d.ts", "tests.ts"]
|
18
|
-
}
|