@epilot/blueprint-manifest-client 2.3.0 → 2.3.2

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/dist/openapi.json CHANGED
@@ -16,7 +16,11 @@
16
16
  },
17
17
  {
18
18
  "name": "Import",
19
- "description": "Import a Blueprint Manifest"
19
+ "description": "Install or update a Blueprint Manifest"
20
+ },
21
+ {
22
+ "name": "Manifests",
23
+ "description": "Manage installed Manifests"
20
24
  }
21
25
  ],
22
26
  "security": [
@@ -64,7 +68,7 @@
64
68
  "post": {
65
69
  "operationId": "createExport",
66
70
  "summary": "createExport",
67
- "description": "Creates a new Export Job with a list of available resources to export from the passed root resource.\n",
71
+ "description": "Creates a new Export Job with a list of available resources to export from the passed root resource.\n\nMultiple root resources can be added by calling this multiple times with the same jobId\n",
68
72
  "tags": [
69
73
  "Export"
70
74
  ],
@@ -75,25 +79,7 @@
75
79
  "type": "object",
76
80
  "properties": {
77
81
  "resourceType": {
78
- "type": "string",
79
- "enum": [
80
- "journey",
81
- "product",
82
- "price",
83
- "tax",
84
- "automation_flow",
85
- "designbuilder",
86
- "file",
87
- "emailtemplate",
88
- "entity",
89
- "schema",
90
- "schema_attribute",
91
- "schema_capability",
92
- "schema_group",
93
- "workflow_definition",
94
- "closing_reason",
95
- "taxonomy_classification"
96
- ]
82
+ "$ref": "#/components/schemas/ResourceNodeType"
97
83
  },
98
84
  "resourceIds": {
99
85
  "type": "array",
@@ -103,14 +89,18 @@
103
89
  "minItems": 1,
104
90
  "maxItems": 25
105
91
  },
92
+ "jobId": {
93
+ "$ref": "#/components/schemas/JobID"
94
+ },
106
95
  "isExportingMultipleResources": {
107
96
  "type": "boolean",
108
97
  "description": "Temporary flag to indicate if multiple resources are being exported"
109
- },
110
- "jobId": {
111
- "type": "string"
112
98
  }
113
- }
99
+ },
100
+ "required": [
101
+ "resourceType",
102
+ "resourceIds"
103
+ ]
114
104
  }
115
105
  }
116
106
  }
@@ -168,7 +158,11 @@
168
158
  "type": "boolean",
169
159
  "description": "Temporary flag to indicate if multiple resources are being exported"
170
160
  }
171
- }
161
+ },
162
+ "required": [
163
+ "resourceName",
164
+ "selectedResourceIds"
165
+ ]
172
166
  }
173
167
  }
174
168
  }
