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