@maxim_mazurok/gapi.client.appengine-v1alpha 0.0.20231109 → 0.0.20231204

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.appengine-v1alpha",
3
- "version": "0.0.20231109",
3
+ "version": "0.0.20231204",
4
4
  "description": "TypeScript typings for App Engine Admin API v1alpha",
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://appengine.googleapis.com/$discovery/rest?version=v1alpha', () => {
29
- // now we can use:
30
- // gapi.client.appengine
31
- });
28
+ gapi.client.load(
29
+ 'https://appengine.googleapis.com/$discovery/rest?version=v1alpha',
30
+ () => {
31
+ // now we can use:
32
+ // gapi.client.appengine
33
+ }
34
+ );
32
35
  ```
33
36
 
34
37
  ```typescript
@@ -45,30 +48,32 @@ 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
- // View and manage your applications deployed on Google App Engine
49
- 'https://www.googleapis.com/auth/appengine.admin',
51
+ // View and manage your applications deployed on Google App Engine
52
+ 'https://www.googleapis.com/auth/appengine.admin',
50
53
 
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',
54
+ // See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
55
+ 'https://www.googleapis.com/auth/cloud-platform',
53
56
 
54
- // View your data across Google Cloud services and see the email address of your Google Account
55
- 'https://www.googleapis.com/auth/cloud-platform.read-only',
56
- ],
57
- immediate = true;
57
+ // View your data across Google Cloud services and see the email address of your Google Account
58
+ 'https://www.googleapis.com/auth/cloud-platform.read-only',
59
+ ],
60
+ immediate = true;
58
61
  // ...
59
62
 
60
63
  gapi.auth.authorize(
61
- { client_id: client_id, scope: scope, immediate: immediate },
64
+ {client_id: client_id, scope: scope, immediate: immediate},
62
65
  authResult => {
63
66
  if (authResult && !authResult.error) {
64
- /* handle successful authorization */
67
+ /* handle successful authorization */
65
68
  } else {
66
- /* handle authorization error */
69
+ /* handle authorization error */
67
70
  }
68
- });
71
+ }
72
+ );
69
73
  ```
70
74
 
71
75
  After that you can use App Engine Admin API resources: <!-- TODO: make this work for multiple namespaces -->
72
76
 
73
77
  ```typescript
