@epilot/blueprint-manifest-client 2.2.1 → 2.2.3

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.
@@ -1 +1 @@
1
- (()=>{"use strict";var e={914:function(e,t,o){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=r(o(240));t.default=s.default},240:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"servers":[{"url":"https://blueprint-manifest.sls.epilot.io"}],"paths":{"/v1/blueprint-manifest/jobs/{job_id}":{"get":{"operationId":"getJob","parameters":[{"$ref":"#/components/parameters/JobID"}],"responses":{}}},"/v1/blueprint-manifest/jobs:createExport":{"post":{"operationId":"createExport","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/blueprint-manifest/jobs/{job_id}:exportManifest":{"post":{"operationId":"exportManifest","parameters":[{"$ref":"#/components/parameters/JobID"}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/blueprint-manifest:uploadManifest":{"post":{"operationId":"uploadManifest","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/blueprint-manifest/jobs:createPlan":{"post":{"operationId":"createPlan","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/blueprint-manifest/jobs/{job_id}:applyPlan":{"post":{"operationId":"applyPlan","parameters":[{"$ref":"#/components/parameters/JobID"}],"requestBody":{"content":{"application/json":{}}},"responses":{}}}},"components":{"parameters":{"JobID":{"name":"job_id","in":"path","required":true}}}}')}},t={},o=function o(r){var s=t[r];if(void 0!==s)return s.exports;var n=t[r]={exports:{}};return e[r].call(n.exports,n,n.exports,o),n.exports}(914),r=exports;for(var s in o)r[s]=o[s];o.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={914:function(e,t,o){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=r(o(240));t.default=n.default},240:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"servers":[{"url":"https://blueprint-manifest.sls.epilot.io"}],"paths":{"/v1/blueprint-manifest/jobs/{job_id}":{"get":{"operationId":"getJob","parameters":[{"$ref":"#/components/parameters/JobID"}]}},"/v1/blueprint-manifest/jobs:createExport":{"post":{"operationId":"createExport","requestBody":{"content":{"application/json":{}}}}},"/v1/blueprint-manifest/jobs/{job_id}:exportManifest":{"post":{"operationId":"exportManifest","parameters":[{"$ref":"#/components/parameters/JobID"}],"requestBody":{"content":{"application/json":{}}}}},"/v1/blueprint-manifest:uploadManifest":{"post":{"operationId":"uploadManifest","requestBody":{"content":{"application/json":{}}}}},"/v1/blueprint-manifest/jobs:createPlan":{"post":{"operationId":"createPlan","requestBody":{"content":{"application/json":{}}}}},"/v1/blueprint-manifest/jobs/{job_id}:applyPlan":{"post":{"operationId":"applyPlan","parameters":[{"$ref":"#/components/parameters/JobID"}],"requestBody":{"content":{"application/json":{}}}}}},"components":{"parameters":{"JobID":{"name":"job_id","in":"path","required":true}}}}')}},t={},o=function o(r){var n=t[r];if(void 0!==n)return n.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,o),a.exports}(914),r=exports;for(var n in o)r[n]=o[n];o.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
@@ -17,8 +17,7 @@
17
17
  {
18
18
  "$ref": "#/components/parameters/JobID"
19
19
  }
20
- ],
21
- "responses": {}
20
+ ]
22
21
  }
23
22
  },
24
23
  "/v1/blueprint-manifest/jobs:createExport": {
@@ -28,8 +27,7 @@
28
27
  "content": {
29
28
  "application/json": {}
30
29
  }
31
- },
32
- "responses": {}
30
+ }
33
31
  }
34
32
  },
35
33
  "/v1/blueprint-manifest/jobs/{job_id}:exportManifest": {
@@ -44,8 +42,7 @@
44
42
  "content": {
45
43
  "application/json": {}
46
44
  }
47
- },
48
- "responses": {}
45
+ }
49
46
  }
50
47
  },
51
48
  "/v1/blueprint-manifest:uploadManifest": {
@@ -55,8 +52,7 @@
55
52
  "content": {
56
53
  "application/json": {}
57
54
  }
58
- },
59
- "responses": {}
55
+ }
60
56
  }
61
57
  },
62
58
  "/v1/blueprint-manifest/jobs:createPlan": {
@@ -66,8 +62,7 @@
66
62
  "content": {
67
63
  "application/json": {}
68
64
  }
69
- },
70
- "responses": {}
65
+ }
71
66
  }
72
67
  },
73
68
  "/v1/blueprint-manifest/jobs/{job_id}:applyPlan": {
@@ -82,8 +77,7 @@
82
77
  "content": {
83
78
  "application/json": {}
84
79
  }
85
- },
86
- "responses": {}
80
+ }
87
81
  }
88
82
  }
89
83
  },
