@emilgroup/tenant-sdk-node 1.39.1-beta.3 → 1.39.1-beta.30

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.
Files changed (119) hide show
  1. package/.openapi-generator/FILES +32 -0
  2. package/README.md +2 -2
  3. package/api/ssoconnection-api.ts +793 -0
  4. package/api/test-tenant-pool-api.ts +1285 -0
  5. package/api/user-controller-rest-api.ts +4 -4
  6. package/api/users-api.ts +4 -4
  7. package/api.ts +4 -0
  8. package/dist/api/ssoconnection-api.d.ts +434 -0
  9. package/dist/api/ssoconnection-api.js +784 -0
  10. package/dist/api/test-tenant-pool-api.d.ts +699 -0
  11. package/dist/api/test-tenant-pool-api.js +1239 -0
  12. package/dist/api/user-controller-rest-api.d.ts +4 -4
  13. package/dist/api/user-controller-rest-api.js +3 -3
  14. package/dist/api/users-api.d.ts +4 -4
  15. package/dist/api/users-api.js +3 -3
  16. package/dist/api.d.ts +2 -0
  17. package/dist/api.js +2 -0
  18. package/dist/models/checkout-request-dto.d.ts +36 -0
  19. package/dist/models/checkout-request-dto.js +15 -0
  20. package/dist/models/checkout-response-class.d.ts +36 -0
  21. package/dist/models/checkout-response-class.js +15 -0
  22. package/dist/models/cleanup-registry-entity-dto.d.ts +36 -0
  23. package/dist/models/cleanup-registry-entity-dto.js +15 -0
  24. package/dist/models/cleanup-registry-request-dto.d.ts +25 -0
  25. package/dist/models/cleanup-registry-request-dto.js +15 -0
  26. package/dist/models/cleanup-registry-response-class.d.ts +31 -0
  27. package/dist/models/cleanup-registry-response-class.js +15 -0
  28. package/dist/models/create-admin-tenant-request-dto.d.ts +11 -0
  29. package/dist/models/create-admin-tenant-request-dto.js +5 -0
  30. package/dist/models/create-sso-connection-request-dto.d.ts +66 -0
  31. package/dist/models/create-sso-connection-request-dto.js +23 -0
  32. package/dist/models/create-sso-connection-response-class.d.ts +25 -0
  33. package/dist/models/create-sso-connection-response-class.js +15 -0
  34. package/dist/models/create-tenant-request-dto.d.ts +11 -0
  35. package/dist/models/create-tenant-request-dto.js +5 -0
  36. package/dist/models/delete-tenant-request-dto.d.ts +30 -0
  37. package/dist/models/delete-tenant-request-dto.js +15 -0
  38. package/dist/models/get-sso-connection-response-class.d.ts +25 -0
  39. package/dist/models/get-sso-connection-response-class.js +15 -0
  40. package/dist/models/get-sso-connection-setup-response-class.d.ts +25 -0
  41. package/dist/models/get-sso-connection-setup-response-class.js +15 -0
  42. package/dist/models/index.d.ts +30 -0
  43. package/dist/models/index.js +30 -0
  44. package/dist/models/list-pool-tenants-response-class.d.ts +25 -0
  45. package/dist/models/list-pool-tenants-response-class.js +15 -0
  46. package/dist/models/oidc-sso-details-input-dto.d.ts +36 -0
  47. package/dist/models/oidc-sso-details-input-dto.js +15 -0
  48. package/dist/models/oidc-sso-details-update-dto.d.ts +36 -0
  49. package/dist/models/oidc-sso-details-update-dto.js +15 -0
  50. package/dist/models/oidc-sso-setup-class.d.ts +31 -0
  51. package/dist/models/oidc-sso-setup-class.js +15 -0
  52. package/dist/models/pool-tenant-response-class.d.ts +54 -0
  53. package/dist/models/pool-tenant-response-class.js +15 -0
  54. package/dist/models/register-pool-tenant-request-dto.d.ts +30 -0
  55. package/dist/models/register-pool-tenant-request-dto.js +15 -0
  56. package/dist/models/saml-sso-details-dto.d.ts +24 -0
  57. package/dist/models/saml-sso-details-dto.js +15 -0
  58. package/dist/models/saml-sso-setup-class.d.ts +37 -0
  59. package/dist/models/saml-sso-setup-class.js +15 -0
  60. package/dist/models/shared-oidc-sso-details-class.d.ts +36 -0
  61. package/dist/models/shared-oidc-sso-details-class.js +15 -0
  62. package/dist/models/shared-saml-sso-details-class.d.ts +24 -0
  63. package/dist/models/shared-saml-sso-details-class.js +15 -0
  64. package/dist/models/shared-sso-attribute-mapping-class.d.ts +30 -0
  65. package/dist/models/shared-sso-attribute-mapping-class.js +15 -0
  66. package/dist/models/sso-attribute-mapping-dto.d.ts +30 -0
  67. package/dist/models/sso-attribute-mapping-dto.js +15 -0
  68. package/dist/models/sso-attribute-mapping-template-class.d.ts +36 -0
  69. package/dist/models/sso-attribute-mapping-template-class.js +15 -0
  70. package/dist/models/sso-connection-class.d.ts +102 -0
  71. package/dist/models/sso-connection-class.js +23 -0
  72. package/dist/models/sso-connection-setup-class.d.ts +32 -0
  73. package/dist/models/sso-connection-setup-class.js +15 -0
  74. package/dist/models/update-sso-connection-body-dto.d.ts +45 -0
  75. package/dist/models/update-sso-connection-body-dto.js +15 -0
  76. package/dist/models/update-sso-connection-response-class.d.ts +25 -0
  77. package/dist/models/update-sso-connection-response-class.js +15 -0
  78. package/dist/models/update-sso-connection-status-body-dto.d.ts +24 -0
  79. package/dist/models/update-sso-connection-status-body-dto.js +15 -0
  80. package/dist/models/update-sso-connection-status-response-class.d.ts +25 -0
  81. package/dist/models/update-sso-connection-status-response-class.js +15 -0
  82. package/dist/models/update-tags-body-dto.d.ts +24 -0
  83. package/dist/models/update-tags-body-dto.js +15 -0
  84. package/dist/models/user-class.d.ts +7 -0
  85. package/models/checkout-request-dto.ts +42 -0
  86. package/models/checkout-response-class.ts +42 -0
  87. package/models/cleanup-registry-entity-dto.ts +42 -0
  88. package/models/cleanup-registry-request-dto.ts +31 -0
  89. package/models/cleanup-registry-response-class.ts +37 -0
  90. package/models/create-admin-tenant-request-dto.ts +14 -0
  91. package/models/create-sso-connection-request-dto.ts +76 -0
  92. package/models/create-sso-connection-response-class.ts +31 -0
  93. package/models/create-tenant-request-dto.ts +14 -0
  94. package/models/delete-tenant-request-dto.ts +36 -0
  95. package/models/get-sso-connection-response-class.ts +31 -0
  96. package/models/get-sso-connection-setup-response-class.ts +31 -0
  97. package/models/index.ts +30 -0
  98. package/models/list-pool-tenants-response-class.ts +31 -0
  99. package/models/oidc-sso-details-input-dto.ts +42 -0
  100. package/models/oidc-sso-details-update-dto.ts +42 -0
  101. package/models/oidc-sso-setup-class.ts +37 -0
  102. package/models/pool-tenant-response-class.ts +60 -0
  103. package/models/register-pool-tenant-request-dto.ts +36 -0
  104. package/models/saml-sso-details-dto.ts +30 -0
  105. package/models/saml-sso-setup-class.ts +43 -0
  106. package/models/shared-oidc-sso-details-class.ts +42 -0
  107. package/models/shared-saml-sso-details-class.ts +30 -0
  108. package/models/shared-sso-attribute-mapping-class.ts +36 -0
  109. package/models/sso-attribute-mapping-dto.ts +36 -0
  110. package/models/sso-attribute-mapping-template-class.ts +42 -0
  111. package/models/sso-connection-class.ts +112 -0
  112. package/models/sso-connection-setup-class.ts +38 -0
  113. package/models/update-sso-connection-body-dto.ts +51 -0
  114. package/models/update-sso-connection-response-class.ts +31 -0
  115. package/models/update-sso-connection-status-body-dto.ts +30 -0
  116. package/models/update-sso-connection-status-response-class.ts +31 -0
  117. package/models/update-tags-body-dto.ts +30 -0
  118. package/models/user-class.ts +7 -0
  119. package/package.json +1 -1
