1 |
|
2 |
|
3 |
|
4 |
|
5 | export interface Schemas {
|
6 | discoveryVersion: string;
|
7 | kind: string;
|
8 | items: Schema[];
|
9 | }
|
10 | export interface Schema {
|
11 | auth: {
|
12 | oauth2: {
|
13 | scopes: {
|
14 | [index: string]: {
|
15 | description: string;
|
16 | };
|
17 | };
|
18 | };
|
19 | };
|
20 | basePath: string;
|
21 | baseUrl: string;
|
22 | batchPath: string;
|
23 | description: string;
|
24 | discoveryVersion: string;
|
25 | discoveryRestUrl: string;
|
26 | documentationLink: string;
|
27 | etag: string;
|
28 | icons: {
|
29 | x16: string;
|
30 | x32: string;
|
31 | };
|
32 | id: string;
|
33 | kind: string;
|
34 | methods: SchemaMethods;
|
35 | name: string;
|
36 | ownerDomain: string;
|
37 | ownerName: string;
|
38 | parameters: SchemaParameters;
|
39 | protocol: string;
|
40 | resources: SchemaResources;
|
41 | revision: string;
|
42 | rootUrl: string;
|
43 | schemas: SchemaItems;
|
44 | servicePath: string;
|
45 | title: string;
|
46 | version: string;
|
47 | }
|
48 | export interface SchemaResources {
|
49 | [index: string]: SchemaResource;
|
50 | }
|
51 | export interface SchemaResource {
|
52 | methods?: SchemaMethods;
|
53 | resources?: SchemaResources;
|
54 | }
|
55 | export interface SchemaItems {
|
56 | [index: string]: SchemaItem;
|
57 | }
|
58 | export interface SchemaItem {
|
59 | description?: string;
|
60 | default?: string;
|
61 | id?: string;
|
62 | properties?: {
|
63 | [index: string]: SchemaItem;
|
64 | };
|
65 | additionalProperties?: {
|
66 | [index: string]: SchemaItem;
|
67 | };
|
68 | items?: {
|
69 | [index: string]: SchemaItem;
|
70 | };
|
71 | type?: SchemaType;
|
72 | format?: ParameterFormat;
|
73 | $ref?: string;
|
74 | }
|
75 | export interface SchemaParameters {
|
76 | [index: string]: SchemaParameter;
|
77 | }
|
78 | export interface SchemaParameter {
|
79 | default: string;
|
80 | description: string;
|
81 | location: string;
|
82 | enum: string[];
|
83 | enumDescription: string[];
|
84 | type: SchemaType;
|
85 | format: ParameterFormat;
|
86 | required: boolean;
|
87 | }
|
88 | export interface SchemaMethods {
|
89 | [index: string]: SchemaMethod;
|
90 | }
|
91 | export interface SchemaMethod {
|
92 | description: string;
|
93 | httpMethod: HttpMethod;
|
94 | id: string;
|
95 | parameterOrder?: string[];
|
96 | parameters?: {
|
97 | [index: string]: SchemaParameter;
|
98 | };
|
99 | path: string;
|
100 | request: {
|
101 | $ref: string;
|
102 | };
|
103 | response: {
|
104 | $ref: string;
|
105 | };
|
106 | sampleUrl: string;
|
107 | scopes: string[];
|
108 | fragment: string;
|
109 | mediaUpload: {
|
110 | protocols: {
|
111 | simple: {
|
112 | path: string;
|
113 | };
|
114 | };
|
115 | };
|
116 | supportsMediaDownload?: boolean;
|
117 | apiVersion?: string;
|
118 | }
|
119 | export interface FragmentResponse {
|
120 | codeFragment: {
|
121 | [index: string]: {
|
122 | fragment: string;
|
123 | };
|
124 | };
|
125 | }
|
126 | export type ParameterFormat = 'int32';
|
127 | export type HttpMethod = 'GET' | 'PATCH' | 'PUT';
|
128 | export type SchemaType = 'object' | 'integer' | 'string' | 'array' | 'boolean';
|