@maxim_mazurok/gapi.client.connectors-v2 0.0.20231106 → 0.0.20231126

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/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.connectors-v2",
3
- "version": "0.0.20231106",
3
+ "version": "0.0.20231126",
4
4
  "description": "TypeScript typings for Connectors API v2",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
8
+ },
5
9
  "license": "MIT",
6
10
  "author": {
7
- "email": "maxim@mazurok.com",
8
11
  "name": "Maxim Mazurok",
12
+ "email": "maxim@mazurok.com",
9
13
  "url": "https://maxim.mazurok.com"
10
14
  },
11
- "repository": {
12
- "type": "git",
13
- "url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
14
- },
15
15
  "types": "index.d.ts",
16
16
  "dependencies": {
17
17
  "@types/gapi.client": "*",
package/readme.md CHANGED
@@ -25,10 +25,13 @@ gapi.load('client', () => {
25
25
  Then load api client wrapper:
26
26
 
27
27
  ```typescript
28
- gapi.client.load('https://connectors.googleapis.com/$discovery/rest?version=v2', () => {
29
- // now we can use:
30
- // gapi.client.connectors
31
- });
28
+ gapi.client.load(
29
+ 'https://connectors.googleapis.com/$discovery/rest?version=v2',
30
+ () => {
31
+ // now we can use:
32
+ // gapi.client.connectors
33
+ }
34
+ );
32
35
  ```
33
36
 
34
37
  ```typescript
@@ -45,24 +48,26 @@ Don't forget to authenticate your client before sending any request to resources
45
48
  // declare client_id registered in Google Developers Console
46
49
  var client_id = '',
47
50
  scope = [
48
- // See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
49
- 'https://www.googleapis.com/auth/cloud-platform',
50
- ],
51
- immediate = true;
51
+ // See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
52
+ 'https://www.googleapis.com/auth/cloud-platform',
53
+ ],
54
+ immediate = true;
52
55
  // ...
53
56
 
54
57
  gapi.auth.authorize(
55
- { client_id: client_id, scope: scope, immediate: immediate },
58
+ {client_id: client_id, scope: scope, immediate: immediate},
56
59
  authResult => {
57
60
  if (authResult && !authResult.error) {
58
- /* handle successful authorization */
61
+ /* handle successful authorization */
59
62
  } else {
60
- /* handle authorization error */
63
+ /* handle authorization error */
61
64
  }
62
- });
65
+ }
66
+ );
63
67
  ```
64
68
 
65
69
  After that you can use Connectors API resources: <!-- TODO: make this work for multiple namespaces -->
66
70
 
67
71
  ```typescript
72
+
68
73
  ```
package/tests.ts DELETED
@@ -1,142 +0,0 @@
1
- /* This is stub file for gapi.client.connectors-v2 definition tests */
2
- // IMPORTANT
3
- // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
- // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
-
6
- // Revision: 20231106
7
-
8
- gapi.load('client', async () => {
9
- /** now we can use gapi.client */
10
-
11
- await gapi.client.load('https://connectors.googleapis.com/$discovery/rest?version=v2');
12
- /** now we can use gapi.client.connectors */
13
-
14
- /** don't forget to authenticate your client before sending any request to resources: */
15
- /** declare client_id registered in Google Developers Console */
16
- const client_id = '<<PUT YOUR CLIENT ID HERE>>';
17
- const scope = [
18
- /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. */
19
- 'https://www.googleapis.com/auth/cloud-platform',
20
- ];
21
- const immediate = false;
22
- gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
23
- if (authResult && !authResult.error) {
24
- /** handle successful authorization */
25
- run();
26
- } else {
27
- /** handle authorization error */
28
- }
29
- });
30
-
31
- async function run() {
32
- /**
33
- * Executes a SQL statement specified in the body of the request. An example of this SQL statement in the case of Salesforce connector would be 'select * from Account a, Order o where a.Id
34
- * = o.AccountId'.
35
- */
36
- await gapi.client.connectors.projects.locations.connections.executeSqlQuery({
37
- connection: "Test string",
38
- }, {
39
- query: {
40
- maxRows: "Test string",
41
- query: "Test string",
42
- queryParameters: [
43
- {
44
- dataType: "Test string",
45
- value: 42,
46
- }
47
- ],
48
- timeout: "Test string",
49
- },
50
- });
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. */
52
- await gapi.client.connectors.projects.locations.connections.actions.execute({
53
- name: "Test string",
54
- }, {
55
- parameters: {
56
- A: 42
57
- },
58
- });
59
- /** Gets the schema of the given action. */
60
- await gapi.client.connectors.projects.locations.connections.actions.get({
61
- name: "Test string",
62
- });
63
- /** Gets the schema of all the actions supported by the connector. */
64
- await gapi.client.connectors.projects.locations.connections.actions.list({
65
- pageSize: 42,
66
- pageToken: "Test string",
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",
73
- });
74
- /** Lists metadata related to all entity types present in the external system. */
75
- await gapi.client.connectors.projects.locations.connections.entityTypes.list({
76
- pageSize: 42,
77
- pageToken: "Test string",
78
- parent: "Test string",
79
- view: "Test string",
80
- });
81
- /**
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
83
- * contains a `Entity` message object returned as a response by the external system.
84
- */
85
- await gapi.client.connectors.projects.locations.connections.entityTypes.entities.create({
86
- parent: "Test string",
87
- }, {
88
- fields: {
89
- A: 42
90
- },
91
- name: "Test string",
92
- });
93
- /** Deletes an existing entity row matching the entity type and entity id specified in the request. */
94
- await gapi.client.connectors.projects.locations.connections.entityTypes.entities.delete({
95
- name: "Test string",
96
- });
97
- /** Deletes entities based on conditions specified in the request and not on entity id. */
98
- await gapi.client.connectors.projects.locations.connections.entityTypes.entities.deleteEntitiesWithConditions({
99
- conditions: "Test string",
100
- entityType: "Test string",
101
- });
102
- /** Gets a single entity row matching the entity type and entity id specified in the request. */
103
- await gapi.client.connectors.projects.locations.connections.entityTypes.entities.get({
104
- name: "Test string",
105
- });
106
- /**
107
- * Lists entity rows of a particular entity type contained in the request. Note: 1. Currently, only max of one 'sort_by' column is supported. 2. If no 'sort_by' column is provided, the
108
- * primary key of the table is used. If zero or more than one primary key is available, we default to the unpaginated list entities logic which only returns the first page. 3. The values
109
- * of the 'sort_by' columns must uniquely identify an entity row, otherwise undefined behaviors may be observed during pagination. 4. Since transactions are not supported, any updates,
110
- * inserts or deletes during pagination can lead to stale data being returned or other unexpected behaviors.
111
- */
112
- await gapi.client.connectors.projects.locations.connections.entityTypes.entities.list({
113
- conditions: "Test string",
114
- pageSize: 42,
115
- pageToken: "Test string",
116
- parent: "Test string",
117
- sortBy: "Test string",
118
- });
119
- /**
120
- * Updates an existing entity row matching the entity type and entity id specified in the request. The fields in the entity row that need to be modified are contained in the body of the
121
- * request. All unspecified fields are left unchanged. The response message contains a `Entity` message object returned as a response by the external system.
122
- */
123
- await gapi.client.connectors.projects.locations.connections.entityTypes.entities.patch({
124
- name: "Test string",
125
- }, {
126
- fields: {
127
- A: 42
128
- },
129
- name: "Test string",
130
- });
131
- /** Updates entities based on conditions specified in the request and not on entity id. */
132
- await gapi.client.connectors.projects.locations.connections.entityTypes.entities.updateEntitiesWithConditions({
133
- conditions: "Test string",
134
- entityType: "Test string",
135
- }, {
136
- fields: {
137
- A: 42
138
- },
139
- name: "Test string",
140
- });
141
- }
142
- });
package/tsconfig.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "commonjs",
4
- "lib": ["es6", "dom"],
5
- "noImplicitAny": true,
6
- "noImplicitThis": true,
7
- "strictNullChecks": true,
8
- "baseUrl": "../",
9
- "typeRoots": [
10
- "../"
11
- ],
12
- "types": [],
13
- "noEmit": true,
14
- "forceConsistentCasingInFileNames": true,
15
- "strictFunctionTypes": true
16
- },
17
- "files": ["index.d.ts", "tests.ts"]
18
- }
package/tslint.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "extends": "dtslint/dtslint.json",
3
- "rules": {
4
- "no-redundant-jsdoc": false
5
- }
6
- }