package/dist/openapi.d.ts CHANGED
@@ -37,7 +37,7 @@ declare namespace Components {
37
37
  /**
38
38
  * An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import
39
39
  */
40
- resources_to_export?: /* An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import */ ResourceNode[] | ResourceNode;
40
+ resources_to_export?: /* An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import */ RootResourceNode[] | RootResourceNode;
41
41
  /**
42
42
  * An URL to download the resources to export when the resources are too large to be included in the response
43
43
  */
@@ -45,7 +45,7 @@ declare namespace Components {
45
45
  /**
46
46
  * An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import
47
47
  */
48
- resources_to_import?: /* An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import */ ResourceNode[] | ResourceNode;
48
+ resources_to_import?: /* An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import */ RootResourceNode[] | RootResourceNode;
49
49
  /**
50
50
  * An URL to download the resources to import when the resources are too large to be included in the response
51
51
  */
@@ -53,7 +53,7 @@ declare namespace Components {
53
53
  /**
54
54
  * An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import
55
55
  */
56
- imported_resources?: /* An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import */ ResourceNode[] | ResourceNode;
56
+ imported_resources?: /* An array of tree-like JSON objects or a singular tree-like JSON object representing the resources to import */ RootResourceNode[] | RootResourceNode;
57
57
  /**
58
58
  * An URL to download the imported resources when the resources are too large to be included in the response
59
59
  */
@@ -81,17 +81,29 @@ declare namespace Components {
81
81
  * 4854bb2a-94f9-424d-a968-3fb17fb0bf89
82
82
  */
83
83
  export type JobID = string;
84
- export type JobStatus = "STARTED" | "WAITING_USER_ACTION" | "CANCELLED" | "IN_PROGRESS" | "SUCCESS" | "FAILED";
84
+ export type JobStatus = "STARTED" | "WAITING_USER_ACTION" | "CANCELED" | "IN_PROGRESS" | "SUCCESS" | "FAILED";
85
85
  export interface ResourceNode {
86
86
  id: string;
87
87
  type: ResourceNodeType;
88
88
  name?: string;
89
89
  source_id?: string;
90
90
  address?: string;
91
- dependencies?: ResourceNode[];
92
91
  changes?: ("create" | "update" | "no-op" | "delete")[];
92
+ parents?: {
93
+ id?: string;
94
+ type?: ResourceNodeType;
95
+ }[];
93
96
  }
94
97
  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";
98
+ export interface RootResourceNode {
99
+ id: string;
100
+ type: ResourceNodeType;
101
+ name?: string;
102
+ source_id?: string;
103
+ address?: string;
104
+ dependencies?: VirtualResourceNodeGroup[];
105
+ changes?: ("create" | "update" | "no-op" | "delete")[];
106
+ }
95
107
  export interface S3Reference {
96
108
  /**
97
109
  * example:
@@ -117,6 +129,13 @@ declare namespace Components {
117
129
  */
118
130
  mime_type?: string;
119
131
  }
132
+ export interface VirtualResourceNodeGroup {
133
+ id: string;
134
+ type: ResourceNodeType;
135
+ name?: string;
136
+ dependencies?: ResourceNode[];
137
+ is_virtual?: boolean;
138
+ }
120
139
  }
121
140
  }
122
141
  declare namespace Paths {
@@ -173,6 +192,11 @@ declare namespace Paths {
173
192
  string?,
174
193
  string?
175
194
  ];
195
+ /**
196
+ * Temporary flag to indicate if multiple resources are being exported
197
+ */
198
+ isExportingMultipleResources?: boolean;
199
+ jobId?: string;
176
200
  }
177
201
  namespace Responses {
178
202
  export interface $200 {
@@ -226,6 +250,10 @@ declare namespace Paths {
226
250
  * journey_HouseConnectionJourney
227
251
  */
228
252
  resourceName?: string;
253
+ /**
254
+ * Temporary flag to indicate if multiple resources are being exported
255
+ */
256
+ isExportingMultipleResources?: boolean;
229
257
  }
230
258
  namespace Responses {
231
259
  export interface $200 {
package/dist/openapi.json CHANGED
@@ -25,6 +25,9 @@
25
25
  }
26
26
  ],
27
27
  "servers": [
28
+ {
29
+ "url": "https://blueprint-manifest.sls.epilot.io"
30
+ },
28
31
  {
29
32
  "url": "https://blueprint-manifest.sls.epilot.io"
30
33
  }
@@ -99,6 +102,13 @@
99
102
  },
100
103
  "minItems": 1,
101
104
  "maxItems": 25
105
+ },
106
+ "isExportingMultipleResources": {
107
+ "type": "boolean",
108
+ "description": "Temporary flag to indicate if multiple resources are being exported"
109
+ },
110
+ "jobId": {
111
+ "type": "string"
102
112
  }
103
113
  }
104
114
  }
@@ -153,6 +163,10 @@
153
163
  "resourceName": {
154
164
  "type": "string",
155
165
  "example": "journey_HouseConnectionJourney"
166
+ },
167
+ "isExportingMultipleResources": {
168
+ "type": "boolean",
169
+ "description": "Temporary flag to indicate if multiple resources are being exported"
156
170
  }
157
171
  }
