@epilot/blueprint-manifest-client 2.2.1 → 2.2.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.
@@ -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 {
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
  }
@@ -313,7 +316,7 @@
313
316
  "enum": [
314
317
  "STARTED",
315
318
  "WAITING_USER_ACTION",
316
- "CANCELLED",
319
+ "CANCELED",
317
320
  "IN_PROGRESS",
318
321
  "SUCCESS",
319
322
  "FAILED"
@@ -340,7 +343,7 @@
340
343
  "taxonomy_classification"
341
344
  ]
342
345
  },
343
- "ResourceNode": {
346
+ "RootResourceNode": {
344
347
  "type": "object",
345
348
  "properties": {
346
349
  "id": {
@@ -358,12 +361,75 @@
358
361
  "address": {
359
362
  "type": "string"
360
363
  },
364
+ "dependencies": {
365
+ "type": "array",
366
+ "items": {
367
+ "$ref": "#/components/schemas/VirtualResourceNodeGroup"
368
+ }
369
+ },
370
+ "changes": {
371
+ "type": "array",
372
+ "items": {
373
+ "type": "string",
374
+ "enum": [
375
+ "create",
376
+ "update",
377
+ "no-op",
378
+ "delete"
379
+ ]
380
+ }
381
+ }
382
+ },
383
+ "required": [
384
+ "id",
385
+ "type"
386
+ ]
387
+ },
388
+ "VirtualResourceNodeGroup": {
389
+ "type": "object",
390
+ "properties": {
391
+ "id": {
392
+ "type": "string"
393
+ },
394
+ "type": {
395
+ "$ref": "#/components/schemas/ResourceNodeType"
396
+ },
397
+ "name": {
398
+ "type": "string"
399
+ },
361
400
  "dependencies": {
362
401
  "type": "array",
363
402
  "items": {
364
403
  "$ref": "#/components/schemas/ResourceNode"
365
404
  }
366
405
  },
406
+ "is_virtual": {
407
+ "type": "boolean"
408
+ }
409
+ },
410
+ "required": [
411
+ "id",
412
+ "type"
413
+ ]
414
+ },
415
+ "ResourceNode": {
416
+ "type": "object",
417
+ "properties": {
418
+ "id": {
419
+ "type": "string"
420
+ },
421
+ "type": {
422
+ "$ref": "#/components/schemas/ResourceNodeType"
423
+ },
424
+ "name": {
425
+ "type": "string"
426
+ },
427
+ "source_id": {
428
+ "type": "string"
429
+ },
430
+ "address": {
431
+ "type": "string"
432
+ },
367
433
  "changes": {
368
434
  "type": "array",
369
435
  "items": {
@@ -375,6 +441,20 @@
375
441
  "delete"
376
442
  ]
377
443
  }
444
+ },
445
+ "parents": {
446
+ "type": "array",
447
+ "items": {
448
+ "type": "object",
449
+ "properties": {
450
+ "id": {
451
+ "type": "string"
452
+ },
453
+ "type": {
454
+ "$ref": "#/components/schemas/ResourceNodeType"
455
+ }
456
+ }
457
+ }
378
458
  }
379
459
  },
380
460
  "required": [
@@ -413,11 +493,11 @@
413
493
  {
414
494
  "type": "array",
415
495
  "items": {
416
- "$ref": "#/components/schemas/ResourceNode"
496
+ "$ref": "#/components/schemas/RootResourceNode"
417
497
  }
418
498
  },
419
499
  {
420
- "$ref": "#/components/schemas/ResourceNode"
500
+ "$ref": "#/components/schemas/RootResourceNode"
421
501
  }
422
502
  ]
423
503
  },
@@ -431,11 +511,11 @@
431
511
  {
432
512
  "type": "array",
433
513
  "items": {
434
- "$ref": "#/components/schemas/ResourceNode"
514
+ "$ref": "#/components/schemas/RootResourceNode"
435
515
  }
436
516
  },
437
517
  {
438
- "$ref": "#/components/schemas/ResourceNode"
518
+ "$ref": "#/components/schemas/RootResourceNode"
439
519
  }
440
520
  ]
441
521
  },
@@ -449,11 +529,11 @@
449
529
  {
450
530
  "type": "array",
451
531
  "items": {
452
- "$ref": "#/components/schemas/ResourceNode"
532
+ "$ref": "#/components/schemas/RootResourceNode"
453
533
  }
454
534
  },
455
535
  {
456
- "$ref": "#/components/schemas/ResourceNode"
536
+ "$ref": "#/components/schemas/RootResourceNode"
457
537
  }
458
538
  ]
459
539
  },
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.2",
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",