@epilot/blueprint-manifest-client 2.3.0 → 2.3.1

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.d.ts CHANGED
@@ -11,7 +11,7 @@ import type {
11
11
  declare namespace Components {
12
12
  namespace Parameters {
13
13
  export type JobID = /**
14
- * ID of an import or export job
14
+ * ID of an import or export job (state machine)
15
15
  * example:
16
16
  * 4854bb2a-94f9-424d-a968-3fb17fb0bf89
17
17
  */
@@ -21,14 +21,79 @@ declare namespace Components {
21
21
  JobID?: Parameters.JobID;
22
22
  }
23
23
  namespace Schemas {
24
+ export interface CommonImportFields {
25
+ /**
26
+ * An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import
27
+ */
28
+ imported_resources?: /* An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import */ RootResourceNode[] | RootResourceNode;
29
+ /**
30
+ * An URL to download the imported resources when the resources are too large to be included in the response
31
+ * example:
32
+ * https://blueprint-manifest-prod.s3.eu-central-1.amazonaws.com/large.json
33
+ */
34
+ large_imported_resources_url?: string; // uri
35
+ }
36
+ export interface CommonManifestFields {
37
+ manifest_id?: /**
38
+ * ID of an imported / installed manifest
39
+ * example:
40
+ * c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341
41
+ */
42
+ ManifestID;
43
+ /**
44
+ * example:
45
+ * Solar B2B
46
+ */
47
+ source_blueprint_name?: string;
48
+ /**
49
+ * URL slug of a blueprint from the epilot marketplace
50
+ * example:
51
+ * solar-b2b
52
+ */
53
+ source_blueprint_slug?: string;
54
+ /**
55
+ * Version of the blueprint (semver)
56
+ * example:
57
+ * 1.0.0
58
+ */
59
+ source_blueprint_version?: string;
60
+ }
61
+ export interface CommonMarkdownFields {
62
+ /**
63
+ * Markdown content part of a manifest file
64
+ */
65
+ markdown?: {
66
+ /**
67
+ * Markdown content shown before installing the manifest
68
+ * example:
69
+ * This is the content of the manifest.md file which contains the manifest descripton.
70
+ *
71
+ */
72
+ manifest?: string;
73
+ /**
74
+ * Markdown content to be displayed when showing the plan to install blueprint
75
+ * example:
76
+ * This is the content of the preinstall.md file
77
+ *
78
+ */
79
+ preinstall?: string;
80
+ /**
81
+ * Markdown content to be displayed when showing the plan to install blueprint
82
+ * example:
83
+ * This is the content of the postinstall.md file
84
+ *
85
+ */
86
+ postinstall?: string;
87
+ };
88
+ }
24
89
  export interface Job {
25
- job_status?: JobStatus;
26
90
  job_id?: /**
27
- * ID of an import or export job
91
+ * ID of an import or export job (state machine)
28
92
  * example:
29
93
  * 4854bb2a-94f9-424d-a968-3fb17fb0bf89
30
94
  */
31
95
  JobID;
96
+ job_status?: JobStatus;
32
97
  message?: string;
33
98
  timestamp?: string; // date-time
34
99
  /**
@@ -57,9 +122,21 @@ declare namespace Components {
57
122
  imported_resources?: /* An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import */ RootResourceNode[] | RootResourceNode;
58
123
  /**
59
124
  * An URL to download the imported resources when the resources are too large to be included in the response
125
+ * example:
126
+ * https://blueprint-manifest-prod.s3.eu-central-1.amazonaws.com/large.json
127
+ */
128
+ large_imported_resources_url?: string; // uri
129
+ /**
130
+ * Markdown content part of a manifest file
60
131
  */
61
- large_imported_resources_url?: string;
62
132
  markdown?: {
133
+ /**
134
+ * Markdown content shown before installing the manifest
135
+ * example:
136
+ * This is the content of the manifest.md file which contains the manifest descripton.
137
+ *
138
+ */
139
+ manifest?: string;
63
140
  /**
64
141
  * Markdown content to be displayed when showing the plan to install blueprint
65
142
  * example:
@@ -75,14 +152,155 @@ declare namespace Components {
75
152
  */
76
153
  postinstall?: string;
77
154
  };
155
+ manifest_id?: /**
156
+ * ID of an imported / installed manifest
157
+ * example:
158
+ * c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341
159
+ */
160
+ ManifestID;
161
+ /**
162
+ * example:
163
+ * Solar B2B
164
+ */
165
+ source_blueprint_name?: string;
166
+ /**
167
+ * URL slug of a blueprint from the epilot marketplace
168
+ * example:
169
+ * solar-b2b
170
+ */
171
+ source_blueprint_slug?: string;
172
+ /**
173
+ * Version of the blueprint (semver)
174
+ * example:
175
+ * 1.0.0
176
+ */
177
+ source_blueprint_version?: string;
78
178
  }
79
179
  /**
80
- * ID of an import or export job
180
+ * ID of an import or export job (state machine)
81
181
  * example:
82
182
  * 4854bb2a-94f9-424d-a968-3fb17fb0bf89
83
183
  */
84
184
  export type JobID = string;
85
185
  export type JobStatus = "STARTED" | "WAITING_USER_ACTION" | "CANCELED" | "IN_PROGRESS" | "SUCCESS" | "FAILED";
186
+ export interface Manifest {
187
+ manifest_id?: /**
188
+ * ID of an imported / installed manifest
189
+ * example:
190
+ * c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341
191
+ */
192
+ ManifestID;
193
+ /**
194
+ * example:
195
+ * Solar B2B
196
+ */
197
+ source_blueprint_name?: string;
198
+ /**
199
+ * URL slug of a blueprint from the epilot marketplace
200
+ * example:
201
+ * solar-b2b
202
+ */
203
+ source_blueprint_slug?: string;
204
+ /**
205
+ * Version of the blueprint (semver)
206
+ * example:
207
+ * 1.0.0
208
+ */
209
+ source_blueprint_version?: string;
210
+ /**
211
+ * Markdown content part of a manifest file
212
+ */
213
+ markdown?: {
214
+ /**
215
+ * Markdown content shown before installing the manifest
216
+ * example:
217
+ * This is the content of the manifest.md file which contains the manifest descripton.
218
+ *
219
+ */
220
+ manifest?: string;
221
+ /**
222
+ * Markdown content to be displayed when showing the plan to install blueprint
223
+ * example:
224
+ * This is the content of the preinstall.md file
225
+ *
226
+ */
227
+ preinstall?: string;
228
+ /**
229
+ * Markdown content to be displayed when showing the plan to install blueprint
230
+ * example:
231
+ * This is the content of the postinstall.md file
232
+ *
233
+ */
234
+ postinstall?: string;
235
+ };
236
+ /**
237
+ * An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import
238
+ */
239
+ imported_resources?: /* An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import */ RootResourceNode[] | RootResourceNode;
240
+ /**
241
+ * An URL to download the imported resources when the resources are too large to be included in the response
242
+ * example:
243
+ * https://blueprint-manifest-prod.s3.eu-central-1.amazonaws.com/large.json
244
+ */
245
+ large_imported_resources_url?: string; // uri
246
+ /**
247
+ * When the manifest was first installed (applied)
248
+ */
249
+ created_at?: string; // date-time
250
+ /**
251
+ * When the manifest was last updated (applied)
252
+ */
253
+ updated_at?: string; // date-time
254
+ }
255
+ /**
256
+ * ID of an imported / installed manifest
257
+ * example:
258
+ * c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341
259
+ */
260
+ export type ManifestID = string;
261
+ export interface ManifestItem {
262
+ manifest_id?: /**
263
+ * ID of an imported / installed manifest
264
+ * example:
265
+ * c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341
266
+ */
267
+ ManifestID;
268
+ /**
269
+ * example:
270
+ * Solar B2B
271
+ */
272
+ source_blueprint_name?: string;
273
+ /**
274
+ * URL slug of a blueprint from the epilot marketplace
275
+ * example:
276
+ * solar-b2b
277
+ */
278
+ source_blueprint_slug?: string;
279
+ /**
280
+ * Version of the blueprint (semver)
281
+ * example:
282
+ * 1.0.0
283
+ */
284
+ source_blueprint_version?: string;
285
+ /**
286
+ * When the manifest was first installed (applied)
287
+ */
288
+ created_at?: string; // date-time
289
+ /**
290
+ * When the manifest was last updated (applied)
291
+ */
292
+ updated_at?: string; // date-time
293
+ }
294
+ export interface ManifestTimestampFields {
295
+ /**
296
+ * When the manifest was first installed (applied)
297
+ */
298
+ created_at?: string; // date-time
299
+ /**
300
+ * When the manifest was last updated (applied)
301
+ */
302
+ updated_at?: string; // date-time
303
+ }
86
304
  export interface ResourceNode {
87
305
  id: string;
88
306
  type: ResourceNodeType;
@@ -95,7 +313,7 @@ declare namespace Components {
95
313
  type?: ResourceNodeType;
96
314
  }[];
97
315
  }
98
- export type ResourceNodeType = "designbuilder" | "journey" | "product" | "price" | "tax" | "automation_flow" | "entity_mapping" | "file" | "emailtemplate" | "schema" | "schema_attribute" | "schema_capability" | "schema_group" | "workflow_definition" | "closing_reason" | "taxonomy_classification";
316
+ export type ResourceNodeType = "designbuilder" | "journey" | "product" | "price" | "tax" | "automation_flow" | "entity_mapping" | "file" | "emailtemplate" | "schema" | "schema_attribute" | "schema_capability" | "schema_group" | "workflow_definition" | "closing_reason" | "taxonomy_classification" | "webhook";
99
317
  export interface RootResourceNode {
100
318
  id: string;
101
319
  type: ResourceNodeType;
@@ -108,7 +326,7 @@ declare namespace Components {
108
326
  export interface S3Reference {
109
327
  /**
110
328
  * example:
111
- * epilot-dev-blueprints
329
+ * blueprint-manifest-prod-blueprintsv2bucket-sybpsryropzw
112
330
  */
113
331
  bucket?: string;
114
332
  /**
@@ -143,7 +361,7 @@ declare namespace Paths {
143
361
  namespace ApplyPlan {
144
362
  namespace Parameters {
145
363
  export type JobId = /**
146
- * ID of an import or export job
364
+ * ID of an import or export job (state machine)
147
365
  * example:
148
366
  * 4854bb2a-94f9-424d-a968-3fb17fb0bf89
149
367
  */
@@ -160,12 +378,19 @@ declare namespace Paths {
160
378
  manifestFilePath?: string;
161
379
  }
162
380
  namespace Responses {
163
- export type $200 = string;
381
+ export interface $200 {
382
+ jobId?: /**
383
+ * ID of an import or export job (state machine)
384
+ * example:
385
+ * 4854bb2a-94f9-424d-a968-3fb17fb0bf89
386
+ */
387
+ Components.Schemas.JobID;
388
+ }
164
389
  }
165
390
  }
166
391
  namespace CreateExport {
167
392
  export interface RequestBody {
168
- resourceType?: "journey" | "product" | "price" | "tax" | "automation_flow" | "designbuilder" | "file" | "emailtemplate" | "entity" | "schema" | "schema_attribute" | "schema_capability" | "schema_group" | "workflow_definition" | "closing_reason" | "taxonomy_classification";
393
+ resourceType?: Components.Schemas.ResourceNodeType;
169
394
  resourceIds?: [
170
395
  string,
171
396
  string?,
@@ -193,16 +418,21 @@ declare namespace Paths {
193
418
  string?,
194
419
  string?
195
420
  ];
421
+ jobId?: /**
422
+ * ID of an import or export job (state machine)
423
+ * example:
424
+ * 4854bb2a-94f9-424d-a968-3fb17fb0bf89
425
+ */
426
+ Components.Schemas.JobID;
196
427
  /**
197
428
  * Temporary flag to indicate if multiple resources are being exported
198
429
  */
199
430
  isExportingMultipleResources?: boolean;
200
- jobId?: string;
201
431
  }
202
432
  namespace Responses {
203
433
  export interface $200 {
204
434
  jobId?: /**
205
- * ID of an import or export job
435
+ * ID of an import or export job (state machine)
206
436
  * example:
207
437
  * 4854bb2a-94f9-424d-a968-3fb17fb0bf89
208
438
  */
@@ -211,14 +441,36 @@ declare namespace Paths {
211
441
  }
212
442
  }
213
443
  namespace CreatePlan {
214
- export interface RequestBody {
444
+ export type RequestBody = {
215
445
  /**
216
- * Path to the manifest file uploaded via `uploadManifest`
446
+ * s3ref of manifest file uploaded via `uploadManifest`
447
+ */
448
+ s3ref: {
449
+ /**
450
+ * example:
451
+ * blueprint-manifest-prod-blueprintsv2bucket-sybpsryropzw
452
+ */
453
+ bucket?: string;
454
+ /**
455
+ * example:
456
+ * templates/main.tf
457
+ */
458
+ key?: string;
459
+ };
460
+ /**
461
+ * ID of an imported / installed manifest
462
+ * example:
463
+ * c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341
464
+ */
465
+ manifest_id?: string;
466
+ } | {
467
+ /**
468
+ * Manifest file key uploaded via `uploadManifest`
217
469
  * example:
218
470
  * example.tf
219
471
  */
220
- manifestFilePath?: string;
221
- }
472
+ manifestFilePath: string;
473
+ };
222
474
  namespace Responses {
223
475
  export interface $200 {
224
476
  /**
@@ -229,10 +481,26 @@ declare namespace Paths {
229
481
  }
230
482
  }
231
483
  }
484
+ namespace DeleteManifest {
485
+ namespace Parameters {
486
+ export type ManifestId = /**
487
+ * ID of an imported / installed manifest
488
+ * example:
489
+ * c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341
490
+ */
491
+ Components.Schemas.ManifestID;
492
+ }
493
+ export interface PathParameters {
494
+ manifest_id: Parameters.ManifestId;
495
+ }
496
+ namespace Responses {
497
+ export type $200 = Components.Schemas.Manifest;
498
+ }
499
+ }
232
500
  namespace ExportManifest {
233
501
  namespace Parameters {
234
502
  export type JobId = /**
235
- * ID of an import or export job
503
+ * ID of an import or export job (state machine)
236
504
  * example:
237
505
  * 4854bb2a-94f9-424d-a968-3fb17fb0bf89
238
506
  */
@@ -259,7 +527,7 @@ declare namespace Paths {
259
527
  namespace Responses {
260
528
  export interface $200 {
261
529
  jobId?: /**
262
- * ID of an import or export job
530
+ * ID of an import or export job (state machine)
263
531
  * example:
264
532
  * 4854bb2a-94f9-424d-a968-3fb17fb0bf89
265
533
  */
@@ -270,7 +538,7 @@ declare namespace Paths {
270
538
  namespace GetJob {
271
539
  namespace Parameters {
272
540
  export type JobId = /**
273
- * ID of an import or export job
541
+ * ID of an import or export job (state machine)
274
542
  * example:
275
543
  * 4854bb2a-94f9-424d-a968-3fb17fb0bf89
276
544
  */
@@ -283,6 +551,34 @@ declare namespace Paths {
283
551
  export type $200 = Components.Schemas.Job;
284
552
  }
285
553
  }
554
+ namespace GetManifest {
555
+ namespace Parameters {
556
+ export type ManifestId = /**
557
+ * ID of an imported / installed manifest
558
+ * example:
559
+ * c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341
560
+ */
561
+ Components.Schemas.ManifestID;
562
+ }
563
+ export interface PathParameters {
564
+ manifest_id: Parameters.ManifestId;
565
+ }
566
+ namespace Responses {
567
+ export type $200 = Components.Schemas.Manifest;
568
+ }
569
+ }
570
+ namespace ListInstalledManifests {
571
+ namespace Responses {
572
+ export interface $200 {
573
+ /**
574
+ * example:
575
+ * 1
576
+ */
577
+ total?: number;
578
+ results?: Components.Schemas.ManifestItem[];
579
+ }
580
+ }
581
+ }
286
582
  namespace UploadManifest {
287
583
  export type RequestBody = Components.Schemas.UploadFilePayload;
288
584
  namespace Responses {
@@ -314,6 +610,8 @@ export interface OperationMethods {
314
610
  *
315
611
  * Creates a new Export Job with a list of available resources to export from the passed root resource.
316
612
  *
613
+ * Multiple root resources can be added by calling this multiple times with the same jobId
614
+ *
317
615
  */
318
616
  'createExport'(
319
617
  parameters?: Parameters<UnknownParamsObject> | null,
@@ -344,7 +642,10 @@ export interface OperationMethods {
344
642
  /**
345
643
  * createPlan - createPlan
346
644
  *
347
- * Creates a new import job from an uploaded manifest file and returns the plan
645
+ * Creates a new import job from an uploaded manifest file and returns the plan.
646
+ *
647
+ * Creates an updated plan for an installed manifest when `manifest_id` is passed
648
+ *
348
649
  */
349
650
  'createPlan'(
350
651
  parameters?: Parameters<UnknownParamsObject> | null,
@@ -354,13 +655,46 @@ export interface OperationMethods {
354
655
  /**
355
656
  * applyPlan - applyPlan
356
657
  *
357
- * Apply a plan returned by `createPlan`
658
+ * Apply a plan returned by `createPlan`.
358
659
  */
359
660
  'applyPlan'(
360
661
  parameters?: Parameters<Paths.ApplyPlan.PathParameters> | null,
361
662
  data?: Paths.ApplyPlan.RequestBody,
362
663
  config?: AxiosRequestConfig
363
664
  ): OperationResponse<Paths.ApplyPlan.Responses.$200>
665
+ /**
666
+ * listInstalledManifests - listInstalledManifests
667
+ *
668
+ * List Blueprint Manifests installed to the organization
669
+ */
670
+ 'listInstalledManifests'(
671
+ parameters?: Parameters<UnknownParamsObject> | null,
672
+ data?: any,
673
+ config?: AxiosRequestConfig
674
+ ): OperationResponse<Paths.ListInstalledManifests.Responses.$200>
675
+ /**
676
+ * getManifest - getManifest
677
+ *
678
+ * Get installed Manifest by ID
679
+ */
680
+ 'getManifest'(
681
+ parameters?: Parameters<Paths.GetManifest.PathParameters> | null,
682
+ data?: any,
683
+ config?: AxiosRequestConfig
684
+ ): OperationResponse<Paths.GetManifest.Responses.$200>
685
+ /**
686
+ * deleteManifest - deleteManifest
687
+ *
688
+ * Remove installed manifest from the org
689
+ *
690
+ * Note that this does not delete the installed resources of the Manifest!
691
+ *
692
+ */
693
+ 'deleteManifest'(
694
+ parameters?: Parameters<Paths.DeleteManifest.PathParameters> | null,
695
+ data?: any,
696
+ config?: AxiosRequestConfig
697
+ ): OperationResponse<Paths.DeleteManifest.Responses.$200>
364
698
  }
365
699
 
366
700
  export interface PathsDictionary {
@@ -382,6 +716,8 @@ export interface PathsDictionary {
382
716
  *
383
717
  * Creates a new Export Job with a list of available resources to export from the passed root resource.
384
718
  *
719
+ * Multiple root resources can be added by calling this multiple times with the same jobId
720
+ *
385
721
  */
386
722
  'post'(
387
723
  parameters?: Parameters<UnknownParamsObject> | null,
@@ -418,7 +754,10 @@ export interface PathsDictionary {
418
754
  /**
419
755
  * createPlan - createPlan
420
756
  *
421
- * Creates a new import job from an uploaded manifest file and returns the plan
757
+ * Creates a new import job from an uploaded manifest file and returns the plan.
758
+ *
759
+ * Creates an updated plan for an installed manifest when `manifest_id` is passed
760
+ *
422
761
  */
423
762
  'post'(
424
763
  parameters?: Parameters<UnknownParamsObject> | null,
@@ -430,7 +769,7 @@ export interface PathsDictionary {
430
769
  /**
431
770
  * applyPlan - applyPlan
432
771
  *
433
- * Apply a plan returned by `createPlan`
772
+ * Apply a plan returned by `createPlan`.
434
773
  */
435
774
  'post'(
436
775
  parameters?: Parameters<Paths.ApplyPlan.PathParameters> | null,
@@ -438,13 +777,57 @@ export interface PathsDictionary {
438
777
  config?: AxiosRequestConfig
439
778
  ): OperationResponse<Paths.ApplyPlan.Responses.$200>
440
779
  }
780
+ ['/v1/blueprint-manifest/manifests']: {
781
+ /**
782
+ * listInstalledManifests - listInstalledManifests
783
+ *
784
+ * List Blueprint Manifests installed to the organization
785
+ */
786
+ 'get'(
787
+ parameters?: Parameters<UnknownParamsObject> | null,
788
+ data?: any,
789
+ config?: AxiosRequestConfig
790
+ ): OperationResponse<Paths.ListInstalledManifests.Responses.$200>
791
+ }
792
+ ['/v1/blueprint-manifest/manifests/{manifest_id}']: {
793
+ /**
794
+ * getManifest - getManifest
795
+ *
796
+ * Get installed Manifest by ID
797
+ */
798
+ 'get'(
799
+ parameters?: Parameters<Paths.GetManifest.PathParameters> | null,
800
+ data?: any,
801
+ config?: AxiosRequestConfig
802
+ ): OperationResponse<Paths.GetManifest.Responses.$200>
803
+ /**
804
+ * deleteManifest - deleteManifest
805
+ *
806
+ * Remove installed manifest from the org
807
+ *
808
+ * Note that this does not delete the installed resources of the Manifest!
809
+ *
810
+ */
811
+ 'delete'(
812
+ parameters?: Parameters<Paths.DeleteManifest.PathParameters> | null,
813
+ data?: any,
814
+ config?: AxiosRequestConfig
815
+ ): OperationResponse<Paths.DeleteManifest.Responses.$200>
816
+ }
441
817
  }
442
818
 
443
819
  export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
444
820
 
821
+ export type CommonImportFields = Components.Schemas.CommonImportFields;
822
+ export type CommonManifestFields = Components.Schemas.CommonManifestFields;
823
+ export type CommonMarkdownFields = Components.Schemas.CommonMarkdownFields;
445
824
  export type Job = Components.Schemas.Job;
446
825
  export type JobID = Components.Schemas.JobID;
447
826
  export type JobStatus = Components.Schemas.JobStatus;
827
+ export type Manifest = Components.Schemas.Manifest;
828
+ export type ManifestID = Components.Schemas.ManifestID;
829
+ export type ManifestItem = Components.Schemas.ManifestItem;
830
+ export type ManifestTimestampFields = Components.Schemas.ManifestTimestampFields;
448
831
  export type ResourceNode = Components.Schemas.ResourceNode;
449
832
  export type ResourceNodeType = Components.Schemas.ResourceNodeType;
450
833
  export type RootResourceNode = Components.Schemas.RootResourceNode;