@tapis/tapis-typescript-sk 0.0.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/.openapi-generator/FILES +67 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +45 -0
- package/dist/apis/GeneralApi.d.ts +45 -0
- package/dist/apis/GeneralApi.js +199 -0
- package/dist/apis/RoleApi.d.ts +205 -0
- package/dist/apis/RoleApi.js +861 -0
- package/dist/apis/UserApi.d.ts +276 -0
- package/dist/apis/UserApi.js +1166 -0
- package/dist/apis/VaultApi.d.ts +195 -0
- package/dist/apis/VaultApi.js +740 -0
- package/dist/apis/index.d.ts +4 -0
- package/dist/apis/index.js +11 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +10 -0
- package/dist/models/Options.d.ts +27 -0
- package/dist/models/Options.js +41 -0
- package/dist/models/ReqAddChildRole.d.ts +39 -0
- package/dist/models/ReqAddChildRole.js +45 -0
- package/dist/models/ReqAddRolePermission.d.ts +39 -0
- package/dist/models/ReqAddRolePermission.js +45 -0
- package/dist/models/ReqCreateRole.d.ts +39 -0
- package/dist/models/ReqCreateRole.js +45 -0
- package/dist/models/ReqGrantAdminRole.d.ts +33 -0
- package/dist/models/ReqGrantAdminRole.js +43 -0
- package/dist/models/ReqGrantUserPermission.d.ts +39 -0
- package/dist/models/ReqGrantUserPermission.js +45 -0
- package/dist/models/ReqGrantUserRole.d.ts +39 -0
- package/dist/models/ReqGrantUserRole.js +45 -0
- package/dist/models/ReqGrantUserRoleWithPermission.d.ts +45 -0
- package/dist/models/ReqGrantUserRoleWithPermission.js +47 -0
- package/dist/models/ReqPreviewPathPrefix.d.ts +63 -0
- package/dist/models/ReqPreviewPathPrefix.js +53 -0
- package/dist/models/ReqRemoveChildRole.d.ts +39 -0
- package/dist/models/ReqRemoveChildRole.js +45 -0
- package/dist/models/ReqRemoveRolePermission.d.ts +39 -0
- package/dist/models/ReqRemoveRolePermission.js +45 -0
- package/dist/models/ReqReplacePathPrefix.d.ts +63 -0
- package/dist/models/ReqReplacePathPrefix.js +53 -0
- package/dist/models/ReqRevokeAdminRole.d.ts +33 -0
- package/dist/models/ReqRevokeAdminRole.js +43 -0
- package/dist/models/ReqRevokeUserPermission.d.ts +39 -0
- package/dist/models/ReqRevokeUserPermission.js +45 -0
- package/dist/models/ReqRevokeUserRole.d.ts +39 -0
- package/dist/models/ReqRevokeUserRole.js +45 -0
- package/dist/models/ReqUpdateRoleDescription.d.ts +33 -0
- package/dist/models/ReqUpdateRoleDescription.js +43 -0
- package/dist/models/ReqUpdateRoleName.d.ts +33 -0
- package/dist/models/ReqUpdateRoleName.js +43 -0
- package/dist/models/ReqUpdateRoleOwner.d.ts +39 -0
- package/dist/models/ReqUpdateRoleOwner.js +45 -0
- package/dist/models/ReqUserHasRole.d.ts +45 -0
- package/dist/models/ReqUserHasRole.js +47 -0
- package/dist/models/ReqUserHasRoleMulti.d.ts +45 -0
- package/dist/models/ReqUserHasRoleMulti.js +47 -0
- package/dist/models/ReqUserIsAdmin.d.ts +33 -0
- package/dist/models/ReqUserIsAdmin.js +43 -0
- package/dist/models/ReqUserIsPermitted.d.ts +45 -0
- package/dist/models/ReqUserIsPermitted.js +47 -0
- package/dist/models/ReqUserIsPermittedMulti.d.ts +45 -0
- package/dist/models/ReqUserIsPermittedMulti.js +47 -0
- package/dist/models/ReqValidateServicePwd.d.ts +39 -0
- package/dist/models/ReqValidateServicePwd.js +45 -0
- package/dist/models/ReqVersions.d.ts +39 -0
- package/dist/models/ReqVersions.js +45 -0
- package/dist/models/ReqWriteSecret.d.ts +48 -0
- package/dist/models/ReqWriteSecret.js +48 -0
- package/dist/models/RespAuthorized.d.ts +46 -0
- package/dist/models/RespAuthorized.js +48 -0
- package/dist/models/RespBasic.d.ts +45 -0
- package/dist/models/RespBasic.js +47 -0
- package/dist/models/RespChangeCount.d.ts +46 -0
- package/dist/models/RespChangeCount.js +48 -0
- package/dist/models/RespName.d.ts +46 -0
- package/dist/models/RespName.js +48 -0
- package/dist/models/RespNameArray.d.ts +46 -0
- package/dist/models/RespNameArray.js +48 -0
- package/dist/models/RespPathPrefixes.d.ts +46 -0
- package/dist/models/RespPathPrefixes.js +48 -0
- package/dist/models/RespProbe.d.ts +46 -0
- package/dist/models/RespProbe.js +48 -0
- package/dist/models/RespResourceUrl.d.ts +46 -0
- package/dist/models/RespResourceUrl.js +48 -0
- package/dist/models/RespRole.d.ts +46 -0
- package/dist/models/RespRole.js +48 -0
- package/dist/models/RespSecret.d.ts +46 -0
- package/dist/models/RespSecret.js +48 -0
- package/dist/models/RespSecretList.d.ts +46 -0
- package/dist/models/RespSecretList.js +48 -0
- package/dist/models/RespSecretMeta.d.ts +46 -0
- package/dist/models/RespSecretMeta.js +48 -0
- package/dist/models/RespSecretVersionMetadata.d.ts +46 -0
- package/dist/models/RespSecretVersionMetadata.js +48 -0
- package/dist/models/RespVersions.d.ts +45 -0
- package/dist/models/RespVersions.js +47 -0
- package/dist/models/ResultAuthorized.d.ts +27 -0
- package/dist/models/ResultAuthorized.js +41 -0
- package/dist/models/ResultChangeCount.d.ts +27 -0
- package/dist/models/ResultChangeCount.js +41 -0
- package/dist/models/ResultName.d.ts +27 -0
- package/dist/models/ResultName.js +41 -0
- package/dist/models/ResultNameArray.d.ts +27 -0
- package/dist/models/ResultNameArray.js +41 -0
- package/dist/models/ResultResourceUrl.d.ts +27 -0
- package/dist/models/ResultResourceUrl.js +41 -0
- package/dist/models/SkProbe.d.ts +45 -0
- package/dist/models/SkProbe.js +47 -0
- package/dist/models/SkRole.d.ts +93 -0
- package/dist/models/SkRole.js +63 -0
- package/dist/models/SkSecret.d.ts +36 -0
- package/dist/models/SkSecret.js +44 -0
- package/dist/models/SkSecretList.d.ts +33 -0
- package/dist/models/SkSecretList.js +43 -0
- package/dist/models/SkSecretMetadata.d.ts +45 -0
- package/dist/models/SkSecretMetadata.js +47 -0
- package/dist/models/SkSecretVersion.d.ts +45 -0
- package/dist/models/SkSecretVersion.js +47 -0
- package/dist/models/SkSecretVersionMetadata.d.ts +58 -0
- package/dist/models/SkSecretVersionMetadata.js +52 -0
- package/dist/models/Transformation.d.ts +39 -0
- package/dist/models/Transformation.js +45 -0
- package/dist/models/index.d.ts +53 -0
- package/dist/models/index.js +60 -0
- package/dist/runtime.d.ts +140 -0
- package/dist/runtime.js +420 -0
- package/package.json +15 -0
- package/src/apis/GeneralApi.ts +117 -0
- package/src/apis/RoleApi.ts +782 -0
- package/src/apis/UserApi.ts +1047 -0
- package/src/apis/VaultApi.ts +802 -0
- package/src/apis/index.ts +6 -0
- package/src/index.ts +5 -0
- package/src/models/Options.ts +56 -0
- package/src/models/ReqAddChildRole.ts +72 -0
- package/src/models/ReqAddRolePermission.ts +72 -0
- package/src/models/ReqCreateRole.ts +72 -0
- package/src/models/ReqGrantAdminRole.ts +64 -0
- package/src/models/ReqGrantUserPermission.ts +72 -0
- package/src/models/ReqGrantUserRole.ts +72 -0
- package/src/models/ReqGrantUserRoleWithPermission.ts +80 -0
- package/src/models/ReqPreviewPathPrefix.ts +104 -0
- package/src/models/ReqRemoveChildRole.ts +72 -0
- package/src/models/ReqRemoveRolePermission.ts +72 -0
- package/src/models/ReqReplacePathPrefix.ts +104 -0
- package/src/models/ReqRevokeAdminRole.ts +64 -0
- package/src/models/ReqRevokeUserPermission.ts +72 -0
- package/src/models/ReqRevokeUserRole.ts +72 -0
- package/src/models/ReqUpdateRoleDescription.ts +64 -0
- package/src/models/ReqUpdateRoleName.ts +64 -0
- package/src/models/ReqUpdateRoleOwner.ts +72 -0
- package/src/models/ReqUserHasRole.ts +80 -0
- package/src/models/ReqUserHasRoleMulti.ts +80 -0
- package/src/models/ReqUserIsAdmin.ts +64 -0
- package/src/models/ReqUserIsPermitted.ts +80 -0
- package/src/models/ReqUserIsPermittedMulti.ts +80 -0
- package/src/models/ReqValidateServicePwd.ts +72 -0
- package/src/models/ReqVersions.ts +72 -0
- package/src/models/ReqWriteSecret.ts +87 -0
- package/src/models/RespAuthorized.ts +87 -0
- package/src/models/RespBasic.ts +80 -0
- package/src/models/RespChangeCount.ts +87 -0
- package/src/models/RespName.ts +87 -0
- package/src/models/RespNameArray.ts +87 -0
- package/src/models/RespPathPrefixes.ts +87 -0
- package/src/models/RespProbe.ts +87 -0
- package/src/models/RespResourceUrl.ts +87 -0
- package/src/models/RespRole.ts +87 -0
- package/src/models/RespSecret.ts +87 -0
- package/src/models/RespSecretList.ts +87 -0
- package/src/models/RespSecretMeta.ts +87 -0
- package/src/models/RespSecretVersionMetadata.ts +87 -0
- package/src/models/RespVersions.ts +80 -0
- package/src/models/ResultAuthorized.ts +56 -0
- package/src/models/ResultChangeCount.ts +56 -0
- package/src/models/ResultName.ts +56 -0
- package/src/models/ResultNameArray.ts +56 -0
- package/src/models/ResultResourceUrl.ts +56 -0
- package/src/models/SkProbe.ts +80 -0
- package/src/models/SkRole.ts +144 -0
- package/src/models/SkSecret.ts +71 -0
- package/src/models/SkSecretList.ts +64 -0
- package/src/models/SkSecretMetadata.ts +80 -0
- package/src/models/SkSecretVersion.ts +80 -0
- package/src/models/SkSecretVersionMetadata.ts +103 -0
- package/src/models/Transformation.ts +72 -0
- package/src/models/index.ts +55 -0
- package/src/runtime.ts +320 -0
- package/tsconfig.json +20 -0
package/dist/runtime.js
ADDED
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Tapis Security API
|
|
6
|
+
* The Tapis Security API provides access to the Tapis Security Kernel authorization and secrets facilities.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1
|
|
9
|
+
* Contact: cicsupport@tacc.utexas.edu
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __extends = (this && this.__extends) || (function () {
|
|
16
|
+
var extendStatics = Object.setPrototypeOf ||
|
|
17
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
18
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
19
|
+
return function (d, b) {
|
|
20
|
+
extendStatics(d, b);
|
|
21
|
+
function __() { this.constructor = d; }
|
|
22
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
23
|
+
};
|
|
24
|
+
})();
|
|
25
|
+
var __assign = (this && this.__assign) || Object.assign || function(t) {
|
|
26
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
27
|
+
s = arguments[i];
|
|
28
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
29
|
+
t[p] = s[p];
|
|
30
|
+
}
|
|
31
|
+
return t;
|
|
32
|
+
};
|
|
33
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
34
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
35
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
36
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
37
|
+
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
|
38
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
42
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
43
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
44
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
45
|
+
function step(op) {
|
|
46
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
47
|
+
while (_) try {
|
|
48
|
+
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;
|
|
49
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
50
|
+
switch (op[0]) {
|
|
51
|
+
case 0: case 1: t = op; break;
|
|
52
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
53
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
54
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
55
|
+
default:
|
|
56
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
57
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
58
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
59
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
60
|
+
if (t[2]) _.ops.pop();
|
|
61
|
+
_.trys.pop(); continue;
|
|
62
|
+
}
|
|
63
|
+
op = body.call(thisArg, _);
|
|
64
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
65
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69
|
+
exports.BASE_PATH = "http://localhost:8080/v3".replace(/\/+$/, "");
|
|
70
|
+
var isBlob = function (value) { return typeof Blob !== 'undefined' && value instanceof Blob; };
|
|
71
|
+
/**
|
|
72
|
+
* This is the base class for all generated API classes.
|
|
73
|
+
*/
|
|
74
|
+
var BaseAPI = /** @class */ (function () {
|
|
75
|
+
function BaseAPI(configuration) {
|
|
76
|
+
if (configuration === void 0) { configuration = new Configuration(); }
|
|
77
|
+
var _this = this;
|
|
78
|
+
this.configuration = configuration;
|
|
79
|
+
this.fetchApi = function (url, init) { return __awaiter(_this, void 0, void 0, function () {
|
|
80
|
+
var fetchParams, _i, _a, middleware, response, _b, _c, middleware;
|
|
81
|
+
return __generator(this, function (_d) {
|
|
82
|
+
switch (_d.label) {
|
|
83
|
+
case 0:
|
|
84
|
+
fetchParams = { url: url, init: init };
|
|
85
|
+
_i = 0, _a = this.middleware;
|
|
86
|
+
_d.label = 1;
|
|
87
|
+
case 1:
|
|
88
|
+
if (!(_i < _a.length)) return [3 /*break*/, 4];
|
|
89
|
+
middleware = _a[_i];
|
|
90
|
+
if (!middleware.pre) return [3 /*break*/, 3];
|
|
91
|
+
return [4 /*yield*/, middleware.pre(__assign({ fetch: this.fetchApi }, fetchParams))];
|
|
92
|
+
case 2:
|
|
93
|
+
fetchParams = (_d.sent()) || fetchParams;
|
|
94
|
+
_d.label = 3;
|
|
95
|
+
case 3:
|
|
96
|
+
_i++;
|
|
97
|
+
return [3 /*break*/, 1];
|
|
98
|
+
case 4: return [4 /*yield*/, (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init)];
|
|
99
|
+
case 5:
|
|
100
|
+
response = _d.sent();
|
|
101
|
+
_b = 0, _c = this.middleware;
|
|
102
|
+
_d.label = 6;
|
|
103
|
+
case 6:
|
|
104
|
+
if (!(_b < _c.length)) return [3 /*break*/, 9];
|
|
105
|
+
middleware = _c[_b];
|
|
106
|
+
if (!middleware.post) return [3 /*break*/, 8];
|
|
107
|
+
return [4 /*yield*/, middleware.post({
|
|
108
|
+
fetch: this.fetchApi,
|
|
109
|
+
url: fetchParams.url,
|
|
110
|
+
init: fetchParams.init,
|
|
111
|
+
response: response.clone(),
|
|
112
|
+
})];
|
|
113
|
+
case 7:
|
|
114
|
+
response = (_d.sent()) || response;
|
|
115
|
+
_d.label = 8;
|
|
116
|
+
case 8:
|
|
117
|
+
_b++;
|
|
118
|
+
return [3 /*break*/, 6];
|
|
119
|
+
case 9: return [2 /*return*/, response];
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}); };
|
|
123
|
+
this.middleware = configuration.middleware;
|
|
124
|
+
}
|
|
125
|
+
BaseAPI.prototype.withMiddleware = function () {
|
|
126
|
+
var middlewares = [];
|
|
127
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
128
|
+
middlewares[_i] = arguments[_i];
|
|
129
|
+
}
|
|
130
|
+
var _a;
|
|
131
|
+
var next = this.clone();
|
|
132
|
+
next.middleware = (_a = next.middleware).concat.apply(_a, middlewares);
|
|
133
|
+
return next;
|
|
134
|
+
};
|
|
135
|
+
BaseAPI.prototype.withPreMiddleware = function () {
|
|
136
|
+
var preMiddlewares = [];
|
|
137
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
138
|
+
preMiddlewares[_i] = arguments[_i];
|
|
139
|
+
}
|
|
140
|
+
var middlewares = preMiddlewares.map(function (pre) { return ({ pre: pre }); });
|
|
141
|
+
return this.withMiddleware.apply(this, middlewares);
|
|
142
|
+
};
|
|
143
|
+
BaseAPI.prototype.withPostMiddleware = function () {
|
|
144
|
+
var postMiddlewares = [];
|
|
145
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
146
|
+
postMiddlewares[_i] = arguments[_i];
|
|
147
|
+
}
|
|
148
|
+
var middlewares = postMiddlewares.map(function (post) { return ({ post: post }); });
|
|
149
|
+
return this.withMiddleware.apply(this, middlewares);
|
|
150
|
+
};
|
|
151
|
+
BaseAPI.prototype.request = function (context, initOverrides) {
|
|
152
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
153
|
+
var _a, url, init, response;
|
|
154
|
+
return __generator(this, function (_b) {
|
|
155
|
+
switch (_b.label) {
|
|
156
|
+
case 0:
|
|
157
|
+
_a = this.createFetchParams(context, initOverrides), url = _a.url, init = _a.init;
|
|
158
|
+
return [4 /*yield*/, this.fetchApi(url, init)];
|
|
159
|
+
case 1:
|
|
160
|
+
response = _b.sent();
|
|
161
|
+
if (response.status >= 200 && response.status < 300) {
|
|
162
|
+
return [2 /*return*/, response];
|
|
163
|
+
}
|
|
164
|
+
throw response;
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
};
|
|
169
|
+
BaseAPI.prototype.createFetchParams = function (context, initOverrides) {
|
|
170
|
+
var url = this.configuration.basePath + context.path;
|
|
171
|
+
if (context.query !== undefined && Object.keys(context.query).length !== 0) {
|
|
172
|
+
// only add the querystring to the URL if there are query parameters.
|
|
173
|
+
// this is done to avoid urls ending with a "?" character which buggy webservers
|
|
174
|
+
// do not handle correctly sometimes.
|
|
175
|
+
url += '?' + this.configuration.queryParamsStringify(context.query);
|
|
176
|
+
}
|
|
177
|
+
var body = ((typeof FormData !== "undefined" && context.body instanceof FormData) || context.body instanceof URLSearchParams || isBlob(context.body))
|
|
178
|
+
? context.body
|
|
179
|
+
: JSON.stringify(context.body);
|
|
180
|
+
var headers = Object.assign({}, this.configuration.headers, context.headers);
|
|
181
|
+
var init = __assign({ method: context.method, headers: headers, body: body, credentials: this.configuration.credentials }, initOverrides);
|
|
182
|
+
return { url: url, init: init };
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* Create a shallow clone of `this` by constructing a new instance
|
|
186
|
+
* and then shallow cloning data members.
|
|
187
|
+
*/
|
|
188
|
+
BaseAPI.prototype.clone = function () {
|
|
189
|
+
var constructor = this.constructor;
|
|
190
|
+
var next = new constructor(this.configuration);
|
|
191
|
+
next.middleware = this.middleware.slice();
|
|
192
|
+
return next;
|
|
193
|
+
};
|
|
194
|
+
return BaseAPI;
|
|
195
|
+
}());
|
|
196
|
+
exports.BaseAPI = BaseAPI;
|
|
197
|
+
;
|
|
198
|
+
var RequiredError = /** @class */ (function (_super) {
|
|
199
|
+
__extends(RequiredError, _super);
|
|
200
|
+
function RequiredError(field, msg) {
|
|
201
|
+
var _this = _super.call(this, msg) || this;
|
|
202
|
+
_this.field = field;
|
|
203
|
+
_this.name = "RequiredError";
|
|
204
|
+
return _this;
|
|
205
|
+
}
|
|
206
|
+
return RequiredError;
|
|
207
|
+
}(Error));
|
|
208
|
+
exports.RequiredError = RequiredError;
|
|
209
|
+
exports.COLLECTION_FORMATS = {
|
|
210
|
+
csv: ",",
|
|
211
|
+
ssv: " ",
|
|
212
|
+
tsv: "\t",
|
|
213
|
+
pipes: "|",
|
|
214
|
+
};
|
|
215
|
+
var Configuration = /** @class */ (function () {
|
|
216
|
+
function Configuration(configuration) {
|
|
217
|
+
if (configuration === void 0) { configuration = {}; }
|
|
218
|
+
this.configuration = configuration;
|
|
219
|
+
}
|
|
220
|
+
Object.defineProperty(Configuration.prototype, "basePath", {
|
|
221
|
+
get: function () {
|
|
222
|
+
return this.configuration.basePath != null ? this.configuration.basePath : exports.BASE_PATH;
|
|
223
|
+
},
|
|
224
|
+
enumerable: true,
|
|
225
|
+
configurable: true
|
|
226
|
+
});
|
|
227
|
+
Object.defineProperty(Configuration.prototype, "fetchApi", {
|
|
228
|
+
get: function () {
|
|
229
|
+
return this.configuration.fetchApi;
|
|
230
|
+
},
|
|
231
|
+
enumerable: true,
|
|
232
|
+
configurable: true
|
|
233
|
+
});
|
|
234
|
+
Object.defineProperty(Configuration.prototype, "middleware", {
|
|
235
|
+
get: function () {
|
|
236
|
+
return this.configuration.middleware || [];
|
|
237
|
+
},
|
|
238
|
+
enumerable: true,
|
|
239
|
+
configurable: true
|
|
240
|
+
});
|
|
241
|
+
Object.defineProperty(Configuration.prototype, "queryParamsStringify", {
|
|
242
|
+
get: function () {
|
|
243
|
+
return this.configuration.queryParamsStringify || querystring;
|
|
244
|
+
},
|
|
245
|
+
enumerable: true,
|
|
246
|
+
configurable: true
|
|
247
|
+
});
|
|
248
|
+
Object.defineProperty(Configuration.prototype, "username", {
|
|
249
|
+
get: function () {
|
|
250
|
+
return this.configuration.username;
|
|
251
|
+
},
|
|
252
|
+
enumerable: true,
|
|
253
|
+
configurable: true
|
|
254
|
+
});
|
|
255
|
+
Object.defineProperty(Configuration.prototype, "password", {
|
|
256
|
+
get: function () {
|
|
257
|
+
return this.configuration.password;
|
|
258
|
+
},
|
|
259
|
+
enumerable: true,
|
|
260
|
+
configurable: true
|
|
261
|
+
});
|
|
262
|
+
Object.defineProperty(Configuration.prototype, "apiKey", {
|
|
263
|
+
get: function () {
|
|
264
|
+
var apiKey = this.configuration.apiKey;
|
|
265
|
+
if (apiKey) {
|
|
266
|
+
return typeof apiKey === 'function' ? apiKey : function () { return apiKey; };
|
|
267
|
+
}
|
|
268
|
+
return undefined;
|
|
269
|
+
},
|
|
270
|
+
enumerable: true,
|
|
271
|
+
configurable: true
|
|
272
|
+
});
|
|
273
|
+
Object.defineProperty(Configuration.prototype, "accessToken", {
|
|
274
|
+
get: function () {
|
|
275
|
+
var _this = this;
|
|
276
|
+
var accessToken = this.configuration.accessToken;
|
|
277
|
+
if (accessToken) {
|
|
278
|
+
return typeof accessToken === 'function' ? accessToken : function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
279
|
+
return [2 /*return*/, accessToken];
|
|
280
|
+
}); }); };
|
|
281
|
+
}
|
|
282
|
+
return undefined;
|
|
283
|
+
},
|
|
284
|
+
enumerable: true,
|
|
285
|
+
configurable: true
|
|
286
|
+
});
|
|
287
|
+
Object.defineProperty(Configuration.prototype, "headers", {
|
|
288
|
+
get: function () {
|
|
289
|
+
return this.configuration.headers;
|
|
290
|
+
},
|
|
291
|
+
enumerable: true,
|
|
292
|
+
configurable: true
|
|
293
|
+
});
|
|
294
|
+
Object.defineProperty(Configuration.prototype, "credentials", {
|
|
295
|
+
get: function () {
|
|
296
|
+
return this.configuration.credentials;
|
|
297
|
+
},
|
|
298
|
+
enumerable: true,
|
|
299
|
+
configurable: true
|
|
300
|
+
});
|
|
301
|
+
return Configuration;
|
|
302
|
+
}());
|
|
303
|
+
exports.Configuration = Configuration;
|
|
304
|
+
function exists(json, key) {
|
|
305
|
+
var value = json[key];
|
|
306
|
+
return value !== null && value !== undefined;
|
|
307
|
+
}
|
|
308
|
+
exports.exists = exists;
|
|
309
|
+
function querystring(params, prefix) {
|
|
310
|
+
if (prefix === void 0) { prefix = ''; }
|
|
311
|
+
return Object.keys(params)
|
|
312
|
+
.map(function (key) {
|
|
313
|
+
var fullKey = prefix + (prefix.length ? "[" + key + "]" : key);
|
|
314
|
+
var value = params[key];
|
|
315
|
+
if (value instanceof Array) {
|
|
316
|
+
var multiValue = value.map(function (singleValue) { return encodeURIComponent(String(singleValue)); })
|
|
317
|
+
.join("&" + encodeURIComponent(fullKey) + "=");
|
|
318
|
+
return encodeURIComponent(fullKey) + "=" + multiValue;
|
|
319
|
+
}
|
|
320
|
+
if (value instanceof Date) {
|
|
321
|
+
return encodeURIComponent(fullKey) + "=" + encodeURIComponent(value.toISOString());
|
|
322
|
+
}
|
|
323
|
+
if (value instanceof Object) {
|
|
324
|
+
return querystring(value, fullKey);
|
|
325
|
+
}
|
|
326
|
+
return encodeURIComponent(fullKey) + "=" + encodeURIComponent(String(value));
|
|
327
|
+
})
|
|
328
|
+
.filter(function (part) { return part.length > 0; })
|
|
329
|
+
.join('&');
|
|
330
|
+
}
|
|
331
|
+
exports.querystring = querystring;
|
|
332
|
+
function mapValues(data, fn) {
|
|
333
|
+
return Object.keys(data).reduce(function (acc, key) {
|
|
334
|
+
var _a;
|
|
335
|
+
return (__assign({}, acc, (_a = {}, _a[key] = fn(data[key]), _a)));
|
|
336
|
+
}, {});
|
|
337
|
+
}
|
|
338
|
+
exports.mapValues = mapValues;
|
|
339
|
+
function canConsumeForm(consumes) {
|
|
340
|
+
for (var _i = 0, consumes_1 = consumes; _i < consumes_1.length; _i++) {
|
|
341
|
+
var consume = consumes_1[_i];
|
|
342
|
+
if ('multipart/form-data' === consume.contentType) {
|
|
343
|
+
return true;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
return false;
|
|
347
|
+
}
|
|
348
|
+
exports.canConsumeForm = canConsumeForm;
|
|
349
|
+
var JSONApiResponse = /** @class */ (function () {
|
|
350
|
+
function JSONApiResponse(raw, transformer) {
|
|
351
|
+
if (transformer === void 0) { transformer = function (jsonValue) { return jsonValue; }; }
|
|
352
|
+
this.raw = raw;
|
|
353
|
+
this.transformer = transformer;
|
|
354
|
+
}
|
|
355
|
+
JSONApiResponse.prototype.value = function () {
|
|
356
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
357
|
+
var _a;
|
|
358
|
+
return __generator(this, function (_b) {
|
|
359
|
+
switch (_b.label) {
|
|
360
|
+
case 0:
|
|
361
|
+
_a = this.transformer;
|
|
362
|
+
return [4 /*yield*/, this.raw.json()];
|
|
363
|
+
case 1: return [2 /*return*/, _a.apply(this, [_b.sent()])];
|
|
364
|
+
}
|
|
365
|
+
});
|
|
366
|
+
});
|
|
367
|
+
};
|
|
368
|
+
return JSONApiResponse;
|
|
369
|
+
}());
|
|
370
|
+
exports.JSONApiResponse = JSONApiResponse;
|
|
371
|
+
var VoidApiResponse = /** @class */ (function () {
|
|
372
|
+
function VoidApiResponse(raw) {
|
|
373
|
+
this.raw = raw;
|
|
374
|
+
}
|
|
375
|
+
VoidApiResponse.prototype.value = function () {
|
|
376
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
377
|
+
return __generator(this, function (_a) {
|
|
378
|
+
return [2 /*return*/, undefined];
|
|
379
|
+
});
|
|
380
|
+
});
|
|
381
|
+
};
|
|
382
|
+
return VoidApiResponse;
|
|
383
|
+
}());
|
|
384
|
+
exports.VoidApiResponse = VoidApiResponse;
|
|
385
|
+
var BlobApiResponse = /** @class */ (function () {
|
|
386
|
+
function BlobApiResponse(raw) {
|
|
387
|
+
this.raw = raw;
|
|
388
|
+
}
|
|
389
|
+
BlobApiResponse.prototype.value = function () {
|
|
390
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
391
|
+
return __generator(this, function (_a) {
|
|
392
|
+
switch (_a.label) {
|
|
393
|
+
case 0: return [4 /*yield*/, this.raw.blob()];
|
|
394
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
});
|
|
398
|
+
};
|
|
399
|
+
;
|
|
400
|
+
return BlobApiResponse;
|
|
401
|
+
}());
|
|
402
|
+
exports.BlobApiResponse = BlobApiResponse;
|
|
403
|
+
var TextApiResponse = /** @class */ (function () {
|
|
404
|
+
function TextApiResponse(raw) {
|
|
405
|
+
this.raw = raw;
|
|
406
|
+
}
|
|
407
|
+
TextApiResponse.prototype.value = function () {
|
|
408
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
409
|
+
return __generator(this, function (_a) {
|
|
410
|
+
switch (_a.label) {
|
|
411
|
+
case 0: return [4 /*yield*/, this.raw.text()];
|
|
412
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
});
|
|
416
|
+
};
|
|
417
|
+
;
|
|
418
|
+
return TextApiResponse;
|
|
419
|
+
}());
|
|
420
|
+
exports.TextApiResponse = TextApiResponse;
|
package/package.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tapis/tapis-typescript-sk",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "OpenAPI client for @tapis/tapis-typescript-sk",
|
|
5
|
+
"author": "OpenAPI-Generator",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"typings": "./dist/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tsc",
|
|
10
|
+
"prepare": "npm run build"
|
|
11
|
+
},
|
|
12
|
+
"devDependencies": {
|
|
13
|
+
"typescript": "^2.4"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Tapis Security API
|
|
5
|
+
* The Tapis Security API provides access to the Tapis Security Kernel authorization and secrets facilities.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1
|
|
8
|
+
* Contact: cicsupport@tacc.utexas.edu
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import {
|
|
18
|
+
RespBasic,
|
|
19
|
+
RespBasicFromJSON,
|
|
20
|
+
RespBasicToJSON,
|
|
21
|
+
RespProbe,
|
|
22
|
+
RespProbeFromJSON,
|
|
23
|
+
RespProbeToJSON,
|
|
24
|
+
} from '../models';
|
|
25
|
+
|
|
26
|
+
export interface SayHelloRequest {
|
|
27
|
+
pretty?: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
export class GeneralApi extends runtime.BaseAPI {
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Lightwieght health check for liveness. No authorization required.
|
|
37
|
+
*/
|
|
38
|
+
async checkHealthRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespProbe>> {
|
|
39
|
+
const queryParameters: any = {};
|
|
40
|
+
|
|
41
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
42
|
+
|
|
43
|
+
const response = await this.request({
|
|
44
|
+
path: `/security/healthcheck`,
|
|
45
|
+
method: 'GET',
|
|
46
|
+
headers: headerParameters,
|
|
47
|
+
query: queryParameters,
|
|
48
|
+
}, initOverrides);
|
|
49
|
+
|
|
50
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RespProbeFromJSON(jsonValue));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Lightwieght health check for liveness. No authorization required.
|
|
55
|
+
*/
|
|
56
|
+
async checkHealth(initOverrides?: RequestInit): Promise<RespProbe> {
|
|
57
|
+
const response = await this.checkHealthRaw(initOverrides);
|
|
58
|
+
return await response.value();
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Lightwieght readiness check. No authorization required.
|
|
63
|
+
*/
|
|
64
|
+
async readyRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespProbe>> {
|
|
65
|
+
const queryParameters: any = {};
|
|
66
|
+
|
|
67
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
68
|
+
|
|
69
|
+
const response = await this.request({
|
|
70
|
+
path: `/security/ready`,
|
|
71
|
+
method: 'GET',
|
|
72
|
+
headers: headerParameters,
|
|
73
|
+
query: queryParameters,
|
|
74
|
+
}, initOverrides);
|
|
75
|
+
|
|
76
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RespProbeFromJSON(jsonValue));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Lightwieght readiness check. No authorization required.
|
|
81
|
+
*/
|
|
82
|
+
async ready(initOverrides?: RequestInit): Promise<RespProbe> {
|
|
83
|
+
const response = await this.readyRaw(initOverrides);
|
|
84
|
+
return await response.value();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Logged connectivity test. No authorization required.
|
|
89
|
+
*/
|
|
90
|
+
async sayHelloRaw(requestParameters: SayHelloRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespBasic>> {
|
|
91
|
+
const queryParameters: any = {};
|
|
92
|
+
|
|
93
|
+
if (requestParameters.pretty !== undefined) {
|
|
94
|
+
queryParameters['pretty'] = requestParameters.pretty;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
98
|
+
|
|
99
|
+
const response = await this.request({
|
|
100
|
+
path: `/security/hello`,
|
|
101
|
+
method: 'GET',
|
|
102
|
+
headers: headerParameters,
|
|
103
|
+
query: queryParameters,
|
|
104
|
+
}, initOverrides);
|
|
105
|
+
|
|
106
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RespBasicFromJSON(jsonValue));
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Logged connectivity test. No authorization required.
|
|
111
|
+
*/
|
|
112
|
+
async sayHello(requestParameters: SayHelloRequest, initOverrides?: RequestInit): Promise<RespBasic> {
|
|
113
|
+
const response = await this.sayHelloRaw(requestParameters, initOverrides);
|
|
114
|
+
return await response.value();
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
}
|