@maxim_mazurok/gapi.client.connectors-v2 0.0.20230806 → 0.0.20230906

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.
Files changed (3) hide show
  1. package/index.d.ts +150 -1
  2. package/package.json +1 -1
  3. package/tests.ts +19 -1
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://connectors.googleapis.com/$discovery/rest?version=v2
12
- // Revision: 20230806
12
+ // Revision: 20230906
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -23,12 +23,18 @@ declare namespace gapi.client {
23
23
 
24
24
  namespace connectors {
25
25
  interface Action {
26
+ /** JsonSchema representation of this actions's input schema */
27
+ inputJsonSchema?:
28
+ JsonSchema;
26
29
  /** List containing input parameter metadata. */
27
30
  inputParameters?:
28
31
  InputParameter[];
29
32
  /** Name of the action. */
30
33
  name?:
31
34
  string;
35
+ /** JsonSchema representation of this actions's result schema */
36
+ resultJsonSchema?:
37
+ JsonSchema;
32
38
  /** List containing the metadata of result fields. */
33
39
  resultMetadata?:
34
40
  ResultMetadata[];
@@ -48,6 +54,9 @@ declare namespace gapi.client {
48
54
  /** List containing metadata information about each field of the entity type. */
49
55
  fields?:
50
56
  Field[];
57
+ /** JsonSchema representation of this entity's schema */
58
+ jsonSchema?:
59
+ JsonSchema;
51
60
  /** The name of the entity type. */
52
61
  name?:
53
62
  string;
@@ -92,6 +101,9 @@ declare namespace gapi.client {
92
101
  /** A brief description of the Field. */
93
102
  description?:
94
103
  string;
104
+ /** JsonSchema of the field, applicable only if field is of type `STRUCT` */
105
+ jsonSchema?:
106
+ JsonSchema;
95
107
  /** The following boolean field specifies if the current Field acts as a primary key or id if the parent is of type entity. */
96
108
  key?:
97
109
  boolean;
@@ -115,6 +127,9 @@ declare namespace gapi.client {
115
127
  /** A brief description of the Parameter. */
116
128
  description?:
117
129
  string;
130
+ /** JsonSchema of the parameter, applicable only if parameter is of type `STRUCT` */
131
+ jsonSchema?:
132
+ JsonSchema;
118
133
  /** Name of the Parameter. */
119
134
  name?:
120
135
  string;
@@ -122,6 +137,38 @@ declare namespace gapi.client {
122
137
  nullable?:
123
138
  boolean;
124
139
  }
140
+ interface JsonSchema {
141
+ /** Additional details apart from standard json schema fields, this gives flexibility to store metadata about the schema */
142
+ additionalDetails?:
143
+ { [P in string]: any };
144
+ /** The default value of the field or object described by this schema. */
145
+ default?:
146
+ any;
147
+ /** A description of this schema. */
148
+ description?:
149
+ string;
150
+ /** Possible values for an enumeration. This works in conjunction with `type` to represent types with a fixed set of legal values */
151
+ enum?:
152
+ any[];
153
+ /** Format of the value as per https://json-schema.org/understanding-json-schema/reference/string.html#format */
154
+ format?:
155
+ string;
156
+ /** Schema that applies to array values, applicable only if this is of type `array`. */
157
+ items?:
158
+ JsonSchema;
159
+ /** JDBC datatype of the field. */
160
+ jdbcType?:
161
+ string;
162
+ /** The child schemas, applicable only if this is of type `object`. The key is the name of the property and the value is the json schema that describes that property */
163
+ properties?:
164
+ { [P in string]: JsonSchema };
165
+ /** Whether this property is required. */
166
+ required?:
167
+ string[];
168
+ /** JSON Schema Validation: A Vocabulary for Structural Validation of JSON */
169
+ type?:
170
+ string[];
171
+ }
125
172
  interface ListActionsResponse {
126
173
  /** List of action metadata. */
127
174
  actions?:
@@ -153,9 +200,24 @@ declare namespace gapi.client {
153
200
  string[];
154
201
  }
155
202
  interface Query {
203
+ /** Sets the limit for the maximum number of rows returned after the query execution. */
204
+ maxRows?:
205
+ string;
156
206
  /** Required. Sql query to execute. */
157
207
  query?:
158
208
  string;
209
+ /** In the struct, the value corresponds to the value of query parameter and date type corresponds to the date type of the query parameter. */
210
+ queryParameters?:
211
+ QueryParameter[];
212
+ /** Sets the number of seconds the driver will wait for a query to execute. */
213
+ timeout?:
214
+ string;
215
+ }
216
+ interface QueryParameter {
217
+ dataType?:
218
+ string;
219
+ value?:
220
+ string;
159
221
  }
160
222
  interface Reference {
161
223
  /** Name of the reference field. */
@@ -172,6 +234,9 @@ declare namespace gapi.client {
172
234
  /** A brief description of the metadata field. */
173
235
  description?:
174
236
  string;
237
+ /** JsonSchema of the result, applicable only if parameter is of type `STRUCT` */
238
+ jsonSchema?:
239
+ JsonSchema;
175
240
  /** Name of the metadata field. */
176
241
  name?:
177
242
  string;
@@ -263,6 +328,45 @@ declare namespace gapi.client {
263
328
  string;
264
329
  },
265
330
  body: ExecuteActionRequest): Request<ExecuteActionResponse>;
331
+ /** Gets the schema of the given action. */
332
+ get(request?: {
333
+ /** V1 error format. */
334
+ "$.xgafv"?:
335
+ string;
336
+ /** OAuth access token. */
337
+ access_token?:
338
+ string;
339
+ /** Data format for response. */
340
+ alt?:
341
+ string;
342
+ /** JSONP */
343
+ callback?:
344
+ string;
345
+ /** Selector specifying which fields to include in a partial response. */
346
+ fields?:
347
+ string;
348
+ /** 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. */
349
+ key?:
350
+ string;
351
+ /** Required. Resource name of the Action. Format: projects/{project}/locations/{location}/connections/{connection}/actions/{action} */
352
+ name:
353
+ string;
354
+ /** OAuth 2.0 token for the current user. */
355
+ oauth_token?:
356
+ string;
357
+ /** Returns response with indentations and line breaks. */
358
+ prettyPrint?:
359
+ boolean;
360
+ /** 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. */
361
+ quotaUser?:
362
+ string;
363
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
364
+ upload_protocol?:
365
+ string;
366
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
367
+ uploadType?:
368
+ string;
369
+ }): Request<Action>;
266
370
  /** Gets the schema of all the actions supported by the connector. */
267
371
  list(request?: {
268
372
  /** V1 error format. */
@@ -307,6 +411,9 @@ declare namespace gapi.client {
307
411
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
308
412
  uploadType?:
309
413
  string;
414
+ /** Specifies which fields of the Action are returned in the response. */
415
+ view?:
416
+ string;
310
417
  }): Request<ListActionsResponse>;
311
418
  }
312
419
  interface EntitiesResource {
@@ -758,6 +865,45 @@ declare namespace gapi.client {
758
865
  body: Entity): Request<UpdateEntitiesWithConditionsResponse>;
759
866
  }
760
867
  interface EntityTypesResource {
868
+ /** Gets metadata of given entity type */
869
+ get(request?: {
870
+ /** V1 error format. */
871
+ "$.xgafv"?:
872
+ string;
873
+ /** OAuth access token. */
874
+ access_token?:
875
+ string;
876
+ /** Data format for response. */
877
+ alt?:
878
+ string;
879
+ /** JSONP */
880
+ callback?:
881
+ string;
882
+ /** Selector specifying which fields to include in a partial response. */
883
+ fields?:
884
+ string;
885
+ /** 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. */
886
+ key?:
887
+ string;
888
+ /** Required. Resource name of the Entity Type. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{entityType} */
889
+ name:
890
+ string;
891
+ /** OAuth 2.0 token for the current user. */
892
+ oauth_token?:
893
+ string;
894
+ /** Returns response with indentations and line breaks. */
895
+ prettyPrint?:
896
+ boolean;
897
+ /** 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. */
898
+ quotaUser?:
899
+ string;
900
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
901
+ upload_protocol?:
902
+ string;
903
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
904
+ uploadType?:
905
+ string;
906
+ }): Request<EntityType>;
761
907
  /** Lists metadata related to all entity types present in the external system. */
762
908
  list(request?: {
763
909
  /** V1 error format. */
@@ -802,6 +948,9 @@ declare namespace gapi.client {
802
948
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
803
949
  uploadType?:
804
950
  string;
951
+ /** Specifies which fields of the Entity Type are returned in the response. */
952
+ view?:
953
+ string;
805
954
  }): Request<ListEntityTypesResponse>;
806
955
  entities:
807
956
  EntitiesResource;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.connectors-v2",
3
- "version": "0.0.20230806",
3
+ "version": "0.0.20230906",
4
4
  "description": "TypeScript typings for Connectors API v2",
5
5
  "license": "MIT",
6
6
  "author": {
package/tests.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
4
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
5
 
6
- // Revision: 20230806
6
+ // Revision: 20230906
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -37,7 +37,15 @@ gapi.load('client', async () => {
37
37
  connection: "Test string",
38
38
  }, {
39
39
  query: {
40
+ maxRows: "Test string",
40
41
  query: "Test string",
42
+ queryParameters: [
43
+ {
44
+ dataType: "Test string",
45
+ value: "Test string",
46
+ }
47
+ ],
48
+ timeout: "Test string",
41
49
  },
42
50
  });
43
51
  /** Executes an action with the name specified in the request. The input parameters for executing the action are passed through the body of the ExecuteAction request. */
@@ -48,17 +56,27 @@ gapi.load('client', async () => {
48
56
  A: 42
49
57
  },
50
58
  });
59
+ /** Gets the schema of the given action. */
60
+ await gapi.client.connectors.projects.locations.connections.actions.get({
61
+ name: "Test string",
62
+ });
51
63
  /** Gets the schema of all the actions supported by the connector. */
52
64
  await gapi.client.connectors.projects.locations.connections.actions.list({
53
65
  pageSize: 42,
54
66
  pageToken: "Test string",
55
67
  parent: "Test string",
68
+ view: "Test string",
69
+ });
70
+ /** Gets metadata of given entity type */
71
+ await gapi.client.connectors.projects.locations.connections.entityTypes.get({
72
+ name: "Test string",
56
73
  });
57
74
  /** Lists metadata related to all entity types present in the external system. */
58
75
  await gapi.client.connectors.projects.locations.connections.entityTypes.list({
59
76
  pageSize: 42,
60
77
  pageToken: "Test string",
61
78
  parent: "Test string",
79
+ view: "Test string",
62
80
  });
63
81
  /**
64
82
  * Creates a new entity row of the specified entity type in the external system. The field values for creating the row are contained in the body of the request. The response message