ts2workflows 0.13.0 → 0.14.0
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/CHANGELOG.md +8 -0
- package/dist/ast/expressions.d.ts +2 -2
- package/dist/ast/expressions.d.ts.map +1 -1
- package/dist/ast/expressions.js +4 -1
- package/dist/transpiler/generated/functionMetadata.d.ts.map +1 -1
- package/dist/transpiler/generated/functionMetadata.js +267 -0
- package/dist/transpiler/parseexpressions.d.ts.map +1 -1
- package/dist/transpiler/parseexpressions.js +10 -1
- package/dist/transpiler/transformations.js +19 -7
- package/package.json +1 -1
- package/types/workflowslib.d.ts +356 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# ts2workflows changelog
|
|
2
2
|
|
|
3
|
+
## Version 0.14.0 - 2025-11-19
|
|
4
|
+
|
|
5
|
+
Fixes:
|
|
6
|
+
|
|
7
|
+
- Blocking calls and assignments were generated in a wrong order in complex expressions
|
|
8
|
+
- Don't output undefined arguments in call steps
|
|
9
|
+
- Type annotation fixes in workflowslib
|
|
10
|
+
|
|
3
11
|
## Version 0.13.0 - 2025-10-12
|
|
4
12
|
|
|
5
13
|
Fixes:
|
|
@@ -38,9 +38,9 @@ export declare function variableReferenceEx(variableName: VariableName): Variabl
|
|
|
38
38
|
export interface FunctionInvocationExpression {
|
|
39
39
|
readonly tag: 'functionInvocation';
|
|
40
40
|
readonly functionName: string;
|
|
41
|
-
readonly arguments: Expression[];
|
|
41
|
+
readonly arguments: (Expression | undefined)[];
|
|
42
42
|
}
|
|
43
|
-
export declare function functionInvocationEx(functionName: string, argumentExpressions: Expression[]): FunctionInvocationExpression;
|
|
43
|
+
export declare function functionInvocationEx(functionName: string, argumentExpressions: (Expression | undefined)[]): FunctionInvocationExpression;
|
|
44
44
|
export interface MemberExpression {
|
|
45
45
|
readonly tag: 'member';
|
|
46
46
|
readonly object: Expression;
|
|
@@ -1 +1 @@
|
|
|
1
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|
|
91
91
|
case 'functionInvocation':
|
|
92
|
-
return `${ex.functionName}(${ex.arguments
|
|
92
|
+
return `${ex.functionName}(${ex.arguments
|
|
93
|
+
.map((x) => x ?? nullEx)
|
|
94
|
+
.map(expressionToString)
|
|
95
|
+
.join(', ')})`;
|
|
93
96
|
case 'member':
|
|
94
97
|
if (ex.computed) {
|
|
95
98
|
return `${expressionToString(ex.object)}[${expressionToString(ex.property)}]`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functionMetadata.d.ts","sourceRoot":"","sources":["../../../src/transpiler/generated/functionMetadata.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"functionMetadata.d.ts","sourceRoot":"","sources":["../../../src/transpiler/generated/functionMetadata.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,uBA4kB5B,CAAA"}
|
|
@@ -320,5 +320,272 @@ export const blockingFunctions = new Map([
|
|
|
320
320
|
"pageSize",
|
|
321
321
|
"pageToken"
|
|
322
322
|
]
|
|
323
|
+
],
|
|
324
|
+
[
|
|
325
|
+
"googleapis.pubsub.v1.projects.schemas.create",
|
|
326
|
+
[
|
|
327
|
+
"parent",
|
|
328
|
+
"schemaId",
|
|
329
|
+
"body"
|
|
330
|
+
]
|
|
331
|
+
],
|
|
332
|
+
[
|
|
333
|
+
"googleapis.pubsub.v1.projects.schemas.delete",
|
|
334
|
+
[
|
|
335
|
+
"name"
|
|
336
|
+
]
|
|
337
|
+
],
|
|
338
|
+
[
|
|
339
|
+
"googleapis.pubsub.v1.projects.schemas.get",
|
|
340
|
+
[
|
|
341
|
+
"name",
|
|
342
|
+
"view"
|
|
343
|
+
]
|
|
344
|
+
],
|
|
345
|
+
[
|
|
346
|
+
"googleapis.pubsub.v1.projects.schemas.list",
|
|
347
|
+
[
|
|
348
|
+
"parent",
|
|
349
|
+
"pageSize",
|
|
350
|
+
"pageToken",
|
|
351
|
+
"view"
|
|
352
|
+
]
|
|
353
|
+
],
|
|
354
|
+
[
|
|
355
|
+
"googleapis.pubsub.v1.projects.schemas.validate",
|
|
356
|
+
[
|
|
357
|
+
"parent",
|
|
358
|
+
"body"
|
|
359
|
+
]
|
|
360
|
+
],
|
|
361
|
+
[
|
|
362
|
+
"googleapis.pubsub.v1.projects.schemas.validateMessage",
|
|
363
|
+
[
|
|
364
|
+
"parent",
|
|
365
|
+
"body"
|
|
366
|
+
]
|
|
367
|
+
],
|
|
368
|
+
[
|
|
369
|
+
"googleapis.pubsub.v1.projects.snapshots.create",
|
|
370
|
+
[
|
|
371
|
+
"name",
|
|
372
|
+
"object"
|
|
373
|
+
]
|
|
374
|
+
],
|
|
375
|
+
[
|
|
376
|
+
"googleapis.pubsub.v1.projects.snapshots.delete",
|
|
377
|
+
[
|
|
378
|
+
"snapshot"
|
|
379
|
+
]
|
|
380
|
+
],
|
|
381
|
+
[
|
|
382
|
+
"googleapis.pubsub.v1.projects.snapshots.getIamPolicy",
|
|
383
|
+
[
|
|
384
|
+
"resource",
|
|
385
|
+
"options"
|
|
386
|
+
]
|
|
387
|
+
],
|
|
388
|
+
[
|
|
389
|
+
"googleapis.pubsub.v1.projects.snapshots.list",
|
|
390
|
+
[
|
|
391
|
+
"project",
|
|
392
|
+
"pageSize",
|
|
393
|
+
"pageToken"
|
|
394
|
+
]
|
|
395
|
+
],
|
|
396
|
+
[
|
|
397
|
+
"googleapis.pubsub.v1.projects.snapshots.patch",
|
|
398
|
+
[
|
|
399
|
+
"name",
|
|
400
|
+
"body"
|
|
401
|
+
]
|
|
402
|
+
],
|
|
403
|
+
[
|
|
404
|
+
"googleapis.pubsub.v1.projects.snapshots.setIamPolicy",
|
|
405
|
+
[
|
|
406
|
+
"resource",
|
|
407
|
+
"body"
|
|
408
|
+
]
|
|
409
|
+
],
|
|
410
|
+
[
|
|
411
|
+
"googleapis.pubsub.v1.projects.snapshots.testIamPermissions",
|
|
412
|
+
[
|
|
413
|
+
"resource",
|
|
414
|
+
"body"
|
|
415
|
+
]
|
|
416
|
+
],
|
|
417
|
+
[
|
|
418
|
+
"googleapis.pubsub.v1.projects.subscriptions.acknowledge",
|
|
419
|
+
[
|
|
420
|
+
"subscription",
|
|
421
|
+
"body"
|
|
422
|
+
]
|
|
423
|
+
],
|
|
424
|
+
[
|
|
425
|
+
"googleapis.pubsub.v1.projects.subscriptions.create",
|
|
426
|
+
[
|
|
427
|
+
"name",
|
|
428
|
+
"body"
|
|
429
|
+
]
|
|
430
|
+
],
|
|
431
|
+
[
|
|
432
|
+
"googleapis.pubsub.v1.projects.subscriptions.delete",
|
|
433
|
+
[
|
|
434
|
+
"subscription"
|
|
435
|
+
]
|
|
436
|
+
],
|
|
437
|
+
[
|
|
438
|
+
"googleapis.pubsub.v1.projects.subscriptions.detach",
|
|
439
|
+
[
|
|
440
|
+
"subscription"
|
|
441
|
+
]
|
|
442
|
+
],
|
|
443
|
+
[
|
|
444
|
+
"googleapis.pubsub.v1.projects.subscriptions.get",
|
|
445
|
+
[
|
|
446
|
+
"subscription"
|
|
447
|
+
]
|
|
448
|
+
],
|
|
449
|
+
[
|
|
450
|
+
"googleapis.pubsub.v1.projects.subscriptions.getIamPolicy",
|
|
451
|
+
[
|
|
452
|
+
"resource",
|
|
453
|
+
"options"
|
|
454
|
+
]
|
|
455
|
+
],
|
|
456
|
+
[
|
|
457
|
+
"googleapis.pubsub.v1.projects.subscriptions.list",
|
|
458
|
+
[
|
|
459
|
+
"project",
|
|
460
|
+
"pageSize",
|
|
461
|
+
"pageToken"
|
|
462
|
+
]
|
|
463
|
+
],
|
|
464
|
+
[
|
|
465
|
+
"googleapis.pubsub.v1.projects.subscriptions.modifyAckDeadline",
|
|
466
|
+
[
|
|
467
|
+
"subscription",
|
|
468
|
+
"body"
|
|
469
|
+
]
|
|
470
|
+
],
|
|
471
|
+
[
|
|
472
|
+
"googleapis.pubsub.v1.projects.subscriptions.modifyPushConfig",
|
|
473
|
+
[
|
|
474
|
+
"subscription",
|
|
475
|
+
"body"
|
|
476
|
+
]
|
|
477
|
+
],
|
|
478
|
+
[
|
|
479
|
+
"googleapis.pubsub.v1.projects.subscriptions.patch",
|
|
480
|
+
[
|
|
481
|
+
"name",
|
|
482
|
+
"body"
|
|
483
|
+
]
|
|
484
|
+
],
|
|
485
|
+
[
|
|
486
|
+
"googleapis.pubsub.v1.projects.subscriptions.pull",
|
|
487
|
+
[
|
|
488
|
+
"subscription",
|
|
489
|
+
"body"
|
|
490
|
+
]
|
|
491
|
+
],
|
|
492
|
+
[
|
|
493
|
+
"googleapis.pubsub.v1.projects.subscriptions.seek",
|
|
494
|
+
[
|
|
495
|
+
"subscription",
|
|
496
|
+
"body"
|
|
497
|
+
]
|
|
498
|
+
],
|
|
499
|
+
[
|
|
500
|
+
"googleapis.pubsub.v1.projects.subscriptions.setIamPolicy",
|
|
501
|
+
[
|
|
502
|
+
"resource",
|
|
503
|
+
"body"
|
|
504
|
+
]
|
|
505
|
+
],
|
|
506
|
+
[
|
|
507
|
+
"googleapis.pubsub.v1.projects.subscriptions.testIamPermissions",
|
|
508
|
+
[
|
|
509
|
+
"resource",
|
|
510
|
+
"body"
|
|
511
|
+
]
|
|
512
|
+
],
|
|
513
|
+
[
|
|
514
|
+
"googleapis.pubsub.v1.projects.topics.create",
|
|
515
|
+
[
|
|
516
|
+
"name",
|
|
517
|
+
"body"
|
|
518
|
+
]
|
|
519
|
+
],
|
|
520
|
+
[
|
|
521
|
+
"googleapis.pubsub.v1.projects.topics.delete",
|
|
522
|
+
[
|
|
523
|
+
"topic"
|
|
524
|
+
]
|
|
525
|
+
],
|
|
526
|
+
[
|
|
527
|
+
"googleapis.pubsub.v1.projects.topics.get",
|
|
528
|
+
[
|
|
529
|
+
"topic"
|
|
530
|
+
]
|
|
531
|
+
],
|
|
532
|
+
[
|
|
533
|
+
"googleapis.pubsub.v1.projects.topics.getIamPolicy",
|
|
534
|
+
[
|
|
535
|
+
"resource",
|
|
536
|
+
"options"
|
|
537
|
+
]
|
|
538
|
+
],
|
|
539
|
+
[
|
|
540
|
+
"googleapis.pubsub.v1.projects.topics.list",
|
|
541
|
+
[
|
|
542
|
+
"project",
|
|
543
|
+
"pageSize",
|
|
544
|
+
"pageToken"
|
|
545
|
+
]
|
|
546
|
+
],
|
|
547
|
+
[
|
|
548
|
+
"googleapis.pubsub.v1.projects.topics.patch",
|
|
549
|
+
[
|
|
550
|
+
"name",
|
|
551
|
+
"body"
|
|
552
|
+
]
|
|
553
|
+
],
|
|
554
|
+
[
|
|
555
|
+
"googleapis.pubsub.v1.projects.topics.publish",
|
|
556
|
+
[
|
|
557
|
+
"topic",
|
|
558
|
+
"body"
|
|
559
|
+
]
|
|
560
|
+
],
|
|
561
|
+
[
|
|
562
|
+
"googleapis.pubsub.v1.projects.topics.setIamPolicy",
|
|
563
|
+
[
|
|
564
|
+
"resource",
|
|
565
|
+
"body"
|
|
566
|
+
]
|
|
567
|
+
],
|
|
568
|
+
[
|
|
569
|
+
"googleapis.pubsub.v1.projects.topics.testIamPermissions",
|
|
570
|
+
[
|
|
571
|
+
"resource",
|
|
572
|
+
"body"
|
|
573
|
+
]
|
|
574
|
+
],
|
|
575
|
+
[
|
|
576
|
+
"googleapis.pubsub.v1.projects.topics.snapshots.list",
|
|
577
|
+
[
|
|
578
|
+
"topic",
|
|
579
|
+
"pageSize",
|
|
580
|
+
"pageToken"
|
|
581
|
+
]
|
|
582
|
+
],
|
|
583
|
+
[
|
|
584
|
+
"googleapis.pubsub.v1.projects.topics.subscriptions.list",
|
|
585
|
+
[
|
|
586
|
+
"topic",
|
|
587
|
+
"pageSize",
|
|
588
|
+
"pageToken"
|
|
589
|
+
]
|
|
323
590
|
]
|
|
324
591
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseexpressions.d.ts","sourceRoot":"","sources":["../../src/transpiler/parseexpressions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAkB,MAAM,sCAAsC,CAAA;AAC/E,OAAO,EAGL,U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QAAQ,CAAC,iBAAiB,GACrD,QAAQ,CAAC,UAAU,CAMrB;AAED,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,QAAQ,CAAC,UAAU,GACxB,2BAA2B,GAAG,gBAAgB,CAWhD"}
|
|
@@ -286,13 +286,22 @@ function convertCallExpression(node) {
|
|
|
286
286
|
}
|
|
287
287
|
throw new WorkflowSyntaxError(msg, node.callee.loc);
|
|
288
288
|
}
|
|
289
|
-
const argumentExpressions = throwIfSpread(node.arguments).map(
|
|
289
|
+
const argumentExpressions = throwIfSpread(node.arguments).map(convertExpressionOrUndefined);
|
|
290
290
|
return functionInvocationEx(calleeName, argumentExpressions);
|
|
291
291
|
}
|
|
292
292
|
else {
|
|
293
293
|
throw new WorkflowSyntaxError('Callee should be a qualified name', node.loc);
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
|
+
function convertExpressionOrUndefined(instance) {
|
|
297
|
+
if (instance.type === TSESTree.AST_NODE_TYPES.Identifier &&
|
|
298
|
+
instance.name === 'undefined') {
|
|
299
|
+
return undefined;
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
return convertExpression(instance);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
296
305
|
export function isIntrinsic(calleeName) {
|
|
297
306
|
const intrinsics = ['parallel', 'retry_policy', 'call_step'];
|
|
298
307
|
return intrinsics.includes(calleeName);
|
|
@@ -8,7 +8,7 @@ import { blockingFunctions } from './generated/functionMetadata.js';
|
|
|
8
8
|
*/
|
|
9
9
|
export function transformAST(statements) {
|
|
10
10
|
const tempGen = createTempVariableGenerator();
|
|
11
|
-
const transform = R.pipe(R.chain(mapLiteralsAsAssigns(tempGen)),
|
|
11
|
+
const transform = R.pipe(R.chain(mapLiteralsAsAssigns(tempGen)), R.chain(intrinsicFunctionImplementation), R.chain(blockingCallsAsFunctionCalls(tempGen)), mergeAssigns);
|
|
12
12
|
return transform(statements.map((s) => applyNested(transformAST, s)));
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
@@ -206,7 +206,7 @@ function replaceBlockingCalls(generateName, expression) {
|
|
|
206
206
|
}
|
|
207
207
|
const blockingCallArgumentNames = blockingFunctions.get(ex.functionName);
|
|
208
208
|
if (blockingCallArgumentNames) {
|
|
209
|
-
const nameAndValue = R.zip(blockingCallArgumentNames, ex.arguments);
|
|
209
|
+
const nameAndValue = R.zip(blockingCallArgumentNames, ex.arguments).filter(isDefinedArgument);
|
|
210
210
|
const callArgs = R.fromPairs(nameAndValue);
|
|
211
211
|
const tempCallResultVariable = generateName();
|
|
212
212
|
callStatements.push(new FunctionInvocationStatement(ex.functionName, callArgs, tempCallResultVariable));
|
|
@@ -223,6 +223,9 @@ function replaceBlockingCalls(generateName, expression) {
|
|
|
223
223
|
transformExpression(replaceBlockingFunctionInvocations, expression),
|
|
224
224
|
];
|
|
225
225
|
}
|
|
226
|
+
function isDefinedArgument(x) {
|
|
227
|
+
return x[1] !== undefined;
|
|
228
|
+
}
|
|
226
229
|
/**
|
|
227
230
|
* Search for blocking calls in expressions and replace them with a call + variable.
|
|
228
231
|
*
|
|
@@ -258,6 +261,7 @@ function blockingCallsAsFunctionCalls(generateTempName) {
|
|
|
258
261
|
*/
|
|
259
262
|
function transformExpression(transform, ex) {
|
|
260
263
|
const nestedTr = (y) => transformExpression(transform, y);
|
|
264
|
+
const nestedTr2 = R.ifElse((R.isNil), () => undefined, nestedTr);
|
|
261
265
|
switch (ex.tag) {
|
|
262
266
|
case 'string':
|
|
263
267
|
case 'number':
|
|
@@ -272,7 +276,7 @@ function transformExpression(transform, ex) {
|
|
|
272
276
|
case 'binary':
|
|
273
277
|
return transform(binaryEx(nestedTr(ex.left), ex.binaryOperator, nestedTr(ex.right)));
|
|
274
278
|
case 'functionInvocation':
|
|
275
|
-
return transform(functionInvocationEx(ex.functionName, ex.arguments.map(
|
|
279
|
+
return transform(functionInvocationEx(ex.functionName, ex.arguments.map(nestedTr2)));
|
|
276
280
|
case 'member':
|
|
277
281
|
return transform(memberEx(nestedTr(ex.object), nestedTr(ex.property), ex.computed));
|
|
278
282
|
case 'unary':
|
|
@@ -375,11 +379,19 @@ function extractMapsInMap(map, generateName, nestingLevel) {
|
|
|
375
379
|
}
|
|
376
380
|
function extractNestedMapFunctionInvocation(ex, generateName, nestingLevel) {
|
|
377
381
|
const { expressions, temps } = ex.arguments.reduce((acc, arg) => {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
382
|
+
if (arg === undefined) {
|
|
383
|
+
acc.expressions.push(undefined);
|
|
384
|
+
}
|
|
385
|
+
else {
|
|
386
|
+
const { transformedExpression, tempVariables } = extractNestedMaps(arg, generateName, nestingLevel + 1);
|
|
387
|
+
acc.expressions.push(transformedExpression);
|
|
388
|
+
acc.temps.push(...tempVariables);
|
|
389
|
+
}
|
|
381
390
|
return acc;
|
|
382
|
-
}, {
|
|
391
|
+
}, {
|
|
392
|
+
expressions: [],
|
|
393
|
+
temps: [],
|
|
394
|
+
});
|
|
383
395
|
return {
|
|
384
396
|
transformedExpression: functionInvocationEx(ex.functionName, expressions),
|
|
385
397
|
tempVariables: temps,
|
package/package.json
CHANGED
package/types/workflowslib.d.ts
CHANGED
|
@@ -37,18 +37,28 @@ type HTTPQuery = Record<
|
|
|
37
37
|
export declare function double(x: string | number): number
|
|
38
38
|
export declare function int(x: string | number): number
|
|
39
39
|
export declare function string(x: string | number | boolean): string
|
|
40
|
-
export declare function keys(map:
|
|
40
|
+
export declare function keys<T extends object>(map: T): (keyof T)[]
|
|
41
41
|
export declare function len(
|
|
42
42
|
value: unknown[] | Record<string, unknown> | string,
|
|
43
43
|
): number
|
|
44
|
-
export declare function get_type(
|
|
44
|
+
export declare function get_type(
|
|
45
|
+
value: unknown,
|
|
46
|
+
):
|
|
47
|
+
| 'boolean'
|
|
48
|
+
| 'bytes'
|
|
49
|
+
| 'double'
|
|
50
|
+
| 'integer'
|
|
51
|
+
| 'list'
|
|
52
|
+
| 'map'
|
|
53
|
+
| 'string'
|
|
54
|
+
| 'null'
|
|
45
55
|
|
|
46
56
|
// GCP Workflows standard library functions
|
|
47
57
|
// https://cloud.google.com/workflows/docs/reference/stdlib/overview
|
|
48
58
|
|
|
49
59
|
export declare namespace base64 {
|
|
50
|
-
function decode(data:
|
|
51
|
-
function encode(data:
|
|
60
|
+
function decode(data: string, padding?: boolean): bytes
|
|
61
|
+
function encode(data: bytes, padding?: boolean): string
|
|
52
62
|
}
|
|
53
63
|
|
|
54
64
|
export declare namespace events {
|
|
@@ -68,7 +78,7 @@ export declare namespace events {
|
|
|
68
78
|
received_time: string
|
|
69
79
|
type: string
|
|
70
80
|
}
|
|
71
|
-
function create_callback_endpoint(http_callback_method
|
|
81
|
+
function create_callback_endpoint(http_callback_method?: string): {
|
|
72
82
|
url: string
|
|
73
83
|
}
|
|
74
84
|
}
|
|
@@ -309,9 +319,9 @@ export declare namespace uuid {
|
|
|
309
319
|
|
|
310
320
|
// Connectors
|
|
311
321
|
|
|
312
|
-
// Cloud Firestore API Connector
|
|
313
|
-
// https://cloud.google.com/workflows/docs/reference/googleapis/firestore/Overview
|
|
314
322
|
export declare namespace googleapis {
|
|
323
|
+
// Cloud Firestore API Connector
|
|
324
|
+
// https://cloud.google.com/workflows/docs/reference/googleapis/firestore/Overview
|
|
315
325
|
namespace firestore {
|
|
316
326
|
namespace v1 {
|
|
317
327
|
interface ArrayValue {
|
|
@@ -528,9 +538,9 @@ export declare namespace googleapis {
|
|
|
528
538
|
transaction?: string
|
|
529
539
|
}
|
|
530
540
|
interface RunQueryResponse {
|
|
531
|
-
document
|
|
541
|
+
document?: Document
|
|
532
542
|
readTime: string
|
|
533
|
-
skippedResults
|
|
543
|
+
skippedResults?: number
|
|
534
544
|
transaction?: string
|
|
535
545
|
}
|
|
536
546
|
interface Status {
|
|
@@ -679,8 +689,8 @@ export declare namespace googleapis {
|
|
|
679
689
|
): PartitionQueryResponse
|
|
680
690
|
export function patch(
|
|
681
691
|
name: string,
|
|
682
|
-
currentDocument: Precondition,
|
|
683
|
-
mask: DocumentMask,
|
|
692
|
+
currentDocument: Precondition | undefined,
|
|
693
|
+
mask: DocumentMask | undefined,
|
|
684
694
|
updateMask: DocumentMask,
|
|
685
695
|
body: Pick<Document, 'fields' | 'name'>,
|
|
686
696
|
): Document
|
|
@@ -691,7 +701,7 @@ export declare namespace googleapis {
|
|
|
691
701
|
export function runQuery(
|
|
692
702
|
parent: string,
|
|
693
703
|
body: RunQueryRequest,
|
|
694
|
-
): RunQueryResponse
|
|
704
|
+
): RunQueryResponse[]
|
|
695
705
|
export { _delete as delete }
|
|
696
706
|
}
|
|
697
707
|
namespace operations {
|
|
@@ -719,6 +729,340 @@ export declare namespace googleapis {
|
|
|
719
729
|
}
|
|
720
730
|
}
|
|
721
731
|
}
|
|
732
|
+
|
|
733
|
+
// Cloud Pub/Sub API Connector
|
|
734
|
+
// https://docs.cloud.google.com/workflows/docs/reference/googleapis/pubsub/Overview
|
|
735
|
+
namespace pubsub {
|
|
736
|
+
namespace v1 {
|
|
737
|
+
interface AcknowledgeRequest {
|
|
738
|
+
ackIds: string[]
|
|
739
|
+
}
|
|
740
|
+
interface Binding {
|
|
741
|
+
condition: Expr
|
|
742
|
+
members: string[]
|
|
743
|
+
role: string
|
|
744
|
+
}
|
|
745
|
+
interface CreateSnapshotRequest {
|
|
746
|
+
label?: Record<string, string>
|
|
747
|
+
subscription: string
|
|
748
|
+
}
|
|
749
|
+
interface DeadLetterPolicy {
|
|
750
|
+
deadLetterTopic: string
|
|
751
|
+
maxDeliveryAttempts?: number
|
|
752
|
+
}
|
|
753
|
+
interface Expr {
|
|
754
|
+
description?: string
|
|
755
|
+
expression: string
|
|
756
|
+
location?: string
|
|
757
|
+
title?: string
|
|
758
|
+
}
|
|
759
|
+
interface ExpirationPolicy {
|
|
760
|
+
ttl: string
|
|
761
|
+
}
|
|
762
|
+
interface ListSchemasResponse {
|
|
763
|
+
nextPageToken?: string
|
|
764
|
+
schemas: Schema[]
|
|
765
|
+
}
|
|
766
|
+
interface ListSnapshotsResponse {
|
|
767
|
+
nextPagetoken?: string
|
|
768
|
+
snapshots?: Snapshot[]
|
|
769
|
+
}
|
|
770
|
+
interface ListSubscriptionsResponse {
|
|
771
|
+
nextPageToken?: string
|
|
772
|
+
subscriptions?: Subscription[]
|
|
773
|
+
}
|
|
774
|
+
interface ListTopicsResponse {
|
|
775
|
+
nextPageToken?: string
|
|
776
|
+
topics?: Topic[]
|
|
777
|
+
}
|
|
778
|
+
interface ListTopicSubscriptionsResponse {
|
|
779
|
+
nextPageToken?: string
|
|
780
|
+
subscriptions?: string[]
|
|
781
|
+
}
|
|
782
|
+
interface ListTopicSnapshotsResponse {
|
|
783
|
+
nextPageToken?: string
|
|
784
|
+
snapshots?: string[]
|
|
785
|
+
}
|
|
786
|
+
interface MessageStoragePolicy {
|
|
787
|
+
allowedPersistenceRegions?: string[]
|
|
788
|
+
}
|
|
789
|
+
interface ModifyAckDeadlineRequest {
|
|
790
|
+
ackDeadlineSeconds: number
|
|
791
|
+
ackIds: string[]
|
|
792
|
+
}
|
|
793
|
+
interface ModifyPushConfigRequest {
|
|
794
|
+
pushConfig: PushConfig
|
|
795
|
+
}
|
|
796
|
+
interface OidcToken {
|
|
797
|
+
audience: string
|
|
798
|
+
serviceAccountEmail: string
|
|
799
|
+
}
|
|
800
|
+
interface Policy {
|
|
801
|
+
bindings: Binding[]
|
|
802
|
+
etag: string
|
|
803
|
+
version: number
|
|
804
|
+
}
|
|
805
|
+
interface PublishRequest {
|
|
806
|
+
messages: PubsubMessage[]
|
|
807
|
+
}
|
|
808
|
+
interface PublishResponse {
|
|
809
|
+
messageIds?: string[]
|
|
810
|
+
}
|
|
811
|
+
interface PubsubMessage {
|
|
812
|
+
attributes?: Record<string, string>
|
|
813
|
+
data?: string
|
|
814
|
+
messageId?: string
|
|
815
|
+
orderingKey?: string
|
|
816
|
+
publishTime?: string
|
|
817
|
+
}
|
|
818
|
+
interface PullRequest {
|
|
819
|
+
maxMessages: number
|
|
820
|
+
returnImmediately?: boolean
|
|
821
|
+
}
|
|
822
|
+
interface PullResponse {
|
|
823
|
+
receivedMessages: ReceivedMessage[]
|
|
824
|
+
}
|
|
825
|
+
interface PushConfig {
|
|
826
|
+
attributes: Record<string, string>
|
|
827
|
+
oidcToken: OidcToken
|
|
828
|
+
pushEndpoint: string
|
|
829
|
+
}
|
|
830
|
+
interface ReceivedMessage {
|
|
831
|
+
ackId: string
|
|
832
|
+
deliveryAttempt: number
|
|
833
|
+
message: PubsubMessage
|
|
834
|
+
}
|
|
835
|
+
interface RetryPolicy {
|
|
836
|
+
maximumBackoff?: string
|
|
837
|
+
minimumBackoff?: string
|
|
838
|
+
}
|
|
839
|
+
interface Schema {
|
|
840
|
+
definition: string
|
|
841
|
+
name: string
|
|
842
|
+
type: 'TYPE_UNSPECIFIED' | 'PROTOCOL_BUFFER' | 'AVRO'
|
|
843
|
+
}
|
|
844
|
+
interface SchemaSettings {
|
|
845
|
+
encoding?: 'ENCODING_UNSPECIFIED' | 'JSON' | 'BINARY'
|
|
846
|
+
schema: string
|
|
847
|
+
}
|
|
848
|
+
interface SeekRequest {
|
|
849
|
+
snapshot?: string
|
|
850
|
+
time?: string
|
|
851
|
+
}
|
|
852
|
+
interface SetIamPolicyRequest {
|
|
853
|
+
policy: Policy
|
|
854
|
+
}
|
|
855
|
+
interface Snapshot {
|
|
856
|
+
expireTime?: string
|
|
857
|
+
labels?: Record<string, string>
|
|
858
|
+
name?: string
|
|
859
|
+
topic?: string
|
|
860
|
+
}
|
|
861
|
+
interface Subscription {
|
|
862
|
+
ackDeadlineSeconds?: number
|
|
863
|
+
deadLetterPolicy?: DeadLetterPolicy
|
|
864
|
+
detached?: boolean
|
|
865
|
+
enableMessageOrdering?: boolean
|
|
866
|
+
expirationPolicy?: ExpirationPolicy
|
|
867
|
+
filter?: string
|
|
868
|
+
labels?: Record<string, string>
|
|
869
|
+
messageRetentionDuration?: string
|
|
870
|
+
name: string
|
|
871
|
+
pushConfig?: PushConfig
|
|
872
|
+
retainAckedMessages?: boolean
|
|
873
|
+
retryPolicy?: RetryPolicy
|
|
874
|
+
topic: string
|
|
875
|
+
topicMessageRetentionDuration?: string
|
|
876
|
+
}
|
|
877
|
+
interface TestIamPermissionsRequest {
|
|
878
|
+
permissions: string[]
|
|
879
|
+
}
|
|
880
|
+
interface TestIamPermissionsResponse {
|
|
881
|
+
permissions: string[]
|
|
882
|
+
}
|
|
883
|
+
interface Topic {
|
|
884
|
+
kmsKeyName?: string
|
|
885
|
+
labels?: Map<string, string>
|
|
886
|
+
messageRetentionDuration?: string
|
|
887
|
+
messageStoragePolicy?: MessageStoragePolicy
|
|
888
|
+
name: string
|
|
889
|
+
satisfiesPzs?: boolean
|
|
890
|
+
schemaSettings?: SchemaSettings
|
|
891
|
+
}
|
|
892
|
+
interface UpdateSnapshotRequest {
|
|
893
|
+
snapshot: Snapshot
|
|
894
|
+
updateMask: string
|
|
895
|
+
}
|
|
896
|
+
interface UpdateSubscriptionRequest {
|
|
897
|
+
subscription: Subscription
|
|
898
|
+
updateMask: string
|
|
899
|
+
}
|
|
900
|
+
interface UpdateTopicRequest {
|
|
901
|
+
topic: Topic
|
|
902
|
+
updateMask: string
|
|
903
|
+
}
|
|
904
|
+
interface ValidateMessageRequest {
|
|
905
|
+
encoding: 'ENCODING_UNSPECIFIED' | 'JSON' | 'BINARY'
|
|
906
|
+
message: string
|
|
907
|
+
name?: string
|
|
908
|
+
schema?: Schema
|
|
909
|
+
}
|
|
910
|
+
interface ValidateSchemaRequest {
|
|
911
|
+
object: Schema
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
namespace projects {
|
|
915
|
+
namespace schemas {
|
|
916
|
+
export function create(
|
|
917
|
+
parent: string,
|
|
918
|
+
schemaId: string,
|
|
919
|
+
body: Schema,
|
|
920
|
+
): Schema
|
|
921
|
+
function _delete(name: string): void
|
|
922
|
+
export { _delete as delete }
|
|
923
|
+
export function get(
|
|
924
|
+
name: string,
|
|
925
|
+
view?: 'SCHEMA_VIEW_UNSPECIFIED' | 'BASIC' | 'FULL',
|
|
926
|
+
): Schema
|
|
927
|
+
export function list(
|
|
928
|
+
parent: string,
|
|
929
|
+
pageSize?: number,
|
|
930
|
+
pageToken?: string,
|
|
931
|
+
view?: 'SCHEMA_VIEW_UNSPECIFIED' | 'BASIC' | 'FULL',
|
|
932
|
+
): ListSchemasResponse
|
|
933
|
+
export function validate(
|
|
934
|
+
parent: string,
|
|
935
|
+
body: ValidateSchemaRequest,
|
|
936
|
+
): void
|
|
937
|
+
export function validateMessage(
|
|
938
|
+
parent: string,
|
|
939
|
+
body: ValidateMessageRequest,
|
|
940
|
+
): void
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
namespace snapshots {
|
|
944
|
+
export function create(
|
|
945
|
+
name: string,
|
|
946
|
+
object: CreateSnapshotRequest,
|
|
947
|
+
): Snapshot
|
|
948
|
+
function _delete(snapshot: string): void
|
|
949
|
+
export { _delete as delete }
|
|
950
|
+
export function getIamPolicy(
|
|
951
|
+
resource: string,
|
|
952
|
+
options: { requestedPolicyVersion: number },
|
|
953
|
+
): Policy
|
|
954
|
+
export function list(
|
|
955
|
+
project: string,
|
|
956
|
+
pageSize?: number,
|
|
957
|
+
pageToken?: string,
|
|
958
|
+
): ListSnapshotsResponse
|
|
959
|
+
export function patch(
|
|
960
|
+
name: string,
|
|
961
|
+
body: UpdateSnapshotRequest,
|
|
962
|
+
): Snapshot
|
|
963
|
+
export function setIamPolicy(
|
|
964
|
+
resource: string,
|
|
965
|
+
body: SetIamPolicyRequest,
|
|
966
|
+
): Policy
|
|
967
|
+
export function testIamPermissions(
|
|
968
|
+
resource: string,
|
|
969
|
+
body: TestIamPermissionsRequest,
|
|
970
|
+
): TestIamPermissionsResponse
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
namespace subscriptions {
|
|
974
|
+
export function acknowledge(
|
|
975
|
+
subscription: string,
|
|
976
|
+
body: AcknowledgeRequest,
|
|
977
|
+
): void
|
|
978
|
+
export function create(name: string, body: Subscription): Subscription
|
|
979
|
+
function _delete(subscription: string): void
|
|
980
|
+
export { _delete as delete }
|
|
981
|
+
export function detach(subscription: string): void
|
|
982
|
+
export function get(subscription: string): Subscription
|
|
983
|
+
export function getIamPolicy(
|
|
984
|
+
resource: string,
|
|
985
|
+
options: { requestedPolicyVersion: number },
|
|
986
|
+
): Policy
|
|
987
|
+
export function list(
|
|
988
|
+
project: string,
|
|
989
|
+
pageSize?: number,
|
|
990
|
+
pageToken?: string,
|
|
991
|
+
): ListSubscriptionsResponse
|
|
992
|
+
export function modifyAckDeadline(
|
|
993
|
+
subscription: string,
|
|
994
|
+
body: ModifyAckDeadlineRequest,
|
|
995
|
+
): void
|
|
996
|
+
export function modifyPushConfig(
|
|
997
|
+
subscription: string,
|
|
998
|
+
body: ModifyPushConfigRequest,
|
|
999
|
+
): void
|
|
1000
|
+
export function patch(
|
|
1001
|
+
name: string,
|
|
1002
|
+
body: UpdateSubscriptionRequest,
|
|
1003
|
+
): Subscription
|
|
1004
|
+
export function pull(
|
|
1005
|
+
subscription: string,
|
|
1006
|
+
body: PullRequest,
|
|
1007
|
+
): PullResponse
|
|
1008
|
+
export function seek(subscription: string, body: SeekRequest): void
|
|
1009
|
+
export function setIamPolicy(
|
|
1010
|
+
resource: string,
|
|
1011
|
+
body: SetIamPolicyRequest,
|
|
1012
|
+
): Policy
|
|
1013
|
+
export function testIamPermissions(
|
|
1014
|
+
resource: string,
|
|
1015
|
+
body: TestIamPermissionsRequest,
|
|
1016
|
+
): TestIamPermissionsResponse
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
namespace topics {
|
|
1020
|
+
export function create(name: string, body: Topic): Topic
|
|
1021
|
+
function _delete(topic: string): void
|
|
1022
|
+
export { _delete as delete }
|
|
1023
|
+
export function get(topic: string): Topic
|
|
1024
|
+
export function getIamPolicy(
|
|
1025
|
+
resource: string,
|
|
1026
|
+
options: { requestedPolicyVersion: number },
|
|
1027
|
+
): Policy
|
|
1028
|
+
export function list(
|
|
1029
|
+
project: string,
|
|
1030
|
+
pageSize?: number,
|
|
1031
|
+
pageToken?: string,
|
|
1032
|
+
): ListTopicsResponse
|
|
1033
|
+
export function patch(name: string, body: UpdateTopicRequest): Topic
|
|
1034
|
+
export function publish(
|
|
1035
|
+
topic: string,
|
|
1036
|
+
body: PublishRequest,
|
|
1037
|
+
): PublishResponse
|
|
1038
|
+
export function setIamPolicy(
|
|
1039
|
+
resource: string,
|
|
1040
|
+
body: SetIamPolicyRequest,
|
|
1041
|
+
): Policy
|
|
1042
|
+
export function testIamPermissions(
|
|
1043
|
+
resource: string,
|
|
1044
|
+
body: TestIamPermissionsRequest,
|
|
1045
|
+
): TestIamPermissionsResponse
|
|
1046
|
+
|
|
1047
|
+
namespace snapshots {
|
|
1048
|
+
export function list(
|
|
1049
|
+
topic: string,
|
|
1050
|
+
pageSize?: number,
|
|
1051
|
+
pageToken?: string,
|
|
1052
|
+
): ListTopicSnapshotsResponse
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
namespace subscriptions {
|
|
1056
|
+
export function list(
|
|
1057
|
+
topic: string,
|
|
1058
|
+
pageSize?: number,
|
|
1059
|
+
pageToken?: string,
|
|
1060
|
+
): ListTopicSubscriptionsResponse
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
722
1066
|
}
|
|
723
1067
|
|
|
724
1068
|
// Functionality that is not implemented by Typescript keywords
|