v1.d.ts
16.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
/**
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { OAuth2Client, JWT, Compute, UserRefreshClient } from 'google-auth-library';
import { GoogleConfigurable, MethodOptions, GlobalOptions, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { GaxiosPromise } from 'gaxios';
export declare namespace discovery_v1 {
export interface Options extends GlobalOptions {
version: 'v1';
}
interface StandardParameters {
/**
* Data format for the response.
*/
alt?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* 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.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
*/
quotaUser?: string;
/**
* Deprecated. Please use quotaUser instead.
*/
userIp?: string;
}
/**
* API Discovery Service
*
* Provides information about other Google APIs, such as what APIs are available, the resource, and method details for each API.
*
* @example
* const {google} = require('googleapis');
* const discovery = google.discovery('v1');
*
* @namespace discovery
* @type {Function}
* @version v1
* @variation v1
* @param {object=} options Options for Discovery
*/
export class Discovery {
context: APIRequestContext;
apis: Resource$Apis;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
export interface Schema$DirectoryList {
/**
* Indicate the version of the Discovery API used to generate this doc.
*/
discoveryVersion?: string | null;
/**
* The individual directory entries. One entry per api/version pair.
*/
items?: Array<{
description?: string;
discoveryLink?: string;
discoveryRestUrl?: string;
documentationLink?: string;
icons?: {
x16?: string;
x32?: string;
};
id?: string;
kind?: string;
labels?: string[];
name?: string;
preferred?: boolean;
title?: string;
version?: string;
}> | null;
/**
* The kind for this response.
*/
kind?: string | null;
}
export interface Schema$JsonSchema {
/**
* A reference to another schema. The value of this property is the "id" of another schema.
*/
$ref?: string | null;
/**
* If this is a schema for an object, this property is the schema for any additional properties with dynamic keys on this object.
*/
additionalProperties?: Schema$JsonSchema;
/**
* Additional information about this property.
*/
annotations?: {
required?: string[];
} | null;
/**
* The default value of this property (if one exists).
*/
default?: string | null;
/**
* A description of this object.
*/
description?: string | null;
/**
* Values this parameter may take (if it is an enum).
*/
enum?: string[] | null;
/**
* The descriptions for the enums. Each position maps to the corresponding value in the "enum" array.
*/
enumDescriptions?: string[] | null;
/**
* An additional regular expression or key that helps constrain the value. For more details see: http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.23
*/
format?: string | null;
/**
* Unique identifier for this schema.
*/
id?: string | null;
/**
* If this is a schema for an array, this property is the schema for each element in the array.
*/
items?: Schema$JsonSchema;
/**
* Whether this parameter goes in the query or the path for REST requests.
*/
location?: string | null;
/**
* The maximum value of this parameter.
*/
maximum?: string | null;
/**
* The minimum value of this parameter.
*/
minimum?: string | null;
/**
* The regular expression this parameter must conform to. Uses Java 6 regex format: http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html
*/
pattern?: string | null;
/**
* If this is a schema for an object, list the schema for each property of this object.
*/
properties?: {
[key: string]: Schema$JsonSchema;
} | null;
/**
* The value is read-only, generated by the service. The value cannot be modified by the client. If the value is included in a POST, PUT, or PATCH request, it is ignored by the service.
*/
readOnly?: boolean | null;
/**
* Whether this parameter may appear multiple times.
*/
repeated?: boolean | null;
/**
* Whether the parameter is required.
*/
required?: boolean | null;
/**
* The value type for this schema. A list of values can be found here: http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
*/
type?: string | null;
/**
* In a variant data type, the value of one property is used to determine how to interpret the entire entity. Its value must exist in a map of descriminant values to schema names.
*/
variant?: {
discriminant?: string;
map?: Array<{
$ref?: string;
type_value?: string;
}>;
} | null;
}
export interface Schema$RestDescription {
/**
* Authentication information.
*/
auth?: {
oauth2?: {
scopes?: {
[key: string]: {
description?: string;
};
};
};
} | null;
/**
* [DEPRECATED] The base path for REST requests.
*/
basePath?: string | null;
/**
* [DEPRECATED] The base URL for REST requests.
*/
baseUrl?: string | null;
/**
* The path for REST batch requests.
*/
batchPath?: string | null;
/**
* Indicates how the API name should be capitalized and split into various parts. Useful for generating pretty class names.
*/
canonicalName?: string | null;
/**
* The description of this API.
*/
description?: string | null;
/**
* Indicate the version of the Discovery API used to generate this doc.
*/
discoveryVersion?: string | null;
/**
* A link to human readable documentation for the API.
*/
documentationLink?: string | null;
/**
* The ETag for this response.
*/
etag?: string | null;
/**
* Enable exponential backoff for suitable methods in the generated clients.
*/
exponentialBackoffDefault?: boolean | null;
/**
* A list of supported features for this API.
*/
features?: string[] | null;
/**
* Links to 16x16 and 32x32 icons representing the API.
*/
icons?: {
x16?: string;
x32?: string;
} | null;
/**
* The ID of this API.
*/
id?: string | null;
/**
* The kind for this response.
*/
kind?: string | null;
/**
* Labels for the status of this API, such as labs or deprecated.
*/
labels?: string[] | null;
/**
* API-level methods for this API.
*/
methods?: {
[key: string]: Schema$RestMethod;
} | null;
/**
* The name of this API.
*/
name?: string | null;
/**
* The domain of the owner of this API. Together with the ownerName and a packagePath values, this can be used to generate a library for this API which would have a unique fully qualified name.
*/
ownerDomain?: string | null;
/**
* The name of the owner of this API. See ownerDomain.
*/
ownerName?: string | null;
/**
* The package of the owner of this API. See ownerDomain.
*/
packagePath?: string | null;
/**
* Common parameters that apply across all apis.
*/
parameters?: {
[key: string]: Schema$JsonSchema;
} | null;
/**
* The protocol described by this document.
*/
protocol?: string | null;
/**
* The resources in this API.
*/
resources?: {
[key: string]: Schema$RestResource;
} | null;
/**
* The version of this API.
*/
revision?: string | null;
/**
* The root URL under which all API services live.
*/
rootUrl?: string | null;
/**
* The schemas for this API.
*/
schemas?: {
[key: string]: Schema$JsonSchema;
} | null;
/**
* The base path for all REST requests.
*/
servicePath?: string | null;
/**
* The title of this API.
*/
title?: string | null;
/**
* The version of this API.
*/
version?: string | null;
version_module?: boolean | null;
}
export interface Schema$RestMethod {
/**
* Description of this method.
*/
description?: string | null;
/**
* Whether this method requires an ETag to be specified. The ETag is sent as an HTTP If-Match or If-None-Match header.
*/
etagRequired?: boolean | null;
/**
* HTTP method used by this method.
*/
httpMethod?: string | null;
/**
* A unique ID for this method. This property can be used to match methods between different versions of Discovery.
*/
id?: string | null;
/**
* Media upload parameters.
*/
mediaUpload?: {
accept?: string[];
maxSize?: string;
protocols?: {
resumable?: {
multipart?: boolean;
path?: string;
};
simple?: {
multipart?: boolean;
path?: string;
};
};
} | null;
/**
* Ordered list of required parameters, serves as a hint to clients on how to structure their method signatures. The array is ordered such that the "most-significant" parameter appears first.
*/
parameterOrder?: string[] | null;
/**
* Details for all parameters in this method.
*/
parameters?: {
[key: string]: Schema$JsonSchema;
} | null;
/**
* The URI path of this REST method. Should be used in conjunction with the basePath property at the api-level.
*/
path?: string | null;
/**
* The schema for the request.
*/
request?: {
$ref?: string;
parameterName?: string;
} | null;
/**
* The schema for the response.
*/
response?: {
$ref?: string;
} | null;
/**
* OAuth 2.0 scopes applicable to this method.
*/
scopes?: string[] | null;
/**
* Whether this method supports media downloads.
*/
supportsMediaDownload?: boolean | null;
/**
* Whether this method supports media uploads.
*/
supportsMediaUpload?: boolean | null;
/**
* Whether this method supports subscriptions.
*/
supportsSubscription?: boolean | null;
/**
* Indicates that downloads from this method should use the download service URL (i.e. "/download"). Only applies if the method supports media download.
*/
useMediaDownloadService?: boolean | null;
}
export interface Schema$RestResource {
/**
* Methods on this resource.
*/
methods?: {
[key: string]: Schema$RestMethod;
} | null;
/**
* Sub-resources on this resource.
*/
resources?: {
[key: string]: Schema$RestResource;
} | null;
}
export class Resource$Apis {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* discovery.apis.getRest
* @desc Retrieve the description of a particular version of an api.
* @alias discovery.apis.getRest
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.api The name of the API.
* @param {string} params.version The version of the API.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
getRest(params?: Params$Resource$Apis$Getrest, options?: MethodOptions): GaxiosPromise<Schema$RestDescription>;
getRest(params: Params$Resource$Apis$Getrest, options: MethodOptions | BodyResponseCallback<Schema$RestDescription>, callback: BodyResponseCallback<Schema$RestDescription>): void;
getRest(params: Params$Resource$Apis$Getrest, callback: BodyResponseCallback<Schema$RestDescription>): void;
getRest(callback: BodyResponseCallback<Schema$RestDescription>): void;
/**
* discovery.apis.list
* @desc Retrieve the list of APIs supported at this endpoint.
* @alias discovery.apis.list
* @memberOf! ()
*
* @param {object=} params Parameters for request
* @param {string=} params.name Only include APIs with the given name.
* @param {boolean=} params.preferred Return only the preferred version of an API.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params?: Params$Resource$Apis$List, options?: MethodOptions): GaxiosPromise<Schema$DirectoryList>;
list(params: Params$Resource$Apis$List, options: MethodOptions | BodyResponseCallback<Schema$DirectoryList>, callback: BodyResponseCallback<Schema$DirectoryList>): void;
list(params: Params$Resource$Apis$List, callback: BodyResponseCallback<Schema$DirectoryList>): void;
list(callback: BodyResponseCallback<Schema$DirectoryList>): void;
}
export interface Params$Resource$Apis$Getrest extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* The name of the API.
*/
api?: string;
/**
* The version of the API.
*/
version?: string;
}
export interface Params$Resource$Apis$List extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* Only include APIs with the given name.
*/
name?: string;
/**
* Return only the preferred version of an API.
*/
preferred?: boolean;
}
export {};
}