@maxim_mazurok/gapi.client.cloudfunctions-v2alpha 0.0.20231102 → 0.0.20231130

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.cloudfunctions-v2alpha",
3
- "version": "0.0.20231102",
3
+ "version": "0.0.20231130",
4
4
  "description": "TypeScript typings for Cloud Functions API v2alpha",
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://cloudfunctions.googleapis.com/$discovery/rest?version=v2alpha', () => {
29
- // now we can use:
30
- // gapi.client.cloudfunctions
31
- });
28
+ gapi.client.load(
29
+ 'https://cloudfunctions.googleapis.com/$discovery/rest?version=v2alpha',
30
+ () => {
31
+ // now we can use:
32
+ // gapi.client.cloudfunctions
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 Cloud Functions API resources: <!-- TODO: make this work for multiple namespaces -->
66
70
 
67
71
  ```typescript
72
+
68
73
  ```
package/tests.ts DELETED
@@ -1,396 +0,0 @@
1
- /* This is stub file for gapi.client.cloudfunctions-v2alpha 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: 20231102
7
-
8
- gapi.load('client', async () => {
9
- /** now we can use gapi.client */
10
-
11
- await gapi.client.load('https://cloudfunctions.googleapis.com/$discovery/rest?version=v2alpha');
12
- /** now we can use gapi.client.cloudfunctions */
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
- /** Lists information about the supported locations for this service. */
33
- await gapi.client.cloudfunctions.projects.locations.list({
34
- filter: "Test string",
35
- name: "Test string",
36
- pageSize: 42,
37
- pageToken: "Test string",
38
- });
39
- /** Creates a new function. If a function with the given name already exists in the specified project, the long running operation will return `ALREADY_EXISTS` error. */
40
- await gapi.client.cloudfunctions.projects.locations.functions.create({
41
- functionId: "Test string",
42
- parent: "Test string",
43
- }, {
44
- buildConfig: {
45
- build: "Test string",
46
- dockerRegistry: "Test string",
47
- dockerRepository: "Test string",
48
- entryPoint: "Test string",
49
- environmentVariables: {
50
- A: "Test string"
51
- },
52
- runtime: "Test string",
53
- source: {
54
- gitUri: "Test string",
55
- repoSource: {
56
- branchName: "Test string",
57
- commitSha: "Test string",
58
- dir: "Test string",
59
- projectId: "Test string",
60
- repoName: "Test string",
61
- tagName: "Test string",
62
- },
63
- storageSource: {
64
- bucket: "Test string",
65
- generation: "Test string",
66
- object: "Test string",
67
- },
68
- },
69
- sourceProvenance: {
70
- gitUri: "Test string",
71
- resolvedRepoSource: {
72
- branchName: "Test string",
73
- commitSha: "Test string",
74
- dir: "Test string",
75
- projectId: "Test string",
76
- repoName: "Test string",
77
- tagName: "Test string",
78
- },
79
- resolvedStorageSource: {
80
- bucket: "Test string",
81
- generation: "Test string",
82
- object: "Test string",
83
- },
84
- },
85
- sourceToken: "Test string",
86
- workerPool: "Test string",
87
- },
88
- description: "Test string",
89
- environment: "Test string",
90
- eventTrigger: {
91
- channel: "Test string",
92
- eventFilters: [
93
- {
94
- attribute: "Test string",
95
- operator: "Test string",
96
- value: "Test string",
97
- }
98
- ],
99
- eventType: "Test string",
100
- pubsubTopic: "Test string",
101
- retryPolicy: "Test string",
102
- serviceAccountEmail: "Test string",
103
- trigger: "Test string",
104
- triggerRegion: "Test string",
105
- },
106
- kmsKeyName: "Test string",
107
- labels: {
108
- A: "Test string"
109
- },
110
- name: "Test string",
111
- satisfiesPzs: true,
112
- serviceConfig: {
113
- allTrafficOnLatestRevision: true,
114
- availableCpu: "Test string",
115
- availableMemory: "Test string",
116
- environmentVariables: {
117
- A: "Test string"
118
- },
119
- ingressSettings: "Test string",
120
- maxInstanceCount: 42,
121
- maxInstanceRequestConcurrency: 42,
122
- minInstanceCount: 42,
123
- revision: "Test string",
124
- secretEnvironmentVariables: [
125
- {
126
- key: "Test string",
127
- projectId: "Test string",
128
- secret: "Test string",
129
- version: "Test string",
130
- }
131
- ],
132
- secretVolumes: [
133
- {
134
- mountPath: "Test string",
135
- projectId: "Test string",
136
- secret: "Test string",
137
- versions: [
138
- {
139
- path: "Test string",
140
- version: "Test string",
141
- }
142
- ],
143
- }
144
- ],
145
- securityLevel: "Test string",
146
- service: "Test string",
147
- serviceAccountEmail: "Test string",
148
- timeoutSeconds: 42,
149
- uri: "Test string",
150
- vpcConnector: "Test string",
151
- vpcConnectorEgressSettings: "Test string",
152
- },
153
- state: "Test string",
154
- stateMessages: [
155
- {
156
- message: "Test string",
157
- severity: "Test string",
158
- type: "Test string",
159
- }
160
- ],
161
- updateTime: "Test string",
162
- url: "Test string",
163
- });
164
- /** Deletes a function with the given name from the specified project. If the given function is used by some trigger, the trigger will be updated to remove this function. */
165
- await gapi.client.cloudfunctions.projects.locations.functions.delete({
166
- name: "Test string",
167
- });
168
- /**
169
- * Returns a signed URL for downloading deployed function source code. The URL is only valid for a limited period and should be used within 30 minutes of generation. For more information
170
- * about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls
171
- */
172
- await gapi.client.cloudfunctions.projects.locations.functions.generateDownloadUrl({
173
- name: "Test string",
174
- }, {
175
- });
176
- /**
177
- * Returns a signed URL for uploading a function source code. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls. Once
178
- * the function source code upload is complete, the used signed URL should be provided in CreateFunction or UpdateFunction request as a reference to the function source code. When
179
- * uploading source code to the generated signed URL, please follow these restrictions: * Source file type should be a zip file. * No credentials should be attached - the signed URLs
180
- * provide access to the target bucket using internal service identity; if credentials were attached, the identity from the credentials would be used, but that identity does not have
181
- * permissions to upload files to the URL. When making a HTTP PUT request, specify this header: * `content-type: application/zip` Do not specify this header: * `Authorization: Bearer
182
- * YOUR_TOKEN`
183
- */
184
- await gapi.client.cloudfunctions.projects.locations.functions.generateUploadUrl({
185
- parent: "Test string",
186
- }, {
187
- kmsKeyName: "Test string",
188
- });
189
- /** Returns a function with the given name from the requested project. */
190
- await gapi.client.cloudfunctions.projects.locations.functions.get({
191
- name: "Test string",
192
- });
193
- /** Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. */
194
- await gapi.client.cloudfunctions.projects.locations.functions.getIamPolicy({
195
- "options.requestedPolicyVersion": 42,
196
- resource: "Test string",
197
- });
198
- /** Returns a list of functions that belong to the requested project. */
199
- await gapi.client.cloudfunctions.projects.locations.functions.list({
200
- filter: "Test string",
201
- orderBy: "Test string",
202
- pageSize: 42,
203
- pageToken: "Test string",
204
- parent: "Test string",
205
- });
206
- /** Updates existing function. */
207
- await gapi.client.cloudfunctions.projects.locations.functions.patch({
208
- name: "Test string",
209
- updateMask: "Test string",
210
- }, {
211
- buildConfig: {
212
- build: "Test string",
213
- dockerRegistry: "Test string",
214
- dockerRepository: "Test string",
215
- entryPoint: "Test string",
216
- environmentVariables: {
217
- A: "Test string"
218
- },
219
- runtime: "Test string",
220
- source: {
221
- gitUri: "Test string",
222
- repoSource: {
223
- branchName: "Test string",
224
- commitSha: "Test string",
225
- dir: "Test string",
226
- projectId: "Test string",
227
- repoName: "Test string",
228
- tagName: "Test string",
229
- },
230
- storageSource: {
231
- bucket: "Test string",
232
- generation: "Test string",
233
- object: "Test string",
234
- },
235
- },
236
- sourceProvenance: {
237
- gitUri: "Test string",
238
- resolvedRepoSource: {
239
- branchName: "Test string",
240
- commitSha: "Test string",
241
- dir: "Test string",
242
- projectId: "Test string",
243
- repoName: "Test string",
244
- tagName: "Test string",
245
- },
246
- resolvedStorageSource: {
247
- bucket: "Test string",
248
- generation: "Test string",
249
- object: "Test string",
250
- },
251
- },
252
- sourceToken: "Test string",
253
- workerPool: "Test string",
254
- },
255
- description: "Test string",
256
- environment: "Test string",
257
- eventTrigger: {
258
- channel: "Test string",
259
- eventFilters: [
260
- {
261
- attribute: "Test string",
262
- operator: "Test string",
263
- value: "Test string",
264
- }
265
- ],
266
- eventType: "Test string",
267
- pubsubTopic: "Test string",
268
- retryPolicy: "Test string",
269
- serviceAccountEmail: "Test string",
270
- trigger: "Test string",
271
- triggerRegion: "Test string",
272
- },
273
- kmsKeyName: "Test string",
274
- labels: {
275
- A: "Test string"
276
- },
277
- name: "Test string",
278
- satisfiesPzs: true,
279
- serviceConfig: {
280
- allTrafficOnLatestRevision: true,
281
- availableCpu: "Test string",
282
- availableMemory: "Test string",
283
- environmentVariables: {
284
- A: "Test string"
285
- },
286
- ingressSettings: "Test string",
287
- maxInstanceCount: 42,
288
- maxInstanceRequestConcurrency: 42,
289
- minInstanceCount: 42,
290
- revision: "Test string",
291
- secretEnvironmentVariables: [
292
- {
293
- key: "Test string",
294
- projectId: "Test string",
295
- secret: "Test string",
296
- version: "Test string",
297
- }
298
- ],
299
- secretVolumes: [
300
- {
301
- mountPath: "Test string",
302
- projectId: "Test string",
303
- secret: "Test string",
304
- versions: [
305
- {
306
- path: "Test string",
307
- version: "Test string",
308
- }
309
- ],
310
- }
311
- ],
312
- securityLevel: "Test string",
313
- service: "Test string",
314
- serviceAccountEmail: "Test string",
315
- timeoutSeconds: 42,
316
- uri: "Test string",
317
- vpcConnector: "Test string",
318
- vpcConnectorEgressSettings: "Test string",
319
- },
320
- state: "Test string",
321
- stateMessages: [
322
- {
323
- message: "Test string",
324
- severity: "Test string",
325
- type: "Test string",
326
- }
327
- ],
328
- updateTime: "Test string",
329
- url: "Test string",
330
- });
331
- /** Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. */
332
- await gapi.client.cloudfunctions.projects.locations.functions.setIamPolicy({
333
- resource: "Test string",
334
- }, {
335
- policy: {
336
- auditConfigs: [
337
- {
338
- auditLogConfigs: [
339
- {
340
- exemptedMembers: [
341
- "Test string"
342
- ],
343
- logType: "Test string",
344
- }
345
- ],
346
- service: "Test string",
347
- }
348
- ],
349
- bindings: [
350
- {
351
- condition: {
352
- description: "Test string",
353
- expression: "Test string",
354
- location: "Test string",
355
- title: "Test string",
356
- },
357
- members: [
358
- "Test string"
359
- ],
360
- role: "Test string",
361
- }
362
- ],
363
- etag: "Test string",
364
- version: 42,
365
- },
366
- updateMask: "Test string",
367
- });
368
- /**
369
- * Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This
370
- * operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
371
- */
372
- await gapi.client.cloudfunctions.projects.locations.functions.testIamPermissions({
373
- resource: "Test string",
374
- }, {
375
- permissions: [
376
- "Test string"
377
- ],
378
- });
379
- /** 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. */
380
- await gapi.client.cloudfunctions.projects.locations.operations.get({
381
- name: "Test string",
382
- });
383
- /** Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. */
384
- await gapi.client.cloudfunctions.projects.locations.operations.list({
385
- filter: "Test string",
386
- name: "Test string",
387
- pageSize: 42,
388
- pageToken: "Test string",
389
- });
390
- /** Returns a list of runtimes that are supported for the requested project. */
391
- await gapi.client.cloudfunctions.projects.locations.runtimes.list({
392
- filter: "Test string",
393
- parent: "Test string",
394
- });
395
- }
396
- });
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
- }