@maxim_mazurok/gapi.client.gmailpostmastertools-v2 0.1.20260621 → 0.2.20260623
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +444 -8
- package/package.json +1 -1
- package/readme.md +25 -0
package/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
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://gmailpostmastertools.googleapis.com/$discovery/rest?version=v2
|
|
12
|
-
// Revision:
|
|
12
|
+
// Revision: 20260623
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
@@ -77,6 +77,17 @@ declare namespace gapi.client {
|
|
|
77
77
|
/** Output only. The compliance status. */
|
|
78
78
|
status?: 'STATE_UNSPECIFIED' | 'COMPLIANT' | 'NEEDS_WORK';
|
|
79
79
|
}
|
|
80
|
+
interface CreateDomainRequest {
|
|
81
|
+
/** Required. The domain to add. e.g., "example.com" */
|
|
82
|
+
domainId?: string;
|
|
83
|
+
}
|
|
84
|
+
interface CreateUserRequest {
|
|
85
|
+
/** Optional. Specifies the permission level to give the user for the specified domain. If not specified, the default value for this field is READER. */
|
|
86
|
+
permission?:
|
|
87
|
+
'PERMISSION_UNSPECIFIED' | 'READER' | 'ADMIN' | 'OWNER' | 'NONE';
|
|
88
|
+
/** Required. The user to create. */
|
|
89
|
+
userId?: string;
|
|
90
|
+
}
|
|
80
91
|
interface Date {
|
|
81
92
|
/** Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. */
|
|
82
93
|
day?: number;
|
|
@@ -99,6 +110,20 @@ declare namespace gapi.client {
|
|
|
99
110
|
/** Required. The list of date ranges for which to retrieve data. */
|
|
100
111
|
dateRanges?: DateRange[];
|
|
101
112
|
}
|
|
113
|
+
interface DeliverabilityStatusVerdict {
|
|
114
|
+
/** Output only. The specific reason for the compliance verdict. */
|
|
115
|
+
reason?:
|
|
116
|
+
| 'REASON_UNSPECIFIED'
|
|
117
|
+
| 'MESSAGE_VOLUME_LOW'
|
|
118
|
+
| 'SMTP_ERRORS_HIGH'
|
|
119
|
+
| 'SENDER_NOT_COMPLIANT'
|
|
120
|
+
| 'SPAM_RATE_HIGH'
|
|
121
|
+
| 'USER_FEEDBACK_NEGATIVE'
|
|
122
|
+
| 'USER_FEEDBACK_LOW'
|
|
123
|
+
| 'USER_FEEDBACK_POSITIVE';
|
|
124
|
+
/** Output only. The compliance state. */
|
|
125
|
+
state?: ComplianceStatus;
|
|
126
|
+
}
|
|
102
127
|
interface Domain {
|
|
103
128
|
/** Output only. Immutable. The timestamp at which the domain was added to the user's account. */
|
|
104
129
|
createTime?: string;
|
|
@@ -107,14 +132,15 @@ declare namespace gapi.client {
|
|
|
107
132
|
/** Identifier. The resource name of the domain. Format: `domains/{domain_name}`, where domain_name is the fully qualified domain name (i.e., mymail.mydomain.com). */
|
|
108
133
|
name?: string;
|
|
109
134
|
/** Output only. User's permission of this domain. */
|
|
110
|
-
permission?:
|
|
135
|
+
permission?:
|
|
136
|
+
'PERMISSION_UNSPECIFIED' | 'READER' | 'ADMIN' | 'OWNER' | 'NONE';
|
|
111
137
|
/** Output only. Information about a user's verification history and properties for the domain. */
|
|
112
138
|
verificationState?:
|
|
113
|
-
| '
|
|
114
|
-
| 'UNVERIFIED'
|
|
115
|
-
| 'VERIFIED';
|
|
139
|
+
'VERIFICATION_STATE_UNSPECIFIED' | 'UNVERIFIED' | 'VERIFIED';
|
|
116
140
|
}
|
|
117
141
|
interface DomainComplianceData {
|
|
142
|
+
/** Output only. Deliverability status verdict. */
|
|
143
|
+
deliverabilityStatusVerdict?: DeliverabilityStatusVerdict;
|
|
118
144
|
/** Domain that this data is for. */
|
|
119
145
|
domainId?: string;
|
|
120
146
|
/** Unsubscribe honoring compliance verdict. */
|
|
@@ -142,6 +168,16 @@ declare namespace gapi.client {
|
|
|
142
168
|
/** The value of the corresponding metric. */
|
|
143
169
|
value?: StatisticValue;
|
|
144
170
|
}
|
|
171
|
+
interface DomainVerificationToken {
|
|
172
|
+
/** Identifier. The resource name of the domain verification token. Format: domains/{domain}/verificationToken */
|
|
173
|
+
name?: string;
|
|
174
|
+
/** The verification token. */
|
|
175
|
+
token?: string;
|
|
176
|
+
/** The verification method used. */
|
|
177
|
+
verificationMethod?:
|
|
178
|
+
'DOMAIN_VERIFICATION_METHOD_UNSPECIFIED' | 'TXT' | 'CNAME';
|
|
179
|
+
}
|
|
180
|
+
interface Empty {}
|
|
145
181
|
interface HonorUnsubscribeVerdict {
|
|
146
182
|
/** The specific reason for the compliance verdict. Must be empty if the status is compliant. */
|
|
147
183
|
reason?:
|
|
@@ -158,6 +194,12 @@ declare namespace gapi.client {
|
|
|
158
194
|
/** Token to retrieve the next page of results, or empty if there are no more results in the list. */
|
|
159
195
|
nextPageToken?: string;
|
|
160
196
|
}
|
|
197
|
+
interface ListUsersResponse {
|
|
198
|
+
/** Token to retrieve the next page of results, or empty if there are no more results in the list. */
|
|
199
|
+
nextPageToken?: string;
|
|
200
|
+
/** The users that have access to the domain. */
|
|
201
|
+
users?: User[];
|
|
202
|
+
}
|
|
161
203
|
interface MetricDefinition {
|
|
162
204
|
/** Required. The underlying metric to query. */
|
|
163
205
|
baseMetric?: BaseMetric;
|
|
@@ -179,9 +221,7 @@ declare namespace gapi.client {
|
|
|
179
221
|
interface QueryDomainStatsRequest {
|
|
180
222
|
/** Optional. The granularity at which to aggregate the statistics. If unspecified, defaults to DAILY. */
|
|
181
223
|
aggregationGranularity?:
|
|
182
|
-
| '
|
|
183
|
-
| 'DAILY'
|
|
184
|
-
| 'OVERALL';
|
|
224
|
+
'AGGREGATION_GRANULARITY_UNSPECIFIED' | 'DAILY' | 'OVERALL';
|
|
185
225
|
/** Required. The specific metrics to query. You can define a custom name for each metric, which will be used in the response. */
|
|
186
226
|
metricDefinitions?: MetricDefinition[];
|
|
187
227
|
/** Optional. The maximum number of DomainStats resources to return in the response. The server may return fewer than this value. If unspecified, a default value of 10 will be used. The maximum value is 200. */
|
|
@@ -229,6 +269,25 @@ declare namespace gapi.client {
|
|
|
229
269
|
/** A list of date ranges. */
|
|
230
270
|
dateRanges?: DateRanges;
|
|
231
271
|
}
|
|
272
|
+
interface User {
|
|
273
|
+
/** Output only. The user that added the current user. */
|
|
274
|
+
accessGranter?: string;
|
|
275
|
+
/** Output only. The time the user was granted access. */
|
|
276
|
+
createTime?: string;
|
|
277
|
+
/** Identifier. The resource name of the user. Format: users/{user} Note: {user} is the user's email address. */
|
|
278
|
+
name?: string;
|
|
279
|
+
/** The permission level that the user has for the specified domain. */
|
|
280
|
+
permission?:
|
|
281
|
+
'PERMISSION_UNSPECIFIED' | 'READER' | 'ADMIN' | 'OWNER' | 'NONE';
|
|
282
|
+
/** The user's email address. */
|
|
283
|
+
user?: string;
|
|
284
|
+
}
|
|
285
|
+
interface VerifyDomainRequest {
|
|
286
|
+
/** Required. The verification method used. Must be specified, i.e. TXT or CNAME. */
|
|
287
|
+
verificationMethod?:
|
|
288
|
+
'DOMAIN_VERIFICATION_METHOD_UNSPECIFIED' | 'TXT' | 'CNAME';
|
|
289
|
+
}
|
|
290
|
+
interface VerifyDomainResponse {}
|
|
232
291
|
interface DomainStatsResource {
|
|
233
292
|
/** Retrieves a list of domain statistics for a given domain and time period. Returns statistics only for dates where data is available. Returns PERMISSION_DENIED if you don't have permission to access DomainStats for the domain. */
|
|
234
293
|
query(request: {
|
|
@@ -289,7 +348,295 @@ declare namespace gapi.client {
|
|
|
289
348
|
body: QueryDomainStatsRequest,
|
|
290
349
|
): Request<QueryDomainStatsResponse>;
|
|
291
350
|
}
|
|
351
|
+
interface UsersResource {
|
|
352
|
+
/** [Developer Preview](https://developers.google.com/workspace/preview): Creates a user, who has access to a domain. Returns INVALID_ARGUMENT if a user is not provided. */
|
|
353
|
+
create(request: {
|
|
354
|
+
/** V1 error format. */
|
|
355
|
+
'$.xgafv'?: '1' | '2';
|
|
356
|
+
/** OAuth access token. */
|
|
357
|
+
access_token?: string;
|
|
358
|
+
/** Data format for response. */
|
|
359
|
+
alt?: 'json' | 'media' | 'proto';
|
|
360
|
+
/** JSONP */
|
|
361
|
+
callback?: string;
|
|
362
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
363
|
+
fields?: string;
|
|
364
|
+
/** 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. */
|
|
365
|
+
key?: string;
|
|
366
|
+
/** OAuth 2.0 token for the current user. */
|
|
367
|
+
oauth_token?: string;
|
|
368
|
+
/** Required. The parent resource where this user will be created. Format: domains/{domain} */
|
|
369
|
+
parent: string;
|
|
370
|
+
/** Returns response with indentations and line breaks. */
|
|
371
|
+
prettyPrint?: boolean;
|
|
372
|
+
/** 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. */
|
|
373
|
+
quotaUser?: string;
|
|
374
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
375
|
+
upload_protocol?: string;
|
|
376
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
377
|
+
uploadType?: string;
|
|
378
|
+
/** Request body */
|
|
379
|
+
resource: CreateUserRequest;
|
|
380
|
+
}): Request<User>;
|
|
381
|
+
create(
|
|
382
|
+
request: {
|
|
383
|
+
/** V1 error format. */
|
|
384
|
+
'$.xgafv'?: '1' | '2';
|
|
385
|
+
/** OAuth access token. */
|
|
386
|
+
access_token?: string;
|
|
387
|
+
/** Data format for response. */
|
|
388
|
+
alt?: 'json' | 'media' | 'proto';
|
|
389
|
+
/** JSONP */
|
|
390
|
+
callback?: string;
|
|
391
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
392
|
+
fields?: string;
|
|
393
|
+
/** 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. */
|
|
394
|
+
key?: string;
|
|
395
|
+
/** OAuth 2.0 token for the current user. */
|
|
396
|
+
oauth_token?: string;
|
|
397
|
+
/** Required. The parent resource where this user will be created. Format: domains/{domain} */
|
|
398
|
+
parent: string;
|
|
399
|
+
/** Returns response with indentations and line breaks. */
|
|
400
|
+
prettyPrint?: boolean;
|
|
401
|
+
/** 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. */
|
|
402
|
+
quotaUser?: string;
|
|
403
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
404
|
+
upload_protocol?: string;
|
|
405
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
406
|
+
uploadType?: string;
|
|
407
|
+
},
|
|
408
|
+
body: CreateUserRequest,
|
|
409
|
+
): Request<User>;
|
|
410
|
+
/** [Developer Preview](https://developers.google.com/workspace/preview): Deletes a user from a domain. Returns NOT_FOUND if the user does not exist. */
|
|
411
|
+
delete(request?: {
|
|
412
|
+
/** V1 error format. */
|
|
413
|
+
'$.xgafv'?: '1' | '2';
|
|
414
|
+
/** OAuth access token. */
|
|
415
|
+
access_token?: string;
|
|
416
|
+
/** Data format for response. */
|
|
417
|
+
alt?: 'json' | 'media' | 'proto';
|
|
418
|
+
/** JSONP */
|
|
419
|
+
callback?: string;
|
|
420
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
421
|
+
fields?: string;
|
|
422
|
+
/** 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. */
|
|
423
|
+
key?: string;
|
|
424
|
+
/** Required. The resource name of the user to delete. Format: domains/{domain}/users/{user} */
|
|
425
|
+
name: string;
|
|
426
|
+
/** OAuth 2.0 token for the current user. */
|
|
427
|
+
oauth_token?: string;
|
|
428
|
+
/** Returns response with indentations and line breaks. */
|
|
429
|
+
prettyPrint?: boolean;
|
|
430
|
+
/** 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. */
|
|
431
|
+
quotaUser?: string;
|
|
432
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
433
|
+
upload_protocol?: string;
|
|
434
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
435
|
+
uploadType?: string;
|
|
436
|
+
}): Request<{}>;
|
|
437
|
+
/** [Developer Preview](https://developers.google.com/workspace/preview): Retrieves detailed information about a user that has access to a domain. Returns NOT_FOUND if the user does not exist. */
|
|
438
|
+
get(request?: {
|
|
439
|
+
/** V1 error format. */
|
|
440
|
+
'$.xgafv'?: '1' | '2';
|
|
441
|
+
/** OAuth access token. */
|
|
442
|
+
access_token?: string;
|
|
443
|
+
/** Data format for response. */
|
|
444
|
+
alt?: 'json' | 'media' | 'proto';
|
|
445
|
+
/** JSONP */
|
|
446
|
+
callback?: string;
|
|
447
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
448
|
+
fields?: string;
|
|
449
|
+
/** 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. */
|
|
450
|
+
key?: string;
|
|
451
|
+
/** Required. The resource name of the user to retrieve. Format: `domains/{domain}/users/{user}` */
|
|
452
|
+
name: string;
|
|
453
|
+
/** OAuth 2.0 token for the current user. */
|
|
454
|
+
oauth_token?: string;
|
|
455
|
+
/** Returns response with indentations and line breaks. */
|
|
456
|
+
prettyPrint?: boolean;
|
|
457
|
+
/** 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. */
|
|
458
|
+
quotaUser?: string;
|
|
459
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
460
|
+
upload_protocol?: string;
|
|
461
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
462
|
+
uploadType?: string;
|
|
463
|
+
}): Request<User>;
|
|
464
|
+
/** [Developer Preview](https://developers.google.com/workspace/preview): Lists the users that have access to a domain. */
|
|
465
|
+
list(request?: {
|
|
466
|
+
/** V1 error format. */
|
|
467
|
+
'$.xgafv'?: '1' | '2';
|
|
468
|
+
/** OAuth access token. */
|
|
469
|
+
access_token?: string;
|
|
470
|
+
/** Data format for response. */
|
|
471
|
+
alt?: 'json' | 'media' | 'proto';
|
|
472
|
+
/** JSONP */
|
|
473
|
+
callback?: string;
|
|
474
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
475
|
+
fields?: string;
|
|
476
|
+
/** 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. */
|
|
477
|
+
key?: string;
|
|
478
|
+
/** OAuth 2.0 token for the current user. */
|
|
479
|
+
oauth_token?: string;
|
|
480
|
+
/** Optional. Requested page size. Server may return fewer users than requested. If unspecified, the default value for this field is 10. The maximum value for this field is 200. */
|
|
481
|
+
pageSize?: number;
|
|
482
|
+
/** Optional. The next_page_token value returned from a previous List request, if any. */
|
|
483
|
+
pageToken?: string;
|
|
484
|
+
/** Required. The parent resource name for which to list users. Format: `domains/{domain}` */
|
|
485
|
+
parent: string;
|
|
486
|
+
/** Returns response with indentations and line breaks. */
|
|
487
|
+
prettyPrint?: boolean;
|
|
488
|
+
/** 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. */
|
|
489
|
+
quotaUser?: string;
|
|
490
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
491
|
+
upload_protocol?: string;
|
|
492
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
493
|
+
uploadType?: string;
|
|
494
|
+
}): Request<ListUsersResponse>;
|
|
495
|
+
/** [Developer Preview](https://developers.google.com/workspace/preview): Updates a user for a domain. Only Owners and Admins can execute this RPC, only a user's domain permission will be allowed to be updated. Returns NOT_FOUND if the user does not exist. Returns INVALID_ARGUMENT if a permission is not provided or is PERMISSION_UNSPECIFIED, NONE, or OWNER. */
|
|
496
|
+
patch(request: {
|
|
497
|
+
/** V1 error format. */
|
|
498
|
+
'$.xgafv'?: '1' | '2';
|
|
499
|
+
/** OAuth access token. */
|
|
500
|
+
access_token?: string;
|
|
501
|
+
/** Data format for response. */
|
|
502
|
+
alt?: 'json' | 'media' | 'proto';
|
|
503
|
+
/** JSONP */
|
|
504
|
+
callback?: string;
|
|
505
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
506
|
+
fields?: string;
|
|
507
|
+
/** 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. */
|
|
508
|
+
key?: string;
|
|
509
|
+
/** Identifier. The resource name of the user. Format: users/{user} Note: {user} is the user's email address. */
|
|
510
|
+
name: string;
|
|
511
|
+
/** OAuth 2.0 token for the current user. */
|
|
512
|
+
oauth_token?: string;
|
|
513
|
+
/** Returns response with indentations and line breaks. */
|
|
514
|
+
prettyPrint?: boolean;
|
|
515
|
+
/** 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. */
|
|
516
|
+
quotaUser?: string;
|
|
517
|
+
/** The list of fields to update. */
|
|
518
|
+
updateMask?: string;
|
|
519
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
520
|
+
upload_protocol?: string;
|
|
521
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
522
|
+
uploadType?: string;
|
|
523
|
+
/** Request body */
|
|
524
|
+
resource: User;
|
|
525
|
+
}): Request<User>;
|
|
526
|
+
patch(
|
|
527
|
+
request: {
|
|
528
|
+
/** V1 error format. */
|
|
529
|
+
'$.xgafv'?: '1' | '2';
|
|
530
|
+
/** OAuth access token. */
|
|
531
|
+
access_token?: string;
|
|
532
|
+
/** Data format for response. */
|
|
533
|
+
alt?: 'json' | 'media' | 'proto';
|
|
534
|
+
/** JSONP */
|
|
535
|
+
callback?: string;
|
|
536
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
537
|
+
fields?: string;
|
|
538
|
+
/** 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. */
|
|
539
|
+
key?: string;
|
|
540
|
+
/** Identifier. The resource name of the user. Format: users/{user} Note: {user} is the user's email address. */
|
|
541
|
+
name: string;
|
|
542
|
+
/** OAuth 2.0 token for the current user. */
|
|
543
|
+
oauth_token?: string;
|
|
544
|
+
/** Returns response with indentations and line breaks. */
|
|
545
|
+
prettyPrint?: boolean;
|
|
546
|
+
/** 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. */
|
|
547
|
+
quotaUser?: string;
|
|
548
|
+
/** The list of fields to update. */
|
|
549
|
+
updateMask?: string;
|
|
550
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
551
|
+
upload_protocol?: string;
|
|
552
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
553
|
+
uploadType?: string;
|
|
554
|
+
},
|
|
555
|
+
body: User,
|
|
556
|
+
): Request<User>;
|
|
557
|
+
}
|
|
292
558
|
interface DomainsResource {
|
|
559
|
+
/** [Developer Preview](https://developers.google.com/workspace/preview): Adds a domain to the user's account. Returns INVALID_ARGUMENT if a domain is not provided. Returns ALREADY_EXISTS if the domain is already registered by the user. */
|
|
560
|
+
create(request: {
|
|
561
|
+
/** V1 error format. */
|
|
562
|
+
'$.xgafv'?: '1' | '2';
|
|
563
|
+
/** OAuth access token. */
|
|
564
|
+
access_token?: string;
|
|
565
|
+
/** Data format for response. */
|
|
566
|
+
alt?: 'json' | 'media' | 'proto';
|
|
567
|
+
/** JSONP */
|
|
568
|
+
callback?: string;
|
|
569
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
570
|
+
fields?: string;
|
|
571
|
+
/** 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. */
|
|
572
|
+
key?: string;
|
|
573
|
+
/** OAuth 2.0 token for the current user. */
|
|
574
|
+
oauth_token?: string;
|
|
575
|
+
/** Returns response with indentations and line breaks. */
|
|
576
|
+
prettyPrint?: boolean;
|
|
577
|
+
/** 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. */
|
|
578
|
+
quotaUser?: string;
|
|
579
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
580
|
+
upload_protocol?: string;
|
|
581
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
582
|
+
uploadType?: string;
|
|
583
|
+
/** Request body */
|
|
584
|
+
resource: CreateDomainRequest;
|
|
585
|
+
}): Request<Domain>;
|
|
586
|
+
create(
|
|
587
|
+
request: {
|
|
588
|
+
/** V1 error format. */
|
|
589
|
+
'$.xgafv'?: '1' | '2';
|
|
590
|
+
/** OAuth access token. */
|
|
591
|
+
access_token?: string;
|
|
592
|
+
/** Data format for response. */
|
|
593
|
+
alt?: 'json' | 'media' | 'proto';
|
|
594
|
+
/** JSONP */
|
|
595
|
+
callback?: string;
|
|
596
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
597
|
+
fields?: string;
|
|
598
|
+
/** 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. */
|
|
599
|
+
key?: string;
|
|
600
|
+
/** OAuth 2.0 token for the current user. */
|
|
601
|
+
oauth_token?: string;
|
|
602
|
+
/** Returns response with indentations and line breaks. */
|
|
603
|
+
prettyPrint?: boolean;
|
|
604
|
+
/** 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. */
|
|
605
|
+
quotaUser?: string;
|
|
606
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
607
|
+
upload_protocol?: string;
|
|
608
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
609
|
+
uploadType?: string;
|
|
610
|
+
},
|
|
611
|
+
body: CreateDomainRequest,
|
|
612
|
+
): Request<Domain>;
|
|
613
|
+
/** [Developer Preview](https://developers.google.com/workspace/preview): Deletes a domain from the user's account. Returns NOT_FOUND if the domain is not registered by the user. */
|
|
614
|
+
delete(request?: {
|
|
615
|
+
/** V1 error format. */
|
|
616
|
+
'$.xgafv'?: '1' | '2';
|
|
617
|
+
/** OAuth access token. */
|
|
618
|
+
access_token?: string;
|
|
619
|
+
/** Data format for response. */
|
|
620
|
+
alt?: 'json' | 'media' | 'proto';
|
|
621
|
+
/** JSONP */
|
|
622
|
+
callback?: string;
|
|
623
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
624
|
+
fields?: string;
|
|
625
|
+
/** 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. */
|
|
626
|
+
key?: string;
|
|
627
|
+
/** Required. The domain to delete. */
|
|
628
|
+
name: string;
|
|
629
|
+
/** OAuth 2.0 token for the current user. */
|
|
630
|
+
oauth_token?: string;
|
|
631
|
+
/** Returns response with indentations and line breaks. */
|
|
632
|
+
prettyPrint?: boolean;
|
|
633
|
+
/** 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. */
|
|
634
|
+
quotaUser?: string;
|
|
635
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
636
|
+
upload_protocol?: string;
|
|
637
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
638
|
+
uploadType?: string;
|
|
639
|
+
}): Request<{}>;
|
|
293
640
|
/** Retrieves detailed information about a domain registered by you. Returns NOT_FOUND if the domain is not registered by you. Domain represents the metadata of a domain that has been registered within the system and linked to a user. */
|
|
294
641
|
get(request?: {
|
|
295
642
|
/** V1 error format. */
|
|
@@ -344,6 +691,36 @@ declare namespace gapi.client {
|
|
|
344
691
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
345
692
|
uploadType?: string;
|
|
346
693
|
}): Request<DomainComplianceStatus>;
|
|
694
|
+
/** [Developer Preview](https://developers.google.com/workspace/preview): Gets a verification token used for verifying a user's ownership over a domain. */
|
|
695
|
+
getVerificationToken(request?: {
|
|
696
|
+
/** V1 error format. */
|
|
697
|
+
'$.xgafv'?: '1' | '2';
|
|
698
|
+
/** OAuth access token. */
|
|
699
|
+
access_token?: string;
|
|
700
|
+
/** Data format for response. */
|
|
701
|
+
alt?: 'json' | 'media' | 'proto';
|
|
702
|
+
/** JSONP */
|
|
703
|
+
callback?: string;
|
|
704
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
705
|
+
fields?: string;
|
|
706
|
+
/** 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. */
|
|
707
|
+
key?: string;
|
|
708
|
+
/** Required. The resource name of the verification token to retrieve. Format: `domains/{domain}/verificationToken` */
|
|
709
|
+
name: string;
|
|
710
|
+
/** OAuth 2.0 token for the current user. */
|
|
711
|
+
oauth_token?: string;
|
|
712
|
+
/** Returns response with indentations and line breaks. */
|
|
713
|
+
prettyPrint?: boolean;
|
|
714
|
+
/** 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. */
|
|
715
|
+
quotaUser?: string;
|
|
716
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
717
|
+
upload_protocol?: string;
|
|
718
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
719
|
+
uploadType?: string;
|
|
720
|
+
/** Required. The verification method used. Must be specified, i.e. TXT or CNAME. */
|
|
721
|
+
verificationMethod?:
|
|
722
|
+
'DOMAIN_VERIFICATION_METHOD_UNSPECIFIED' | 'TXT' | 'CNAME';
|
|
723
|
+
}): Request<DomainVerificationToken>;
|
|
347
724
|
/** Retrieves a list of all domains registered by you, along with their corresponding metadata. The order of domains in the response is unspecified and non-deterministic. Newly registered domains will not necessarily be added to the end of this list. */
|
|
348
725
|
list(request?: {
|
|
349
726
|
/** V1 error format. */
|
|
@@ -373,7 +750,66 @@ declare namespace gapi.client {
|
|
|
373
750
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
374
751
|
uploadType?: string;
|
|
375
752
|
}): Request<ListDomainsResponse>;
|
|
753
|
+
/** [Developer Preview](https://developers.google.com/workspace/preview): Verifies a user's ownership of a domain at the DNS level. Note that this is distinct from checking if the user has OWNER status within IRDB. */
|
|
754
|
+
verify(request: {
|
|
755
|
+
/** V1 error format. */
|
|
756
|
+
'$.xgafv'?: '1' | '2';
|
|
757
|
+
/** OAuth access token. */
|
|
758
|
+
access_token?: string;
|
|
759
|
+
/** Data format for response. */
|
|
760
|
+
alt?: 'json' | 'media' | 'proto';
|
|
761
|
+
/** JSONP */
|
|
762
|
+
callback?: string;
|
|
763
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
764
|
+
fields?: string;
|
|
765
|
+
/** 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. */
|
|
766
|
+
key?: string;
|
|
767
|
+
/** Required. The domain to verify. */
|
|
768
|
+
name: string;
|
|
769
|
+
/** OAuth 2.0 token for the current user. */
|
|
770
|
+
oauth_token?: string;
|
|
771
|
+
/** Returns response with indentations and line breaks. */
|
|
772
|
+
prettyPrint?: boolean;
|
|
773
|
+
/** 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. */
|
|
774
|
+
quotaUser?: string;
|
|
775
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
776
|
+
upload_protocol?: string;
|
|
777
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
778
|
+
uploadType?: string;
|
|
779
|
+
/** Request body */
|
|
780
|
+
resource: VerifyDomainRequest;
|
|
781
|
+
}): Request<{}>;
|
|
782
|
+
verify(
|
|
783
|
+
request: {
|
|
784
|
+
/** V1 error format. */
|
|
785
|
+
'$.xgafv'?: '1' | '2';
|
|
786
|
+
/** OAuth access token. */
|
|
787
|
+
access_token?: string;
|
|
788
|
+
/** Data format for response. */
|
|
789
|
+
alt?: 'json' | 'media' | 'proto';
|
|
790
|
+
/** JSONP */
|
|
791
|
+
callback?: string;
|
|
792
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
793
|
+
fields?: string;
|
|
794
|
+
/** 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. */
|
|
795
|
+
key?: string;
|
|
796
|
+
/** Required. The domain to verify. */
|
|
797
|
+
name: string;
|
|
798
|
+
/** OAuth 2.0 token for the current user. */
|
|
799
|
+
oauth_token?: string;
|
|
800
|
+
/** Returns response with indentations and line breaks. */
|
|
801
|
+
prettyPrint?: boolean;
|
|
802
|
+
/** 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. */
|
|
803
|
+
quotaUser?: string;
|
|
804
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
805
|
+
upload_protocol?: string;
|
|
806
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
807
|
+
uploadType?: string;
|
|
808
|
+
},
|
|
809
|
+
body: VerifyDomainRequest,
|
|
810
|
+
): Request<{}>;
|
|
376
811
|
domainStats: DomainStatsResource;
|
|
812
|
+
users: UsersResource;
|
|
377
813
|
}
|
|
378
814
|
interface DomainStatsResource {
|
|
379
815
|
/** Executes a batch of QueryDomainStats requests for multiple domains. Returns PERMISSION_DENIED if you don't have permission to access DomainStats for any of the requested domains. */
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -73,6 +73,9 @@ var client_id = '',
|
|
|
73
73
|
|
|
74
74
|
// Get email traffic metrics for the domains you have registered with Postmaster Tools
|
|
75
75
|
'https://www.googleapis.com/auth/postmaster.traffic.readonly',
|
|
76
|
+
|
|
77
|
+
// View and manage users for the domains you have registered with Postmaster Tools
|
|
78
|
+
'https://www.googleapis.com/auth/postmaster.user',
|
|
76
79
|
],
|
|
77
80
|
immediate = true;
|
|
78
81
|
// ...
|
|
@@ -92,6 +95,16 @@ gapi.auth.authorize(
|
|
|
92
95
|
After that you can use Gmail Postmaster Tools API resources: <!-- TODO: make this work for multiple namespaces -->
|
|
93
96
|
|
|
94
97
|
```typescript
|
|
98
|
+
/*
|
|
99
|
+
[Developer Preview](https://developers.google.com/workspace/preview): Adds a domain to the user's account. Returns INVALID_ARGUMENT if a domain is not provided. Returns ALREADY_EXISTS if the domain is already registered by the user.
|
|
100
|
+
*/
|
|
101
|
+
await gapi.client.gmailpostmastertools.domains.create({});
|
|
102
|
+
|
|
103
|
+
/*
|
|
104
|
+
[Developer Preview](https://developers.google.com/workspace/preview): Deletes a domain from the user's account. Returns NOT_FOUND if the domain is not registered by the user.
|
|
105
|
+
*/
|
|
106
|
+
await gapi.client.gmailpostmastertools.domains.delete({name: 'name'});
|
|
107
|
+
|
|
95
108
|
/*
|
|
96
109
|
Retrieves detailed information about a domain registered by you. Returns NOT_FOUND if the domain is not registered by you. Domain represents the metadata of a domain that has been registered within the system and linked to a user.
|
|
97
110
|
*/
|
|
@@ -104,11 +117,23 @@ await gapi.client.gmailpostmastertools.domains.getComplianceStatus({
|
|
|
104
117
|
name: 'name',
|
|
105
118
|
});
|
|
106
119
|
|
|
120
|
+
/*
|
|
121
|
+
[Developer Preview](https://developers.google.com/workspace/preview): Gets a verification token used for verifying a user's ownership over a domain.
|
|
122
|
+
*/
|
|
123
|
+
await gapi.client.gmailpostmastertools.domains.getVerificationToken({
|
|
124
|
+
name: 'name',
|
|
125
|
+
});
|
|
126
|
+
|
|
107
127
|
/*
|
|
108
128
|
Retrieves a list of all domains registered by you, along with their corresponding metadata. The order of domains in the response is unspecified and non-deterministic. Newly registered domains will not necessarily be added to the end of this list.
|
|
109
129
|
*/
|
|
110
130
|
await gapi.client.gmailpostmastertools.domains.list({});
|
|
111
131
|
|
|
132
|
+
/*
|
|
133
|
+
[Developer Preview](https://developers.google.com/workspace/preview): Verifies a user's ownership of a domain at the DNS level. Note that this is distinct from checking if the user has OWNER status within IRDB.
|
|
134
|
+
*/
|
|
135
|
+
await gapi.client.gmailpostmastertools.domains.verify({name: 'name'});
|
|
136
|
+
|
|
112
137
|
/*
|
|
113
138
|
Executes a batch of QueryDomainStats requests for multiple domains. Returns PERMISSION_DENIED if you don't have permission to access DomainStats for any of the requested domains.
|
|
114
139
|
*/
|