@@ -0,0 +1,1239 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL Tenant Service
6
+ * The EMIL TenantService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
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 = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ var __assign = (this && this.__assign) || function () {
31
+ __assign = Object.assign || function(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
+ t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
41
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
+ return new (P || (P = Promise))(function (resolve, reject) {
44
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
48
+ });
49
+ };
50
+ var __generator = (this && this.__generator) || function (thisArg, body) {
51
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
+ function verb(n) { return function (v) { return step([n, v]); }; }
54
+ function step(op) {
55
+ if (f) throw new TypeError("Generator is already executing.");
56
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
+ 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;
58
+ if (y = 0, t) op = [op[0] & 2, t.value];
59
+ switch (op[0]) {
60
+ case 0: case 1: t = op; break;
61
+ case 4: _.label++; return { value: op[1], done: false };
62
+ case 5: _.label++; y = op[1]; op = [0]; continue;
63
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
+ default:
65
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
+ if (t[2]) _.ops.pop();
70
+ _.trys.pop(); continue;
71
+ }
72
+ op = body.call(thisArg, _);
73
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
+ }
76
+ };
77
+ var __importDefault = (this && this.__importDefault) || function (mod) {
78
+ return (mod && mod.__esModule) ? mod : { "default": mod };
79
+ };
80
+ Object.defineProperty(exports, "__esModule", { value: true });
81
+ exports.TestTenantPoolApi = exports.TestTenantPoolApiFactory = exports.TestTenantPoolApiFp = exports.TestTenantPoolApiAxiosParamCreator = void 0;
82
+ var axios_1 = __importDefault(require("axios"));
83
+ // Some imports not used depending on template conditions
84
+ // @ts-ignore
85
+ var common_1 = require("../common");
86
+ // @ts-ignore
87
+ var base_1 = require("../base");
88
+ // URLSearchParams not necessarily used
89
+ // @ts-ignore
90
+ var url_1 = require("url");
91
+ var FormData = require('form-data');
92
+ /**
93
+ * TestTenantPoolApi - axios parameter creator
94
+ * @export
95
+ */
96
+ var TestTenantPoolApiAxiosParamCreator = function (configuration) {
97
+ var _this = this;
98
+ return {
99
+ /**
100
+ * Atomically claims one available pool tenant whose tags match the given filter and marks it leased for the given duration (defaults to 30 minutes). Concurrent callers requesting the same tags never receive the same tenant. **Required Permissions** \"tenant-management.tenants.update\"
101
+ * @summary Check out an available pool tenant
102
+ * @param {CheckoutRequestDto} checkoutRequestDto
103
+ * @param {string} [authorization] Bearer Token
104
+ * @param {*} [options] Override http request option.
105
+ * @throws {RequiredError}
106
+ */
107
+ checkout: function (checkoutRequestDto, authorization, options) {
108
+ if (options === void 0) { options = {}; }
109
+ return __awaiter(_this, void 0, void 0, function () {
110
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
+ return __generator(this, function (_a) {
112
+ switch (_a.label) {
113
+ case 0:
114
+ // verify required parameter 'checkoutRequestDto' is not null or undefined
115
+ (0, common_1.assertParamExists)('checkout', 'checkoutRequestDto', checkoutRequestDto);
116
+ localVarPath = "/tenantservice/v1/test-tenant-pool/checkout";
117
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
118
+ if (configuration) {
119
+ baseOptions = configuration.baseOptions;
120
+ baseAccessToken = configuration.accessToken;
121
+ }
122
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
123
+ localVarHeaderParameter = {};
124
+ localVarQueryParameter = {};
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ case 1:
129
+ // authentication bearer required
130
+ // http bearer authentication required
131
+ _a.sent();
132
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
134
+ }
135
+ localVarHeaderParameter['Content-Type'] = 'application/json';
136
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
137
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
138
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
139
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(checkoutRequestDto, localVarRequestOptions, configuration);
140
+ return [2 /*return*/, {
141
+ url: (0, common_1.toPathString)(localVarUrlObj),
142
+ options: localVarRequestOptions,
143
+ }];
144
+ }
145
+ });
146
+ });
147
+ },
148
+ /**
149
+ * Removes the pool registration only -- never the underlying tenant. Refused unless the pool tenant is available, so an active lease or in-flight cleanup can never be deregistered out from under itself. **Required Permissions** \"tenant-management.tenants.delete\"
150
+ * @summary Deregister a pool tenant
151
+ * @param {string} tenantSlug The slug of the tenant it was registered under.
152
+ * @param {string} [authorization] Bearer Token
153
+ * @param {*} [options] Override http request option.
154
+ * @throws {RequiredError}
155
+ */
156
+ deregister: function (tenantSlug, authorization, options) {
157
+ if (options === void 0) { options = {}; }
158
+ return __awaiter(_this, void 0, void 0, function () {
159
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
160
+ return __generator(this, function (_a) {
161
+ switch (_a.label) {
162
+ case 0:
163
+ // verify required parameter 'tenantSlug' is not null or undefined
164
+ (0, common_1.assertParamExists)('deregister', 'tenantSlug', tenantSlug);
165
+ localVarPath = "/tenantservice/v1/test-tenant-pool/{tenantSlug}"
166
+ .replace("{".concat("tenantSlug", "}"), encodeURIComponent(String(tenantSlug)));
167
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
168
+ if (configuration) {
169
+ baseOptions = configuration.baseOptions;
170
+ baseAccessToken = configuration.accessToken;
171
+ }
172
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
173
+ localVarHeaderParameter = {};
174
+ localVarQueryParameter = {};
175
+ // authentication bearer required
176
+ // http bearer authentication required
177
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
178
+ case 1:
179
+ // authentication bearer required
180
+ // http bearer authentication required
181
+ _a.sent();
182
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
183
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
184
+ }
185
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
186
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
187
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
188
+ return [2 /*return*/, {
189
+ url: (0, common_1.toPathString)(localVarUrlObj),
190
+ options: localVarRequestOptions,
191
+ }];
192
+ }
193
+ });
194
+ });
195
+ },
196
+ /**
197
+ * Returns the single, shared configuration describing which database entities get hard-deleted when a pool tenant is cleaned up after release. **Required Permissions** \"tenant-management.tenants.view\"
198
+ * @summary Read the shared cleanup registry
199
+ * @param {string} [authorization] Bearer Token
200
+ * @param {*} [options] Override http request option.
201
+ * @throws {RequiredError}
202
+ */
203
+ getCleanupRegistry: function (authorization, options) {
204
+ if (options === void 0) { options = {}; }
205
+ return __awaiter(_this, void 0, void 0, function () {
206
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
207
+ return __generator(this, function (_a) {
208
+ switch (_a.label) {
209
+ case 0:
210
+ localVarPath = "/tenantservice/v1/test-tenant-pool/cleanup-registry";
211
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
212
+ if (configuration) {
213
+ baseOptions = configuration.baseOptions;
214
+ baseAccessToken = configuration.accessToken;
215
+ }
216
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
217
+ localVarHeaderParameter = {};
218
+ localVarQueryParameter = {};
219
+ // authentication bearer required
220
+ // http bearer authentication required
221
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
222
+ case 1:
223
+ // authentication bearer required
224
+ // http bearer authentication required
225
+ _a.sent();
226
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
227
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
228
+ }
229
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
230
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
231
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
232
+ return [2 /*return*/, {
233
+ url: (0, common_1.toPathString)(localVarUrlObj),
234
+ options: localVarRequestOptions,
235
+ }];
236
+ }
237
+ });
238
+ });
239
+ },
240
+ /**
241
+ * Resets the countdown on the lease held by leaseId to the given duration (defaults to 30 minutes). Callers should call this periodically while still using the tenant, since an unextended lease eventually expires and is reclaimed by the background sweep. **Required Permissions** \"tenant-management.tenants.update\"
242
+ * @summary Extend a checked-out lease
243
+ * @param {string} leaseId The lease id returned by checkout.
244
+ * @param {string} [authorization] Bearer Token
245
+ * @param {*} [options] Override http request option.
246
+ * @throws {RequiredError}
247
+ */
248
+ heartbeat: function (leaseId, authorization, options) {
249
+ if (options === void 0) { options = {}; }
250
+ return __awaiter(_this, void 0, void 0, function () {
251
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
252
+ return __generator(this, function (_a) {
253
+ switch (_a.label) {
254
+ case 0:
255
+ // verify required parameter 'leaseId' is not null or undefined
256
+ (0, common_1.assertParamExists)('heartbeat', 'leaseId', leaseId);
257
+ localVarPath = "/tenantservice/v1/test-tenant-pool/{leaseId}/heartbeat"
258
+ .replace("{".concat("leaseId", "}"), encodeURIComponent(String(leaseId)));
259
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
260
+ if (configuration) {
261
+ baseOptions = configuration.baseOptions;
262
+ baseAccessToken = configuration.accessToken;
263
+ }
264
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
265
+ localVarHeaderParameter = {};
266
+ localVarQueryParameter = {};
267
+ // authentication bearer required
268
+ // http bearer authentication required
269
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
270
+ case 1:
271
+ // authentication bearer required
272
+ // http bearer authentication required
273
+ _a.sent();
274
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
275
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
276
+ }
277
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
278
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
279
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
280
+ return [2 /*return*/, {
281
+ url: (0, common_1.toPathString)(localVarUrlObj),
282
+ options: localVarRequestOptions,
283
+ }];
284
+ }
285
+ });
286
+ });
287
+ },
288
+ /**
289
+ * Same as heartbeat by lease id, for callers that only track which tenant they leased rather than the lease id checkout returned. **Required Permissions** \"tenant-management.tenants.update\"
290
+ * @summary Extend a checked-out lease, by tenant slug
291
+ * @param {string} tenantSlug The slug of the leased tenant.
292
+ * @param {string} [authorization] Bearer Token
293
+ * @param {*} [options] Override http request option.
294
+ * @throws {RequiredError}
295
+ */
296
+ heartbeatByTenantSlug: function (tenantSlug, authorization, options) {
297
+ if (options === void 0) { options = {}; }
298
+ return __awaiter(_this, void 0, void 0, function () {
299
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
300
+ return __generator(this, function (_a) {
301
+ switch (_a.label) {
302
+ case 0:
303
+ // verify required parameter 'tenantSlug' is not null or undefined
304
+ (0, common_1.assertParamExists)('heartbeatByTenantSlug', 'tenantSlug', tenantSlug);
305
+ localVarPath = "/tenantservice/v1/test-tenant-pool/by-tenant/{tenantSlug}/heartbeat"
306
+ .replace("{".concat("tenantSlug", "}"), encodeURIComponent(String(tenantSlug)));
307
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
308
+ if (configuration) {
309
+ baseOptions = configuration.baseOptions;
310
+ baseAccessToken = configuration.accessToken;
311
+ }
312
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
313
+ localVarHeaderParameter = {};
314
+ localVarQueryParameter = {};
315
+ // authentication bearer required
316
+ // http bearer authentication required
317
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
318
+ case 1:
319
+ // authentication bearer required
320
+ // http bearer authentication required
321
+ _a.sent();
322
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
323
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
324
+ }
325
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
326
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
327
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
328
+ return [2 /*return*/, {
329
+ url: (0, common_1.toPathString)(localVarUrlObj),
330
+ options: localVarRequestOptions,
331
+ }];
332
+ }
333
+ });
334
+ });
335
+ },
336
+ /**
337
+ * Returns every registered pool tenant, including its tags and status, regardless of availability. **Required Permissions** \"tenant-management.tenants.view\"
338
+ * @summary List every tenant in the test pool
339
+ * @param {string} [authorization] Bearer Token
340
+ * @param {*} [options] Override http request option.
341
+ * @throws {RequiredError}
342
+ */
343
+ listPoolTenants: function (authorization, options) {
344
+ if (options === void 0) { options = {}; }
345
+ return __awaiter(_this, void 0, void 0, function () {
346
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
347
+ return __generator(this, function (_a) {
348
+ switch (_a.label) {
349
+ case 0:
350
+ localVarPath = "/tenantservice/v1/test-tenant-pool";
351
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
352
+ if (configuration) {
353
+ baseOptions = configuration.baseOptions;
354
+ baseAccessToken = configuration.accessToken;
355
+ }
356
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
357
+ localVarHeaderParameter = {};
358
+ localVarQueryParameter = {};
359
+ // authentication bearer required
360
+ // http bearer authentication required
361
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
362
+ case 1:
363
+ // authentication bearer required
364
+ // http bearer authentication required
365
+ _a.sent();
366
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
367
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
368
+ }
369
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
370
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
371
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
372
+ return [2 /*return*/, {
373
+ url: (0, common_1.toPathString)(localVarUrlObj),
374
+ options: localVarRequestOptions,
375
+ }];
376
+ }
377
+ });
378
+ });
379
+ },
380
+ /**
381
+ * Adds an existing tenant to the pool with the given tags, making it eligible for checkout by tests requesting matching tags. Does not create or modify the tenant itself. **Required Permissions** \"tenant-management.tenants.create\"
382
+ * @summary Register a tenant into the test pool
383
+ * @param {RegisterPoolTenantRequestDto} registerPoolTenantRequestDto
384
+ * @param {string} [authorization] Bearer Token
385
+ * @param {*} [options] Override http request option.
386
+ * @throws {RequiredError}
387
+ */
388
+ register: function (registerPoolTenantRequestDto, authorization, options) {
389
+ if (options === void 0) { options = {}; }
390
+ return __awaiter(_this, void 0, void 0, function () {
391
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
392
+ return __generator(this, function (_a) {
393
+ switch (_a.label) {
394
+ case 0:
395
+ // verify required parameter 'registerPoolTenantRequestDto' is not null or undefined
396
+ (0, common_1.assertParamExists)('register', 'registerPoolTenantRequestDto', registerPoolTenantRequestDto);
397
+ localVarPath = "/tenantservice/v1/test-tenant-pool";
398
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
399
+ if (configuration) {
400
+ baseOptions = configuration.baseOptions;
401
+ baseAccessToken = configuration.accessToken;
402
+ }
403
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
404
+ localVarHeaderParameter = {};
405
+ localVarQueryParameter = {};
406
+ // authentication bearer required
407
+ // http bearer authentication required
408
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
409
+ case 1:
410
+ // authentication bearer required
411
+ // http bearer authentication required
412
+ _a.sent();
413
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
414
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
415
+ }
416
+ localVarHeaderParameter['Content-Type'] = 'application/json';
417
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
418
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
419
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
420
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(registerPoolTenantRequestDto, localVarRequestOptions, configuration);
421
+ return [2 /*return*/, {
422
+ url: (0, common_1.toPathString)(localVarUrlObj),
423
+ options: localVarRequestOptions,
424
+ }];
425
+ }
426
+ });
427
+ });
428
+ },
429
+ /**
430
+ * Ends the lease immediately and asynchronously triggers the tenant\'s cleanup, so it becomes available again once cleanup finishes. Cleanup is fire-and-forget: this call returns before cleanup completes. **Required Permissions** \"tenant-management.tenants.update\"
431
+ * @summary Release a checked-out lease
432
+ * @param {string} leaseId The lease id returned by checkout.
433
+ * @param {string} [authorization] Bearer Token
434
+ * @param {*} [options] Override http request option.
435
+ * @throws {RequiredError}
436
+ */
437
+ release: function (leaseId, authorization, options) {
438
+ if (options === void 0) { options = {}; }
439
+ return __awaiter(_this, void 0, void 0, function () {
440
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
441
+ return __generator(this, function (_a) {
442
+ switch (_a.label) {
443
+ case 0:
444
+ // verify required parameter 'leaseId' is not null or undefined
445
+ (0, common_1.assertParamExists)('release', 'leaseId', leaseId);
446
+ localVarPath = "/tenantservice/v1/test-tenant-pool/{leaseId}/release"
447
+ .replace("{".concat("leaseId", "}"), encodeURIComponent(String(leaseId)));
448
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
449
+ if (configuration) {
450
+ baseOptions = configuration.baseOptions;
451
+ baseAccessToken = configuration.accessToken;
452
+ }
453
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
454
+ localVarHeaderParameter = {};
455
+ localVarQueryParameter = {};
456
+ // authentication bearer required
457
+ // http bearer authentication required
458
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
459
+ case 1:
460
+ // authentication bearer required
461
+ // http bearer authentication required
462
+ _a.sent();
463
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
464
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
465
+ }
466
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
467
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
468
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
469
+ return [2 /*return*/, {
470
+ url: (0, common_1.toPathString)(localVarUrlObj),
471
+ options: localVarRequestOptions,
472
+ }];
473
+ }
474
+ });
475
+ });
476
+ },
477
+ /**
478
+ * Same as release by lease id, for callers that only track which tenant they leased rather than the lease id checkout returned. **Required Permissions** \"tenant-management.tenants.update\"
479
+ * @summary Release a checked-out lease, by tenant slug
480
+ * @param {string} tenantSlug The slug of the leased tenant.
481
+ * @param {string} [authorization] Bearer Token
482
+ * @param {*} [options] Override http request option.
483
+ * @throws {RequiredError}
484
+ */
485
+ releaseByTenantSlug: function (tenantSlug, authorization, options) {
486
+ if (options === void 0) { options = {}; }
487
+ return __awaiter(_this, void 0, void 0, function () {
488
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
489
+ return __generator(this, function (_a) {
490
+ switch (_a.label) {
491
+ case 0:
492
+ // verify required parameter 'tenantSlug' is not null or undefined
493
+ (0, common_1.assertParamExists)('releaseByTenantSlug', 'tenantSlug', tenantSlug);
494
+ localVarPath = "/tenantservice/v1/test-tenant-pool/by-tenant/{tenantSlug}/release"
495
+ .replace("{".concat("tenantSlug", "}"), encodeURIComponent(String(tenantSlug)));
496
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
497
+ if (configuration) {
498
+ baseOptions = configuration.baseOptions;
499
+ baseAccessToken = configuration.accessToken;
500
+ }
501
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
502
+ localVarHeaderParameter = {};
503
+ localVarQueryParameter = {};
504
+ // authentication bearer required
505
+ // http bearer authentication required
506
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
507
+ case 1:
508
+ // authentication bearer required
509
+ // http bearer authentication required
510
+ _a.sent();
511
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
512
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
513
+ }
514
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
515
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
516
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
517
+ return [2 /*return*/, {
518
+ url: (0, common_1.toPathString)(localVarUrlObj),
519
+ options: localVarRequestOptions,
520
+ }];
521
+ }
522
+ });
523
+ });
524
+ },
525
+ /**
526
+ * Re-attempts cleanup for a pool tenant stuck in reset_failed, moving it back to leased and resubmitting the cleanup job. Refused for any other status. **Required Permissions** \"tenant-management.tenants.update\"
527
+ * @summary Retry a failed cleanup
528
+ * @param {string} tenantSlug The slug of the tenant it was registered under.
529
+ * @param {string} [authorization] Bearer Token
530
+ * @param {*} [options] Override http request option.
531
+ * @throws {RequiredError}
532
+ */
533
+ retriggerCleanup: function (tenantSlug, authorization, options) {
534
+ if (options === void 0) { options = {}; }
535
+ return __awaiter(_this, void 0, void 0, function () {
536
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
537
+ return __generator(this, function (_a) {
538
+ switch (_a.label) {
539
+ case 0:
540
+ // verify required parameter 'tenantSlug' is not null or undefined
541
+ (0, common_1.assertParamExists)('retriggerCleanup', 'tenantSlug', tenantSlug);
542
+ localVarPath = "/tenantservice/v1/test-tenant-pool/{tenantSlug}/retrigger-cleanup"
543
+ .replace("{".concat("tenantSlug", "}"), encodeURIComponent(String(tenantSlug)));
544
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
545
+ if (configuration) {
546
+ baseOptions = configuration.baseOptions;
547
+ baseAccessToken = configuration.accessToken;
548
+ }
549
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
550
+ localVarHeaderParameter = {};
551
+ localVarQueryParameter = {};
552
+ // authentication bearer required
553
+ // http bearer authentication required
554
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
555
+ case 1:
556
+ // authentication bearer required
557
+ // http bearer authentication required
558
+ _a.sent();
559
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
560
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
561
+ }
562
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
563
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
564
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
565
+ return [2 /*return*/, {
566
+ url: (0, common_1.toPathString)(localVarUrlObj),
567
+ options: localVarRequestOptions,
568
+ }];
569
+ }
570
+ });
571
+ });
572
+ },
573
+ /**
574
+ * Replaces the full list of entities cleaned up when a pool tenant is released. There is only one registry, shared by every pool tenant. **Required Permissions** \"tenant-management.tenants.update\"
575
+ * @summary Replace the shared cleanup registry
576
+ * @param {CleanupRegistryRequestDto} cleanupRegistryRequestDto
577
+ * @param {string} [authorization] Bearer Token
578
+ * @param {*} [options] Override http request option.
579
+ * @throws {RequiredError}
580
+ */
581
+ updateCleanupRegistry: function (cleanupRegistryRequestDto, authorization, options) {
582
+ if (options === void 0) { options = {}; }
583
+ return __awaiter(_this, void 0, void 0, function () {
584
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
585
+ return __generator(this, function (_a) {
586
+ switch (_a.label) {
587
+ case 0:
588
+ // verify required parameter 'cleanupRegistryRequestDto' is not null or undefined
589
+ (0, common_1.assertParamExists)('updateCleanupRegistry', 'cleanupRegistryRequestDto', cleanupRegistryRequestDto);
590
+ localVarPath = "/tenantservice/v1/test-tenant-pool/cleanup-registry";
591
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
592
+ if (configuration) {
593
+ baseOptions = configuration.baseOptions;
594
+ baseAccessToken = configuration.accessToken;
595
+ }
596
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
597
+ localVarHeaderParameter = {};
598
+ localVarQueryParameter = {};
599
+ // authentication bearer required
600
+ // http bearer authentication required
601
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
602
+ case 1:
603
+ // authentication bearer required
604
+ // http bearer authentication required
605
+ _a.sent();
606
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
607
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
608
+ }
609
+ localVarHeaderParameter['Content-Type'] = 'application/json';
610
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
611
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
612
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
613
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(cleanupRegistryRequestDto, localVarRequestOptions, configuration);
614
+ return [2 /*return*/, {
615
+ url: (0, common_1.toPathString)(localVarUrlObj),
616
+ options: localVarRequestOptions,
617
+ }];
618
+ }
619
+ });
620
+ });
621
+ },
622
+ /**
623
+ * Replaces the full tag set of the pool tenant registered under the given tenant slug. **Required Permissions** \"tenant-management.tenants.update\"
624
+ * @summary Replace a pool tenant\'s tags
625
+ * @param {string} tenantSlug The slug of the tenant it was registered under.
626
+ * @param {UpdateTagsBodyDto} updateTagsBodyDto
627
+ * @param {string} [authorization] Bearer Token
628
+ * @param {*} [options] Override http request option.
629
+ * @throws {RequiredError}
630
+ */
631
+ updateTags: function (tenantSlug, updateTagsBodyDto, authorization, options) {
632
+ if (options === void 0) { options = {}; }
633
+ return __awaiter(_this, void 0, void 0, function () {
634
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
635
+ return __generator(this, function (_a) {
636
+ switch (_a.label) {
637
+ case 0:
638
+ // verify required parameter 'tenantSlug' is not null or undefined
639
+ (0, common_1.assertParamExists)('updateTags', 'tenantSlug', tenantSlug);
640
+ // verify required parameter 'updateTagsBodyDto' is not null or undefined
641
+ (0, common_1.assertParamExists)('updateTags', 'updateTagsBodyDto', updateTagsBodyDto);
642
+ localVarPath = "/tenantservice/v1/test-tenant-pool/{tenantSlug}/tags"
643
+ .replace("{".concat("tenantSlug", "}"), encodeURIComponent(String(tenantSlug)));
644
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
645
+ if (configuration) {
646
+ baseOptions = configuration.baseOptions;
647
+ baseAccessToken = configuration.accessToken;
648
+ }
649
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
650
+ localVarHeaderParameter = {};
651
+ localVarQueryParameter = {};
652
+ // authentication bearer required
653
+ // http bearer authentication required
654
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
655
+ case 1:
656
+ // authentication bearer required
657
+ // http bearer authentication required
658
+ _a.sent();
659
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
660
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
661
+ }
662
+ localVarHeaderParameter['Content-Type'] = 'application/json';
663
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
664
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
665
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
666
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateTagsBodyDto, localVarRequestOptions, configuration);
667
+ return [2 /*return*/, {
668
+ url: (0, common_1.toPathString)(localVarUrlObj),
669
+ options: localVarRequestOptions,
670
+ }];
671
+ }
672
+ });
673
+ });
674
+ },
675
+ };
676
+ };
677
+ exports.TestTenantPoolApiAxiosParamCreator = TestTenantPoolApiAxiosParamCreator;
678
+ /**
679
+ * TestTenantPoolApi - functional programming interface
680
+ * @export
681
+ */
682
+ var TestTenantPoolApiFp = function (configuration) {
683
+ var localVarAxiosParamCreator = (0, exports.TestTenantPoolApiAxiosParamCreator)(configuration);
684
+ return {
685
+ /**
686
+ * Atomically claims one available pool tenant whose tags match the given filter and marks it leased for the given duration (defaults to 30 minutes). Concurrent callers requesting the same tags never receive the same tenant. **Required Permissions** \"tenant-management.tenants.update\"
687
+ * @summary Check out an available pool tenant
688
+ * @param {CheckoutRequestDto} checkoutRequestDto
689
+ * @param {string} [authorization] Bearer Token
690
+ * @param {*} [options] Override http request option.
691
+ * @throws {RequiredError}
692
+ */
693
+ checkout: function (checkoutRequestDto, authorization, options) {
694
+ return __awaiter(this, void 0, void 0, function () {
695
+ var localVarAxiosArgs;
696
+ return __generator(this, function (_a) {
697
+ switch (_a.label) {
698
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.checkout(checkoutRequestDto, authorization, options)];
699
+ case 1:
700
+ localVarAxiosArgs = _a.sent();
701
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
702
+ }
703
+ });
704
+ });
705
+ },
706
+ /**
707
+ * Removes the pool registration only -- never the underlying tenant. Refused unless the pool tenant is available, so an active lease or in-flight cleanup can never be deregistered out from under itself. **Required Permissions** \"tenant-management.tenants.delete\"
708
+ * @summary Deregister a pool tenant
709
+ * @param {string} tenantSlug The slug of the tenant it was registered under.
710
+ * @param {string} [authorization] Bearer Token
711
+ * @param {*} [options] Override http request option.
712
+ * @throws {RequiredError}
713
+ */
714
+ deregister: function (tenantSlug, authorization, options) {
715
+ return __awaiter(this, void 0, void 0, function () {
716
+ var localVarAxiosArgs;
717
+ return __generator(this, function (_a) {
718
+ switch (_a.label) {
719
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deregister(tenantSlug, authorization, options)];
720
+ case 1:
721
+ localVarAxiosArgs = _a.sent();
722
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
723
+ }
724
+ });
725
+ });
726
+ },
727
+ /**
728
+ * Returns the single, shared configuration describing which database entities get hard-deleted when a pool tenant is cleaned up after release. **Required Permissions** \"tenant-management.tenants.view\"
729
+ * @summary Read the shared cleanup registry
730
+ * @param {string} [authorization] Bearer Token
731
+ * @param {*} [options] Override http request option.
732
+ * @throws {RequiredError}
733
+ */
734
+ getCleanupRegistry: function (authorization, options) {
735
+ return __awaiter(this, void 0, void 0, function () {
736
+ var localVarAxiosArgs;
737
+ return __generator(this, function (_a) {
738
+ switch (_a.label) {
739
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getCleanupRegistry(authorization, options)];
740
+ case 1:
741
+ localVarAxiosArgs = _a.sent();
742
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
743
+ }
744
+ });
745
+ });
746
+ },
747
+ /**
748
+ * Resets the countdown on the lease held by leaseId to the given duration (defaults to 30 minutes). Callers should call this periodically while still using the tenant, since an unextended lease eventually expires and is reclaimed by the background sweep. **Required Permissions** \"tenant-management.tenants.update\"
749
+ * @summary Extend a checked-out lease
750
+ * @param {string} leaseId The lease id returned by checkout.
751
+ * @param {string} [authorization] Bearer Token
752
+ * @param {*} [options] Override http request option.
753
+ * @throws {RequiredError}
754
+ */
755
+ heartbeat: function (leaseId, authorization, options) {
756
+ return __awaiter(this, void 0, void 0, function () {
757
+ var localVarAxiosArgs;
758
+ return __generator(this, function (_a) {
759
+ switch (_a.label) {
760
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.heartbeat(leaseId, authorization, options)];
761
+ case 1:
762
+ localVarAxiosArgs = _a.sent();
763
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
764
+ }
765
+ });
766
+ });
767
+ },
768
+ /**
769
+ * Same as heartbeat by lease id, for callers that only track which tenant they leased rather than the lease id checkout returned. **Required Permissions** \"tenant-management.tenants.update\"
770
+ * @summary Extend a checked-out lease, by tenant slug
771
+ * @param {string} tenantSlug The slug of the leased tenant.
772
+ * @param {string} [authorization] Bearer Token
773
+ * @param {*} [options] Override http request option.
774
+ * @throws {RequiredError}
775
+ */
776
+ heartbeatByTenantSlug: function (tenantSlug, authorization, options) {
777
+ return __awaiter(this, void 0, void 0, function () {
778
+ var localVarAxiosArgs;
779
+ return __generator(this, function (_a) {
780
+ switch (_a.label) {
781
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.heartbeatByTenantSlug(tenantSlug, authorization, options)];
782
+ case 1:
783
+ localVarAxiosArgs = _a.sent();
784
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
785
+ }
786
+ });
787
+ });
788
+ },
789
+ /**
790
+ * Returns every registered pool tenant, including its tags and status, regardless of availability. **Required Permissions** \"tenant-management.tenants.view\"
791
+ * @summary List every tenant in the test pool
792
+ * @param {string} [authorization] Bearer Token
793
+ * @param {*} [options] Override http request option.
794
+ * @throws {RequiredError}
795
+ */
796
+ listPoolTenants: function (authorization, options) {
797
+ return __awaiter(this, void 0, void 0, function () {
798
+ var localVarAxiosArgs;
799
+ return __generator(this, function (_a) {
800
+ switch (_a.label) {
801
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listPoolTenants(authorization, options)];
802
+ case 1:
803
+ localVarAxiosArgs = _a.sent();
804
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
805
+ }
806
+ });
807
+ });
808
+ },
809
+ /**
810
+ * Adds an existing tenant to the pool with the given tags, making it eligible for checkout by tests requesting matching tags. Does not create or modify the tenant itself. **Required Permissions** \"tenant-management.tenants.create\"
811
+ * @summary Register a tenant into the test pool
812
+ * @param {RegisterPoolTenantRequestDto} registerPoolTenantRequestDto
813
+ * @param {string} [authorization] Bearer Token
814
+ * @param {*} [options] Override http request option.
815
+ * @throws {RequiredError}
816
+ */
817
+ register: function (registerPoolTenantRequestDto, authorization, options) {
818
+ return __awaiter(this, void 0, void 0, function () {
819
+ var localVarAxiosArgs;
820
+ return __generator(this, function (_a) {
821
+ switch (_a.label) {
822
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.register(registerPoolTenantRequestDto, authorization, options)];
823
+ case 1:
824
+ localVarAxiosArgs = _a.sent();
825
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
826
+ }
827
+ });
828
+ });
829
+ },
830
+ /**
831
+ * Ends the lease immediately and asynchronously triggers the tenant\'s cleanup, so it becomes available again once cleanup finishes. Cleanup is fire-and-forget: this call returns before cleanup completes. **Required Permissions** \"tenant-management.tenants.update\"
832
+ * @summary Release a checked-out lease
833
+ * @param {string} leaseId The lease id returned by checkout.
834
+ * @param {string} [authorization] Bearer Token
835
+ * @param {*} [options] Override http request option.
836
+ * @throws {RequiredError}
837
+ */
838
+ release: function (leaseId, authorization, options) {
839
+ return __awaiter(this, void 0, void 0, function () {
840
+ var localVarAxiosArgs;
841
+ return __generator(this, function (_a) {
842
+ switch (_a.label) {
843
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.release(leaseId, authorization, options)];
844
+ case 1:
845
+ localVarAxiosArgs = _a.sent();
846
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
847
+ }
848
+ });
849
+ });
850
+ },
851
+ /**
852
+ * Same as release by lease id, for callers that only track which tenant they leased rather than the lease id checkout returned. **Required Permissions** \"tenant-management.tenants.update\"
853
+ * @summary Release a checked-out lease, by tenant slug
854
+ * @param {string} tenantSlug The slug of the leased tenant.
855
+ * @param {string} [authorization] Bearer Token
856
+ * @param {*} [options] Override http request option.
857
+ * @throws {RequiredError}
858
+ */
859
+ releaseByTenantSlug: function (tenantSlug, authorization, options) {
860
+ return __awaiter(this, void 0, void 0, function () {
861
+ var localVarAxiosArgs;
862
+ return __generator(this, function (_a) {
863
+ switch (_a.label) {
864
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.releaseByTenantSlug(tenantSlug, authorization, options)];
865
+ case 1:
866
+ localVarAxiosArgs = _a.sent();
867
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
868
+ }
869
+ });
870
+ });
871
+ },
872
+ /**
873
+ * Re-attempts cleanup for a pool tenant stuck in reset_failed, moving it back to leased and resubmitting the cleanup job. Refused for any other status. **Required Permissions** \"tenant-management.tenants.update\"
874
+ * @summary Retry a failed cleanup
875
+ * @param {string} tenantSlug The slug of the tenant it was registered under.
876
+ * @param {string} [authorization] Bearer Token
877
+ * @param {*} [options] Override http request option.
878
+ * @throws {RequiredError}
879
+ */
880
+ retriggerCleanup: function (tenantSlug, authorization, options) {
881
+ return __awaiter(this, void 0, void 0, function () {
882
+ var localVarAxiosArgs;
883
+ return __generator(this, function (_a) {
884
+ switch (_a.label) {
885
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.retriggerCleanup(tenantSlug, authorization, options)];
886
+ case 1:
887
+ localVarAxiosArgs = _a.sent();
888
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
889
+ }
890
+ });
891
+ });
892
+ },
893
+ /**
894
+ * Replaces the full list of entities cleaned up when a pool tenant is released. There is only one registry, shared by every pool tenant. **Required Permissions** \"tenant-management.tenants.update\"
895
+ * @summary Replace the shared cleanup registry
896
+ * @param {CleanupRegistryRequestDto} cleanupRegistryRequestDto
897
+ * @param {string} [authorization] Bearer Token
898
+ * @param {*} [options] Override http request option.
899
+ * @throws {RequiredError}
900
+ */
901
+ updateCleanupRegistry: function (cleanupRegistryRequestDto, authorization, options) {
902
+ return __awaiter(this, void 0, void 0, function () {
903
+ var localVarAxiosArgs;
904
+ return __generator(this, function (_a) {
905
+ switch (_a.label) {
906
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateCleanupRegistry(cleanupRegistryRequestDto, authorization, options)];
907
+ case 1:
908
+ localVarAxiosArgs = _a.sent();
909
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
910
+ }
911
+ });
912
+ });
913
+ },
914
+ /**
915
+ * Replaces the full tag set of the pool tenant registered under the given tenant slug. **Required Permissions** \"tenant-management.tenants.update\"
916
+ * @summary Replace a pool tenant\'s tags
917
+ * @param {string} tenantSlug The slug of the tenant it was registered under.
918
+ * @param {UpdateTagsBodyDto} updateTagsBodyDto
919
+ * @param {string} [authorization] Bearer Token
920
+ * @param {*} [options] Override http request option.
921
+ * @throws {RequiredError}
922
+ */
923
+ updateTags: function (tenantSlug, updateTagsBodyDto, authorization, options) {
924
+ return __awaiter(this, void 0, void 0, function () {
925
+ var localVarAxiosArgs;
926
+ return __generator(this, function (_a) {
927
+ switch (_a.label) {
928
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateTags(tenantSlug, updateTagsBodyDto, authorization, options)];
929
+ case 1:
930
+ localVarAxiosArgs = _a.sent();
931
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
932
+ }
933
+ });
934
+ });
935
+ },
936
+ };
937
+ };
938
+ exports.TestTenantPoolApiFp = TestTenantPoolApiFp;
939
+ /**
940
+ * TestTenantPoolApi - factory interface
941
+ * @export
942
+ */
943
+ var TestTenantPoolApiFactory = function (configuration, basePath, axios) {
944
+ var localVarFp = (0, exports.TestTenantPoolApiFp)(configuration);
945
+ return {
946
+ /**
947
+ * Atomically claims one available pool tenant whose tags match the given filter and marks it leased for the given duration (defaults to 30 minutes). Concurrent callers requesting the same tags never receive the same tenant. **Required Permissions** \"tenant-management.tenants.update\"
948
+ * @summary Check out an available pool tenant
949
+ * @param {CheckoutRequestDto} checkoutRequestDto
950
+ * @param {string} [authorization] Bearer Token
951
+ * @param {*} [options] Override http request option.
952
+ * @throws {RequiredError}
953
+ */
954
+ checkout: function (checkoutRequestDto, authorization, options) {
955
+ return localVarFp.checkout(checkoutRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
956
+ },
957
+ /**
958
+ * Removes the pool registration only -- never the underlying tenant. Refused unless the pool tenant is available, so an active lease or in-flight cleanup can never be deregistered out from under itself. **Required Permissions** \"tenant-management.tenants.delete\"
959
+ * @summary Deregister a pool tenant
960
+ * @param {string} tenantSlug The slug of the tenant it was registered under.
961
+ * @param {string} [authorization] Bearer Token
962
+ * @param {*} [options] Override http request option.
963
+ * @throws {RequiredError}
964
+ */
965
+ deregister: function (tenantSlug, authorization, options) {
966
+ return localVarFp.deregister(tenantSlug, authorization, options).then(function (request) { return request(axios, basePath); });
967
+ },
968
+ /**
969
+ * Returns the single, shared configuration describing which database entities get hard-deleted when a pool tenant is cleaned up after release. **Required Permissions** \"tenant-management.tenants.view\"
970
+ * @summary Read the shared cleanup registry
971
+ * @param {string} [authorization] Bearer Token
972
+ * @param {*} [options] Override http request option.
973
+ * @throws {RequiredError}
974
+ */
975
+ getCleanupRegistry: function (authorization, options) {
976
+ return localVarFp.getCleanupRegistry(authorization, options).then(function (request) { return request(axios, basePath); });
977
+ },
978
+ /**
979
+ * Resets the countdown on the lease held by leaseId to the given duration (defaults to 30 minutes). Callers should call this periodically while still using the tenant, since an unextended lease eventually expires and is reclaimed by the background sweep. **Required Permissions** \"tenant-management.tenants.update\"
980
+ * @summary Extend a checked-out lease
981
+ * @param {string} leaseId The lease id returned by checkout.
982
+ * @param {string} [authorization] Bearer Token
983
+ * @param {*} [options] Override http request option.
984
+ * @throws {RequiredError}
985
+ */
986
+ heartbeat: function (leaseId, authorization, options) {
987
+ return localVarFp.heartbeat(leaseId, authorization, options).then(function (request) { return request(axios, basePath); });
988
+ },
989
+ /**
990
+ * Same as heartbeat by lease id, for callers that only track which tenant they leased rather than the lease id checkout returned. **Required Permissions** \"tenant-management.tenants.update\"
991
+ * @summary Extend a checked-out lease, by tenant slug
992
+ * @param {string} tenantSlug The slug of the leased tenant.
993
+ * @param {string} [authorization] Bearer Token
994
+ * @param {*} [options] Override http request option.
995
+ * @throws {RequiredError}
996
+ */
997
+ heartbeatByTenantSlug: function (tenantSlug, authorization, options) {
998
+ return localVarFp.heartbeatByTenantSlug(tenantSlug, authorization, options).then(function (request) { return request(axios, basePath); });
999
+ },
1000
+ /**
1001
+ * Returns every registered pool tenant, including its tags and status, regardless of availability. **Required Permissions** \"tenant-management.tenants.view\"
1002
+ * @summary List every tenant in the test pool
1003
+ * @param {string} [authorization] Bearer Token
1004
+ * @param {*} [options] Override http request option.
1005
+ * @throws {RequiredError}
1006
+ */
1007
+ listPoolTenants: function (authorization, options) {
1008
+ return localVarFp.listPoolTenants(authorization, options).then(function (request) { return request(axios, basePath); });
1009
+ },
1010
+ /**
1011
+ * Adds an existing tenant to the pool with the given tags, making it eligible for checkout by tests requesting matching tags. Does not create or modify the tenant itself. **Required Permissions** \"tenant-management.tenants.create\"
1012
+ * @summary Register a tenant into the test pool
1013
+ * @param {RegisterPoolTenantRequestDto} registerPoolTenantRequestDto
1014
+ * @param {string} [authorization] Bearer Token
1015
+ * @param {*} [options] Override http request option.
1016
+ * @throws {RequiredError}
1017
+ */
1018
+ register: function (registerPoolTenantRequestDto, authorization, options) {
1019
+ return localVarFp.register(registerPoolTenantRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1020
+ },
1021
+ /**
1022
+ * Ends the lease immediately and asynchronously triggers the tenant\'s cleanup, so it becomes available again once cleanup finishes. Cleanup is fire-and-forget: this call returns before cleanup completes. **Required Permissions** \"tenant-management.tenants.update\"
1023
+ * @summary Release a checked-out lease
1024
+ * @param {string} leaseId The lease id returned by checkout.
1025
+ * @param {string} [authorization] Bearer Token
1026
+ * @param {*} [options] Override http request option.
1027
+ * @throws {RequiredError}
1028
+ */
1029
+ release: function (leaseId, authorization, options) {
1030
+ return localVarFp.release(leaseId, authorization, options).then(function (request) { return request(axios, basePath); });
1031
+ },
1032
+ /**
1033
+ * Same as release by lease id, for callers that only track which tenant they leased rather than the lease id checkout returned. **Required Permissions** \"tenant-management.tenants.update\"
1034
+ * @summary Release a checked-out lease, by tenant slug
1035
+ * @param {string} tenantSlug The slug of the leased tenant.
1036
+ * @param {string} [authorization] Bearer Token
1037
+ * @param {*} [options] Override http request option.
1038
+ * @throws {RequiredError}
1039
+ */
1040
+ releaseByTenantSlug: function (tenantSlug, authorization, options) {
1041
+ return localVarFp.releaseByTenantSlug(tenantSlug, authorization, options).then(function (request) { return request(axios, basePath); });
1042
+ },
1043
+ /**
1044
+ * Re-attempts cleanup for a pool tenant stuck in reset_failed, moving it back to leased and resubmitting the cleanup job. Refused for any other status. **Required Permissions** \"tenant-management.tenants.update\"
1045
+ * @summary Retry a failed cleanup
1046
+ * @param {string} tenantSlug The slug of the tenant it was registered under.
1047
+ * @param {string} [authorization] Bearer Token
1048
+ * @param {*} [options] Override http request option.
1049
+ * @throws {RequiredError}
1050
+ */
1051
+ retriggerCleanup: function (tenantSlug, authorization, options) {
1052
+ return localVarFp.retriggerCleanup(tenantSlug, authorization, options).then(function (request) { return request(axios, basePath); });
1053
+ },
1054
+ /**
1055
+ * Replaces the full list of entities cleaned up when a pool tenant is released. There is only one registry, shared by every pool tenant. **Required Permissions** \"tenant-management.tenants.update\"
1056
+ * @summary Replace the shared cleanup registry
1057
+ * @param {CleanupRegistryRequestDto} cleanupRegistryRequestDto
1058
+ * @param {string} [authorization] Bearer Token
1059
+ * @param {*} [options] Override http request option.
1060
+ * @throws {RequiredError}
1061
+ */
1062
+ updateCleanupRegistry: function (cleanupRegistryRequestDto, authorization, options) {
1063
+ return localVarFp.updateCleanupRegistry(cleanupRegistryRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1064
+ },
1065
+ /**
1066
+ * Replaces the full tag set of the pool tenant registered under the given tenant slug. **Required Permissions** \"tenant-management.tenants.update\"
1067
+ * @summary Replace a pool tenant\'s tags
1068
+ * @param {string} tenantSlug The slug of the tenant it was registered under.
1069
+ * @param {UpdateTagsBodyDto} updateTagsBodyDto
1070
+ * @param {string} [authorization] Bearer Token
1071
+ * @param {*} [options] Override http request option.
1072
+ * @throws {RequiredError}
1073
+ */
1074
+ updateTags: function (tenantSlug, updateTagsBodyDto, authorization, options) {
1075
+ return localVarFp.updateTags(tenantSlug, updateTagsBodyDto, authorization, options).then(function (request) { return request(axios, basePath); });
1076
+ },
1077
+ };
1078
+ };
1079
+ exports.TestTenantPoolApiFactory = TestTenantPoolApiFactory;
1080
+ /**
1081
+ * TestTenantPoolApi - object-oriented interface
1082
+ * @export
1083
+ * @class TestTenantPoolApi
1084
+ * @extends {BaseAPI}
1085
+ */
1086
+ var TestTenantPoolApi = /** @class */ (function (_super) {
1087
+ __extends(TestTenantPoolApi, _super);
1088
+ function TestTenantPoolApi() {
1089
+ return _super !== null && _super.apply(this, arguments) || this;
1090
+ }
1091
+ /**
1092
+ * Atomically claims one available pool tenant whose tags match the given filter and marks it leased for the given duration (defaults to 30 minutes). Concurrent callers requesting the same tags never receive the same tenant. **Required Permissions** \"tenant-management.tenants.update\"
1093
+ * @summary Check out an available pool tenant
1094
+ * @param {TestTenantPoolApiCheckoutRequest} requestParameters Request parameters.
1095
+ * @param {*} [options] Override http request option.
1096
+ * @throws {RequiredError}
1097
+ * @memberof TestTenantPoolApi
1098
+ */
1099
+ TestTenantPoolApi.prototype.checkout = function (requestParameters, options) {
1100
+ var _this = this;
1101
+ return (0, exports.TestTenantPoolApiFp)(this.configuration).checkout(requestParameters.checkoutRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1102
+ };
1103
+ /**
1104
+ * Removes the pool registration only -- never the underlying tenant. Refused unless the pool tenant is available, so an active lease or in-flight cleanup can never be deregistered out from under itself. **Required Permissions** \"tenant-management.tenants.delete\"
1105
+ * @summary Deregister a pool tenant
1106
+ * @param {TestTenantPoolApiDeregisterRequest} requestParameters Request parameters.
1107
+ * @param {*} [options] Override http request option.
1108
+ * @throws {RequiredError}
1109
+ * @memberof TestTenantPoolApi
1110
+ */
1111
+ TestTenantPoolApi.prototype.deregister = function (requestParameters, options) {
1112
+ var _this = this;
1113
+ return (0, exports.TestTenantPoolApiFp)(this.configuration).deregister(requestParameters.tenantSlug, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1114
+ };
1115
+ /**
1116
+ * Returns the single, shared configuration describing which database entities get hard-deleted when a pool tenant is cleaned up after release. **Required Permissions** \"tenant-management.tenants.view\"
1117
+ * @summary Read the shared cleanup registry
1118
+ * @param {TestTenantPoolApiGetCleanupRegistryRequest} requestParameters Request parameters.
1119
+ * @param {*} [options] Override http request option.
1120
+ * @throws {RequiredError}
1121
+ * @memberof TestTenantPoolApi
1122
+ */
1123
+ TestTenantPoolApi.prototype.getCleanupRegistry = function (requestParameters, options) {
1124
+ var _this = this;
1125
+ if (requestParameters === void 0) { requestParameters = {}; }
1126
+ return (0, exports.TestTenantPoolApiFp)(this.configuration).getCleanupRegistry(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1127
+ };
1128
+ /**
1129
+ * Resets the countdown on the lease held by leaseId to the given duration (defaults to 30 minutes). Callers should call this periodically while still using the tenant, since an unextended lease eventually expires and is reclaimed by the background sweep. **Required Permissions** \"tenant-management.tenants.update\"
1130
+ * @summary Extend a checked-out lease
1131
+ * @param {TestTenantPoolApiHeartbeatRequest} requestParameters Request parameters.
1132
+ * @param {*} [options] Override http request option.
1133
+ * @throws {RequiredError}
1134
+ * @memberof TestTenantPoolApi
1135
+ */
1136
+ TestTenantPoolApi.prototype.heartbeat = function (requestParameters, options) {
1137
+ var _this = this;
1138
+ return (0, exports.TestTenantPoolApiFp)(this.configuration).heartbeat(requestParameters.leaseId, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1139
+ };
1140
+ /**
1141
+ * Same as heartbeat by lease id, for callers that only track which tenant they leased rather than the lease id checkout returned. **Required Permissions** \"tenant-management.tenants.update\"
1142
+ * @summary Extend a checked-out lease, by tenant slug
1143
+ * @param {TestTenantPoolApiHeartbeatByTenantSlugRequest} requestParameters Request parameters.
1144
+ * @param {*} [options] Override http request option.
1145
+ * @throws {RequiredError}
1146
+ * @memberof TestTenantPoolApi
1147
+ */
1148
+ TestTenantPoolApi.prototype.heartbeatByTenantSlug = function (requestParameters, options) {
1149
+ var _this = this;
1150
+ return (0, exports.TestTenantPoolApiFp)(this.configuration).heartbeatByTenantSlug(requestParameters.tenantSlug, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1151
+ };
1152
+ /**
1153
+ * Returns every registered pool tenant, including its tags and status, regardless of availability. **Required Permissions** \"tenant-management.tenants.view\"
1154
+ * @summary List every tenant in the test pool
1155
+ * @param {TestTenantPoolApiListPoolTenantsRequest} requestParameters Request parameters.
1156
+ * @param {*} [options] Override http request option.
1157
+ * @throws {RequiredError}
1158
+ * @memberof TestTenantPoolApi
1159
+ */
1160
+ TestTenantPoolApi.prototype.listPoolTenants = function (requestParameters, options) {
1161
+ var _this = this;
1162
+ if (requestParameters === void 0) { requestParameters = {}; }
1163
+ return (0, exports.TestTenantPoolApiFp)(this.configuration).listPoolTenants(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1164
+ };
1165
+ /**
1166
+ * Adds an existing tenant to the pool with the given tags, making it eligible for checkout by tests requesting matching tags. Does not create or modify the tenant itself. **Required Permissions** \"tenant-management.tenants.create\"
1167
+ * @summary Register a tenant into the test pool
1168
+ * @param {TestTenantPoolApiRegisterRequest} requestParameters Request parameters.
1169
+ * @param {*} [options] Override http request option.
1170
+ * @throws {RequiredError}
1171
+ * @memberof TestTenantPoolApi
1172
+ */
1173
+ TestTenantPoolApi.prototype.register = function (requestParameters, options) {
1174
+ var _this = this;
1175
+ return (0, exports.TestTenantPoolApiFp)(this.configuration).register(requestParameters.registerPoolTenantRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1176
+ };
1177
+ /**
1178
+ * Ends the lease immediately and asynchronously triggers the tenant\'s cleanup, so it becomes available again once cleanup finishes. Cleanup is fire-and-forget: this call returns before cleanup completes. **Required Permissions** \"tenant-management.tenants.update\"
1179
+ * @summary Release a checked-out lease
1180
+ * @param {TestTenantPoolApiReleaseRequest} requestParameters Request parameters.
1181
+ * @param {*} [options] Override http request option.
1182
+ * @throws {RequiredError}
1183
+ * @memberof TestTenantPoolApi
1184
+ */
1185
+ TestTenantPoolApi.prototype.release = function (requestParameters, options) {
1186
+ var _this = this;
1187
+ return (0, exports.TestTenantPoolApiFp)(this.configuration).release(requestParameters.leaseId, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1188
+ };
1189
+ /**
1190
+ * Same as release by lease id, for callers that only track which tenant they leased rather than the lease id checkout returned. **Required Permissions** \"tenant-management.tenants.update\"
1191
+ * @summary Release a checked-out lease, by tenant slug
1192
+ * @param {TestTenantPoolApiReleaseByTenantSlugRequest} requestParameters Request parameters.
1193
+ * @param {*} [options] Override http request option.
1194
+ * @throws {RequiredError}
1195
+ * @memberof TestTenantPoolApi
1196
+ */
1197
+ TestTenantPoolApi.prototype.releaseByTenantSlug = function (requestParameters, options) {
1198
+ var _this = this;
1199
+ return (0, exports.TestTenantPoolApiFp)(this.configuration).releaseByTenantSlug(requestParameters.tenantSlug, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1200
+ };
1201
+ /**
1202
+ * Re-attempts cleanup for a pool tenant stuck in reset_failed, moving it back to leased and resubmitting the cleanup job. Refused for any other status. **Required Permissions** \"tenant-management.tenants.update\"
1203
+ * @summary Retry a failed cleanup
1204
+ * @param {TestTenantPoolApiRetriggerCleanupRequest} requestParameters Request parameters.
1205
+ * @param {*} [options] Override http request option.
1206
+ * @throws {RequiredError}
1207
+ * @memberof TestTenantPoolApi
1208
+ */
1209
+ TestTenantPoolApi.prototype.retriggerCleanup = function (requestParameters, options) {
1210
+ var _this = this;
1211
+ return (0, exports.TestTenantPoolApiFp)(this.configuration).retriggerCleanup(requestParameters.tenantSlug, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1212
+ };
1213
+ /**
1214
+ * Replaces the full list of entities cleaned up when a pool tenant is released. There is only one registry, shared by every pool tenant. **Required Permissions** \"tenant-management.tenants.update\"
1215
+ * @summary Replace the shared cleanup registry
1216
+ * @param {TestTenantPoolApiUpdateCleanupRegistryRequest} requestParameters Request parameters.
1217
+ * @param {*} [options] Override http request option.
1218
+ * @throws {RequiredError}
1219
+ * @memberof TestTenantPoolApi
1220
+ */
1221
+ TestTenantPoolApi.prototype.updateCleanupRegistry = function (requestParameters, options) {
1222
+ var _this = this;
1223
+ return (0, exports.TestTenantPoolApiFp)(this.configuration).updateCleanupRegistry(requestParameters.cleanupRegistryRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1224
+ };
1225
+ /**
1226
+ * Replaces the full tag set of the pool tenant registered under the given tenant slug. **Required Permissions** \"tenant-management.tenants.update\"
1227
+ * @summary Replace a pool tenant\'s tags
1228
+ * @param {TestTenantPoolApiUpdateTagsRequest} requestParameters Request parameters.
1229
+ * @param {*} [options] Override http request option.
1230
+ * @throws {RequiredError}
1231
+ * @memberof TestTenantPoolApi
1232
+ */
1233
+ TestTenantPoolApi.prototype.updateTags = function (requestParameters, options) {
1234
+ var _this = this;
1235
+ return (0, exports.TestTenantPoolApiFp)(this.configuration).updateTags(requestParameters.tenantSlug, requestParameters.updateTagsBodyDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1236
+ };
1237
+ return TestTenantPoolApi;
1238
+ }(base_1.BaseAPI));
1239
+ exports.TestTenantPoolApi = TestTenantPoolApi;