158
172
  }
@@ -313,7 +327,7 @@
313
327
  "enum": [
314
328
  "STARTED",
315
329
  "WAITING_USER_ACTION",
316
- "CANCELLED",
330
+ "CANCELED",
317
331
  "IN_PROGRESS",
318
332
  "SUCCESS",
319
333
  "FAILED"
@@ -340,7 +354,7 @@
340
354
  "taxonomy_classification"
341
355
  ]
342
356
  },
343
- "ResourceNode": {
357
+ "RootResourceNode": {
344
358
  "type": "object",
345
359
  "properties": {
346
360
  "id": {
@@ -358,12 +372,75 @@
358
372
  "address": {
359
373
  "type": "string"
360
374
  },
375
+ "dependencies": {
376
+ "type": "array",
377
+ "items": {
378
+ "$ref": "#/components/schemas/VirtualResourceNodeGroup"
379
+ }
380
+ },
381
+ "changes": {
382
+ "type": "array",
383
+ "items": {
384
+ "type": "string",
385
+ "enum": [
386
+ "create",
387
+ "update",
388
+ "no-op",
389
+ "delete"
390
+ ]
391
+ }
392
+ }
393
+ },
394
+ "required": [
395
+ "id",
396
+ "type"
397
+ ]
398
+ },
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"
410
+ },
361
411
  "dependencies": {
362
412
  "type": "array",
363
413
  "items": {
364
414
  "$ref": "#/components/schemas/ResourceNode"
365
415
  }
366
416
  },
417
+ "is_virtual": {
418
+ "type": "boolean"
419
+ }
420
+ },
421
+ "required": [
422
+ "id",
423
+ "type"
424
+ ]
425
+ },
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"
443
+ },
367
444
  "changes": {
368
445
  "type": "array",
369
446
  "items": {
@@ -375,6 +452,20 @@
375
452
  "delete"
376
453
  ]
377
454
  }
455
+ },
456
+ "parents": {
457
+ "type": "array",
458
+ "items": {
459
+ "type": "object",
460
+ "properties": {
461
+ "id": {
462
+ "type": "string"
463
+ },
464
+ "type": {
465
+ "$ref": "#/components/schemas/ResourceNodeType"
466
+ }
467
+ }
468
+ }
378
469
  }
379
470
  },
380
471
  "required": [
@@ -413,11 +504,11 @@
413
504
  {
414
505
  "type": "array",
415
506
  "items": {
416
- "$ref": "#/components/schemas/ResourceNode"
507
+ "$ref": "#/components/schemas/RootResourceNode"
417
508
  }
418
509
  },
419
510
  {
420
- "$ref": "#/components/schemas/ResourceNode"
511
+ "$ref": "#/components/schemas/RootResourceNode"
421
512
  }
422
513
  ]
423
514
  },
@@ -431,11 +522,11 @@
431
522
  {
432
523
  "type": "array",
433
524
  "items": {
434
- "$ref": "#/components/schemas/ResourceNode"
525
+ "$ref": "#/components/schemas/RootResourceNode"
435
526
  }
436
527
  },
437
528
  {
438
- "$ref": "#/components/schemas/ResourceNode"
529
+ "$ref": "#/components/schemas/RootResourceNode"
439
530
  }
440
531
  ]
441
532
  },
@@ -449,11 +540,11 @@
449
540
  {
450
541
  "type": "array",
451
542
  "items": {
452
- "$ref": "#/components/schemas/ResourceNode"
543
+ "$ref": "#/components/schemas/RootResourceNode"
453
544
  }
454
545
  },
455
546
  {
456
- "$ref": "#/components/schemas/ResourceNode"
547
+ "$ref": "#/components/schemas/RootResourceNode"
457
548
  }
458
549
  ]
459
550
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/blueprint-manifest-client",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "description": "Client for epilot Terraform Blueprint Manifest API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,6 +25,7 @@
25
25
  "test": "jest",
26
26
  "bundle-definition": "webpack",
27
27
  "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/blueprint-manifest.yaml",
28
+ "openapi:local": "node ../../scripts/update-openapi.js ../../../blueprint-manifest-api/lambda/TerraformHandlerFunction/openapi.yml",
28
29
  "typegen": "echo '/* eslint-disable */' > src/openapi.d.ts && typegen ./src/openapi.json >> src/openapi.d.ts",
29
30
  "build": "tsc && npm run bundle-definition",
30
31
  "build:watch": "npm run build && tsc -w",