78
+
74
79
  ```
package/tests.ts DELETED
@@ -1,227 +0,0 @@
1
- /* This is stub file for gapi.client.appengine-v1alpha 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: 20231109
7
-
8
- gapi.load('client', async () => {
9
- /** now we can use gapi.client */
10
-
11
- await gapi.client.load('https://appengine.googleapis.com/$discovery/rest?version=v1alpha');
12
- /** now we can use gapi.client.appengine */
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
- /** View and manage your applications deployed on Google App Engine */
19
- 'https://www.googleapis.com/auth/appengine.admin',
20
- /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. */
21
- 'https://www.googleapis.com/auth/cloud-platform',
22
- /** View your data across Google Cloud services and see the email address of your Google Account */
23
- 'https://www.googleapis.com/auth/cloud-platform.read-only',
24
- ];
25
- const immediate = false;
26
- gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
27
- if (authResult && !authResult.error) {
28
- /** handle successful authorization */
29
- run();
30
- } else {
31
- /** handle authorization error */
32
- }
33
- });
34
-
35
- async function run() {
36
- /** Uploads the specified SSL certificate. */
37
- await gapi.client.appengine.apps.authorizedCertificates.create({
38
- appsId: "Test string",
39
- }, {
40
- certificateRawData: {
41
- privateKey: "Test string",
42
- publicCertificate: "Test string",
43
- },
44
- displayName: "Test string",
45
- domainMappingsCount: 42,
46
- domainNames: [
47
- "Test string"
48
- ],
49
- expireTime: "Test string",
50
- id: "Test string",
51
- managedCertificate: {
52
- lastRenewalTime: "Test string",
53
- status: "Test string",
54
- },
55
- name: "Test string",
56
- visibleDomainMappings: [
57
- "Test string"
58
- ],
59
- });
60
- /** Deletes the specified SSL certificate. */
61
- await gapi.client.appengine.apps.authorizedCertificates.delete({
62
- appsId: "Test string",
63
- authorizedCertificatesId: "Test string",
64
- });
65
- /** Gets the specified SSL certificate. */
66
- await gapi.client.appengine.apps.authorizedCertificates.get({
67
- appsId: "Test string",
68
- authorizedCertificatesId: "Test string",
69
- view: "Test string",
70
- });
71
- /** Lists all SSL certificates the user is authorized to administer. */
72
- await gapi.client.appengine.apps.authorizedCertificates.list({
73
- appsId: "Test string",
74
- pageSize: 42,
75
- pageToken: "Test string",
76
- view: "Test string",
77
- });
78
- /**
79
- * Updates the specified SSL certificate. To renew a certificate and maintain its existing domain mappings, update certificate_data with a new certificate. The new certificate must be
80
- * applicable to the same domains as the original certificate. The certificate display_name may also be updated.
81
- */
82
- await gapi.client.appengine.apps.authorizedCertificates.patch({
83
- appsId: "Test string",
84
- authorizedCertificatesId: "Test string",
85
- updateMask: "Test string",
86
- }, {
87
- certificateRawData: {
88
- privateKey: "Test string",
89
- publicCertificate: "Test string",
90
- },
91
- displayName: "Test string",
92
- domainMappingsCount: 42,
93
- domainNames: [
94
- "Test string"
95
- ],
96
- expireTime: "Test string",
97
- id: "Test string",
98
- managedCertificate: {
99
- lastRenewalTime: "Test string",
100
- status: "Test string",
101
- },
102
- name: "Test string",
103
- visibleDomainMappings: [
104
- "Test string"
105
- ],
106
- });
107
- /** Lists all domains the user is authorized to administer. */
108
- await gapi.client.appengine.apps.authorizedDomains.list({
109
- appsId: "Test string",
110
- pageSize: 42,
111
- pageToken: "Test string",
112
- });
113
- /**
114
- * Maps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available authorized domains, see
115
- * AuthorizedDomains.ListAuthorizedDomains.
116
- */
117
- await gapi.client.appengine.apps.domainMappings.create({
118
- appsId: "Test string",
119
- noManagedCertificate: true,
120
- overrideStrategy: "Test string",
121
- }, {
122
- id: "Test string",
123
- name: "Test string",
124
- resourceRecords: [
125
- {
126
- name: "Test string",
127
- rrdata: "Test string",
128
- type: "Test string",
129
- }
130
- ],
131
- sslSettings: {
132
- certificateId: "Test string",
133
- isManagedCertificate: true,
134
- },
135
- });
136
- /** Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource. */
137
- await gapi.client.appengine.apps.domainMappings.delete({
138
- appsId: "Test string",
139
- domainMappingsId: "Test string",
140
- });
141
- /** Gets the specified domain mapping. */
142
- await gapi.client.appengine.apps.domainMappings.get({
143
- appsId: "Test string",
144
- domainMappingsId: "Test string",
145
- });
146
- /** Lists the domain mappings on an application. */
147
- await gapi.client.appengine.apps.domainMappings.list({
148
- appsId: "Test string",
149
- pageSize: 42,
150
- pageToken: "Test string",
151
- });
152
- /**
153
- * Updates the specified domain mapping. To map an SSL certificate to a domain mapping, update certificate_id to point to an AuthorizedCertificate resource. A user must be authorized to
154
- * administer the associated domain in order to update a DomainMapping resource.
155
- */
156
- await gapi.client.appengine.apps.domainMappings.patch({
157
- appsId: "Test string",
158
- domainMappingsId: "Test string",
159
- noManagedCertificate: true,
160
- updateMask: "Test string",
161
- }, {
162
- id: "Test string",
163
- name: "Test string",
164
- resourceRecords: [
165
- {
166
- name: "Test string",
167
- rrdata: "Test string",
168
- type: "Test string",
169
- }
170
- ],
171
- sslSettings: {
172
- certificateId: "Test string",
173
- isManagedCertificate: true,
174
- },
175
- });
176
- /** Gets information about a location. */
177
- await gapi.client.appengine.apps.locations.get({
178
- appsId: "Test string",
179
- locationsId: "Test string",
180
- });
181
- /** Lists information about the supported locations for this service. */
182
- await gapi.client.appengine.apps.locations.list({
183
- appsId: "Test string",
184
- filter: "Test string",
185
- pageSize: 42,
186
- pageToken: "Test string",
187
- });
188
- /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
189
- await gapi.client.appengine.apps.operations.get({
190
- appsId: "Test string",
191
- operationsId: "Test string",
192
- });
193
- /** Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. */
194
- await gapi.client.appengine.apps.operations.list({
195
- appsId: "Test string",
196
- filter: "Test string",
197
- pageSize: 42,
198
- pageToken: "Test string",
199
- });
200
- /** Gets information about a location. */
201
- await gapi.client.appengine.projects.locations.get({
202
- locationsId: "Test string",
203
- projectsId: "Test string",
204
- });
205
- /** Lists information about the supported locations for this service. */
206
- await gapi.client.appengine.projects.locations.list({
207
- filter: "Test string",
208
- pageSize: 42,
209
- pageToken: "Test string",
210
- projectsId: "Test string",
211
- });
212
- /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
213
- await gapi.client.appengine.projects.locations.operations.get({
214
- locationsId: "Test string",
215
- operationsId: "Test string",
216
- projectsId: "Test string",
217
- });
218
- /** Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. */
219
- await gapi.client.appengine.projects.locations.operations.list({
220
- filter: "Test string",
221
- locationsId: "Test string",
222
- pageSize: 42,
223
- pageToken: "Test string",
224
- projectsId: "Test string",
225
- });
226
- }
227
- });
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
- }