@schemastore/workflows 0.0.5

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 (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +12 -0
  3. package/index.d.ts +1410 -0
  4. package/package.json +14 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Florian Imdahl. All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
package/README.md ADDED
@@ -0,0 +1,12 @@
1
+ # Installation
2
+ > `npm install --save @schemastore/workflows`
3
+
4
+ # Summary
5
+ This package contains type definitions for workflows.
6
+
7
+ ## Details
8
+ Files were exported from https://github.com/ffflorian/schemastore-updater/tree/main/schemas/workflows.
9
+
10
+ ## Additional Details
11
+ * Last updated: Mon, Jan 23, 2023, 19:39:48 GMT
12
+ * Dependencies: none
package/index.d.ts ADDED
@@ -0,0 +1,1410 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ /**
9
+ * Orchestrate Workflows consisting of Google Cloud APIs, SaaS APIs or private API endpoints.
10
+ */
11
+ export type GoogleCloudWorkflowsConfigFile =
12
+ | StepArray
13
+ | {
14
+ [k: string]: Subworkflow;
15
+ };
16
+ /**
17
+ * A list of steps.
18
+ *
19
+ * @minItems 1
20
+ */
21
+ export type StepArray = [
22
+ {
23
+ [k: string]: Step;
24
+ },
25
+ ...{
26
+ [k: string]: Step;
27
+ }[]
28
+ ];
29
+ /**
30
+ * A list of steps to run in this switch statement.
31
+ *
32
+ * @minItems 1
33
+ */
34
+ export type StepArray1 = [
35
+ {
36
+ [k: string]: Step;
37
+ },
38
+ ...{
39
+ [k: string]: Step;
40
+ }[]
41
+ ];
42
+ /**
43
+ * Steps for loop
44
+ * https://cloud.google.com/workflows/docs/reference/syntax/iteration
45
+ *
46
+ * @minItems 1
47
+ */
48
+ export type StepArray2 = [
49
+ {
50
+ [k: string]: Step;
51
+ },
52
+ ...{
53
+ [k: string]: Step;
54
+ }[]
55
+ ];
56
+ /**
57
+ * A list of steps
58
+ *
59
+ * @minItems 1
60
+ */
61
+ export type StepArray3 = [
62
+ {
63
+ [k: string]: Step;
64
+ },
65
+ ...{
66
+ [k: string]: Step;
67
+ }[]
68
+ ];
69
+ /**
70
+ * An array of objects with a single step.
71
+ *
72
+ * @minItems 1
73
+ */
74
+ export type StepArray4 = [
75
+ {
76
+ [k: string]: Step;
77
+ },
78
+ ...{
79
+ [k: string]: Step;
80
+ }[]
81
+ ];
82
+ /**
83
+ * An array of objects with a single step.
84
+ *
85
+ * @minItems 1
86
+ */
87
+ export type StepArray5 = [
88
+ {
89
+ [k: string]: Step;
90
+ },
91
+ ...{
92
+ [k: string]: Step;
93
+ }[]
94
+ ];
95
+
96
+ /**
97
+ * A single workflow step.
98
+ *
99
+ * This interface was referenced by `undefined`'s JSON-Schema definition
100
+ * via the `patternProperty` "^.*$".
101
+ */
102
+ export interface Step {
103
+ /**
104
+ * Required
105
+ */
106
+ call?: ("http.get" | "http.post" | "http.request" | "sys.sleep") | string;
107
+ /**
108
+ * Arguments to a workflow step.
109
+ */
110
+ args?: {
111
+ url?: string | string;
112
+ /**
113
+ * Required if using call type http.request. The type of HTTP request method to use.
114
+ */
115
+ method?: "GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "CONNECT" | "OPTIONS" | "TRACE" | "PATCH";
116
+ /**
117
+ * Request headers.
118
+ */
119
+ headers?: {
120
+ [k: string]: unknown;
121
+ };
122
+ /**
123
+ * Request body.
124
+ */
125
+ body?: {
126
+ [k: string]: unknown;
127
+ };
128
+ /**
129
+ * Request query parameters.
130
+ */
131
+ query?: {
132
+ [k: string]: unknown;
133
+ };
134
+ /**
135
+ * Required if the API being called requires authentication.
136
+ */
137
+ auth?: {
138
+ /**
139
+ * The type of authentication.
140
+ */
141
+ type?: "OIDC" | "OAuth2";
142
+ };
143
+ /**
144
+ * Time in seconds. How long a request is allowed to run before throwing an exception.
145
+ */
146
+ timeout?: number;
147
+ /**
148
+ * The number of seconds to sleep.
149
+ */
150
+ seconds?: number;
151
+ };
152
+ /**
153
+ * Define a dictionary.
154
+ */
155
+ assign?: {
156
+ [k: string]: unknown;
157
+ }[];
158
+ /**
159
+ * Variable name where the result of an HTTP invocation step is stored.
160
+ */
161
+ result?: string;
162
+ /**
163
+ * A switch block.
164
+ */
165
+ switch?: {
166
+ /**
167
+ * An expression to switch on.
168
+ */
169
+ condition: string;
170
+ /**
171
+ * The next step to jump to. "end" to terminate.
172
+ */
173
+ next?: string;
174
+ steps?: StepArray1;
175
+ /**
176
+ * Stop a workflow's execution and return a value, variable, or expression.
177
+ */
178
+ return?: {
179
+ [k: string]: unknown;
180
+ };
181
+ /**
182
+ * Raise an exception.
183
+ */
184
+ raise?:
185
+ | string
186
+ | {
187
+ [k: string]: unknown;
188
+ };
189
+ }[];
190
+ /**
191
+ * The next step to jump to. "end" to terminate.
192
+ */
193
+ next?: string;
194
+ /**
195
+ * Stop a workflow's execution and return a value, variable, or expression.
196
+ */
197
+ return?: {
198
+ [k: string]: unknown;
199
+ };
200
+ try?: Step1;
201
+ /**
202
+ * Optional. If omitted, all other fields are required. Options include ${http.default_retry} and ${http.default_retry_non_idempotent}. Allows you to specify a default retry policy to use. If you specify a retry policy, omit all other fields in the retry block.
203
+ */
204
+ retry?: {
205
+ /**
206
+ * Required if you don't select a default retry policy. Defines which error codes will be retried. Options include ${http.default_retry_predicate}, ${http.default_retry_predicate_non_idempotent}, or a custom predicate defined as a subworkflow.
207
+ */
208
+ predicate?: string;
209
+ /**
210
+ * Maximum number of times a step will be retried.
211
+ */
212
+ max_retries?: number;
213
+ /**
214
+ * Block that controls how retries occur.
215
+ */
216
+ backoff?: {
217
+ /**
218
+ * Delay in seconds between the initial failure and the first retry.
219
+ */
220
+ initial_delay?: number;
221
+ /**
222
+ * Maximum delay in seconds between retries.
223
+ */
224
+ max_delay?: number;
225
+ /**
226
+ * Multiplier applied to the previous delay to calculate the delay for the subsequent retry.
227
+ */
228
+ multiplier?: number;
229
+ };
230
+ };
231
+ /**
232
+ * Except a try clause.
233
+ */
234
+ except?:
235
+ | Step2
236
+ | {
237
+ /**
238
+ * Name of a dictionary variable that contains the error message.
239
+ */
240
+ as?: string;
241
+ steps?: StepArray4;
242
+ };
243
+ /**
244
+ * Raise an exception.
245
+ */
246
+ raise?:
247
+ | string
248
+ | {
249
+ [k: string]: unknown;
250
+ };
251
+ for?: For;
252
+ /**
253
+ * Run branches or iterations in parallel
254
+ */
255
+ parallel?: {
256
+ /**
257
+ * The action for other branches when an exception occurs
258
+ */
259
+ exception_policy?: "continueAll";
260
+ /**
261
+ * A list of shared variables
262
+ */
263
+ shared?: string[];
264
+ /**
265
+ * An upper limit for branches/iterations to perform concurrently
266
+ */
267
+ concurrency_limit?: number;
268
+ /**
269
+ * A list of branches that will run concurrently
270
+ *
271
+ * @minItems 2
272
+ * @maxItems 10
273
+ */
274
+ branches?:
275
+ | [
276
+ {
277
+ steps?: StepArray3;
278
+ [k: string]: unknown;
279
+ },
280
+ {
281
+ steps?: StepArray3;
282
+ [k: string]: unknown;
283
+ }
284
+ ]
285
+ | [
286
+ {
287
+ steps?: StepArray3;
288
+ [k: string]: unknown;
289
+ },
290
+ {
291
+ steps?: StepArray3;
292
+ [k: string]: unknown;
293
+ },
294
+ {
295
+ steps?: StepArray3;
296
+ [k: string]: unknown;
297
+ }
298
+ ]
299
+ | [
300
+ {
301
+ steps?: StepArray3;
302
+ [k: string]: unknown;
303
+ },
304
+ {
305
+ steps?: StepArray3;
306
+ [k: string]: unknown;
307
+ },
308
+ {
309
+ steps?: StepArray3;
310
+ [k: string]: unknown;
311
+ },
312
+ {
313
+ steps?: StepArray3;
314
+ [k: string]: unknown;
315
+ }
316
+ ]
317
+ | [
318
+ {
319
+ steps?: StepArray3;
320
+ [k: string]: unknown;
321
+ },
322
+ {
323
+ steps?: StepArray3;
324
+ [k: string]: unknown;
325
+ },
326
+ {
327
+ steps?: StepArray3;
328
+ [k: string]: unknown;
329
+ },
330
+ {
331
+ steps?: StepArray3;
332
+ [k: string]: unknown;
333
+ },
334
+ {
335
+ steps?: StepArray3;
336
+ [k: string]: unknown;
337
+ }
338
+ ]
339
+ | [
340
+ {
341
+ steps?: StepArray3;
342
+ [k: string]: unknown;
343
+ },
344
+ {
345
+ steps?: StepArray3;
346
+ [k: string]: unknown;
347
+ },
348
+ {
349
+ steps?: StepArray3;
350
+ [k: string]: unknown;
351
+ },
352
+ {
353
+ steps?: StepArray3;
354
+ [k: string]: unknown;
355
+ },
356
+ {
357
+ steps?: StepArray3;
358
+ [k: string]: unknown;
359
+ },
360
+ {
361
+ steps?: StepArray3;
362
+ [k: string]: unknown;
363
+ }
364
+ ]
365
+ | [
366
+ {
367
+ steps?: StepArray3;
368
+ [k: string]: unknown;
369
+ },
370
+ {
371
+ steps?: StepArray3;
372
+ [k: string]: unknown;
373
+ },
374
+ {
375
+ steps?: StepArray3;
376
+ [k: string]: unknown;
377
+ },
378
+ {
379
+ steps?: StepArray3;
380
+ [k: string]: unknown;
381
+ },
382
+ {
383
+ steps?: StepArray3;
384
+ [k: string]: unknown;
385
+ },
386
+ {
387
+ steps?: StepArray3;
388
+ [k: string]: unknown;
389
+ },
390
+ {
391
+ steps?: StepArray3;
392
+ [k: string]: unknown;
393
+ }
394
+ ]
395
+ | [
396
+ {
397
+ steps?: StepArray3;
398
+ [k: string]: unknown;
399
+ },
400
+ {
401
+ steps?: StepArray3;
402
+ [k: string]: unknown;
403
+ },
404
+ {
405
+ steps?: StepArray3;
406
+ [k: string]: unknown;
407
+ },
408
+ {
409
+ steps?: StepArray3;
410
+ [k: string]: unknown;
411
+ },
412
+ {
413
+ steps?: StepArray3;
414
+ [k: string]: unknown;
415
+ },
416
+ {
417
+ steps?: StepArray3;
418
+ [k: string]: unknown;
419
+ },
420
+ {
421
+ steps?: StepArray3;
422
+ [k: string]: unknown;
423
+ },
424
+ {
425
+ steps?: StepArray3;
426
+ [k: string]: unknown;
427
+ }
428
+ ]
429
+ | [
430
+ {
431
+ steps?: StepArray3;
432
+ [k: string]: unknown;
433
+ },
434
+ {
435
+ steps?: StepArray3;
436
+ [k: string]: unknown;
437
+ },
438
+ {
439
+ steps?: StepArray3;
440
+ [k: string]: unknown;
441
+ },
442
+ {
443
+ steps?: StepArray3;
444
+ [k: string]: unknown;
445
+ },
446
+ {
447
+ steps?: StepArray3;
448
+ [k: string]: unknown;
449
+ },
450
+ {
451
+ steps?: StepArray3;
452
+ [k: string]: unknown;
453
+ },
454
+ {
455
+ steps?: StepArray3;
456
+ [k: string]: unknown;
457
+ },
458
+ {
459
+ steps?: StepArray3;
460
+ [k: string]: unknown;
461
+ },
462
+ {
463
+ steps?: StepArray3;
464
+ [k: string]: unknown;
465
+ }
466
+ ]
467
+ | [
468
+ {
469
+ steps?: StepArray3;
470
+ [k: string]: unknown;
471
+ },
472
+ {
473
+ steps?: StepArray3;
474
+ [k: string]: unknown;
475
+ },
476
+ {
477
+ steps?: StepArray3;
478
+ [k: string]: unknown;
479
+ },
480
+ {
481
+ steps?: StepArray3;
482
+ [k: string]: unknown;
483
+ },
484
+ {
485
+ steps?: StepArray3;
486
+ [k: string]: unknown;
487
+ },
488
+ {
489
+ steps?: StepArray3;
490
+ [k: string]: unknown;
491
+ },
492
+ {
493
+ steps?: StepArray3;
494
+ [k: string]: unknown;
495
+ },
496
+ {
497
+ steps?: StepArray3;
498
+ [k: string]: unknown;
499
+ },
500
+ {
501
+ steps?: StepArray3;
502
+ [k: string]: unknown;
503
+ },
504
+ {
505
+ steps?: StepArray3;
506
+ [k: string]: unknown;
507
+ }
508
+ ];
509
+ for?: For1;
510
+ };
511
+ }
512
+ /**
513
+ * Try a single step or a list of steps.
514
+ */
515
+ export interface Step1 {
516
+ /**
517
+ * Required
518
+ */
519
+ call?: ("http.get" | "http.post" | "http.request" | "sys.sleep") | string;
520
+ /**
521
+ * Arguments to a workflow step.
522
+ */
523
+ args?: {
524
+ url?: string | string;
525
+ /**
526
+ * Required if using call type http.request. The type of HTTP request method to use.
527
+ */
528
+ method?: "GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "CONNECT" | "OPTIONS" | "TRACE" | "PATCH";
529
+ /**
530
+ * Request headers.
531
+ */
532
+ headers?: {
533
+ [k: string]: unknown;
534
+ };
535
+ /**
536
+ * Request body.
537
+ */
538
+ body?: {
539
+ [k: string]: unknown;
540
+ };
541
+ /**
542
+ * Request query parameters.
543
+ */
544
+ query?: {
545
+ [k: string]: unknown;
546
+ };
547
+ /**
548
+ * Required if the API being called requires authentication.
549
+ */
550
+ auth?: {
551
+ /**
552
+ * The type of authentication.
553
+ */
554
+ type?: "OIDC" | "OAuth2";
555
+ };
556
+ /**
557
+ * Time in seconds. How long a request is allowed to run before throwing an exception.
558
+ */
559
+ timeout?: number;
560
+ /**
561
+ * The number of seconds to sleep.
562
+ */
563
+ seconds?: number;
564
+ };
565
+ /**
566
+ * Define a dictionary.
567
+ */
568
+ assign?: {
569
+ [k: string]: unknown;
570
+ }[];
571
+ /**
572
+ * Variable name where the result of an HTTP invocation step is stored.
573
+ */
574
+ result?: string;
575
+ /**
576
+ * A switch block.
577
+ */
578
+ switch?: {
579
+ /**
580
+ * An expression to switch on.
581
+ */
582
+ condition: string;
583
+ /**
584
+ * The next step to jump to. "end" to terminate.
585
+ */
586
+ next?: string;
587
+ steps?: StepArray1;
588
+ /**
589
+ * Stop a workflow's execution and return a value, variable, or expression.
590
+ */
591
+ return?: {
592
+ [k: string]: unknown;
593
+ };
594
+ /**
595
+ * Raise an exception.
596
+ */
597
+ raise?:
598
+ | string
599
+ | {
600
+ [k: string]: unknown;
601
+ };
602
+ }[];
603
+ /**
604
+ * The next step to jump to. "end" to terminate.
605
+ */
606
+ next?: string;
607
+ /**
608
+ * Stop a workflow's execution and return a value, variable, or expression.
609
+ */
610
+ return?: {
611
+ [k: string]: unknown;
612
+ };
613
+ try?: Step1;
614
+ /**
615
+ * Optional. If omitted, all other fields are required. Options include ${http.default_retry} and ${http.default_retry_non_idempotent}. Allows you to specify a default retry policy to use. If you specify a retry policy, omit all other fields in the retry block.
616
+ */
617
+ retry?: {
618
+ /**
619
+ * Required if you don't select a default retry policy. Defines which error codes will be retried. Options include ${http.default_retry_predicate}, ${http.default_retry_predicate_non_idempotent}, or a custom predicate defined as a subworkflow.
620
+ */
621
+ predicate?: string;
622
+ /**
623
+ * Maximum number of times a step will be retried.
624
+ */
625
+ max_retries?: number;
626
+ /**
627
+ * Block that controls how retries occur.
628
+ */
629
+ backoff?: {
630
+ /**
631
+ * Delay in seconds between the initial failure and the first retry.
632
+ */
633
+ initial_delay?: number;
634
+ /**
635
+ * Maximum delay in seconds between retries.
636
+ */
637
+ max_delay?: number;
638
+ /**
639
+ * Multiplier applied to the previous delay to calculate the delay for the subsequent retry.
640
+ */
641
+ multiplier?: number;
642
+ };
643
+ };
644
+ /**
645
+ * Except a try clause.
646
+ */
647
+ except?:
648
+ | Step2
649
+ | {
650
+ /**
651
+ * Name of a dictionary variable that contains the error message.
652
+ */
653
+ as?: string;
654
+ steps?: StepArray4;
655
+ };
656
+ /**
657
+ * Raise an exception.
658
+ */
659
+ raise?:
660
+ | string
661
+ | {
662
+ [k: string]: unknown;
663
+ };
664
+ for?: For;
665
+ /**
666
+ * Run branches or iterations in parallel
667
+ */
668
+ parallel?: {
669
+ /**
670
+ * The action for other branches when an exception occurs
671
+ */
672
+ exception_policy?: "continueAll";
673
+ /**
674
+ * A list of shared variables
675
+ */
676
+ shared?: string[];
677
+ /**
678
+ * An upper limit for branches/iterations to perform concurrently
679
+ */
680
+ concurrency_limit?: number;
681
+ /**
682
+ * A list of branches that will run concurrently
683
+ *
684
+ * @minItems 2
685
+ * @maxItems 10
686
+ */
687
+ branches?:
688
+ | [
689
+ {
690
+ steps?: StepArray3;
691
+ [k: string]: unknown;
692
+ },
693
+ {
694
+ steps?: StepArray3;
695
+ [k: string]: unknown;
696
+ }
697
+ ]
698
+ | [
699
+ {
700
+ steps?: StepArray3;
701
+ [k: string]: unknown;
702
+ },
703
+ {
704
+ steps?: StepArray3;
705
+ [k: string]: unknown;
706
+ },
707
+ {
708
+ steps?: StepArray3;
709
+ [k: string]: unknown;
710
+ }
711
+ ]
712
+ | [
713
+ {
714
+ steps?: StepArray3;
715
+ [k: string]: unknown;
716
+ },
717
+ {
718
+ steps?: StepArray3;
719
+ [k: string]: unknown;
720
+ },
721
+ {
722
+ steps?: StepArray3;
723
+ [k: string]: unknown;
724
+ },
725
+ {
726
+ steps?: StepArray3;
727
+ [k: string]: unknown;
728
+ }
729
+ ]
730
+ | [
731
+ {
732
+ steps?: StepArray3;
733
+ [k: string]: unknown;
734
+ },
735
+ {
736
+ steps?: StepArray3;
737
+ [k: string]: unknown;
738
+ },
739
+ {
740
+ steps?: StepArray3;
741
+ [k: string]: unknown;
742
+ },
743
+ {
744
+ steps?: StepArray3;
745
+ [k: string]: unknown;
746
+ },
747
+ {
748
+ steps?: StepArray3;
749
+ [k: string]: unknown;
750
+ }
751
+ ]
752
+ | [
753
+ {
754
+ steps?: StepArray3;
755
+ [k: string]: unknown;
756
+ },
757
+ {
758
+ steps?: StepArray3;
759
+ [k: string]: unknown;
760
+ },
761
+ {
762
+ steps?: StepArray3;
763
+ [k: string]: unknown;
764
+ },
765
+ {
766
+ steps?: StepArray3;
767
+ [k: string]: unknown;
768
+ },
769
+ {
770
+ steps?: StepArray3;
771
+ [k: string]: unknown;
772
+ },
773
+ {
774
+ steps?: StepArray3;
775
+ [k: string]: unknown;
776
+ }
777
+ ]
778
+ | [
779
+ {
780
+ steps?: StepArray3;
781
+ [k: string]: unknown;
782
+ },
783
+ {
784
+ steps?: StepArray3;
785
+ [k: string]: unknown;
786
+ },
787
+ {
788
+ steps?: StepArray3;
789
+ [k: string]: unknown;
790
+ },
791
+ {
792
+ steps?: StepArray3;
793
+ [k: string]: unknown;
794
+ },
795
+ {
796
+ steps?: StepArray3;
797
+ [k: string]: unknown;
798
+ },
799
+ {
800
+ steps?: StepArray3;
801
+ [k: string]: unknown;
802
+ },
803
+ {
804
+ steps?: StepArray3;
805
+ [k: string]: unknown;
806
+ }
807
+ ]
808
+ | [
809
+ {
810
+ steps?: StepArray3;
811
+ [k: string]: unknown;
812
+ },
813
+ {
814
+ steps?: StepArray3;
815
+ [k: string]: unknown;
816
+ },
817
+ {
818
+ steps?: StepArray3;
819
+ [k: string]: unknown;
820
+ },
821
+ {
822
+ steps?: StepArray3;
823
+ [k: string]: unknown;
824
+ },
825
+ {
826
+ steps?: StepArray3;
827
+ [k: string]: unknown;
828
+ },
829
+ {
830
+ steps?: StepArray3;
831
+ [k: string]: unknown;
832
+ },
833
+ {
834
+ steps?: StepArray3;
835
+ [k: string]: unknown;
836
+ },
837
+ {
838
+ steps?: StepArray3;
839
+ [k: string]: unknown;
840
+ }
841
+ ]
842
+ | [
843
+ {
844
+ steps?: StepArray3;
845
+ [k: string]: unknown;
846
+ },
847
+ {
848
+ steps?: StepArray3;
849
+ [k: string]: unknown;
850
+ },
851
+ {
852
+ steps?: StepArray3;
853
+ [k: string]: unknown;
854
+ },
855
+ {
856
+ steps?: StepArray3;
857
+ [k: string]: unknown;
858
+ },
859
+ {
860
+ steps?: StepArray3;
861
+ [k: string]: unknown;
862
+ },
863
+ {
864
+ steps?: StepArray3;
865
+ [k: string]: unknown;
866
+ },
867
+ {
868
+ steps?: StepArray3;
869
+ [k: string]: unknown;
870
+ },
871
+ {
872
+ steps?: StepArray3;
873
+ [k: string]: unknown;
874
+ },
875
+ {
876
+ steps?: StepArray3;
877
+ [k: string]: unknown;
878
+ }
879
+ ]
880
+ | [
881
+ {
882
+ steps?: StepArray3;
883
+ [k: string]: unknown;
884
+ },
885
+ {
886
+ steps?: StepArray3;
887
+ [k: string]: unknown;
888
+ },
889
+ {
890
+ steps?: StepArray3;
891
+ [k: string]: unknown;
892
+ },
893
+ {
894
+ steps?: StepArray3;
895
+ [k: string]: unknown;
896
+ },
897
+ {
898
+ steps?: StepArray3;
899
+ [k: string]: unknown;
900
+ },
901
+ {
902
+ steps?: StepArray3;
903
+ [k: string]: unknown;
904
+ },
905
+ {
906
+ steps?: StepArray3;
907
+ [k: string]: unknown;
908
+ },
909
+ {
910
+ steps?: StepArray3;
911
+ [k: string]: unknown;
912
+ },
913
+ {
914
+ steps?: StepArray3;
915
+ [k: string]: unknown;
916
+ },
917
+ {
918
+ steps?: StepArray3;
919
+ [k: string]: unknown;
920
+ }
921
+ ];
922
+ for?: For1;
923
+ };
924
+ }
925
+ /**
926
+ * A single workflow step.
927
+ */
928
+ export interface Step2 {
929
+ /**
930
+ * Required
931
+ */
932
+ call?: ("http.get" | "http.post" | "http.request" | "sys.sleep") | string;
933
+ /**
934
+ * Arguments to a workflow step.
935
+ */
936
+ args?: {
937
+ url?: string | string;
938
+ /**
939
+ * Required if using call type http.request. The type of HTTP request method to use.
940
+ */
941
+ method?: "GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "CONNECT" | "OPTIONS" | "TRACE" | "PATCH";
942
+ /**
943
+ * Request headers.
944
+ */
945
+ headers?: {
946
+ [k: string]: unknown;
947
+ };
948
+ /**
949
+ * Request body.
950
+ */
951
+ body?: {
952
+ [k: string]: unknown;
953
+ };
954
+ /**
955
+ * Request query parameters.
956
+ */
957
+ query?: {
958
+ [k: string]: unknown;
959
+ };
960
+ /**
961
+ * Required if the API being called requires authentication.
962
+ */
963
+ auth?: {
964
+ /**
965
+ * The type of authentication.
966
+ */
967
+ type?: "OIDC" | "OAuth2";
968
+ };
969
+ /**
970
+ * Time in seconds. How long a request is allowed to run before throwing an exception.
971
+ */
972
+ timeout?: number;
973
+ /**
974
+ * The number of seconds to sleep.
975
+ */
976
+ seconds?: number;
977
+ };
978
+ /**
979
+ * Define a dictionary.
980
+ */
981
+ assign?: {
982
+ [k: string]: unknown;
983
+ }[];
984
+ /**
985
+ * Variable name where the result of an HTTP invocation step is stored.
986
+ */
987
+ result?: string;
988
+ /**
989
+ * A switch block.
990
+ */
991
+ switch?: {
992
+ /**
993
+ * An expression to switch on.
994
+ */
995
+ condition: string;
996
+ /**
997
+ * The next step to jump to. "end" to terminate.
998
+ */
999
+ next?: string;
1000
+ steps?: StepArray1;
1001
+ /**
1002
+ * Stop a workflow's execution and return a value, variable, or expression.
1003
+ */
1004
+ return?: {
1005
+ [k: string]: unknown;
1006
+ };
1007
+ /**
1008
+ * Raise an exception.
1009
+ */
1010
+ raise?:
1011
+ | string
1012
+ | {
1013
+ [k: string]: unknown;
1014
+ };
1015
+ }[];
1016
+ /**
1017
+ * The next step to jump to. "end" to terminate.
1018
+ */
1019
+ next?: string;
1020
+ /**
1021
+ * Stop a workflow's execution and return a value, variable, or expression.
1022
+ */
1023
+ return?: {
1024
+ [k: string]: unknown;
1025
+ };
1026
+ try?: Step1;
1027
+ /**
1028
+ * Optional. If omitted, all other fields are required. Options include ${http.default_retry} and ${http.default_retry_non_idempotent}. Allows you to specify a default retry policy to use. If you specify a retry policy, omit all other fields in the retry block.
1029
+ */
1030
+ retry?: {
1031
+ /**
1032
+ * Required if you don't select a default retry policy. Defines which error codes will be retried. Options include ${http.default_retry_predicate}, ${http.default_retry_predicate_non_idempotent}, or a custom predicate defined as a subworkflow.
1033
+ */
1034
+ predicate?: string;
1035
+ /**
1036
+ * Maximum number of times a step will be retried.
1037
+ */
1038
+ max_retries?: number;
1039
+ /**
1040
+ * Block that controls how retries occur.
1041
+ */
1042
+ backoff?: {
1043
+ /**
1044
+ * Delay in seconds between the initial failure and the first retry.
1045
+ */
1046
+ initial_delay?: number;
1047
+ /**
1048
+ * Maximum delay in seconds between retries.
1049
+ */
1050
+ max_delay?: number;
1051
+ /**
1052
+ * Multiplier applied to the previous delay to calculate the delay for the subsequent retry.
1053
+ */
1054
+ multiplier?: number;
1055
+ };
1056
+ };
1057
+ /**
1058
+ * Except a try clause.
1059
+ */
1060
+ except?:
1061
+ | Step2
1062
+ | {
1063
+ /**
1064
+ * Name of a dictionary variable that contains the error message.
1065
+ */
1066
+ as?: string;
1067
+ steps?: StepArray4;
1068
+ };
1069
+ /**
1070
+ * Raise an exception.
1071
+ */
1072
+ raise?:
1073
+ | string
1074
+ | {
1075
+ [k: string]: unknown;
1076
+ };
1077
+ for?: For;
1078
+ /**
1079
+ * Run branches or iterations in parallel
1080
+ */
1081
+ parallel?: {
1082
+ /**
1083
+ * The action for other branches when an exception occurs
1084
+ */
1085
+ exception_policy?: "continueAll";
1086
+ /**
1087
+ * A list of shared variables
1088
+ */
1089
+ shared?: string[];
1090
+ /**
1091
+ * An upper limit for branches/iterations to perform concurrently
1092
+ */
1093
+ concurrency_limit?: number;
1094
+ /**
1095
+ * A list of branches that will run concurrently
1096
+ *
1097
+ * @minItems 2
1098
+ * @maxItems 10
1099
+ */
1100
+ branches?:
1101
+ | [
1102
+ {
1103
+ steps?: StepArray3;
1104
+ [k: string]: unknown;
1105
+ },
1106
+ {
1107
+ steps?: StepArray3;
1108
+ [k: string]: unknown;
1109
+ }
1110
+ ]
1111
+ | [
1112
+ {
1113
+ steps?: StepArray3;
1114
+ [k: string]: unknown;
1115
+ },
1116
+ {
1117
+ steps?: StepArray3;
1118
+ [k: string]: unknown;
1119
+ },
1120
+ {
1121
+ steps?: StepArray3;
1122
+ [k: string]: unknown;
1123
+ }
1124
+ ]
1125
+ | [
1126
+ {
1127
+ steps?: StepArray3;
1128
+ [k: string]: unknown;
1129
+ },
1130
+ {
1131
+ steps?: StepArray3;
1132
+ [k: string]: unknown;
1133
+ },
1134
+ {
1135
+ steps?: StepArray3;
1136
+ [k: string]: unknown;
1137
+ },
1138
+ {
1139
+ steps?: StepArray3;
1140
+ [k: string]: unknown;
1141
+ }
1142
+ ]
1143
+ | [
1144
+ {
1145
+ steps?: StepArray3;
1146
+ [k: string]: unknown;
1147
+ },
1148
+ {
1149
+ steps?: StepArray3;
1150
+ [k: string]: unknown;
1151
+ },
1152
+ {
1153
+ steps?: StepArray3;
1154
+ [k: string]: unknown;
1155
+ },
1156
+ {
1157
+ steps?: StepArray3;
1158
+ [k: string]: unknown;
1159
+ },
1160
+ {
1161
+ steps?: StepArray3;
1162
+ [k: string]: unknown;
1163
+ }
1164
+ ]
1165
+ | [
1166
+ {
1167
+ steps?: StepArray3;
1168
+ [k: string]: unknown;
1169
+ },
1170
+ {
1171
+ steps?: StepArray3;
1172
+ [k: string]: unknown;
1173
+ },
1174
+ {
1175
+ steps?: StepArray3;
1176
+ [k: string]: unknown;
1177
+ },
1178
+ {
1179
+ steps?: StepArray3;
1180
+ [k: string]: unknown;
1181
+ },
1182
+ {
1183
+ steps?: StepArray3;
1184
+ [k: string]: unknown;
1185
+ },
1186
+ {
1187
+ steps?: StepArray3;
1188
+ [k: string]: unknown;
1189
+ }
1190
+ ]
1191
+ | [
1192
+ {
1193
+ steps?: StepArray3;
1194
+ [k: string]: unknown;
1195
+ },
1196
+ {
1197
+ steps?: StepArray3;
1198
+ [k: string]: unknown;
1199
+ },
1200
+ {
1201
+ steps?: StepArray3;
1202
+ [k: string]: unknown;
1203
+ },
1204
+ {
1205
+ steps?: StepArray3;
1206
+ [k: string]: unknown;
1207
+ },
1208
+ {
1209
+ steps?: StepArray3;
1210
+ [k: string]: unknown;
1211
+ },
1212
+ {
1213
+ steps?: StepArray3;
1214
+ [k: string]: unknown;
1215
+ },
1216
+ {
1217
+ steps?: StepArray3;
1218
+ [k: string]: unknown;
1219
+ }
1220
+ ]
1221
+ | [
1222
+ {
1223
+ steps?: StepArray3;
1224
+ [k: string]: unknown;
1225
+ },
1226
+ {
1227
+ steps?: StepArray3;
1228
+ [k: string]: unknown;
1229
+ },
1230
+ {
1231
+ steps?: StepArray3;
1232
+ [k: string]: unknown;
1233
+ },
1234
+ {
1235
+ steps?: StepArray3;
1236
+ [k: string]: unknown;
1237
+ },
1238
+ {
1239
+ steps?: StepArray3;
1240
+ [k: string]: unknown;
1241
+ },
1242
+ {
1243
+ steps?: StepArray3;
1244
+ [k: string]: unknown;
1245
+ },
1246
+ {
1247
+ steps?: StepArray3;
1248
+ [k: string]: unknown;
1249
+ },
1250
+ {
1251
+ steps?: StepArray3;
1252
+ [k: string]: unknown;
1253
+ }
1254
+ ]
1255
+ | [
1256
+ {
1257
+ steps?: StepArray3;
1258
+ [k: string]: unknown;
1259
+ },
1260
+ {
1261
+ steps?: StepArray3;
1262
+ [k: string]: unknown;
1263
+ },
1264
+ {
1265
+ steps?: StepArray3;
1266
+ [k: string]: unknown;
1267
+ },
1268
+ {
1269
+ steps?: StepArray3;
1270
+ [k: string]: unknown;
1271
+ },
1272
+ {
1273
+ steps?: StepArray3;
1274
+ [k: string]: unknown;
1275
+ },
1276
+ {
1277
+ steps?: StepArray3;
1278
+ [k: string]: unknown;
1279
+ },
1280
+ {
1281
+ steps?: StepArray3;
1282
+ [k: string]: unknown;
1283
+ },
1284
+ {
1285
+ steps?: StepArray3;
1286
+ [k: string]: unknown;
1287
+ },
1288
+ {
1289
+ steps?: StepArray3;
1290
+ [k: string]: unknown;
1291
+ }
1292
+ ]
1293
+ | [
1294
+ {
1295
+ steps?: StepArray3;
1296
+ [k: string]: unknown;
1297
+ },
1298
+ {
1299
+ steps?: StepArray3;
1300
+ [k: string]: unknown;
1301
+ },
1302
+ {
1303
+ steps?: StepArray3;
1304
+ [k: string]: unknown;
1305
+ },
1306
+ {
1307
+ steps?: StepArray3;
1308
+ [k: string]: unknown;
1309
+ },
1310
+ {
1311
+ steps?: StepArray3;
1312
+ [k: string]: unknown;
1313
+ },
1314
+ {
1315
+ steps?: StepArray3;
1316
+ [k: string]: unknown;
1317
+ },
1318
+ {
1319
+ steps?: StepArray3;
1320
+ [k: string]: unknown;
1321
+ },
1322
+ {
1323
+ steps?: StepArray3;
1324
+ [k: string]: unknown;
1325
+ },
1326
+ {
1327
+ steps?: StepArray3;
1328
+ [k: string]: unknown;
1329
+ },
1330
+ {
1331
+ steps?: StepArray3;
1332
+ [k: string]: unknown;
1333
+ }
1334
+ ];
1335
+ for?: For1;
1336
+ };
1337
+ }
1338
+ /**
1339
+ * Iterates over a sequence of numbers or through a collection of data
1340
+ * https://cloud.google.com/workflows/docs/reference/syntax/syntax-search
1341
+ */
1342
+ export interface For {
1343
+ /**
1344
+ * A loop variable name
1345
+ * https://cloud.google.com/workflows/docs/reference/syntax/iteration
1346
+ */
1347
+ value?: string;
1348
+ /**
1349
+ * An index variable name
1350
+ * https://cloud.google.com/workflows/docs/reference/syntax/iteration
1351
+ */
1352
+ index?: string;
1353
+ /**
1354
+ * A number's range
1355
+ * https://cloud.google.com/workflows/docs/reference/syntax/iteration
1356
+ *
1357
+ * @minItems 2
1358
+ * @maxItems 2
1359
+ */
1360
+ range?: [number, number];
1361
+ /**
1362
+ * A list expression
1363
+ * https://cloud.google.com/workflows/docs/reference/syntax/iteration
1364
+ */
1365
+ in?: unknown[];
1366
+ steps?: StepArray2;
1367
+ }
1368
+ /**
1369
+ * Iterates over a sequence of numbers or through a collection of data
1370
+ * https://cloud.google.com/workflows/docs/reference/syntax/syntax-search
1371
+ */
1372
+ export interface For1 {
1373
+ /**
1374
+ * A loop variable name
1375
+ * https://cloud.google.com/workflows/docs/reference/syntax/iteration
1376
+ */
1377
+ value?: string;
1378
+ /**
1379
+ * An index variable name
1380
+ * https://cloud.google.com/workflows/docs/reference/syntax/iteration
1381
+ */
1382
+ index?: string;
1383
+ /**
1384
+ * A number's range
1385
+ * https://cloud.google.com/workflows/docs/reference/syntax/iteration
1386
+ *
1387
+ * @minItems 2
1388
+ * @maxItems 2
1389
+ */
1390
+ range?: [number, number];
1391
+ /**
1392
+ * A list expression
1393
+ * https://cloud.google.com/workflows/docs/reference/syntax/iteration
1394
+ */
1395
+ in?: unknown[];
1396
+ steps?: StepArray2;
1397
+ }
1398
+ /**
1399
+ * A subworkflow.
1400
+ *
1401
+ * This interface was referenced by `undefined`'s JSON-Schema definition
1402
+ * via the `patternProperty` "^.*$".
1403
+ */
1404
+ export interface Subworkflow {
1405
+ /**
1406
+ * A list of parameters.
1407
+ */
1408
+ params?: string[];
1409
+ steps?: StepArray5;
1410
+ }
package/package.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "author": "Florian Imdahl <git@ffflorian.de>",
3
+ "dependencies": {},
4
+ "description": "TypeScript definitions for workflows.",
5
+ "license": "MIT",
6
+ "main": "index.d.ts",
7
+ "name": "@schemastore/workflows",
8
+ "repository": "https://github.com/ffflorian/schemastore-updater/tree/main/schemas/workflows",
9
+ "scripts": {},
10
+ "typesPublisherContentHash": "b787e405095a2a6692f00ee223d271aad1ae2aafad9f7b8c3e1770d41c84a103",
11
+ "types": "index.d.ts",
12
+ "version": "0.0.5",
13
+ "typeScriptVersion": "2.2"
14
+ }