@backstage/plugin-scaffolder-backend 2.1.0-next.2 → 2.2.0-next.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.
@@ -0,0 +1,1294 @@
1
+ 'use strict';
2
+
3
+ var backendOpenapiUtils = require('@backstage/backend-openapi-utils');
4
+
5
+ const spec = {
6
+ openapi: "3.0.3",
7
+ info: {
8
+ title: "scaffolder",
9
+ version: "1",
10
+ description: "The Backstage backend plugin that helps you create new things",
11
+ license: {
12
+ name: "Apache-2.0",
13
+ url: "http://www.apache.org/licenses/LICENSE-2.0.html"
14
+ },
15
+ contact: {}
16
+ },
17
+ servers: [
18
+ {
19
+ url: "/"
20
+ }
21
+ ],
22
+ components: {
23
+ examples: {},
24
+ headers: {},
25
+ parameters: {
26
+ createdBy: {
27
+ name: "createdBy",
28
+ in: "query",
29
+ description: "Created by",
30
+ required: false,
31
+ allowReserved: true,
32
+ schema: {
33
+ type: "array",
34
+ items: {
35
+ type: "string"
36
+ }
37
+ }
38
+ },
39
+ eventsAfter: {
40
+ name: "after",
41
+ in: "query",
42
+ description: "Offset event ID to stream events after.",
43
+ required: false,
44
+ allowReserved: true,
45
+ schema: {
46
+ type: "integer"
47
+ }
48
+ },
49
+ kind: {
50
+ name: "kind",
51
+ in: "path",
52
+ required: true,
53
+ allowReserved: true,
54
+ schema: {
55
+ type: "string"
56
+ }
57
+ },
58
+ limit: {
59
+ name: "limit",
60
+ in: "query",
61
+ description: "Number of records to return in the response.",
62
+ required: false,
63
+ allowReserved: true,
64
+ schema: {
65
+ type: "integer",
66
+ minimum: 0
67
+ }
68
+ },
69
+ namespace: {
70
+ name: "namespace",
71
+ in: "path",
72
+ required: true,
73
+ allowReserved: true,
74
+ schema: {
75
+ type: "string"
76
+ }
77
+ },
78
+ name: {
79
+ name: "name",
80
+ in: "path",
81
+ required: true,
82
+ allowReserved: true,
83
+ schema: {
84
+ type: "string"
85
+ }
86
+ },
87
+ offset: {
88
+ name: "offset",
89
+ in: "query",
90
+ description: "Number of records to skip in the query page.",
91
+ required: false,
92
+ allowReserved: true,
93
+ schema: {
94
+ type: "integer",
95
+ minimum: 0
96
+ }
97
+ },
98
+ order: {
99
+ name: "order",
100
+ in: "query",
101
+ description: "Order",
102
+ required: false,
103
+ allowReserved: true,
104
+ schema: {
105
+ type: "array",
106
+ items: {
107
+ type: "string"
108
+ }
109
+ }
110
+ },
111
+ status: {
112
+ name: "status",
113
+ in: "query",
114
+ description: "Status",
115
+ required: false,
116
+ allowReserved: true,
117
+ schema: {
118
+ type: "array",
119
+ items: {
120
+ type: "string"
121
+ }
122
+ }
123
+ },
124
+ taskId: {
125
+ name: "taskId",
126
+ in: "path",
127
+ required: true,
128
+ allowReserved: true,
129
+ schema: {
130
+ type: "string"
131
+ }
132
+ }
133
+ },
134
+ requestBodies: {},
135
+ responses: {
136
+ ErrorResponse: {
137
+ description: "An error response from the backend.",
138
+ content: {
139
+ "application/json; charset=utf-8": {
140
+ schema: {
141
+ $ref: "#/components/schemas/Error"
142
+ }
143
+ }
144
+ }
145
+ }
146
+ },
147
+ schemas: {
148
+ Action: {
149
+ type: "object",
150
+ properties: {
151
+ id: {
152
+ type: "string"
153
+ },
154
+ description: {
155
+ type: "string"
156
+ },
157
+ "'examples'": {
158
+ type: "array",
159
+ items: {
160
+ $ref: "#/components/schemas/ActionExample"
161
+ }
162
+ },
163
+ schema: {
164
+ type: "object",
165
+ properties: {
166
+ input: {
167
+ $ref: "#/components/schemas/JsonObject"
168
+ },
169
+ output: {
170
+ $ref: "#/components/schemas/JsonObject"
171
+ }
172
+ }
173
+ }
174
+ },
175
+ required: ["id"],
176
+ description: "The response shape for a single action in the `listActions` call to the `scaffolder-backend`"
177
+ },
178
+ ActionExample: {
179
+ type: "object",
180
+ properties: {
181
+ description: {
182
+ type: "string"
183
+ },
184
+ example: {
185
+ type: "string"
186
+ }
187
+ },
188
+ required: ["description", "example"],
189
+ description: "A single action example"
190
+ },
191
+ DryRunResult: {
192
+ type: "object",
193
+ properties: {
194
+ log: {
195
+ type: "array",
196
+ items: {
197
+ type: "object",
198
+ properties: {
199
+ body: {
200
+ allOf: [
201
+ {
202
+ $ref: "#/components/schemas/JsonObject"
203
+ },
204
+ {
205
+ type: "object",
206
+ properties: {
207
+ message: {
208
+ type: "string"
209
+ },
210
+ status: {
211
+ $ref: "#/components/schemas/TaskStatus"
212
+ },
213
+ stepId: {
214
+ type: "string"
215
+ }
216
+ },
217
+ required: ["message"]
218
+ }
219
+ ]
220
+ }
221
+ },
222
+ required: ["body"]
223
+ }
224
+ },
225
+ directoryContents: {
226
+ type: "array",
227
+ items: {
228
+ $ref: "#/components/schemas/SerializedFile"
229
+ }
230
+ },
231
+ output: {
232
+ $ref: "#/components/schemas/JsonObject"
233
+ }
234
+ },
235
+ required: ["log", "directoryContents", "output"]
236
+ },
237
+ Error: {
238
+ type: "object",
239
+ properties: {
240
+ error: {
241
+ type: "object",
242
+ properties: {
243
+ name: {
244
+ type: "string"
245
+ },
246
+ message: {
247
+ type: "string"
248
+ },
249
+ stack: {
250
+ type: "string"
251
+ },
252
+ code: {
253
+ type: "string"
254
+ }
255
+ },
256
+ required: ["name", "message"]
257
+ },
258
+ request: {
259
+ type: "object",
260
+ properties: {
261
+ method: {
262
+ type: "string"
263
+ },
264
+ url: {
265
+ type: "string"
266
+ }
267
+ },
268
+ required: ["method", "url"]
269
+ },
270
+ response: {
271
+ type: "object",
272
+ properties: {
273
+ statusCode: {
274
+ type: "number"
275
+ }
276
+ },
277
+ required: ["statusCode"]
278
+ }
279
+ },
280
+ required: ["error", "response"],
281
+ additionalProperties: {}
282
+ },
283
+ JsonArray: {
284
+ type: "array",
285
+ items: {
286
+ $ref: "#/components/schemas/JsonValue"
287
+ },
288
+ description: "A type representing all allowed JSON array values."
289
+ },
290
+ JsonObject: {
291
+ type: "object",
292
+ properties: {},
293
+ description: "A type representing all allowed JSON object values.",
294
+ additionalProperties: {}
295
+ },
296
+ JsonPrimitive: {
297
+ oneOf: [
298
+ {
299
+ type: "boolean"
300
+ },
301
+ {
302
+ type: "number"
303
+ },
304
+ {
305
+ type: "string"
306
+ },
307
+ {
308
+ type: "object",
309
+ nullable: true
310
+ }
311
+ ],
312
+ description: "A type representing all allowed JSON primitive values."
313
+ },
314
+ JsonValue: {
315
+ oneOf: [
316
+ {
317
+ $ref: "#/components/schemas/JsonObject"
318
+ },
319
+ {
320
+ $ref: "#/components/schemas/JsonArray"
321
+ },
322
+ {
323
+ $ref: "#/components/schemas/JsonPrimitive"
324
+ }
325
+ ],
326
+ description: "A type representing all allowed JSON values."
327
+ },
328
+ ListActionsResponse: {
329
+ type: "array",
330
+ items: {
331
+ $ref: "#/components/schemas/Action"
332
+ },
333
+ description: "The response shape for the `listActions` call to the `scaffolder-backend`"
334
+ },
335
+ ListTasksResponse: {
336
+ type: "object",
337
+ properties: {
338
+ tasks: {
339
+ type: "array",
340
+ items: {
341
+ $ref: "#/components/schemas/SerializedTask"
342
+ }
343
+ },
344
+ totalTasks: {
345
+ type: "number"
346
+ }
347
+ },
348
+ required: ["tasks"],
349
+ description: "The response shape for the `listTasks` call to the `scaffolder-backend`"
350
+ },
351
+ ListTemplatingExtensionsResponse: {
352
+ type: "object",
353
+ properties: {
354
+ filters: {
355
+ type: "object",
356
+ additionalProperties: {
357
+ $ref: "#/components/schemas/TemplateFilter"
358
+ }
359
+ },
360
+ globals: {
361
+ type: "object",
362
+ properties: {
363
+ functions: {
364
+ type: "object",
365
+ additionalProperties: {
366
+ $ref: "#/components/schemas/TemplateGlobalFunction"
367
+ }
368
+ },
369
+ values: {
370
+ type: "object",
371
+ additionalProperties: {
372
+ $ref: "#/components/schemas/TemplateGlobalValue"
373
+ }
374
+ }
375
+ },
376
+ required: ["functions", "values"]
377
+ }
378
+ },
379
+ required: ["filters", "globals"],
380
+ description: "The response shape for the `listTemplatingExtensions` call to the `scaffolder-backend`"
381
+ },
382
+ ScaffolderScaffoldOptions: {
383
+ type: "object",
384
+ properties: {
385
+ templateRef: {
386
+ type: "string"
387
+ },
388
+ values: {
389
+ type: "object",
390
+ additionalProperties: {}
391
+ },
392
+ secrets: {
393
+ type: "object",
394
+ additionalProperties: {
395
+ type: "string"
396
+ }
397
+ }
398
+ },
399
+ required: ["templateRef", "values"],
400
+ description: "The input options to the `scaffold` method of the `ScaffolderClient`."
401
+ },
402
+ ScaffolderUsageExample: {
403
+ type: "object",
404
+ properties: {
405
+ description: {
406
+ type: "string"
407
+ },
408
+ example: {
409
+ type: "string"
410
+ },
411
+ notes: {
412
+ type: "string"
413
+ }
414
+ },
415
+ required: ["example"],
416
+ description: "A single scaffolder usage example"
417
+ },
418
+ SerializedFile: {
419
+ type: "object",
420
+ properties: {
421
+ path: {
422
+ type: "string"
423
+ },
424
+ content: {
425
+ type: "string"
426
+ },
427
+ executable: {
428
+ type: "boolean"
429
+ },
430
+ symlink: {
431
+ type: "boolean"
432
+ }
433
+ },
434
+ required: ["path", "content"]
435
+ },
436
+ SerializedTaskEvent: {
437
+ type: "object",
438
+ properties: {
439
+ id: {
440
+ type: "integer"
441
+ },
442
+ isTaskRecoverable: {
443
+ type: "boolean"
444
+ },
445
+ taskId: {
446
+ type: "string"
447
+ },
448
+ body: {
449
+ allOf: [
450
+ {
451
+ $ref: "#/components/schemas/JsonObject"
452
+ },
453
+ {
454
+ type: "object",
455
+ properties: {
456
+ message: {
457
+ type: "string"
458
+ },
459
+ status: {
460
+ $ref: "#/components/schemas/TaskStatus"
461
+ },
462
+ stepId: {
463
+ type: "string"
464
+ }
465
+ },
466
+ required: ["message"]
467
+ }
468
+ ]
469
+ },
470
+ type: {
471
+ $ref: "#/components/schemas/TaskEventType"
472
+ },
473
+ createdAt: {
474
+ type: "string"
475
+ }
476
+ },
477
+ required: ["id", "taskId", "body", "type", "createdAt"],
478
+ description: "SerializedTaskEvent"
479
+ },
480
+ SerializedTask: {
481
+ type: "object",
482
+ properties: {
483
+ id: {
484
+ type: "string"
485
+ },
486
+ spec: {
487
+ type: "object"
488
+ },
489
+ status: {
490
+ $ref: "#/components/schemas/TaskStatus"
491
+ },
492
+ createdAt: {
493
+ type: "string"
494
+ },
495
+ lastHeartbeatAt: {
496
+ type: "string"
497
+ },
498
+ createdBy: {
499
+ type: "string"
500
+ },
501
+ secrets: {
502
+ $ref: "#/components/schemas/TaskSecrets"
503
+ },
504
+ state: {
505
+ $ref: "#/components/schemas/JsonObject"
506
+ }
507
+ },
508
+ required: ["id", "spec", "status", "createdAt"],
509
+ description: "SerializedTask"
510
+ },
511
+ TaskEventType: {
512
+ type: "string",
513
+ description: "TaskEventType",
514
+ enum: ["cancelled", "completion", "log", "recovered"]
515
+ },
516
+ TaskSecrets: {
517
+ allOf: [
518
+ {
519
+ type: "object",
520
+ additionalProperties: {
521
+ type: "string"
522
+ }
523
+ },
524
+ {
525
+ type: "object",
526
+ properties: {
527
+ backstageToken: {
528
+ type: "string"
529
+ }
530
+ }
531
+ }
532
+ ],
533
+ description: "TaskSecrets"
534
+ },
535
+ TaskStatus: {
536
+ type: "string",
537
+ enum: [
538
+ "cancelled",
539
+ "completed",
540
+ "failed",
541
+ "open",
542
+ "processing",
543
+ "skipped"
544
+ ],
545
+ description: "The status of each step of the Task"
546
+ },
547
+ TemplateGlobalFunction: {
548
+ type: "object",
549
+ properties: {
550
+ description: {
551
+ type: "string"
552
+ },
553
+ schema: {
554
+ type: "object",
555
+ properties: {
556
+ arguments: {
557
+ type: "array",
558
+ items: {
559
+ $ref: "#/components/schemas/JsonObject"
560
+ }
561
+ },
562
+ output: {
563
+ $ref: "#/components/schemas/JsonObject"
564
+ }
565
+ }
566
+ },
567
+ "'examples'": {
568
+ type: "array",
569
+ items: {
570
+ $ref: "#/components/schemas/ScaffolderUsageExample"
571
+ }
572
+ }
573
+ },
574
+ description: "The response shape for a single global function in the `listTemplatingExtensions` call to the `scaffolder-backend`"
575
+ },
576
+ TemplateGlobalValue: {
577
+ type: "object",
578
+ properties: {
579
+ description: {
580
+ type: "string"
581
+ },
582
+ value: {
583
+ type: "object",
584
+ nullable: true
585
+ }
586
+ },
587
+ required: ["value"],
588
+ description: "The response shape for a single global value in the `listTemplatingExtensions` call to the `scaffolder-backend`"
589
+ },
590
+ TemplateFilter: {
591
+ type: "object",
592
+ properties: {
593
+ description: {
594
+ type: "string"
595
+ },
596
+ schema: {
597
+ type: "object",
598
+ properties: {
599
+ input: {
600
+ $ref: "#/components/schemas/JsonObject"
601
+ },
602
+ arguments: {
603
+ type: "array",
604
+ items: {
605
+ $ref: "#/components/schemas/JsonObject"
606
+ }
607
+ },
608
+ output: {
609
+ $ref: "#/components/schemas/JsonObject"
610
+ }
611
+ }
612
+ },
613
+ "'examples'": {
614
+ type: "array",
615
+ items: {
616
+ $ref: "#/components/schemas/ScaffolderUsageExample"
617
+ }
618
+ }
619
+ },
620
+ description: "The response shape for a single filter in the `listTemplatingExtensions` call to the `scaffolder-backend`"
621
+ },
622
+ TemplateParameterSchema: {
623
+ type: "object",
624
+ properties: {
625
+ title: {
626
+ type: "string"
627
+ },
628
+ description: {
629
+ type: "string"
630
+ },
631
+ steps: {
632
+ type: "array",
633
+ items: {
634
+ type: "object",
635
+ properties: {
636
+ title: {
637
+ type: "string"
638
+ },
639
+ description: {
640
+ type: "string"
641
+ },
642
+ schema: {
643
+ type: "object"
644
+ }
645
+ },
646
+ required: ["title", "schema"]
647
+ }
648
+ }
649
+ },
650
+ required: ["title", "steps"],
651
+ description: "The shape of each entry of parameters which gets rendered\nas a separate step in the wizard input",
652
+ additionalProperties: {}
653
+ },
654
+ ValidationError: {
655
+ type: "object",
656
+ properties: {
657
+ path: {
658
+ type: "array",
659
+ items: {
660
+ oneOf: [
661
+ {
662
+ type: "string"
663
+ },
664
+ {
665
+ type: "integer"
666
+ }
667
+ ]
668
+ }
669
+ },
670
+ property: {
671
+ type: "string"
672
+ },
673
+ message: {
674
+ type: "string"
675
+ },
676
+ instance: {
677
+ type: "object"
678
+ },
679
+ name: {
680
+ type: "string"
681
+ },
682
+ argument: {
683
+ oneOf: [
684
+ {
685
+ type: "boolean"
686
+ },
687
+ {
688
+ type: "number"
689
+ },
690
+ {
691
+ type: "object"
692
+ },
693
+ {
694
+ type: "string"
695
+ }
696
+ ]
697
+ },
698
+ stack: {
699
+ type: "string"
700
+ }
701
+ },
702
+ required: [
703
+ "path",
704
+ "property",
705
+ "message",
706
+ "schema",
707
+ "instance",
708
+ "name",
709
+ "argument",
710
+ "stack"
711
+ ],
712
+ additionalProperties: {}
713
+ }
714
+ },
715
+ securitySchemes: {
716
+ JWT: {
717
+ type: "http",
718
+ scheme: "bearer",
719
+ bearerFormat: "JWT"
720
+ }
721
+ }
722
+ },
723
+ paths: {
724
+ "/v2/templates/{namespace}/{kind}/{name}/parameter-schema": {
725
+ get: {
726
+ operationId: "GetTemplateParameterSchema",
727
+ description: "Get template parameter schema.",
728
+ responses: {
729
+ "200": {
730
+ description: "Ok",
731
+ content: {
732
+ "application/json": {
733
+ schema: {
734
+ $ref: "#/components/schemas/TemplateParameterSchema"
735
+ }
736
+ }
737
+ }
738
+ },
739
+ "400": {
740
+ $ref: "#/components/responses/ErrorResponse"
741
+ },
742
+ default: {
743
+ $ref: "#/components/responses/ErrorResponse"
744
+ }
745
+ },
746
+ security: [
747
+ {},
748
+ {
749
+ JWT: []
750
+ }
751
+ ],
752
+ parameters: [
753
+ {
754
+ $ref: "#/components/parameters/namespace"
755
+ },
756
+ {
757
+ $ref: "#/components/parameters/kind"
758
+ },
759
+ {
760
+ $ref: "#/components/parameters/name"
761
+ }
762
+ ]
763
+ }
764
+ },
765
+ "/v2/actions": {
766
+ get: {
767
+ operationId: "ListActions",
768
+ description: "Returns a list of all installed actions.",
769
+ responses: {
770
+ "200": {
771
+ description: "Ok",
772
+ content: {
773
+ "application/json": {
774
+ schema: {
775
+ $ref: "#/components/schemas/ListActionsResponse"
776
+ }
777
+ }
778
+ }
779
+ }
780
+ },
781
+ security: [
782
+ {},
783
+ {
784
+ JWT: []
785
+ }
786
+ ],
787
+ parameters: []
788
+ }
789
+ },
790
+ "/v2/tasks": {
791
+ get: {
792
+ operationId: "ListTasks",
793
+ description: "Returns a list of tasks, filtering by ownership and/or status if given.",
794
+ responses: {
795
+ "200": {
796
+ description: "Ok",
797
+ content: {
798
+ "application/json": {
799
+ schema: {
800
+ $ref: "#/components/schemas/ListTasksResponse"
801
+ }
802
+ }
803
+ }
804
+ }
805
+ },
806
+ security: [
807
+ {},
808
+ {
809
+ JWT: []
810
+ }
811
+ ],
812
+ parameters: [
813
+ {
814
+ $ref: "#/components/parameters/createdBy"
815
+ },
816
+ {
817
+ $ref: "#/components/parameters/limit"
818
+ },
819
+ {
820
+ $ref: "#/components/parameters/offset"
821
+ },
822
+ {
823
+ $ref: "#/components/parameters/order"
824
+ },
825
+ {
826
+ $ref: "#/components/parameters/status"
827
+ }
828
+ ]
829
+ },
830
+ post: {
831
+ operationId: "Scaffold",
832
+ description: "Executes the scaffolding of a component, given a template and its\nparameter values.",
833
+ requestBody: {
834
+ required: true,
835
+ content: {
836
+ "application/json": {
837
+ schema: {
838
+ $ref: "#/components/schemas/ScaffolderScaffoldOptions"
839
+ }
840
+ }
841
+ }
842
+ },
843
+ responses: {
844
+ "201": {
845
+ description: "Created",
846
+ content: {
847
+ "application/json": {
848
+ schema: {
849
+ type: "object",
850
+ properties: {
851
+ id: {
852
+ type: "string"
853
+ }
854
+ },
855
+ required: ["id"]
856
+ }
857
+ }
858
+ }
859
+ },
860
+ "400": {
861
+ description: "Validation errors.",
862
+ content: {
863
+ "application/json": {
864
+ schema: {
865
+ type: "object",
866
+ properties: {
867
+ errors: {
868
+ type: "array",
869
+ items: {
870
+ $ref: "#/components/schemas/ValidationError"
871
+ }
872
+ }
873
+ },
874
+ required: ["errors"]
875
+ }
876
+ }
877
+ }
878
+ }
879
+ },
880
+ security: [
881
+ {},
882
+ {
883
+ JWT: []
884
+ }
885
+ ],
886
+ parameters: []
887
+ }
888
+ },
889
+ "/v2/tasks/{taskId}": {
890
+ get: {
891
+ operationId: "GetTask",
892
+ description: "Get a task by ID.",
893
+ responses: {
894
+ "200": {
895
+ description: "Ok",
896
+ content: {
897
+ "application/json": {
898
+ schema: {
899
+ $ref: "#/components/schemas/SerializedTask"
900
+ }
901
+ }
902
+ }
903
+ },
904
+ "403": {
905
+ $ref: "#/components/responses/ErrorResponse"
906
+ }
907
+ },
908
+ security: [
909
+ {},
910
+ {
911
+ JWT: []
912
+ }
913
+ ],
914
+ parameters: [
915
+ {
916
+ $ref: "#/components/parameters/taskId"
917
+ }
918
+ ]
919
+ }
920
+ },
921
+ "/v2/tasks/{taskId}/cancel": {
922
+ post: {
923
+ operationId: "CancelTask",
924
+ description: "Sends a signal to a task broker to cancel the running task by taskId.",
925
+ responses: {
926
+ "200": {
927
+ description: "Ok",
928
+ content: {
929
+ "application/json": {
930
+ schema: {
931
+ type: "object",
932
+ properties: {
933
+ status: {
934
+ $ref: "#/components/schemas/TaskStatus"
935
+ }
936
+ }
937
+ }
938
+ }
939
+ }
940
+ }
941
+ },
942
+ security: [
943
+ {},
944
+ {
945
+ JWT: []
946
+ }
947
+ ],
948
+ parameters: [
949
+ {
950
+ $ref: "#/components/parameters/taskId"
951
+ }
952
+ ]
953
+ }
954
+ },
955
+ "/v2/tasks/{taskId}/retry": {
956
+ post: {
957
+ operationId: "Retry",
958
+ description: "Starts the task again from the point where it failed.",
959
+ requestBody: {
960
+ required: false,
961
+ content: {
962
+ "application/json": {
963
+ schema: {
964
+ type: "object",
965
+ properties: {
966
+ secrets: {
967
+ type: "object",
968
+ additionalProperties: {
969
+ type: "string"
970
+ }
971
+ }
972
+ }
973
+ }
974
+ }
975
+ }
976
+ },
977
+ responses: {
978
+ "201": {
979
+ description: "Ok",
980
+ content: {
981
+ "application/json": {
982
+ schema: {
983
+ type: "object",
984
+ properties: {
985
+ id: {
986
+ type: "string"
987
+ }
988
+ },
989
+ required: ["id"]
990
+ }
991
+ }
992
+ }
993
+ }
994
+ },
995
+ security: [
996
+ {},
997
+ {
998
+ JWT: []
999
+ }
1000
+ ],
1001
+ parameters: [
1002
+ {
1003
+ $ref: "#/components/parameters/taskId"
1004
+ }
1005
+ ]
1006
+ }
1007
+ },
1008
+ "/v2/tasks/{taskId}/events": {
1009
+ get: {
1010
+ operationId: "StreamLogsPolling",
1011
+ description: "Get events for a task by ID.",
1012
+ responses: {
1013
+ "200": {
1014
+ description: "Ok",
1015
+ content: {
1016
+ "application/json": {
1017
+ schema: {
1018
+ type: "array",
1019
+ items: {
1020
+ $ref: "#/components/schemas/SerializedTaskEvent"
1021
+ }
1022
+ }
1023
+ }
1024
+ }
1025
+ },
1026
+ "403": {
1027
+ $ref: "#/components/responses/ErrorResponse"
1028
+ }
1029
+ },
1030
+ parameters: [
1031
+ {
1032
+ $ref: "#/components/parameters/eventsAfter"
1033
+ },
1034
+ {
1035
+ $ref: "#/components/parameters/taskId"
1036
+ }
1037
+ ]
1038
+ }
1039
+ },
1040
+ "/v2/dry-run": {
1041
+ post: {
1042
+ operationId: "DryRun",
1043
+ description: "Perform a dry-run of a template",
1044
+ requestBody: {
1045
+ required: true,
1046
+ content: {
1047
+ "application/json": {
1048
+ schema: {
1049
+ type: "object",
1050
+ properties: {
1051
+ template: {
1052
+ type: "object"
1053
+ },
1054
+ values: {
1055
+ $ref: "#/components/schemas/JsonObject"
1056
+ },
1057
+ secrets: {
1058
+ type: "object",
1059
+ additionalProperties: {
1060
+ type: "string"
1061
+ }
1062
+ },
1063
+ directoryContents: {
1064
+ type: "array",
1065
+ items: {
1066
+ type: "object",
1067
+ properties: {
1068
+ path: {
1069
+ type: "string"
1070
+ },
1071
+ base64Content: {
1072
+ type: "string"
1073
+ }
1074
+ }
1075
+ }
1076
+ }
1077
+ },
1078
+ required: ["template", "values", "directoryContents"]
1079
+ }
1080
+ }
1081
+ }
1082
+ },
1083
+ responses: {
1084
+ "200": {
1085
+ description: "Ok",
1086
+ content: {
1087
+ "application/json": {
1088
+ schema: {
1089
+ allOf: [
1090
+ {
1091
+ $ref: "#/components/schemas/DryRunResult"
1092
+ },
1093
+ {
1094
+ type: "object",
1095
+ properties: {
1096
+ steps: {
1097
+ type: "array",
1098
+ items: {
1099
+ type: "object",
1100
+ properties: {
1101
+ id: {
1102
+ type: "string"
1103
+ },
1104
+ name: {
1105
+ type: "string"
1106
+ },
1107
+ action: {
1108
+ type: "string"
1109
+ }
1110
+ },
1111
+ required: ["id", "name", "action"],
1112
+ additionalProperties: {}
1113
+ }
1114
+ },
1115
+ directoryContents: {
1116
+ type: "array",
1117
+ items: {
1118
+ type: "object",
1119
+ properties: {
1120
+ path: {
1121
+ type: "string"
1122
+ },
1123
+ executable: {
1124
+ type: "boolean"
1125
+ },
1126
+ base64Content: {
1127
+ type: "string"
1128
+ }
1129
+ },
1130
+ required: ["path", "base64Content"]
1131
+ }
1132
+ }
1133
+ },
1134
+ required: ["steps"]
1135
+ }
1136
+ ]
1137
+ }
1138
+ }
1139
+ }
1140
+ },
1141
+ "400": {
1142
+ description: "Validation errors.",
1143
+ content: {
1144
+ "application/json": {
1145
+ schema: {
1146
+ type: "object",
1147
+ properties: {
1148
+ errors: {
1149
+ type: "array",
1150
+ items: {
1151
+ $ref: "#/components/schemas/ValidationError"
1152
+ }
1153
+ }
1154
+ },
1155
+ required: ["errors"]
1156
+ }
1157
+ }
1158
+ }
1159
+ }
1160
+ },
1161
+ parameters: []
1162
+ }
1163
+ },
1164
+ "/v2/autocomplete/{provider}/{resource}": {
1165
+ post: {
1166
+ operationId: "Autocomplete",
1167
+ description: "Perform an autocomplete for the given provider and resource.",
1168
+ requestBody: {
1169
+ required: true,
1170
+ content: {
1171
+ "application/json": {
1172
+ schema: {
1173
+ type: "object",
1174
+ properties: {
1175
+ context: {
1176
+ type: "object",
1177
+ additionalProperties: {
1178
+ type: "string"
1179
+ }
1180
+ },
1181
+ token: {
1182
+ type: "string"
1183
+ }
1184
+ },
1185
+ required: ["context", "token"]
1186
+ }
1187
+ }
1188
+ }
1189
+ },
1190
+ responses: {
1191
+ "200": {
1192
+ description: "Ok",
1193
+ content: {
1194
+ "application/json": {
1195
+ schema: {
1196
+ type: "object",
1197
+ properties: {
1198
+ results: {
1199
+ type: "array",
1200
+ items: {
1201
+ type: "object",
1202
+ properties: {
1203
+ title: {
1204
+ type: "string"
1205
+ },
1206
+ id: {
1207
+ type: "string"
1208
+ }
1209
+ },
1210
+ required: ["id"]
1211
+ }
1212
+ }
1213
+ },
1214
+ required: ["results"]
1215
+ }
1216
+ }
1217
+ }
1218
+ },
1219
+ "400": {
1220
+ description: "Unsupported provider.",
1221
+ content: {
1222
+ "application/json": {
1223
+ schema: {
1224
+ type: "object",
1225
+ properties: {
1226
+ message: {
1227
+ type: "string"
1228
+ },
1229
+ name: {
1230
+ type: "string"
1231
+ }
1232
+ }
1233
+ }
1234
+ }
1235
+ }
1236
+ }
1237
+ },
1238
+ parameters: [
1239
+ {
1240
+ in: "path",
1241
+ name: "provider",
1242
+ required: true,
1243
+ allowReserved: true,
1244
+ schema: {
1245
+ type: "string"
1246
+ }
1247
+ },
1248
+ {
1249
+ in: "path",
1250
+ name: "resource",
1251
+ required: true,
1252
+ allowReserved: true,
1253
+ schema: {
1254
+ type: "string"
1255
+ }
1256
+ }
1257
+ ]
1258
+ }
1259
+ },
1260
+ "/v2/templating-extensions": {
1261
+ get: {
1262
+ operationId: "ListTemplatingExtensions",
1263
+ description: "Returns a structure describing the available templating extensions.",
1264
+ responses: {
1265
+ "200": {
1266
+ description: "Ok",
1267
+ content: {
1268
+ "application/json": {
1269
+ schema: {
1270
+ $ref: "#/components/schemas/ListTemplatingExtensionsResponse"
1271
+ }
1272
+ }
1273
+ }
1274
+ }
1275
+ },
1276
+ security: [
1277
+ {},
1278
+ {
1279
+ JWT: []
1280
+ }
1281
+ ],
1282
+ parameters: []
1283
+ }
1284
+ }
1285
+ }
1286
+ };
1287
+ const createOpenApiRouter = async (options) => backendOpenapiUtils.createValidatedOpenApiRouterFromGeneratedEndpointMap(
1288
+ spec,
1289
+ options
1290
+ );
1291
+
1292
+ exports.createOpenApiRouter = createOpenApiRouter;
1293
+ exports.spec = spec;
1294
+ //# sourceMappingURL=router.cjs.js.map