@@ -237,7 +231,7 @@
237
231
  "post": {
238
232
  "operationId": "createPlan",
239
233
  "summary": "createPlan",
240
- "description": "Creates a new import job from an uploaded manifest file and returns the plan",
234
+ "description": "Creates a new import job from an uploaded manifest file and returns the plan.\n\nCreates an updated plan for an installed manifest when `manifest_id` is passed\n",
241
235
  "tags": [
242
236
  "Import"
243
237
  ],
@@ -245,14 +239,60 @@
245
239
  "content": {
246
240
  "application/json": {
247
241
  "schema": {
248
- "type": "object",
249
- "properties": {
250
- "manifestFilePath": {
251
- "description": "Path to the manifest file uploaded via `uploadManifest`",
252
- "type": "string",
253
- "example": "example.tf"
242
+ "oneOf": [
243
+ {
244
+ "type": "object",
245
+ "properties": {
246
+ "s3ref": {
247
+ "allOf": [
248
+ {
249
+ "description": "s3ref of manifest file uploaded via `uploadManifest`"
250
+ },
251
+ {
252
+ "$ref": "#/components/schemas/S3Reference"
253
+ }
254
+ ]
255
+ },
256
+ "manifest_id": {
257
+ "allOf": [
258
+ {
259
+ "description": "Update an existing manifest (optional)"
260
+ },
261
+ {
262
+ "$ref": "#/components/schemas/ManifestID"
263
+ }
264
+ ]
265
+ }
266
+ },
267
+ "required": [
268
+ "s3ref"
269
+ ]
270
+ },
271
+ {
272
+ "type": "object",
273
+ "deprecated": true,
274
+ "properties": {
275
+ "manifestFilePath": {
276
+ "deprecated": true,
277
+ "description": "Manifest s3 key uploaded via `uploadManifest`",
278
+ "type": "string"
279
+ },
280
+ "manifest_id": {
281
+ "allOf": [
282
+ {
283
+ "description": "Update an existing manifest (optional)"
284
+ },
285
+ {
286
+ "$ref": "#/components/schemas/ManifestID"
287
+ }
288
+ ]
289
+ }
290
+ },
291
+ "required": [
292
+ "manifestFilePath"
293
+ ]
254
294
  }
255
- }
295
+ ]
256
296
  }
257
297
  }
258
298
  }
@@ -281,7 +321,7 @@
281
321
  "post": {
282
322
  "operationId": "applyPlan",
283
323
  "summary": "applyPlan",
284
- "description": "Apply a plan returned by `createPlan`",
324
+ "description": "Apply a plan returned by `createPlan`.",
285
325
  "tags": [
286
326
  "Import"
287
327
  ],
@@ -307,11 +347,112 @@
307
347
  },
308
348
  "responses": {
309
349
  "200": {
310
- "description": "Success",
350
+ "description": "Applied Import Job ID",
351
+ "content": {
352
+ "application/json": {
353
+ "schema": {
354
+ "type": "object",
355
+ "properties": {
356
+ "jobId": {
357
+ "$ref": "#/components/schemas/JobID"
358
+ }
359
+ }
360
+ }
361
+ }
362
+ }
363
+ }
364
+ }
365
+ }
366
+ },
367
+ "/v1/blueprint-manifest/manifests": {
368
+ "get": {
369
+ "operationId": "listInstalledManifests",
370
+ "summary": "listInstalledManifests",
371
+ "description": "List Blueprint Manifests installed to the organization",
372
+ "tags": [
373
+ "Manifests"
374
+ ],
375
+ "responses": {
376
+ "200": {
377
+ "description": "Installed Blueprint Manifests in the organization",
378
+ "content": {
379
+ "application/json": {
380
+ "schema": {
381
+ "type": "object",
382
+ "properties": {
383
+ "total": {
384
+ "type": "integer",
385
+ "example": 1
386
+ },
387
+ "results": {
388
+ "type": "array",
389
+ "items": {
390
+ "$ref": "#/components/schemas/ManifestItem"
391
+ }
392
+ }
393
+ }
394
+ }
395
+ }
396
+ }
397
+ }
398
+ }
399
+ }
400
+ },
401
+ "/v1/blueprint-manifest/manifests/{manifest_id}": {
402
+ "get": {
403
+ "operationId": "getManifest",
404
+ "summary": "getManifest",
405
+ "description": "Get installed Manifest by ID",
406
+ "tags": [
407
+ "Manifests"
408
+ ],
409
+ "parameters": [
410
+ {
411
+ "in": "path",
412
+ "required": true,
413
+ "name": "manifest_id",
414
+ "schema": {
415
+ "$ref": "#/components/schemas/ManifestID"
416
+ }
417
+ }
418
+ ],
419
+ "responses": {
420
+ "200": {
421
+ "description": "Installed Blueprint Manifest in the Organization",
422
+ "content": {
423
+ "application/json": {
424
+ "schema": {
425
+ "$ref": "#/components/schemas/Manifest"
426
+ }
427
+ }
428
+ }
429
+ }
430
+ }
431
+ },
432
+ "delete": {
433
+ "operationId": "deleteManifest",
434
+ "summary": "deleteManifest",
435
+ "description": "Remove installed manifest from the org\n\nNote that this does not delete the installed resources of the Manifest!\n",
436
+ "tags": [
437
+ "Manifests"
438
+ ],
439
+ "parameters": [
440
+ {
441
+ "in": "path",
442
+ "required": true,
443
+ "name": "manifest_id",
444
+ "schema": {
445
+ "$ref": "#/components/schemas/ManifestID"
446
+ }
447
+ }
448
+ ],
449
+ "responses": {
450
+ "200": {
451
+ "description": "The deleted Manifest",
311
452
  "content": {
312
453
  "application/json": {
313
454
  "schema": {
314
- "type": "string"
455
+ "$ref": "#/components/schemas/Manifest"
315
456
  }
316
457
  }
317
458
  }
@@ -322,6 +463,42 @@
322
463
  },
323
464
  "components": {
324
465
  "schemas": {
466
+ "ManifestID": {
467
+ "type": "string",
468
+ "description": "ID of an imported / installed manifest",
469
+ "example": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341"
470
+ },
471
+ "JobID": {
472
+ "type": "string",
473
+ "description": "ID of an import or export job (state machine)",
474
+ "example": "4854bb2a-94f9-424d-a968-3fb17fb0bf89"
475
+ },
476
+ "Manifest": {
477
+ "allOf": [
478
+ {
479
+ "$ref": "#/components/schemas/CommonManifestFields"
480
+ },
481
+ {
482
+ "$ref": "#/components/schemas/CommonMarkdownFields"
483
+ },
484
+ {
485
+ "$ref": "#/components/schemas/CommonImportFields"
486
+ },
487
+ {
488
+ "$ref": "#/components/schemas/ManifestTimestampFields"
489
+ }
490
+ ]
491
+ },
492
+ "ManifestItem": {
493
+ "allOf": [
494
+ {
495
+ "$ref": "#/components/schemas/CommonManifestFields"
496
+ },
497
+ {
498
+ "$ref": "#/components/schemas/ManifestTimestampFields"
499
+ }
500
+ ]
501
+ },
325
502
  "JobStatus": {
326
503
  "type": "string",
327
504
  "enum": [
@@ -349,46 +526,47 @@
349
526
  "schema_attribute",
350
527
  "schema_capability",
351
528
  "schema_group",
529
+ "schema_group_headline",
352
530
  "workflow_definition",
353
531
  "closing_reason",
354
- "taxonomy_classification"
532
+ "taxonomy_classification",
533
+ "webhook"
355
534
  ]
356
535
  },
357
- "RootResourceNode": {
536
+ "PlanChanges": {
537
+ "type": "array",
538
+ "items": {
539
+ "type": "string",
540
+ "enum": [
541
+ "create",
542
+ "update",
543
+ "no-op",
544
+ "delete"
545
+ ]
546
+ }
547
+ },
548
+ "CommonResourceNode": {
358
549
  "type": "object",
359
550
  "properties": {
360
551
  "id": {
361
- "type": "string"
552
+ "type": "string",
553
+ "description": "ID of the resource"
362
554
  },
363
555
  "type": {
364
- "$ref": "#/components/schemas/ResourceNodeType"
556
+ "$ref": "#/components/schemas/ResourceNodeType",
557
+ "description": "Type of the resource"
365
558
  },
366
559
  "name": {
367
- "type": "string"
560
+ "type": "string",
561
+ "description": "Name of the resource"
368
562
  },
369
563
  "source_id": {
370
- "type": "string"
371
- },
372
- "address": {
373
- "type": "string"
374
- },
375
- "dependencies": {
376
- "type": "array",
377
- "items": {
378
- "$ref": "#/components/schemas/VirtualResourceNodeGroup"
379
- }
564
+ "type": "string",
565
+ "description": "Source ID of the resource"
380
566
  },
381
- "changes": {
382
- "type": "array",
383
- "items": {
384
- "type": "string",
385
- "enum": [
386
- "create",
387
- "update",
388
- "no-op",
389
- "delete"
390
- ]
391
- }
567
+ "is_virtual": {
568
+ "type": "boolean",
569
+ "description": "Whether the resource is virtual"
392
570
  }
393
571
  },
394
572
  "required": [
@@ -396,144 +574,242 @@
396
574
  "type"
397
575
  ]
398
576
  },
399
- "VirtualResourceNodeGroup": {
400
- "type": "object",
401
- "properties": {
402
- "id": {
403
- "type": "string"
404
- },
405
- "type": {
406
- "$ref": "#/components/schemas/ResourceNodeType"
407
- },
408
- "name": {
409
- "type": "string"
577
+ "RootResourceNode": {
578
+ "allOf": [
579
+ {
580
+ "$ref": "#/components/schemas/CommonResourceNode"
410
581
  },
411
- "dependencies": {
412
- "type": "array",
413
- "items": {
414
- "$ref": "#/components/schemas/ResourceNode"
582
+ {
583
+ "type": "object",
584
+ "properties": {
585
+ "address": {
586
+ "type": "string",
587
+ "description": "Terraform address of the resource"
588
+ },
589
+ "dependencies": {
590
+ "type": "array",
591
+ "items": {
592
+ "$ref": "#/components/schemas/VirtualResourceNodeGroup"
593
+ },
594
+ "description": "Dependencies of the resource",
595
+ "nullable": true
596
+ },
597
+ "changes": {
598
+ "$ref": "#/components/schemas/PlanChanges"
599
+ }
415
600
  }
416
- },
417
- "is_virtual": {
418
- "type": "boolean"
419
601
  }
420
- },
421
- "required": [
422
- "id",
423
- "type"
424
602
  ]
425
603
  },
426
- "ResourceNode": {
427
- "type": "object",
428
- "properties": {
429
- "id": {
430
- "type": "string"
431
- },
432
- "type": {
433
- "$ref": "#/components/schemas/ResourceNodeType"
434
- },
435
- "name": {
436
- "type": "string"
437
- },
438
- "source_id": {
439
- "type": "string"
440
- },
441
- "address": {
442
- "type": "string"
604
+ "VirtualResourceNodeGroup": {
605
+ "allOf": [
606
+ {
607
+ "$ref": "#/components/schemas/CommonResourceNode"
443
608
  },
444
- "changes": {
445
- "type": "array",
446
- "items": {
447
- "type": "string",
448
- "enum": [
449
- "create",
450
- "update",
451
- "no-op",
452
- "delete"
453
- ]
609
+ {
610
+ "type": "object",
611
+ "properties": {
612
+ "dependencies": {
613
+ "type": "array",
614
+ "items": {
615
+ "$ref": "#/components/schemas/ResourceNode"
616
+ }
617
+ },
618
+ "is_virtual": {
619
+ "type": "boolean",
620
+ "enum": [
621
+ true
622
+ ]
623
+ }
454
624
  }
625
+ }
626
+ ]
627
+ },
628
+ "ResourceNode": {
629
+ "allOf": [
630
+ {
631
+ "$ref": "#/components/schemas/CommonResourceNode"
455
632
  },
456
- "parents": {
457
- "type": "array",
458
- "items": {
459
- "type": "object",
460
- "properties": {
461
- "id": {
462
- "type": "string"
633
+ {
634
+ "type": "object",
635
+ "properties": {
636
+ "address": {
637
+ "type": "string",
638
+ "description": "Terraform address of the resource"
639
+ },
640
+ "dependencies": {
641
+ "type": "array",
642
+ "items": {
643
+ "$ref": "#/components/schemas/ResourceNode"
463
644
  },
464
- "type": {
465
- "$ref": "#/components/schemas/ResourceNodeType"
645
+ "description": "Dependencies of the resource",
646
+ "nullable": true
647
+ },
648
+ "parents": {
649
+ "type": "array",
650
+ "items": {
651
+ "type": "object",
652
+ "properties": {
653
+ "id": {
654
+ "type": "string"
655
+ },
656
+ "type": {
657
+ "$ref": "#/components/schemas/ResourceNodeType"
658
+ }
659
+ }
466
660
  }
661
+ },
662
+ "source_id": {
663
+ "description": "Original ID of the exported resource",
664
+ "type": "string"
665
+ },
666
+ "changes": {
667
+ "$ref": "#/components/schemas/PlanChanges"
467
668
  }
468
669
  }
469
670
  }
470
- },
471
- "required": [
472
- "id",
473
- "type"
474
671
  ]
475
672
  },
476
- "JobID": {
477
- "type": "string",
478
- "description": "ID of an import or export job",
479
- "example": "4854bb2a-94f9-424d-a968-3fb17fb0bf89"
480
- },
481
673
  "Job": {
482
- "type": "object",
483
- "properties": {
484
- "job_status": {
485
- "$ref": "#/components/schemas/JobStatus"
674
+ "allOf": [
675
+ {
676
+ "type": "object",
677
+ "properties": {
678
+ "job_id": {
679
+ "$ref": "#/components/schemas/JobID"
680
+ },
681
+ "job_status": {
682
+ "$ref": "#/components/schemas/JobStatus"
683
+ },
684
+ "message": {
685
+ "type": "string"
686
+ },
687
+ "timestamp": {
688
+ "type": "string",
689
+ "format": "date-time"
690
+ },
691
+ "plan_file_content": {
692
+ "type": "string",
693
+ "description": "An URL to download the plan file"
694
+ },
695
+ "resources_to_export": {
696
+ "description": "An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import",
697
+ "oneOf": [
698
+ {
699
+ "type": "array",
700
+ "items": {
701
+ "$ref": "#/components/schemas/RootResourceNode"
702
+ }
703
+ },
704
+ {
705
+ "$ref": "#/components/schemas/RootResourceNode"
706
+ }
707
+ ]
708
+ },
709
+ "large_resources_to_export_url": {
710
+ "type": "string",
711
+ "description": "An URL to download the resources to export when the resources are too large to be included in the response"
712
+ },
713
+ "resources_to_import": {
714
+ "description": "An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import",
715
+ "oneOf": [
716
+ {
717
+ "type": "array",
718
+ "items": {
719
+ "$ref": "#/components/schemas/RootResourceNode"
720
+ }
721
+ },
722
+ {
723
+ "$ref": "#/components/schemas/RootResourceNode"
724
+ }
725
+ ]
726
+ },
727
+ "large_resources_to_import_url": {
728
+ "type": "string",
729
+ "description": "An URL to download the resources to import when the resources are too large to be included in the response"
730
+ }
731
+ }
486
732
  },
487
- "job_id": {
488
- "$ref": "#/components/schemas/JobID"
733
+ {
734
+ "$ref": "#/components/schemas/CommonImportFields"
489
735
  },
490
- "message": {
491
- "type": "string"
736
+ {
737
+ "$ref": "#/components/schemas/CommonMarkdownFields"
492
738
  },
493
- "timestamp": {
739
+ {
740
+ "$ref": "#/components/schemas/CommonManifestFields"
741
+ }
742
+ ]
743
+ },
744
+ "UploadFilePayload": {
745
+ "type": "object",
746
+ "properties": {
747
+ "filename": {
494
748
  "type": "string",
495
- "format": "date-time"
496
- },
497
- "plan_file_content": {
749
+ "example": "example.manifest.zip"
750
+ }
751
+ },
752
+ "required": [
753
+ "filename"
754
+ ]
755
+ },
756
+ "S3Reference": {
757
+ "type": "object",
758
+ "properties": {
759
+ "bucket": {
498
760
  "type": "string",
499
- "description": "An URL to download the plan file"
761
+ "example": "blueprint-manifest-prod-blueprintsv2bucket-sybpsryropzw"
500
762
  },
501
- "resources_to_export": {
502
- "description": "An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import",
503
- "oneOf": [
504
- {
505
- "type": "array",
506
- "items": {
507
- "$ref": "#/components/schemas/RootResourceNode"
508
- }
509
- },
510
- {
511
- "$ref": "#/components/schemas/RootResourceNode"
512
- }
513
- ]
763
+ "key": {
764
+ "type": "string",
765
+ "example": "templates/main.tf"
766
+ }
767
+ },
768
+ "required": [
769
+ "bucket",
770
+ "key"
771
+ ]
772
+ },
773
+ "CommonManifestFields": {
774
+ "type": "object",
775
+ "properties": {
776
+ "manifest_id": {
777
+ "$ref": "#/components/schemas/ManifestID"
514
778
  },
515
- "large_resources_to_export_url": {
779
+ "source_blueprint_name": {
516
780
  "type": "string",
517
- "description": "An URL to download the resources to export when the resources are too large to be included in the response"
781
+ "example": "Solar B2B"
518
782
  },
519
- "resources_to_import": {
520
- "description": "An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import",
521
- "oneOf": [
522
- {
523
- "type": "array",
524
- "items": {
525
- "$ref": "#/components/schemas/RootResourceNode"
526
- }
527
- },
528
- {
529
- "$ref": "#/components/schemas/RootResourceNode"
530
- }
531
- ]
783
+ "source_blueprint_slug": {
784
+ "type": "string",
785
+ "description": "URL slug of a blueprint from the epilot marketplace",
786
+ "example": "solar-b2b"
532
787
  },
533
- "large_resources_to_import_url": {
788
+ "source_blueprint_version": {
789
+ "type": "string",
790
+ "description": "Version of the blueprint (semver)",
791
+ "example": "1.0.0"
792
+ }
793
+ }
794
+ },
795
+ "ManifestTimestampFields": {
796
+ "type": "object",
797
+ "properties": {
798
+ "created_at": {
799
+ "description": "When the manifest was first installed (applied)",
534
800
  "type": "string",
535
- "description": "An URL to download the resources to import when the resources are too large to be included in the response"
801
+ "format": "date-time"
536
802
  },
803
+ "updated_at": {
804
+ "description": "When the manifest was last updated (applied)",
805
+ "type": "string",
806
+ "format": "date-time"
807
+ }
808
+ }
809
+ },
810
+ "CommonImportFields": {
811
+ "type": "object",
812
+ "properties": {
537
813
  "imported_resources": {
538
814
  "description": "An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import",
539
815
  "oneOf": [
@@ -550,13 +826,27 @@
550
826
  },
551
827
  "large_imported_resources_url": {
552
828
  "type": "string",
553
- "description": "An URL to download the imported resources when the resources are too large to be included in the response"
554
- },
829
+ "format": "uri",
830
+ "description": "An URL to download the imported resources when the resources are too large to be included in the response",
831
+ "example": "https://blueprint-manifest-prod.s3.eu-central-1.amazonaws.com/large.json"
832
+ }
833
+ }
834
+ },
835
+ "CommonMarkdownFields": {
836
+ "type": "object",
837
+ "properties": {
555
838
  "markdown": {
556
839
  "type": "object",
840
+ "description": "Markdown content part of a manifest file",
557
841
  "properties": {
842
+ "manifest": {
843
+ "type": "string",
844
+ "description": "Markdown content shown before installing the manifest",
845
+ "example": "This is the content of the manifest.md file which contains the manifest descripton. \n"
846
+ },
558
847
  "preinstall": {
559
848
  "type": "string",
849
+ "deprecated": true,
560
850
  "description": "Markdown content to be displayed when showing the plan to install blueprint",
561
851
  "example": "This is the content of the preinstall.md file\n"
562
852
  },
@@ -568,37 +858,6 @@
568
858
  }
569
859
  }
570
860
  }
571
- },
572
- "UploadFilePayload": {
573
- "type": "object",
574
- "properties": {
575
- "filename": {
576
- "type": "string",
577
- "example": "main.tf"
578
- },
579
- "mime_type": {
580
- "description": "MIME type of file",
581
- "type": "string",
582
- "example": "application/pdf",
583
- "default": "application/octet-stream"
584
- }
585
- },
586
- "required": [
587
- "filename"
588
- ]
589
- },
590
- "S3Reference": {
591
- "type": "object",
592
- "properties": {
593
- "bucket": {
594
- "type": "string",
595
- "example": "epilot-dev-blueprints"
596
- },
597
- "key": {
598
- "type": "string",
599
- "example": "templates/main.tf"
600
- }
601
- }
602
861
  }
603
862
  },
604
863
  "parameters": {