1 | import { APIRequestContext, GlobalOptions } from './api';
|
2 | import { Schema, SchemaResource } from './schema';
|
3 | export interface Target {
|
4 | [index: string]: {};
|
5 | }
|
6 | export declare class Endpoint implements Target, APIRequestContext {
|
7 | _options: GlobalOptions;
|
8 | google: any;
|
9 | [index: string]: {};
|
10 | constructor(options: {});
|
11 | /**
|
12 | * Given a schema, add methods and resources to a target.
|
13 | *
|
14 | * @param {object} target The target to which to apply the schema.
|
15 | * @param {object} rootSchema The top-level schema, so we don't lose track of it
|
16 | * during recursion.
|
17 | * @param {object} schema The current schema from which to extract methods and
|
18 | * resources.
|
19 | * @param {object} context The context to add to each method.
|
20 | */
|
21 | applySchema(target: Target, rootSchema: Schema, schema: SchemaResource, context: APIRequestContext): void;
|
22 | |
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 | private applyMethodsFromSchema;
|
32 | |
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 | private makeMethod;
|
41 | private getPathParams;
|
42 | }
|