@flightctl/types 1.0.2 → 1.1.0-rc1
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/imagebuilder/index.d.ts +28 -0
- package/dist/imagebuilder/index.d.ts.map +1 -0
- package/dist/imagebuilder/index.js +14 -0
- package/dist/imagebuilder/index.js.map +1 -0
- package/dist/imagebuilder/models/BindingType.d.ts +8 -0
- package/dist/imagebuilder/models/BindingType.d.ts.map +1 -0
- package/dist/imagebuilder/models/BindingType.js +13 -0
- package/dist/imagebuilder/models/BindingType.js.map +1 -0
- package/dist/imagebuilder/models/EarlyBinding.d.ts +10 -0
- package/dist/imagebuilder/models/EarlyBinding.d.ts.map +1 -0
- package/dist/imagebuilder/models/EarlyBinding.js +2 -0
- package/dist/imagebuilder/models/EarlyBinding.js.map +1 -0
- package/dist/imagebuilder/models/ExportFormatType.d.ts +10 -0
- package/dist/imagebuilder/models/ExportFormatType.d.ts.map +1 -0
- package/dist/imagebuilder/models/ExportFormatType.js +15 -0
- package/dist/imagebuilder/models/ExportFormatType.js.map +1 -0
- package/dist/imagebuilder/models/ImageBuild.d.ts +25 -0
- package/dist/imagebuilder/models/ImageBuild.d.ts.map +1 -0
- package/dist/imagebuilder/models/ImageBuild.js +2 -0
- package/dist/imagebuilder/models/ImageBuild.js.map +1 -0
- package/dist/imagebuilder/models/ImageBuildBinding.d.ts +7 -0
- package/dist/imagebuilder/models/ImageBuildBinding.d.ts.map +1 -0
- package/dist/imagebuilder/models/ImageBuildBinding.js +2 -0
- package/dist/imagebuilder/models/ImageBuildBinding.js.map +1 -0
- package/dist/imagebuilder/models/ImageBuildCondition.d.ts +9 -0
- package/dist/imagebuilder/models/ImageBuildCondition.d.ts.map +1 -0
- package/dist/imagebuilder/models/ImageBuildCondition.js +2 -0
- package/dist/imagebuilder/models/ImageBuildCondition.js.map +1 -0
- package/dist/imagebuilder/models/ImageBuildConditionReason.d.ts +13 -0
- package/dist/imagebuilder/models/ImageBuildConditionReason.d.ts.map +1 -0
- package/dist/imagebuilder/models/ImageBuildConditionReason.js +18 -0
- package/dist/imagebuilder/models/ImageBuildConditionReason.js.map +1 -0
- package/dist/imagebuilder/models/ImageBuildConditionType.d.ts +7 -0
- package/dist/imagebuilder/models/ImageBuildConditionType.d.ts.map +1 -0
- package/dist/imagebuilder/models/ImageBuildConditionType.js +12 -0
- package/dist/imagebuilder/models/ImageBuildConditionType.js.map +1 -0
- package/dist/imagebuilder/models/ImageBuildDestination.d.ts +18 -0
- package/dist/imagebuilder/models/ImageBuildDestination.d.ts.map +1 -0
- package/dist/imagebuilder/models/ImageBuildDestination.js +2 -0
- package/dist/imagebuilder/models/ImageBuildDestination.js.map +1 -0
- package/dist/imagebuilder/models/ImageBuildList.d.ts +21 -0
- package/dist/imagebuilder/models/ImageBuildList.d.ts.map +1 -0
- package/dist/imagebuilder/models/ImageBuildList.js +2 -0
- package/dist/imagebuilder/models/ImageBuildList.js.map +1 -0
- package/dist/imagebuilder/models/ImageBuildRefSource.d.ts +14 -0
- package/dist/imagebuilder/models/ImageBuildRefSource.d.ts.map +1 -0
- package/dist/imagebuilder/models/ImageBuildRefSource.js +2 -0
- package/dist/imagebuilder/models/ImageBuildRefSource.js.map +1 -0
- package/dist/imagebuilder/models/ImageBuildSource.d.ts +18 -0
- package/dist/imagebuilder/models/ImageBuildSource.d.ts.map +1 -0
- package/dist/imagebuilder/models/ImageBuildSource.js +2 -0
- package/dist/imagebuilder/models/ImageBuildSource.js.map +1 -0
- package/dist/imagebuilder/models/ImageBuildSpec.d.ts +14 -0
- package/dist/imagebuilder/models/ImageBuildSpec.d.ts.map +1 -0
- package/dist/imagebuilder/models/ImageBuildSpec.js +2 -0
- package/dist/imagebuilder/models/ImageBuildSpec.js.map +1 -0
- package/dist/imagebuilder/models/ImageBuildStatus.d.ts +27 -0
- package/dist/imagebuilder/models/ImageBuildStatus.d.ts.map +1 -0
- package/dist/imagebuilder/models/ImageBuildStatus.js +2 -0
- package/dist/imagebuilder/models/ImageBuildStatus.js.map +1 -0
- package/dist/imagebuilder/models/ImageBuildUserConfiguration.d.ts +14 -0
- package/dist/imagebuilder/models/ImageBuildUserConfiguration.d.ts.map +1 -0
- package/dist/imagebuilder/models/ImageBuildUserConfiguration.js +2 -0
- package/dist/imagebuilder/models/ImageBuildUserConfiguration.js.map +1 -0
- package/dist/imagebuilder/models/ImageExport.d.ts +20 -0
- package/dist/imagebuilder/models/ImageExport.d.ts.map +1 -0
- package/dist/imagebuilder/models/ImageExport.js +2 -0
- package/dist/imagebuilder/models/ImageExport.js.map +1 -0
- package/dist/imagebuilder/models/ImageExportCondition.d.ts +9 -0
- package/dist/imagebuilder/models/ImageExportCondition.d.ts.map +1 -0
- package/dist/imagebuilder/models/ImageExportCondition.js +2 -0
- package/dist/imagebuilder/models/ImageExportCondition.js.map +1 -0
- package/dist/imagebuilder/models/ImageExportConditionReason.d.ts +13 -0
- package/dist/imagebuilder/models/ImageExportConditionReason.d.ts.map +1 -0
- package/dist/imagebuilder/models/ImageExportConditionReason.js +18 -0
- package/dist/imagebuilder/models/ImageExportConditionReason.js.map +1 -0
- package/dist/imagebuilder/models/ImageExportConditionType.d.ts +7 -0
- package/dist/imagebuilder/models/ImageExportConditionType.d.ts.map +1 -0
- package/dist/imagebuilder/models/ImageExportConditionType.js +12 -0
- package/dist/imagebuilder/models/ImageExportConditionType.js.map +1 -0
- package/dist/imagebuilder/models/ImageExportFormatPhase.d.ts +11 -0
- package/dist/imagebuilder/models/ImageExportFormatPhase.d.ts.map +1 -0
- package/dist/imagebuilder/models/ImageExportFormatPhase.js +16 -0
- package/dist/imagebuilder/models/ImageExportFormatPhase.js.map +1 -0
- package/dist/imagebuilder/models/ImageExportList.d.ts +21 -0
- package/dist/imagebuilder/models/ImageExportList.d.ts.map +1 -0
- package/dist/imagebuilder/models/ImageExportList.js +2 -0
- package/dist/imagebuilder/models/ImageExportList.js.map +1 -0
- package/dist/imagebuilder/models/ImageExportSource.d.ts +6 -0
- package/dist/imagebuilder/models/ImageExportSource.d.ts.map +1 -0
- package/dist/imagebuilder/models/ImageExportSource.js +2 -0
- package/dist/imagebuilder/models/ImageExportSource.js.map +1 -0
- package/dist/imagebuilder/models/ImageExportSourceType.d.ts +7 -0
- package/dist/imagebuilder/models/ImageExportSourceType.d.ts.map +1 -0
- package/dist/imagebuilder/models/ImageExportSourceType.js +12 -0
- package/dist/imagebuilder/models/ImageExportSourceType.js.map +1 -0
- package/dist/imagebuilder/models/ImageExportSpec.d.ts +10 -0
- package/dist/imagebuilder/models/ImageExportSpec.d.ts.map +1 -0
- package/dist/imagebuilder/models/ImageExportSpec.js +2 -0
- package/dist/imagebuilder/models/ImageExportSpec.js.map +1 -0
- package/dist/imagebuilder/models/ImageExportStatus.d.ts +19 -0
- package/dist/imagebuilder/models/ImageExportStatus.d.ts.map +1 -0
- package/dist/imagebuilder/models/ImageExportStatus.js +2 -0
- package/dist/imagebuilder/models/ImageExportStatus.js.map +1 -0
- package/dist/imagebuilder/models/LateBinding.d.ts +10 -0
- package/dist/imagebuilder/models/LateBinding.d.ts.map +1 -0
- package/dist/imagebuilder/models/LateBinding.js +2 -0
- package/dist/imagebuilder/models/LateBinding.js.map +1 -0
- package/dist/imagebuilder/models/ResourceKind.d.ts +8 -0
- package/dist/imagebuilder/models/ResourceKind.d.ts.map +1 -0
- package/dist/imagebuilder/models/ResourceKind.js +13 -0
- package/dist/imagebuilder/models/ResourceKind.js.map +1 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/models/AppType.d.ts +2 -1
- package/dist/models/AppType.d.ts.map +1 -1
- package/dist/models/AppType.js +1 -0
- package/dist/models/AppType.js.map +1 -1
- package/dist/models/ApplicationProviderSpec.d.ts +4 -0
- package/dist/models/ApplicationProviderSpec.d.ts.map +1 -1
- package/dist/models/ApplicationVolume.d.ts +2 -0
- package/dist/models/ApplicationVolume.d.ts.map +1 -1
- package/dist/models/ApplicationVolumeReclaimPolicy.d.ts +7 -0
- package/dist/models/ApplicationVolumeReclaimPolicy.d.ts.map +1 -0
- package/dist/models/ApplicationVolumeReclaimPolicy.js +12 -0
- package/dist/models/ApplicationVolumeReclaimPolicy.js.map +1 -0
- package/dist/models/Condition.d.ts +3 -20
- package/dist/models/Condition.d.ts.map +1 -1
- package/dist/models/ConditionBase.d.ts +24 -0
- package/dist/models/ConditionBase.d.ts.map +1 -0
- package/dist/models/ConditionBase.js +2 -0
- package/dist/models/ConditionBase.js.map +1 -0
- package/dist/models/DeviceApplicationStatus.d.ts +4 -0
- package/dist/models/DeviceApplicationStatus.d.ts.map +1 -1
- package/dist/models/DockerAuth.d.ts +15 -0
- package/dist/models/DockerAuth.d.ts.map +1 -0
- package/dist/models/DockerAuth.js +2 -0
- package/dist/models/DockerAuth.js.map +1 -0
- package/dist/models/GitRepoSpec.d.ts +18 -0
- package/dist/models/GitRepoSpec.d.ts.map +1 -0
- package/dist/models/GitRepoSpec.js +2 -0
- package/dist/models/GitRepoSpec.js.map +1 -0
- package/dist/models/HttpRepoSpec.d.ts +9 -4
- package/dist/models/HttpRepoSpec.d.ts.map +1 -1
- package/dist/models/ImageApplicationProviderSpec.d.ts +12 -0
- package/dist/models/ImageApplicationProviderSpec.d.ts.map +1 -1
- package/dist/models/K8sProviderSpec.d.ts +4 -0
- package/dist/models/K8sProviderSpec.d.ts.map +1 -1
- package/dist/models/KubernetesSecretProviderSpec.d.ts +8 -0
- package/dist/models/KubernetesSecretProviderSpec.d.ts.map +1 -1
- package/dist/models/OciAuth.d.ts +6 -0
- package/dist/models/OciAuth.d.ts.map +1 -0
- package/dist/models/OciAuth.js +2 -0
- package/dist/models/OciAuth.js.map +1 -0
- package/dist/models/OciAuthType.d.ts +7 -0
- package/dist/models/OciAuthType.d.ts.map +1 -0
- package/dist/models/OciAuthType.js +12 -0
- package/dist/models/OciAuthType.js.map +1 -0
- package/dist/models/OciRepoSpec.d.ts +48 -0
- package/dist/models/OciRepoSpec.d.ts.map +1 -0
- package/dist/models/OciRepoSpec.js +20 -0
- package/dist/models/OciRepoSpec.js.map +1 -0
- package/dist/models/OpenShiftProviderSpec.d.ts +8 -0
- package/dist/models/OpenShiftProviderSpec.d.ts.map +1 -1
- package/dist/models/RepoSpecType.d.ts +3 -2
- package/dist/models/RepoSpecType.d.ts.map +1 -1
- package/dist/models/RepoSpecType.js +3 -2
- package/dist/models/RepoSpecType.js.map +1 -1
- package/dist/models/RepositorySpec.d.ts +3 -3
- package/dist/models/RepositorySpec.d.ts.map +1 -1
- package/dist/scripts/openapi-typescript.js +124 -17
- package/dist/scripts/openapi-typescript.js.map +1 -1
- package/dist/scripts/openapi-utils.d.ts +23 -0
- package/dist/scripts/openapi-utils.d.ts.map +1 -0
- package/dist/scripts/openapi-utils.js +213 -0
- package/dist/scripts/openapi-utils.js.map +1 -0
- package/imagebuilder/index.ts +32 -0
- package/imagebuilder/models/BindingType.ts +11 -0
- package/imagebuilder/models/EarlyBinding.ts +14 -0
- package/imagebuilder/models/ExportFormatType.ts +13 -0
- package/imagebuilder/models/ImageBuild.ts +29 -0
- package/imagebuilder/models/ImageBuildBinding.ts +11 -0
- package/imagebuilder/models/ImageBuildCondition.ts +13 -0
- package/imagebuilder/models/ImageBuildConditionReason.ts +16 -0
- package/imagebuilder/models/ImageBuildConditionType.ts +10 -0
- package/imagebuilder/models/ImageBuildDestination.ts +22 -0
- package/imagebuilder/models/ImageBuildList.ts +25 -0
- package/imagebuilder/models/ImageBuildRefSource.ts +18 -0
- package/imagebuilder/models/ImageBuildSource.ts +22 -0
- package/imagebuilder/models/ImageBuildSpec.ts +18 -0
- package/imagebuilder/models/ImageBuildStatus.ts +31 -0
- package/imagebuilder/models/ImageBuildUserConfiguration.ts +18 -0
- package/imagebuilder/models/ImageExport.ts +24 -0
- package/imagebuilder/models/ImageExportCondition.ts +13 -0
- package/imagebuilder/models/ImageExportConditionReason.ts +16 -0
- package/imagebuilder/models/ImageExportConditionType.ts +10 -0
- package/imagebuilder/models/ImageExportFormatPhase.ts +14 -0
- package/imagebuilder/models/ImageExportList.ts +25 -0
- package/imagebuilder/models/ImageExportSource.ts +10 -0
- package/imagebuilder/models/ImageExportSourceType.ts +10 -0
- package/imagebuilder/models/ImageExportSpec.ts +14 -0
- package/imagebuilder/models/ImageExportStatus.ts +23 -0
- package/imagebuilder/models/LateBinding.ts +14 -0
- package/imagebuilder/models/ResourceKind.ts +11 -0
- package/index.ts +7 -2
- package/package.json +9 -3
- package/dist/models/GenericRepoSpec.d.ts +0 -9
- package/dist/models/GenericRepoSpec.d.ts.map +0 -1
- package/dist/models/GenericRepoSpec.js +0 -2
- package/dist/models/GenericRepoSpec.js.map +0 -1
- package/dist/models/SshRepoSpec.d.ts +0 -11
- package/dist/models/SshRepoSpec.d.ts.map +0 -1
- package/dist/models/SshRepoSpec.js +0 -2
- package/dist/models/SshRepoSpec.js.map +0 -1
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
5
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
6
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
7
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
8
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
9
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
13
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
14
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
15
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
16
|
+
function step(op) {
|
|
17
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
18
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
19
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
20
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
21
|
+
switch (op[0]) {
|
|
22
|
+
case 0: case 1: t = op; break;
|
|
23
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
24
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
25
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
26
|
+
default:
|
|
27
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
28
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
29
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
30
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
31
|
+
if (t[2]) _.ops.pop();
|
|
32
|
+
_.trys.pop(); continue;
|
|
33
|
+
}
|
|
34
|
+
op = body.call(thisArg, _);
|
|
35
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
36
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
var fs = require('fs');
|
|
40
|
+
var fsPromises = require('fs/promises');
|
|
41
|
+
var path = require('path');
|
|
42
|
+
// Recursively remove directory
|
|
43
|
+
function rimraf(dir) {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
45
|
+
var entries;
|
|
46
|
+
var _this = this;
|
|
47
|
+
return __generator(this, function (_a) {
|
|
48
|
+
switch (_a.label) {
|
|
49
|
+
case 0:
|
|
50
|
+
if (!fs.existsSync(dir)) {
|
|
51
|
+
return [2 /*return*/];
|
|
52
|
+
}
|
|
53
|
+
return [4 /*yield*/, fsPromises.readdir(dir, { withFileTypes: true })];
|
|
54
|
+
case 1:
|
|
55
|
+
entries = _a.sent();
|
|
56
|
+
return [4 /*yield*/, Promise.all(entries.map(function (entry) { return __awaiter(_this, void 0, void 0, function () {
|
|
57
|
+
var fullPath;
|
|
58
|
+
return __generator(this, function (_a) {
|
|
59
|
+
switch (_a.label) {
|
|
60
|
+
case 0:
|
|
61
|
+
fullPath = path.join(dir, entry.name);
|
|
62
|
+
if (!entry.isDirectory()) return [3 /*break*/, 2];
|
|
63
|
+
return [4 /*yield*/, rimraf(fullPath)];
|
|
64
|
+
case 1:
|
|
65
|
+
_a.sent();
|
|
66
|
+
return [3 /*break*/, 4];
|
|
67
|
+
case 2: return [4 /*yield*/, fsPromises.unlink(fullPath)];
|
|
68
|
+
case 3:
|
|
69
|
+
_a.sent();
|
|
70
|
+
_a.label = 4;
|
|
71
|
+
case 4: return [2 /*return*/];
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}); }))];
|
|
75
|
+
case 2:
|
|
76
|
+
_a.sent();
|
|
77
|
+
return [4 /*yield*/, fsPromises.rmdir(dir)];
|
|
78
|
+
case 3:
|
|
79
|
+
_a.sent();
|
|
80
|
+
return [2 /*return*/];
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
// Recursively copy directory
|
|
86
|
+
function copyDir(src, dest) {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
88
|
+
var entries;
|
|
89
|
+
var _this = this;
|
|
90
|
+
return __generator(this, function (_a) {
|
|
91
|
+
switch (_a.label) {
|
|
92
|
+
case 0:
|
|
93
|
+
if (!fs.existsSync(src)) {
|
|
94
|
+
return [2 /*return*/];
|
|
95
|
+
}
|
|
96
|
+
if (!fs.existsSync(dest)) {
|
|
97
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
98
|
+
}
|
|
99
|
+
return [4 /*yield*/, fsPromises.readdir(src, { withFileTypes: true })];
|
|
100
|
+
case 1:
|
|
101
|
+
entries = _a.sent();
|
|
102
|
+
return [4 /*yield*/, Promise.all(entries.map(function (entry) { return __awaiter(_this, void 0, void 0, function () {
|
|
103
|
+
var srcPath, destPath, content;
|
|
104
|
+
return __generator(this, function (_a) {
|
|
105
|
+
switch (_a.label) {
|
|
106
|
+
case 0:
|
|
107
|
+
srcPath = path.join(src, entry.name);
|
|
108
|
+
destPath = path.join(dest, entry.name);
|
|
109
|
+
if (!entry.isDirectory()) return [3 /*break*/, 2];
|
|
110
|
+
return [4 /*yield*/, copyDir(srcPath, destPath)];
|
|
111
|
+
case 1:
|
|
112
|
+
_a.sent();
|
|
113
|
+
return [3 /*break*/, 6];
|
|
114
|
+
case 2: return [4 /*yield*/, fsPromises.readFile(srcPath)];
|
|
115
|
+
case 3:
|
|
116
|
+
content = _a.sent();
|
|
117
|
+
return [4 /*yield*/, fsPromises.writeFile(destPath, content)];
|
|
118
|
+
case 4:
|
|
119
|
+
_a.sent();
|
|
120
|
+
return [4 /*yield*/, fsPromises.unlink(srcPath)];
|
|
121
|
+
case 5:
|
|
122
|
+
_a.sent();
|
|
123
|
+
_a.label = 6;
|
|
124
|
+
case 6: return [2 /*return*/];
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
}); }))];
|
|
128
|
+
case 2:
|
|
129
|
+
_a.sent();
|
|
130
|
+
return [2 /*return*/];
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
// Recursively find all TypeScript files
|
|
136
|
+
function findTsFiles(dir) {
|
|
137
|
+
var files = [];
|
|
138
|
+
if (!fs.existsSync(dir)) {
|
|
139
|
+
return files;
|
|
140
|
+
}
|
|
141
|
+
var entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
142
|
+
for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
|
|
143
|
+
var entry = entries_1[_i];
|
|
144
|
+
var fullPath = path.join(dir, entry.name);
|
|
145
|
+
if (entry.isDirectory()) {
|
|
146
|
+
files.push.apply(files, findTsFiles(fullPath));
|
|
147
|
+
}
|
|
148
|
+
else if (entry.isFile() && entry.name.endsWith('.ts')) {
|
|
149
|
+
files.push(fullPath);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return files;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Fixes references from the auto-generated imagebuilder types so they point to the correct types of the "core" API module.
|
|
156
|
+
* The generated types are in the form of:
|
|
157
|
+
* import type { core_v1beta1_openapi_yaml_components_schemas_ObjectMeta } from './core_v1beta1_openapi_yaml_components_schemas_ObjectMeta';
|
|
158
|
+
* type SomeType = {
|
|
159
|
+
* ...
|
|
160
|
+
* someField: core_v1beta1_openapi_yaml_components_schemas_ObjectMeta;
|
|
161
|
+
* }
|
|
162
|
+
*
|
|
163
|
+
* The fixed types will be like this:
|
|
164
|
+
* import type { ObjectMeta } from '../../models/ObjectMeta';
|
|
165
|
+
* type SomeType = {
|
|
166
|
+
* ...
|
|
167
|
+
* someField: ObjectMeta;
|
|
168
|
+
* }
|
|
169
|
+
*
|
|
170
|
+
* @param {string} modelsDir - Directory containing TypeScript files to fix
|
|
171
|
+
*/
|
|
172
|
+
function fixImagebuilderCoreReferences(modelsDir) {
|
|
173
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
174
|
+
var files;
|
|
175
|
+
var _this = this;
|
|
176
|
+
return __generator(this, function (_a) {
|
|
177
|
+
switch (_a.label) {
|
|
178
|
+
case 0:
|
|
179
|
+
files = findTsFiles(modelsDir);
|
|
180
|
+
return [4 /*yield*/, Promise.all(files.map(function (filePath) { return __awaiter(_this, void 0, void 0, function () {
|
|
181
|
+
var content, originalContent;
|
|
182
|
+
return __generator(this, function (_a) {
|
|
183
|
+
switch (_a.label) {
|
|
184
|
+
case 0: return [4 /*yield*/, fsPromises.readFile(filePath, 'utf8')];
|
|
185
|
+
case 1:
|
|
186
|
+
content = _a.sent();
|
|
187
|
+
originalContent = content;
|
|
188
|
+
// Modify the path to properly point to the type from the "core" module
|
|
189
|
+
content = content.replace(/from\s+['"]\.\/core_v1beta1_openapi_yaml_components_schemas_([A-Za-z][A-Za-z0-9]*)['"]/g, "from '../../models/$1'");
|
|
190
|
+
// Correct the import name and the references to this type by removing the prefix
|
|
191
|
+
content = content.replace(/\bcore_v1beta1_openapi_yaml_components_schemas_([A-Za-z][A-Za-z0-9]*)\b/g, '$1');
|
|
192
|
+
if (!(content !== originalContent)) return [3 /*break*/, 3];
|
|
193
|
+
return [4 /*yield*/, fsPromises.writeFile(filePath, content, 'utf8')];
|
|
194
|
+
case 2:
|
|
195
|
+
_a.sent();
|
|
196
|
+
_a.label = 3;
|
|
197
|
+
case 3: return [2 /*return*/];
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
}); }))];
|
|
201
|
+
case 1:
|
|
202
|
+
_a.sent();
|
|
203
|
+
return [2 /*return*/];
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
module.exports = {
|
|
209
|
+
rimraf: rimraf,
|
|
210
|
+
copyDir: copyDir,
|
|
211
|
+
fixImagebuilderCoreReferences: fixImagebuilderCoreReferences,
|
|
212
|
+
};
|
|
213
|
+
//# sourceMappingURL=openapi-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi-utils.js","sourceRoot":"","sources":["../../scripts/openapi-utils.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,IAAM,UAAU,GAAG,OAAO,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egen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
|
|
6
|
+
export { BindingType } from './models/BindingType';
|
|
7
|
+
export type { EarlyBinding } from './models/EarlyBinding';
|
|
8
|
+
export { ExportFormatType } from './models/ExportFormatType';
|
|
9
|
+
export type { ImageBuild } from './models/ImageBuild';
|
|
10
|
+
export type { ImageBuildBinding } from './models/ImageBuildBinding';
|
|
11
|
+
export type { ImageBuildCondition } from './models/ImageBuildCondition';
|
|
12
|
+
export { ImageBuildConditionReason } from './models/ImageBuildConditionReason';
|
|
13
|
+
export { ImageBuildConditionType } from './models/ImageBuildConditionType';
|
|
14
|
+
export type { ImageBuildDestination } from './models/ImageBuildDestination';
|
|
15
|
+
export type { ImageBuildList } from './models/ImageBuildList';
|
|
16
|
+
export type { ImageBuildRefSource } from './models/ImageBuildRefSource';
|
|
17
|
+
export type { ImageBuildSource } from './models/ImageBuildSource';
|
|
18
|
+
export type { ImageBuildSpec } from './models/ImageBuildSpec';
|
|
19
|
+
export type { ImageBuildStatus } from './models/ImageBuildStatus';
|
|
20
|
+
export type { ImageBuildUserConfiguration } from './models/ImageBuildUserConfiguration';
|
|
21
|
+
export type { ImageExport } from './models/ImageExport';
|
|
22
|
+
export type { ImageExportCondition } from './models/ImageExportCondition';
|
|
23
|
+
export { ImageExportConditionReason } from './models/ImageExportConditionReason';
|
|
24
|
+
export { ImageExportConditionType } from './models/ImageExportConditionType';
|
|
25
|
+
export { ImageExportFormatPhase } from './models/ImageExportFormatPhase';
|
|
26
|
+
export type { ImageExportList } from './models/ImageExportList';
|
|
27
|
+
export type { ImageExportSource } from './models/ImageExportSource';
|
|
28
|
+
export { ImageExportSourceType } from './models/ImageExportSourceType';
|
|
29
|
+
export type { ImageExportSpec } from './models/ImageExportSpec';
|
|
30
|
+
export type { ImageExportStatus } from './models/ImageExportStatus';
|
|
31
|
+
export type { LateBinding } from './models/LateBinding';
|
|
32
|
+
export { ResourceKind } from './models/ResourceKind';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* The type of binding for the image build.
|
|
7
|
+
*/
|
|
8
|
+
export enum BindingType {
|
|
9
|
+
BindingTypeEarly = 'early',
|
|
10
|
+
BindingTypeLate = 'late',
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* Early binding configuration - embeds certificate in the image.
|
|
7
|
+
*/
|
|
8
|
+
export type EarlyBinding = {
|
|
9
|
+
/**
|
|
10
|
+
* The type of binding.
|
|
11
|
+
*/
|
|
12
|
+
type: 'early';
|
|
13
|
+
};
|
|
14
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* The type of format to export the image to.
|
|
7
|
+
*/
|
|
8
|
+
export enum ExportFormatType {
|
|
9
|
+
ExportFormatTypeVMDK = 'vmdk',
|
|
10
|
+
ExportFormatTypeQCOW2 = 'qcow2',
|
|
11
|
+
ExportFormatTypeISO = 'iso',
|
|
12
|
+
ExportFormatTypeQCOW2DiskContainer = 'qcow2-disk-container',
|
|
13
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { ObjectMeta } from '../../models/ObjectMeta';
|
|
6
|
+
import type { ImageBuildSpec } from './ImageBuildSpec';
|
|
7
|
+
import type { ImageBuildStatus } from './ImageBuildStatus';
|
|
8
|
+
import type { ImageExport } from './ImageExport';
|
|
9
|
+
/**
|
|
10
|
+
* ImageBuild represents a build request for a container image.
|
|
11
|
+
*/
|
|
12
|
+
export type ImageBuild = {
|
|
13
|
+
/**
|
|
14
|
+
* APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.
|
|
15
|
+
*/
|
|
16
|
+
apiVersion: string;
|
|
17
|
+
/**
|
|
18
|
+
* Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.
|
|
19
|
+
*/
|
|
20
|
+
kind: string;
|
|
21
|
+
metadata: ObjectMeta;
|
|
22
|
+
spec: ImageBuildSpec;
|
|
23
|
+
status?: ImageBuildStatus;
|
|
24
|
+
/**
|
|
25
|
+
* Array of ImageExport resources that reference this ImageBuild. Only populated when withExports query parameter is true.
|
|
26
|
+
*/
|
|
27
|
+
imageexports?: Array<ImageExport>;
|
|
28
|
+
};
|
|
29
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { EarlyBinding } from './EarlyBinding';
|
|
6
|
+
import type { LateBinding } from './LateBinding';
|
|
7
|
+
/**
|
|
8
|
+
* ImageBuildBinding specifies binding configuration for the build.
|
|
9
|
+
*/
|
|
10
|
+
export type ImageBuildBinding = (EarlyBinding | LateBinding);
|
|
11
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { ConditionBase } from '../../models/ConditionBase';
|
|
6
|
+
import type { ImageBuildConditionType } from './ImageBuildConditionType';
|
|
7
|
+
/**
|
|
8
|
+
* Condition for ImageBuild resources.
|
|
9
|
+
*/
|
|
10
|
+
export type ImageBuildCondition = (ConditionBase & {
|
|
11
|
+
type: ImageBuildConditionType;
|
|
12
|
+
});
|
|
13
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* Reason for the ImageBuild Ready condition.
|
|
7
|
+
*/
|
|
8
|
+
export enum ImageBuildConditionReason {
|
|
9
|
+
ImageBuildConditionReasonPending = 'Pending',
|
|
10
|
+
ImageBuildConditionReasonBuilding = 'Building',
|
|
11
|
+
ImageBuildConditionReasonPushing = 'Pushing',
|
|
12
|
+
ImageBuildConditionReasonCompleted = 'Completed',
|
|
13
|
+
ImageBuildConditionReasonFailed = 'Failed',
|
|
14
|
+
ImageBuildConditionReasonCanceling = 'Canceling',
|
|
15
|
+
ImageBuildConditionReasonCanceled = 'Canceled',
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* Type of ImageBuild condition.
|
|
7
|
+
*/
|
|
8
|
+
export enum ImageBuildConditionType {
|
|
9
|
+
ImageBuildConditionTypeReady = 'Ready',
|
|
10
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* ImageBuildDestination specifies the destination for the built image.
|
|
7
|
+
*/
|
|
8
|
+
export type ImageBuildDestination = {
|
|
9
|
+
/**
|
|
10
|
+
* The name of the Repository resource of type OCI to push the built image to.
|
|
11
|
+
*/
|
|
12
|
+
repository: string;
|
|
13
|
+
/**
|
|
14
|
+
* The name of the output image.
|
|
15
|
+
*/
|
|
16
|
+
imageName: string;
|
|
17
|
+
/**
|
|
18
|
+
* The tag of the output image.
|
|
19
|
+
*/
|
|
20
|
+
imageTag: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { ListMeta } from '../../models/ListMeta';
|
|
6
|
+
import type { ImageBuild } from './ImageBuild';
|
|
7
|
+
/**
|
|
8
|
+
* ImageBuildList is a list of ImageBuild resources.
|
|
9
|
+
*/
|
|
10
|
+
export type ImageBuildList = {
|
|
11
|
+
/**
|
|
12
|
+
* APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.
|
|
13
|
+
*/
|
|
14
|
+
apiVersion: string;
|
|
15
|
+
/**
|
|
16
|
+
* Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.
|
|
17
|
+
*/
|
|
18
|
+
kind: string;
|
|
19
|
+
metadata: ListMeta;
|
|
20
|
+
/**
|
|
21
|
+
* List of ImageBuild resources.
|
|
22
|
+
*/
|
|
23
|
+
items: Array<ImageBuild>;
|
|
24
|
+
};
|
|
25
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* ImageBuildRefSource specifies a source image from an ImageBuild resource.
|
|
7
|
+
*/
|
|
8
|
+
export type ImageBuildRefSource = {
|
|
9
|
+
/**
|
|
10
|
+
* The type of source.
|
|
11
|
+
*/
|
|
12
|
+
type: 'imageBuild';
|
|
13
|
+
/**
|
|
14
|
+
* The name of the ImageBuild resource to use as source.
|
|
15
|
+
*/
|
|
16
|
+
imageBuildRef: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* ImageBuildSource specifies the source image for the build.
|
|
7
|
+
*/
|
|
8
|
+
export type ImageBuildSource = {
|
|
9
|
+
/**
|
|
10
|
+
* The name of the Repository resource of type OCI containing the source image.
|
|
11
|
+
*/
|
|
12
|
+
repository: string;
|
|
13
|
+
/**
|
|
14
|
+
* The name of the source image.
|
|
15
|
+
*/
|
|
16
|
+
imageName: string;
|
|
17
|
+
/**
|
|
18
|
+
* The tag of the source image.
|
|
19
|
+
*/
|
|
20
|
+
imageTag: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { ImageBuildBinding } from './ImageBuildBinding';
|
|
6
|
+
import type { ImageBuildDestination } from './ImageBuildDestination';
|
|
7
|
+
import type { ImageBuildSource } from './ImageBuildSource';
|
|
8
|
+
import type { ImageBuildUserConfiguration } from './ImageBuildUserConfiguration';
|
|
9
|
+
/**
|
|
10
|
+
* ImageBuildSpec describes the specification for an image build.
|
|
11
|
+
*/
|
|
12
|
+
export type ImageBuildSpec = {
|
|
13
|
+
source: ImageBuildSource;
|
|
14
|
+
destination: ImageBuildDestination;
|
|
15
|
+
binding: ImageBuildBinding;
|
|
16
|
+
userConfiguration?: ImageBuildUserConfiguration;
|
|
17
|
+
};
|
|
18
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { ImageBuildCondition } from './ImageBuildCondition';
|
|
6
|
+
/**
|
|
7
|
+
* ImageBuildStatus represents the current status of an ImageBuild.
|
|
8
|
+
*/
|
|
9
|
+
export type ImageBuildStatus = {
|
|
10
|
+
/**
|
|
11
|
+
* Current conditions of the ImageBuild.
|
|
12
|
+
*/
|
|
13
|
+
conditions?: Array<ImageBuildCondition>;
|
|
14
|
+
/**
|
|
15
|
+
* The full image reference of the built image (e.g., quay.io/org/imagename:tag).
|
|
16
|
+
*/
|
|
17
|
+
imageReference?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The architecture of the built image.
|
|
20
|
+
*/
|
|
21
|
+
architecture?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The digest of the built image manifest.
|
|
24
|
+
*/
|
|
25
|
+
manifestDigest?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The last time the build was seen (heartbeat).
|
|
28
|
+
*/
|
|
29
|
+
lastSeen?: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* ImageBuildUserConfiguration specifies user configuration for the build.
|
|
7
|
+
*/
|
|
8
|
+
export type ImageBuildUserConfiguration = {
|
|
9
|
+
/**
|
|
10
|
+
* The username for the user configuration.
|
|
11
|
+
*/
|
|
12
|
+
username: string;
|
|
13
|
+
/**
|
|
14
|
+
* The public key for the user configuration.
|
|
15
|
+
*/
|
|
16
|
+
publickey: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { ObjectMeta } from '../../models/ObjectMeta';
|
|
6
|
+
import type { ImageExportSpec } from './ImageExportSpec';
|
|
7
|
+
import type { ImageExportStatus } from './ImageExportStatus';
|
|
8
|
+
/**
|
|
9
|
+
* ImageExport represents an export request to convert and push images to different formats.
|
|
10
|
+
*/
|
|
11
|
+
export type ImageExport = {
|
|
12
|
+
/**
|
|
13
|
+
* APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.
|
|
14
|
+
*/
|
|
15
|
+
apiVersion: string;
|
|
16
|
+
/**
|
|
17
|
+
* Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.
|
|
18
|
+
*/
|
|
19
|
+
kind: string;
|
|
20
|
+
metadata: ObjectMeta;
|
|
21
|
+
spec: ImageExportSpec;
|
|
22
|
+
status?: ImageExportStatus;
|
|
23
|
+
};
|
|
24
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { ConditionBase } from '../../models/ConditionBase';
|
|
6
|
+
import type { ImageExportConditionType } from './ImageExportConditionType';
|
|
7
|
+
/**
|
|
8
|
+
* Condition for ImageExport resources.
|
|
9
|
+
*/
|
|
10
|
+
export type ImageExportCondition = (ConditionBase & {
|
|
11
|
+
type: ImageExportConditionType;
|
|
12
|
+
});
|
|
13
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* Reason for the ImageExport Ready condition.
|
|
7
|
+
*/
|
|
8
|
+
export enum ImageExportConditionReason {
|
|
9
|
+
ImageExportConditionReasonPending = 'Pending',
|
|
10
|
+
ImageExportConditionReasonConverting = 'Converting',
|
|
11
|
+
ImageExportConditionReasonPushing = 'Pushing',
|
|
12
|
+
ImageExportConditionReasonCompleted = 'Completed',
|
|
13
|
+
ImageExportConditionReasonFailed = 'Failed',
|
|
14
|
+
ImageExportConditionReasonCanceling = 'Canceling',
|
|
15
|
+
ImageExportConditionReasonCanceled = 'Canceled',
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* Type of ImageExport condition.
|
|
7
|
+
*/
|
|
8
|
+
export enum ImageExportConditionType {
|
|
9
|
+
ImageExportConditionTypeReady = 'Ready',
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* The phase of a single format conversion.
|
|
7
|
+
*/
|
|
8
|
+
export enum ImageExportFormatPhase {
|
|
9
|
+
ImageExportFormatPhaseQueued = 'queued',
|
|
10
|
+
ImageExportFormatPhaseConverting = 'converting',
|
|
11
|
+
ImageExportFormatPhasePushing = 'pushing',
|
|
12
|
+
ImageExportFormatPhaseComplete = 'complete',
|
|
13
|
+
ImageExportFormatPhaseFailed = 'failed',
|
|
14
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { ListMeta } from '../../models/ListMeta';
|
|
6
|
+
import type { ImageExport } from './ImageExport';
|
|
7
|
+
/**
|
|
8
|
+
* ImageExportList is a list of ImageExport resources.
|
|
9
|
+
*/
|
|
10
|
+
export type ImageExportList = {
|
|
11
|
+
/**
|
|
12
|
+
* APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.
|
|
13
|
+
*/
|
|
14
|
+
apiVersion: string;
|
|
15
|
+
/**
|
|
16
|
+
* Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.
|
|
17
|
+
*/
|
|
18
|
+
kind: string;
|
|
19
|
+
metadata: ListMeta;
|
|
20
|
+
/**
|
|
21
|
+
* List of ImageExport resources.
|
|
22
|
+
*/
|
|
23
|
+
items: Array<ImageExport>;
|
|
24
|
+
};
|
|
25
|
+
|