@takaro/apiclient 0.0.0-dev.eb86912 → 0.0.0-dev.ecb54e3

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 (65) hide show
  1. package/README.md +27 -0
  2. package/dist/generated/api.d.ts +2509 -1045
  3. package/dist/generated/api.d.ts.map +1 -1
  4. package/dist/generated/api.js +2552 -1605
  5. package/dist/generated/api.js.map +1 -1
  6. package/dist/generated-management/api.d.ts +14494 -0
  7. package/dist/generated-management/api.d.ts.map +1 -0
  8. package/dist/generated-management/api.js +3413 -0
  9. package/dist/generated-management/api.js.map +1 -0
  10. package/dist/generated-management/base.d.ts +67 -0
  11. package/dist/generated-management/base.d.ts.map +1 -0
  12. package/dist/generated-management/base.js +59 -0
  13. package/dist/generated-management/base.js.map +1 -0
  14. package/dist/generated-management/common.d.ts +66 -0
  15. package/dist/generated-management/common.d.ts.map +1 -0
  16. package/dist/generated-management/common.js +135 -0
  17. package/dist/generated-management/common.js.map +1 -0
  18. package/dist/generated-management/configuration.d.ts +92 -0
  19. package/dist/generated-management/configuration.d.ts.map +1 -0
  20. package/dist/generated-management/configuration.js +46 -0
  21. package/dist/generated-management/configuration.js.map +1 -0
  22. package/dist/generated-management/index.d.ts +14 -0
  23. package/dist/generated-management/index.d.ts.map +1 -0
  24. package/{src/generated/index.ts → dist/generated-management/index.js} +1 -1
  25. package/dist/generated-management/index.js.map +1 -0
  26. package/dist/lib/adminClient.d.ts +3 -2
  27. package/dist/lib/adminClient.d.ts.map +1 -1
  28. package/dist/lib/adminClient.js +8 -2
  29. package/dist/lib/adminClient.js.map +1 -1
  30. package/dist/lib/apiKey.d.ts +18 -0
  31. package/dist/lib/apiKey.d.ts.map +1 -0
  32. package/dist/lib/apiKey.js +71 -0
  33. package/dist/lib/apiKey.js.map +1 -0
  34. package/dist/lib/baseClient.d.ts +1 -1
  35. package/dist/lib/baseClient.d.ts.map +1 -1
  36. package/dist/lib/baseClient.js +4 -3
  37. package/dist/lib/baseClient.js.map +1 -1
  38. package/dist/lib/client.d.ts +32 -2
  39. package/dist/lib/client.d.ts.map +1 -1
  40. package/dist/lib/client.js +56 -5
  41. package/dist/lib/client.js.map +1 -1
  42. package/dist/lib/distributorClient.d.ts +18 -0
  43. package/dist/lib/distributorClient.d.ts.map +1 -0
  44. package/dist/lib/distributorClient.js +21 -0
  45. package/dist/lib/distributorClient.js.map +1 -0
  46. package/dist/main.d.ts +5 -1
  47. package/dist/main.d.ts.map +1 -1
  48. package/dist/main.js +7 -0
  49. package/dist/main.js.map +1 -1
  50. package/package.json +13 -5
  51. package/src/__tests__/main.integration.test.ts +0 -39
  52. package/src/generated/.openapi-generator-ignore +0 -23
  53. package/src/generated/api.ts +0 -43516
  54. package/src/generated/base.ts +0 -91
  55. package/src/generated/common.ts +0 -164
  56. package/src/generated/configuration.ts +0 -123
  57. package/src/generated/git_push.sh +0 -57
  58. package/src/lib/__tests__/baseClient.unit.test.ts +0 -17
  59. package/src/lib/adminClient.ts +0 -37
  60. package/src/lib/baseClient.ts +0 -175
  61. package/src/lib/client.ts +0 -319
  62. package/src/main.ts +0 -9
  63. package/tsconfig.build.json +0 -10
  64. package/tsconfig.json +0 -8
  65. package/typedoc.json +0 -3
@@ -0,0 +1,3413 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Takaro API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 0.0.0
8
+ * Contact: support@takaro.io
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
+ import globalAxios from 'axios';
15
+ // Some imports not used depending on template conditions
16
+ // @ts-ignore
17
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, } from './common.js';
18
+ // @ts-ignore
19
+ import { BASE_PATH, BaseAPI, operationServerMap } from './base.js';
20
+ export const ApiKeyCreateInputDTOKindEnum = {
21
+ Personal: 'personal',
22
+ Domain: 'domain',
23
+ };
24
+ export const ApiKeyCreateResultDTOKindEnum = {
25
+ Personal: 'personal',
26
+ Domain: 'domain',
27
+ };
28
+ export const ApiKeyCreateResultDTOStatusEnum = {
29
+ Active: 'ACTIVE',
30
+ Expired: 'EXPIRED',
31
+ Revoked: 'REVOKED',
32
+ };
33
+ export const ApiKeyOutputDTOKindEnum = {
34
+ Personal: 'personal',
35
+ Domain: 'domain',
36
+ };
37
+ export const ApiKeyOutputDTOStatusEnum = {
38
+ Active: 'ACTIVE',
39
+ Expired: 'EXPIRED',
40
+ Revoked: 'REVOKED',
41
+ };
42
+ export const ApiKeySearchInputAllowedFiltersKindEnum = {
43
+ Personal: 'personal',
44
+ Domain: 'domain',
45
+ };
46
+ export const ApiKeySearchInputDTOSortDirectionEnum = {
47
+ Asc: 'asc',
48
+ Desc: 'desc',
49
+ };
50
+ export const DistributorBackedDomainOutputDTOStateEnum = {
51
+ Active: 'ACTIVE',
52
+ Disabled: 'DISABLED',
53
+ Maintenance: 'MAINTENANCE',
54
+ };
55
+ export const DistributorBackedDomainSearchInputDTOSortDirectionEnum = {
56
+ Asc: 'asc',
57
+ Desc: 'desc',
58
+ };
59
+ export const DistributorDomainSearchInputAllowedFiltersStateEnum = {
60
+ Active: 'ACTIVE',
61
+ Disabled: 'DISABLED',
62
+ Maintenance: 'MAINTENANCE',
63
+ };
64
+ export const DistributorDomainSearchInputDTOSortDirectionEnum = {
65
+ Asc: 'asc',
66
+ Desc: 'desc',
67
+ };
68
+ export const DistributorKeyCreateResultDTOStatusEnum = {
69
+ Active: 'ACTIVE',
70
+ Revoked: 'REVOKED',
71
+ };
72
+ export const DistributorKeyOutputDTOStatusEnum = {
73
+ Active: 'ACTIVE',
74
+ Revoked: 'REVOKED',
75
+ };
76
+ export const DistributorKeySearchInputDTOSortDirectionEnum = {
77
+ Asc: 'asc',
78
+ Desc: 'desc',
79
+ };
80
+ export const DistributorSearchInputDTOSortDirectionEnum = {
81
+ Asc: 'asc',
82
+ Desc: 'desc',
83
+ };
84
+ export const DomainCreateInputDTOStateEnum = {
85
+ Active: 'ACTIVE',
86
+ Disabled: 'DISABLED',
87
+ Maintenance: 'MAINTENANCE',
88
+ };
89
+ export const DomainOutputDTOStateEnum = {
90
+ Active: 'ACTIVE',
91
+ Disabled: 'DISABLED',
92
+ Maintenance: 'MAINTENANCE',
93
+ };
94
+ export const DomainSearchInputAllowedFiltersStateEnum = {
95
+ Active: 'ACTIVE',
96
+ Disabled: 'DISABLED',
97
+ Maintenance: 'MAINTENANCE',
98
+ };
99
+ export const DomainSearchInputDTOSortDirectionEnum = {
100
+ Asc: 'asc',
101
+ Desc: 'desc',
102
+ };
103
+ export const DomainUpdateInputDTOStateEnum = {
104
+ Active: 'ACTIVE',
105
+ Disabled: 'DISABLED',
106
+ Maintenance: 'MAINTENANCE',
107
+ };
108
+ export const EntityCreateDTOTypeEnum = {
109
+ Hostile: 'hostile',
110
+ Friendly: 'friendly',
111
+ Neutral: 'neutral',
112
+ };
113
+ export const EntityOutputDTOTypeEnum = {
114
+ Hostile: 'hostile',
115
+ Friendly: 'friendly',
116
+ Neutral: 'neutral',
117
+ };
118
+ export const EntityUpdateDTOTypeEnum = {
119
+ Hostile: 'hostile',
120
+ Friendly: 'friendly',
121
+ Neutral: 'neutral',
122
+ };
123
+ export const EventChatMessageChannelEnum = {
124
+ Global: 'global',
125
+ Team: 'team',
126
+ Friends: 'friends',
127
+ Whisper: 'whisper',
128
+ };
129
+ export const EventCreateDTOEventNameEnum = {
130
+ RoleAssigned: 'role-assigned',
131
+ RoleRemoved: 'role-removed',
132
+ RoleCreated: 'role-created',
133
+ RoleUpdated: 'role-updated',
134
+ RoleDeleted: 'role-deleted',
135
+ CommandExecuted: 'command-executed',
136
+ CommandExecutionDenied: 'command-execution-denied',
137
+ HookExecuted: 'hook-executed',
138
+ CronjobExecuted: 'cronjob-executed',
139
+ CurrencyAdded: 'currency-added',
140
+ CurrencyDeducted: 'currency-deducted',
141
+ CurrencyResetAll: 'currency-reset-all',
142
+ SettingsSet: 'settings-set',
143
+ PlayerNewIpDetected: 'player-new-ip-detected',
144
+ PlayerNewNameDetected: 'player-new-name-detected',
145
+ ServerStatusChanged: 'server-status-changed',
146
+ ModuleCreated: 'module-created',
147
+ ModuleUpdated: 'module-updated',
148
+ ModuleDeleted: 'module-deleted',
149
+ ModuleInstalled: 'module-installed',
150
+ ModuleUninstalled: 'module-uninstalled',
151
+ PlayerCreated: 'player-created',
152
+ ShopListingCreated: 'shop-listing-created',
153
+ ShopListingUpdated: 'shop-listing-updated',
154
+ ShopListingDeleted: 'shop-listing-deleted',
155
+ ShopOrderCreated: 'shop-order-created',
156
+ ShopOrderStatusChanged: 'shop-order-status-changed',
157
+ ShopOrderDeliveryFailed: 'shop-order-delivery-failed',
158
+ PlayerLinked: 'player-linked',
159
+ GameserverCreated: 'gameserver-created',
160
+ GameserverUpdated: 'gameserver-updated',
161
+ GameserverDeleted: 'gameserver-deleted',
162
+ PlayerBanned: 'player-banned',
163
+ PlayerUnbanned: 'player-unbanned',
164
+ PlayerDeleted: 'player-deleted',
165
+ ShopActionExecuted: 'shop-action-executed',
166
+ PlayerInventoryChanged: 'player-inventory-changed',
167
+ EventRateLimited: 'event-rate-limited',
168
+ PlayerSyncSnapshot: 'player-sync-snapshot',
169
+ InviteLinkCreated: 'invite-link-created',
170
+ ApiKeyCreated: 'api-key-created',
171
+ ApiKeyRotated: 'api-key-rotated',
172
+ ApiKeyRevoked: 'api-key-revoked',
173
+ DomainCreated: 'domain-created',
174
+ DomainRegistrationTokenRegenerated: 'domain-registration-token-regenerated',
175
+ DomainPlanChanged: 'domain-plan-changed',
176
+ PlayerConnected: 'player-connected',
177
+ PlayerDisconnected: 'player-disconnected',
178
+ ChatMessage: 'chat-message',
179
+ PlayerDeath: 'player-death',
180
+ EntityKilled: 'entity-killed',
181
+ };
182
+ export const EventOutputDTOEventNameEnum = {
183
+ RoleAssigned: 'role-assigned',
184
+ RoleRemoved: 'role-removed',
185
+ RoleCreated: 'role-created',
186
+ RoleUpdated: 'role-updated',
187
+ RoleDeleted: 'role-deleted',
188
+ CommandExecuted: 'command-executed',
189
+ CommandExecutionDenied: 'command-execution-denied',
190
+ HookExecuted: 'hook-executed',
191
+ CronjobExecuted: 'cronjob-executed',
192
+ CurrencyAdded: 'currency-added',
193
+ CurrencyDeducted: 'currency-deducted',
194
+ CurrencyResetAll: 'currency-reset-all',
195
+ SettingsSet: 'settings-set',
196
+ PlayerNewIpDetected: 'player-new-ip-detected',
197
+ PlayerNewNameDetected: 'player-new-name-detected',
198
+ ServerStatusChanged: 'server-status-changed',
199
+ ModuleCreated: 'module-created',
200
+ ModuleUpdated: 'module-updated',
201
+ ModuleDeleted: 'module-deleted',
202
+ ModuleInstalled: 'module-installed',
203
+ ModuleUninstalled: 'module-uninstalled',
204
+ PlayerCreated: 'player-created',
205
+ ShopListingCreated: 'shop-listing-created',
206
+ ShopListingUpdated: 'shop-listing-updated',
207
+ ShopListingDeleted: 'shop-listing-deleted',
208
+ ShopOrderCreated: 'shop-order-created',
209
+ ShopOrderStatusChanged: 'shop-order-status-changed',
210
+ ShopOrderDeliveryFailed: 'shop-order-delivery-failed',
211
+ PlayerLinked: 'player-linked',
212
+ GameserverCreated: 'gameserver-created',
213
+ GameserverUpdated: 'gameserver-updated',
214
+ GameserverDeleted: 'gameserver-deleted',
215
+ PlayerBanned: 'player-banned',
216
+ PlayerUnbanned: 'player-unbanned',
217
+ PlayerDeleted: 'player-deleted',
218
+ ShopActionExecuted: 'shop-action-executed',
219
+ PlayerInventoryChanged: 'player-inventory-changed',
220
+ EventRateLimited: 'event-rate-limited',
221
+ PlayerSyncSnapshot: 'player-sync-snapshot',
222
+ InviteLinkCreated: 'invite-link-created',
223
+ ApiKeyCreated: 'api-key-created',
224
+ ApiKeyRotated: 'api-key-rotated',
225
+ ApiKeyRevoked: 'api-key-revoked',
226
+ DomainCreated: 'domain-created',
227
+ DomainRegistrationTokenRegenerated: 'domain-registration-token-regenerated',
228
+ DomainPlanChanged: 'domain-plan-changed',
229
+ PlayerConnected: 'player-connected',
230
+ PlayerDisconnected: 'player-disconnected',
231
+ ChatMessage: 'chat-message',
232
+ PlayerDeath: 'player-death',
233
+ EntityKilled: 'entity-killed',
234
+ };
235
+ export const GameServerCreateDTOTypeEnum = {
236
+ Sevendaystodie: 'SEVENDAYSTODIE',
237
+ Rust: 'RUST',
238
+ Generic: 'GENERIC',
239
+ Mock: 'MOCK',
240
+ };
241
+ export const GameServerOutputDTOTypeEnum = {
242
+ Sevendaystodie: 'SEVENDAYSTODIE',
243
+ Rust: 'RUST',
244
+ Generic: 'GENERIC',
245
+ Mock: 'MOCK',
246
+ };
247
+ export const GameServerTypesOutputDTOTypeEnum = {
248
+ Sevendaystodie: 'SEVENDAYSTODIE',
249
+ Rust: 'RUST',
250
+ Generic: 'GENERIC',
251
+ Mock: 'MOCK',
252
+ };
253
+ export const GameServerUpdateDTOTypeEnum = {
254
+ Sevendaystodie: 'SEVENDAYSTODIE',
255
+ Rust: 'RUST',
256
+ Generic: 'GENERIC',
257
+ Mock: 'MOCK',
258
+ };
259
+ export const HookCreateDTOEventTypeEnum = {
260
+ Log: 'log',
261
+ PlayerConnected: 'player-connected',
262
+ PlayerDisconnected: 'player-disconnected',
263
+ ChatMessage: 'chat-message',
264
+ PlayerDeath: 'player-death',
265
+ EntityKilled: 'entity-killed',
266
+ DiscordMessage: 'discord-message',
267
+ RoleAssigned: 'role-assigned',
268
+ RoleRemoved: 'role-removed',
269
+ RoleCreated: 'role-created',
270
+ RoleUpdated: 'role-updated',
271
+ RoleDeleted: 'role-deleted',
272
+ CommandExecuted: 'command-executed',
273
+ CommandExecutionDenied: 'command-execution-denied',
274
+ HookExecuted: 'hook-executed',
275
+ CronjobExecuted: 'cronjob-executed',
276
+ CurrencyAdded: 'currency-added',
277
+ CurrencyDeducted: 'currency-deducted',
278
+ CurrencyResetAll: 'currency-reset-all',
279
+ SettingsSet: 'settings-set',
280
+ PlayerNewIpDetected: 'player-new-ip-detected',
281
+ PlayerNewNameDetected: 'player-new-name-detected',
282
+ ServerStatusChanged: 'server-status-changed',
283
+ ModuleCreated: 'module-created',
284
+ ModuleUpdated: 'module-updated',
285
+ ModuleDeleted: 'module-deleted',
286
+ ModuleInstalled: 'module-installed',
287
+ ModuleUninstalled: 'module-uninstalled',
288
+ PlayerCreated: 'player-created',
289
+ ShopListingCreated: 'shop-listing-created',
290
+ ShopListingUpdated: 'shop-listing-updated',
291
+ ShopListingDeleted: 'shop-listing-deleted',
292
+ ShopOrderCreated: 'shop-order-created',
293
+ ShopOrderStatusChanged: 'shop-order-status-changed',
294
+ ShopOrderDeliveryFailed: 'shop-order-delivery-failed',
295
+ PlayerLinked: 'player-linked',
296
+ GameserverCreated: 'gameserver-created',
297
+ GameserverUpdated: 'gameserver-updated',
298
+ GameserverDeleted: 'gameserver-deleted',
299
+ PlayerBanned: 'player-banned',
300
+ PlayerUnbanned: 'player-unbanned',
301
+ PlayerDeleted: 'player-deleted',
302
+ ShopActionExecuted: 'shop-action-executed',
303
+ PlayerInventoryChanged: 'player-inventory-changed',
304
+ EventRateLimited: 'event-rate-limited',
305
+ PlayerSyncSnapshot: 'player-sync-snapshot',
306
+ InviteLinkCreated: 'invite-link-created',
307
+ ApiKeyCreated: 'api-key-created',
308
+ ApiKeyRotated: 'api-key-rotated',
309
+ ApiKeyRevoked: 'api-key-revoked',
310
+ DomainCreated: 'domain-created',
311
+ DomainRegistrationTokenRegenerated: 'domain-registration-token-regenerated',
312
+ DomainPlanChanged: 'domain-plan-changed',
313
+ };
314
+ export const HookOutputDTOEventTypeEnum = {
315
+ Log: 'log',
316
+ PlayerConnected: 'player-connected',
317
+ PlayerDisconnected: 'player-disconnected',
318
+ ChatMessage: 'chat-message',
319
+ PlayerDeath: 'player-death',
320
+ EntityKilled: 'entity-killed',
321
+ DiscordMessage: 'discord-message',
322
+ RoleAssigned: 'role-assigned',
323
+ RoleRemoved: 'role-removed',
324
+ RoleCreated: 'role-created',
325
+ RoleUpdated: 'role-updated',
326
+ RoleDeleted: 'role-deleted',
327
+ CommandExecuted: 'command-executed',
328
+ CommandExecutionDenied: 'command-execution-denied',
329
+ HookExecuted: 'hook-executed',
330
+ CronjobExecuted: 'cronjob-executed',
331
+ CurrencyAdded: 'currency-added',
332
+ CurrencyDeducted: 'currency-deducted',
333
+ CurrencyResetAll: 'currency-reset-all',
334
+ SettingsSet: 'settings-set',
335
+ PlayerNewIpDetected: 'player-new-ip-detected',
336
+ PlayerNewNameDetected: 'player-new-name-detected',
337
+ ServerStatusChanged: 'server-status-changed',
338
+ ModuleCreated: 'module-created',
339
+ ModuleUpdated: 'module-updated',
340
+ ModuleDeleted: 'module-deleted',
341
+ ModuleInstalled: 'module-installed',
342
+ ModuleUninstalled: 'module-uninstalled',
343
+ PlayerCreated: 'player-created',
344
+ ShopListingCreated: 'shop-listing-created',
345
+ ShopListingUpdated: 'shop-listing-updated',
346
+ ShopListingDeleted: 'shop-listing-deleted',
347
+ ShopOrderCreated: 'shop-order-created',
348
+ ShopOrderStatusChanged: 'shop-order-status-changed',
349
+ ShopOrderDeliveryFailed: 'shop-order-delivery-failed',
350
+ PlayerLinked: 'player-linked',
351
+ GameserverCreated: 'gameserver-created',
352
+ GameserverUpdated: 'gameserver-updated',
353
+ GameserverDeleted: 'gameserver-deleted',
354
+ PlayerBanned: 'player-banned',
355
+ PlayerUnbanned: 'player-unbanned',
356
+ PlayerDeleted: 'player-deleted',
357
+ ShopActionExecuted: 'shop-action-executed',
358
+ PlayerInventoryChanged: 'player-inventory-changed',
359
+ EventRateLimited: 'event-rate-limited',
360
+ PlayerSyncSnapshot: 'player-sync-snapshot',
361
+ InviteLinkCreated: 'invite-link-created',
362
+ ApiKeyCreated: 'api-key-created',
363
+ ApiKeyRotated: 'api-key-rotated',
364
+ ApiKeyRevoked: 'api-key-revoked',
365
+ DomainCreated: 'domain-created',
366
+ DomainRegistrationTokenRegenerated: 'domain-registration-token-regenerated',
367
+ DomainPlanChanged: 'domain-plan-changed',
368
+ };
369
+ export const HookTriggerDTOEventTypeEnum = {
370
+ Log: 'log',
371
+ PlayerConnected: 'player-connected',
372
+ PlayerDisconnected: 'player-disconnected',
373
+ ChatMessage: 'chat-message',
374
+ PlayerDeath: 'player-death',
375
+ EntityKilled: 'entity-killed',
376
+ DiscordMessage: 'discord-message',
377
+ RoleAssigned: 'role-assigned',
378
+ RoleRemoved: 'role-removed',
379
+ RoleCreated: 'role-created',
380
+ RoleUpdated: 'role-updated',
381
+ RoleDeleted: 'role-deleted',
382
+ CommandExecuted: 'command-executed',
383
+ CommandExecutionDenied: 'command-execution-denied',
384
+ HookExecuted: 'hook-executed',
385
+ CronjobExecuted: 'cronjob-executed',
386
+ CurrencyAdded: 'currency-added',
387
+ CurrencyDeducted: 'currency-deducted',
388
+ CurrencyResetAll: 'currency-reset-all',
389
+ SettingsSet: 'settings-set',
390
+ PlayerNewIpDetected: 'player-new-ip-detected',
391
+ PlayerNewNameDetected: 'player-new-name-detected',
392
+ ServerStatusChanged: 'server-status-changed',
393
+ ModuleCreated: 'module-created',
394
+ ModuleUpdated: 'module-updated',
395
+ ModuleDeleted: 'module-deleted',
396
+ ModuleInstalled: 'module-installed',
397
+ ModuleUninstalled: 'module-uninstalled',
398
+ PlayerCreated: 'player-created',
399
+ ShopListingCreated: 'shop-listing-created',
400
+ ShopListingUpdated: 'shop-listing-updated',
401
+ ShopListingDeleted: 'shop-listing-deleted',
402
+ ShopOrderCreated: 'shop-order-created',
403
+ ShopOrderStatusChanged: 'shop-order-status-changed',
404
+ ShopOrderDeliveryFailed: 'shop-order-delivery-failed',
405
+ PlayerLinked: 'player-linked',
406
+ GameserverCreated: 'gameserver-created',
407
+ GameserverUpdated: 'gameserver-updated',
408
+ GameserverDeleted: 'gameserver-deleted',
409
+ PlayerBanned: 'player-banned',
410
+ PlayerUnbanned: 'player-unbanned',
411
+ PlayerDeleted: 'player-deleted',
412
+ ShopActionExecuted: 'shop-action-executed',
413
+ PlayerInventoryChanged: 'player-inventory-changed',
414
+ EventRateLimited: 'event-rate-limited',
415
+ PlayerSyncSnapshot: 'player-sync-snapshot',
416
+ InviteLinkCreated: 'invite-link-created',
417
+ ApiKeyCreated: 'api-key-created',
418
+ ApiKeyRotated: 'api-key-rotated',
419
+ ApiKeyRevoked: 'api-key-revoked',
420
+ DomainCreated: 'domain-created',
421
+ DomainRegistrationTokenRegenerated: 'domain-registration-token-regenerated',
422
+ DomainPlanChanged: 'domain-plan-changed',
423
+ };
424
+ export const HookUpdateDTOEventTypeEnum = {
425
+ Log: 'log',
426
+ PlayerConnected: 'player-connected',
427
+ PlayerDisconnected: 'player-disconnected',
428
+ ChatMessage: 'chat-message',
429
+ PlayerDeath: 'player-death',
430
+ EntityKilled: 'entity-killed',
431
+ DiscordMessage: 'discord-message',
432
+ RoleAssigned: 'role-assigned',
433
+ RoleRemoved: 'role-removed',
434
+ RoleCreated: 'role-created',
435
+ RoleUpdated: 'role-updated',
436
+ RoleDeleted: 'role-deleted',
437
+ CommandExecuted: 'command-executed',
438
+ CommandExecutionDenied: 'command-execution-denied',
439
+ HookExecuted: 'hook-executed',
440
+ CronjobExecuted: 'cronjob-executed',
441
+ CurrencyAdded: 'currency-added',
442
+ CurrencyDeducted: 'currency-deducted',
443
+ CurrencyResetAll: 'currency-reset-all',
444
+ SettingsSet: 'settings-set',
445
+ PlayerNewIpDetected: 'player-new-ip-detected',
446
+ PlayerNewNameDetected: 'player-new-name-detected',
447
+ ServerStatusChanged: 'server-status-changed',
448
+ ModuleCreated: 'module-created',
449
+ ModuleUpdated: 'module-updated',
450
+ ModuleDeleted: 'module-deleted',
451
+ ModuleInstalled: 'module-installed',
452
+ ModuleUninstalled: 'module-uninstalled',
453
+ PlayerCreated: 'player-created',
454
+ ShopListingCreated: 'shop-listing-created',
455
+ ShopListingUpdated: 'shop-listing-updated',
456
+ ShopListingDeleted: 'shop-listing-deleted',
457
+ ShopOrderCreated: 'shop-order-created',
458
+ ShopOrderStatusChanged: 'shop-order-status-changed',
459
+ ShopOrderDeliveryFailed: 'shop-order-delivery-failed',
460
+ PlayerLinked: 'player-linked',
461
+ GameserverCreated: 'gameserver-created',
462
+ GameserverUpdated: 'gameserver-updated',
463
+ GameserverDeleted: 'gameserver-deleted',
464
+ PlayerBanned: 'player-banned',
465
+ PlayerUnbanned: 'player-unbanned',
466
+ PlayerDeleted: 'player-deleted',
467
+ ShopActionExecuted: 'shop-action-executed',
468
+ PlayerInventoryChanged: 'player-inventory-changed',
469
+ EventRateLimited: 'event-rate-limited',
470
+ PlayerSyncSnapshot: 'player-sync-snapshot',
471
+ InviteLinkCreated: 'invite-link-created',
472
+ ApiKeyCreated: 'api-key-created',
473
+ ApiKeyRotated: 'api-key-rotated',
474
+ ApiKeyRevoked: 'api-key-revoked',
475
+ DomainCreated: 'domain-created',
476
+ DomainRegistrationTokenRegenerated: 'domain-registration-token-regenerated',
477
+ DomainPlanChanged: 'domain-plan-changed',
478
+ };
479
+ export const IEntityDTOTypeEnum = {
480
+ Hostile: 'hostile',
481
+ Friendly: 'friendly',
482
+ Neutral: 'neutral',
483
+ };
484
+ export const IHookEventTypeEnum = {
485
+ Log: 'log',
486
+ PlayerConnected: 'player-connected',
487
+ PlayerDisconnected: 'player-disconnected',
488
+ ChatMessage: 'chat-message',
489
+ PlayerDeath: 'player-death',
490
+ EntityKilled: 'entity-killed',
491
+ DiscordMessage: 'discord-message',
492
+ RoleAssigned: 'role-assigned',
493
+ RoleRemoved: 'role-removed',
494
+ RoleCreated: 'role-created',
495
+ RoleUpdated: 'role-updated',
496
+ RoleDeleted: 'role-deleted',
497
+ CommandExecuted: 'command-executed',
498
+ CommandExecutionDenied: 'command-execution-denied',
499
+ HookExecuted: 'hook-executed',
500
+ CronjobExecuted: 'cronjob-executed',
501
+ CurrencyAdded: 'currency-added',
502
+ CurrencyDeducted: 'currency-deducted',
503
+ CurrencyResetAll: 'currency-reset-all',
504
+ SettingsSet: 'settings-set',
505
+ PlayerNewIpDetected: 'player-new-ip-detected',
506
+ PlayerNewNameDetected: 'player-new-name-detected',
507
+ ServerStatusChanged: 'server-status-changed',
508
+ ModuleCreated: 'module-created',
509
+ ModuleUpdated: 'module-updated',
510
+ ModuleDeleted: 'module-deleted',
511
+ ModuleInstalled: 'module-installed',
512
+ ModuleUninstalled: 'module-uninstalled',
513
+ PlayerCreated: 'player-created',
514
+ ShopListingCreated: 'shop-listing-created',
515
+ ShopListingUpdated: 'shop-listing-updated',
516
+ ShopListingDeleted: 'shop-listing-deleted',
517
+ ShopOrderCreated: 'shop-order-created',
518
+ ShopOrderStatusChanged: 'shop-order-status-changed',
519
+ ShopOrderDeliveryFailed: 'shop-order-delivery-failed',
520
+ PlayerLinked: 'player-linked',
521
+ GameserverCreated: 'gameserver-created',
522
+ GameserverUpdated: 'gameserver-updated',
523
+ GameserverDeleted: 'gameserver-deleted',
524
+ PlayerBanned: 'player-banned',
525
+ PlayerUnbanned: 'player-unbanned',
526
+ PlayerDeleted: 'player-deleted',
527
+ ShopActionExecuted: 'shop-action-executed',
528
+ PlayerInventoryChanged: 'player-inventory-changed',
529
+ EventRateLimited: 'event-rate-limited',
530
+ PlayerSyncSnapshot: 'player-sync-snapshot',
531
+ InviteLinkCreated: 'invite-link-created',
532
+ ApiKeyCreated: 'api-key-created',
533
+ ApiKeyRotated: 'api-key-rotated',
534
+ ApiKeyRevoked: 'api-key-revoked',
535
+ DomainCreated: 'domain-created',
536
+ DomainRegistrationTokenRegenerated: 'domain-registration-token-regenerated',
537
+ DomainPlanChanged: 'domain-plan-changed',
538
+ };
539
+ export const ITakaroQuerySortDirectionEnum = {
540
+ Asc: 'asc',
541
+ Desc: 'desc',
542
+ };
543
+ export const InviteLinkCreateResultDTOStatusEnum = {
544
+ Active: 'ACTIVE',
545
+ Revoked: 'REVOKED',
546
+ Expired: 'EXPIRED',
547
+ Depleted: 'DEPLETED',
548
+ };
549
+ export const InviteLinkOutputDTOStatusEnum = {
550
+ Active: 'ACTIVE',
551
+ Revoked: 'REVOKED',
552
+ Expired: 'EXPIRED',
553
+ Depleted: 'DEPLETED',
554
+ };
555
+ export const InviteLinkPreviewDTOStatusEnum = {
556
+ Active: 'ACTIVE',
557
+ Revoked: 'REVOKED',
558
+ Expired: 'EXPIRED',
559
+ Depleted: 'DEPLETED',
560
+ };
561
+ export const InviteLinkSearchInputDTOSortDirectionEnum = {
562
+ Asc: 'asc',
563
+ Desc: 'desc',
564
+ };
565
+ export const JobStatusOutputDTOStatusEnum = {
566
+ Pending: 'pending',
567
+ Completed: 'completed',
568
+ Failed: 'failed',
569
+ Active: 'active',
570
+ Delayed: 'delayed',
571
+ Prioritized: 'prioritized',
572
+ Waiting: 'waiting',
573
+ WaitingChildren: 'waiting-children',
574
+ };
575
+ export const OrderStatusCountDTOStatusEnum = {
576
+ Completed: 'COMPLETED',
577
+ Paid: 'PAID',
578
+ Canceled: 'CANCELED',
579
+ };
580
+ /**
581
+ *
582
+ * @export
583
+ * @enum {string}
584
+ */
585
+ export const PERMISSIONS = {
586
+ Root: 'ROOT',
587
+ ManageUsers: 'MANAGE_USERS',
588
+ ReadUsers: 'READ_USERS',
589
+ ManageRoles: 'MANAGE_ROLES',
590
+ ReadRoles: 'READ_ROLES',
591
+ ManageGameservers: 'MANAGE_GAMESERVERS',
592
+ ReadModules: 'READ_MODULES',
593
+ ManageModules: 'MANAGE_MODULES',
594
+ ReadPlayers: 'READ_PLAYERS',
595
+ ManagePlayers: 'MANAGE_PLAYERS',
596
+ ManageSettings: 'MANAGE_SETTINGS',
597
+ ReadSettings: 'READ_SETTINGS',
598
+ ReadVariables: 'READ_VARIABLES',
599
+ ManageVariables: 'MANAGE_VARIABLES',
600
+ ReadEvents: 'READ_EVENTS',
601
+ ManageEvents: 'MANAGE_EVENTS',
602
+ ReadItems: 'READ_ITEMS',
603
+ ManageItems: 'MANAGE_ITEMS',
604
+ ReadEntities: 'READ_ENTITIES',
605
+ ManageEntities: 'MANAGE_ENTITIES',
606
+ ManageShopListings: 'MANAGE_SHOP_LISTINGS',
607
+ ManageShopOrders: 'MANAGE_SHOP_ORDERS',
608
+ ViewDiscordInfo: 'VIEW_DISCORD_INFO',
609
+ SendDiscordMessage: 'SEND_DISCORD_MESSAGE',
610
+ ManageApiKeys: 'MANAGE_API_KEYS',
611
+ };
612
+ export const PlayerOnGameServerSearchInputDTOExtendEnum = {
613
+ GameServer: 'gameServer',
614
+ Player: 'player',
615
+ };
616
+ export const PlayerOnGameServerSearchInputDTOSortDirectionEnum = {
617
+ Asc: 'asc',
618
+ Desc: 'desc',
619
+ };
620
+ export const PlayerSearchInputAllowedFiltersRoleAssignmentScopeEnum = {
621
+ Global: 'global',
622
+ GameServer: 'gameServer',
623
+ };
624
+ export const PlayerSearchInputDTOExtendEnum = {
625
+ PlayerOnGameServers: 'playerOnGameServers',
626
+ Roles: 'roles',
627
+ GameServers: 'gameServers',
628
+ RoleAssignments: 'roleAssignments',
629
+ };
630
+ export const PlayerSearchInputDTOSortDirectionEnum = {
631
+ Asc: 'asc',
632
+ Desc: 'desc',
633
+ };
634
+ export const RecentOrderDTOStatusEnum = {
635
+ Completed: 'COMPLETED',
636
+ Paid: 'PAID',
637
+ Canceled: 'CANCELED',
638
+ };
639
+ export const SettingsOutputDTOKeyEnum = {
640
+ CommandPrefix: 'commandPrefix',
641
+ ServerChatName: 'serverChatName',
642
+ EconomyEnabled: 'economyEnabled',
643
+ CurrencyName: 'currencyName',
644
+ DeveloperMode: 'developerMode',
645
+ MessagePrefix: 'messagePrefix',
646
+ DomainName: 'domainName',
647
+ DiscordRoleSyncEnabled: 'discordRoleSyncEnabled',
648
+ DiscordRoleSyncPreferDiscord: 'discordRoleSyncPreferDiscord',
649
+ UnknownCommandFeedbackEnabled: 'unknownCommandFeedbackEnabled',
650
+ UnknownCommandFeedbackMessage: 'unknownCommandFeedbackMessage',
651
+ };
652
+ export const SettingsOutputDTOTypeEnum = {
653
+ Override: 'override',
654
+ Inherit: 'inherit',
655
+ Global: 'global',
656
+ Default: 'default',
657
+ };
658
+ export const ShopListingBulkInputDTOActionEnum = {
659
+ Delete: 'delete',
660
+ Publish: 'publish',
661
+ Unpublish: 'unpublish',
662
+ };
663
+ export const ShopListingSearchInputDTOExtendEnum = {
664
+ GameServer: 'gameServer',
665
+ Items: 'items',
666
+ Categories: 'categories',
667
+ };
668
+ export const ShopListingSearchInputDTOSortDirectionEnum = {
669
+ Asc: 'asc',
670
+ Desc: 'desc',
671
+ };
672
+ export const ShopOrderOutputDTOStatusEnum = {
673
+ Completed: 'COMPLETED',
674
+ Paid: 'PAID',
675
+ Canceled: 'CANCELED',
676
+ };
677
+ export const ShopOrderUpdateDTOStatusEnum = {
678
+ Completed: 'COMPLETED',
679
+ Paid: 'PAID',
680
+ Canceled: 'CANCELED',
681
+ };
682
+ export const TakaroEventPlayerInventoryChangedChangeTypeEnum = {
683
+ Added: 'added',
684
+ Removed: 'removed',
685
+ Changed: 'changed',
686
+ };
687
+ export const TakaroEventRateLimitedScopeEnum = {
688
+ Server: 'server',
689
+ Domain: 'domain',
690
+ Global: 'global',
691
+ };
692
+ export const UserSearchInputDTOExtendEnum = {
693
+ Roles: 'roles',
694
+ };
695
+ export const UserSearchInputDTOSortDirectionEnum = {
696
+ Asc: 'asc',
697
+ Desc: 'desc',
698
+ };
699
+ /**
700
+ * DistributorApi - axios parameter creator
701
+ * @export
702
+ */
703
+ export const DistributorApiAxiosParamCreator = function (configuration) {
704
+ return {
705
+ /**
706
+ * Attributes an existing domain to a distributor (ADR 0024 — attribution, never ownership) and creates the domain’s Distributor Service Account, the actor the distributor acts as inside the domain. Idempotent for the same distributor: a second attach returns the same service account id and writes nothing. Four refusals answer 400: the distributor is disabled; the domain still carries a subscription reference; the domain is already attributed to another distributor; the domain is DISABLED. A domain that still carries a subscription reference must be handed over in this order — cancel the subscription in Stripe, then clear the reference with PUT /domain/:id and \"externalReference\": null, then attach. Takaro never cancels a subscription implicitly. An unknown distributor id or domain id is a 404. No Plan is set here, and the domain keeps the limits it has.<br> OperationId: `DistributorControllerAttachDomain`
707
+ * @summary Attach an existing domain to a distributor
708
+ * @param {string} id
709
+ * @param {string} domainId
710
+ * @param {*} [options] Override http request option.
711
+ * @throws {RequiredError}
712
+ */
713
+ distributorControllerAttachDomain: async (id, domainId, options = {}) => {
714
+ // verify required parameter 'id' is not null or undefined
715
+ assertParamExists('distributorControllerAttachDomain', 'id', id);
716
+ // verify required parameter 'domainId' is not null or undefined
717
+ assertParamExists('distributorControllerAttachDomain', 'domainId', domainId);
718
+ const localVarPath = `/distributor/{id}/domain/{domainId}`
719
+ .replace(`{${'id'}}`, encodeURIComponent(String(id)))
720
+ .replace(`{${'domainId'}}`, encodeURIComponent(String(domainId)));
721
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
722
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
723
+ let baseOptions;
724
+ if (configuration) {
725
+ baseOptions = configuration.baseOptions;
726
+ }
727
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
728
+ const localVarHeaderParameter = {};
729
+ const localVarQueryParameter = {};
730
+ // authentication adminAuth required
731
+ await setApiKeyToObject(localVarHeaderParameter, 'x-takaro-admin-token', configuration);
732
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
733
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
734
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
735
+ return {
736
+ url: toPathString(localVarUrlObj),
737
+ options: localVarRequestOptions,
738
+ };
739
+ },
740
+ /**
741
+ * <br> OperationId: `DistributorControllerCreate`
742
+ * @summary Create
743
+ * @param {DistributorCreateInputDTO} [distributorCreateInputDTO] DistributorCreateInputDTO
744
+ * @param {*} [options] Override http request option.
745
+ * @throws {RequiredError}
746
+ */
747
+ distributorControllerCreate: async (distributorCreateInputDTO, options = {}) => {
748
+ const localVarPath = `/distributor`;
749
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
750
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
751
+ let baseOptions;
752
+ if (configuration) {
753
+ baseOptions = configuration.baseOptions;
754
+ }
755
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
756
+ const localVarHeaderParameter = {};
757
+ const localVarQueryParameter = {};
758
+ // authentication adminAuth required
759
+ await setApiKeyToObject(localVarHeaderParameter, 'x-takaro-admin-token', configuration);
760
+ localVarHeaderParameter['Content-Type'] = 'application/json';
761
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
762
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
763
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
764
+ localVarRequestOptions.data = serializeDataIfNeeded(distributorCreateInputDTO, localVarRequestOptions, configuration);
765
+ return {
766
+ url: toPathString(localVarUrlObj),
767
+ options: localVarRequestOptions,
768
+ };
769
+ },
770
+ /**
771
+ * Mints a Distributor Key and returns the secret ONCE — only its hash is stored, so it cannot be shown again. This is how staff hand a distributor its first credential; afterwards the distributor creates its own keys through the self-service routes. Creating a key for a disabled distributor is a 400.<br> OperationId: `DistributorControllerCreateKey`
772
+ * @summary Create a distributor key
773
+ * @param {string} id
774
+ * @param {DistributorKeyCreateInputDTO} [distributorKeyCreateInputDTO] DistributorKeyCreateInputDTO
775
+ * @param {*} [options] Override http request option.
776
+ * @throws {RequiredError}
777
+ */
778
+ distributorControllerCreateKey: async (id, distributorKeyCreateInputDTO, options = {}) => {
779
+ // verify required parameter 'id' is not null or undefined
780
+ assertParamExists('distributorControllerCreateKey', 'id', id);
781
+ const localVarPath = `/distributor/{id}/key`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
782
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
783
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
784
+ let baseOptions;
785
+ if (configuration) {
786
+ baseOptions = configuration.baseOptions;
787
+ }
788
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
789
+ const localVarHeaderParameter = {};
790
+ const localVarQueryParameter = {};
791
+ // authentication adminAuth required
792
+ await setApiKeyToObject(localVarHeaderParameter, 'x-takaro-admin-token', configuration);
793
+ localVarHeaderParameter['Content-Type'] = 'application/json';
794
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
795
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
796
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
797
+ localVarRequestOptions.data = serializeDataIfNeeded(distributorKeyCreateInputDTO, localVarRequestOptions, configuration);
798
+ return {
799
+ url: toPathString(localVarUrlObj),
800
+ options: localVarRequestOptions,
801
+ };
802
+ },
803
+ /**
804
+ * Clears the domain’s distributor attribution and its Plan reference, removes the domain’s Distributor Service Account, and leaves the domain on the self-service path. Both ids are taken so the domain’s distributor is explicit in the URL; a mismatched or unattributed pair is a 404 rather than confirming another distributor’s domain, which also makes a second detach a 404. The domain’s limits, users, roles, game servers and server registration token are left exactly as they are — app-api’s half of the hand-off is this state, and no Stripe object is created or cancelled here.<br> OperationId: `DistributorControllerDetachDomain`
805
+ * @summary Detach a domain from a distributor
806
+ * @param {string} id
807
+ * @param {string} domainId
808
+ * @param {*} [options] Override http request option.
809
+ * @throws {RequiredError}
810
+ */
811
+ distributorControllerDetachDomain: async (id, domainId, options = {}) => {
812
+ // verify required parameter 'id' is not null or undefined
813
+ assertParamExists('distributorControllerDetachDomain', 'id', id);
814
+ // verify required parameter 'domainId' is not null or undefined
815
+ assertParamExists('distributorControllerDetachDomain', 'domainId', domainId);
816
+ const localVarPath = `/distributor/{id}/domain/{domainId}`
817
+ .replace(`{${'id'}}`, encodeURIComponent(String(id)))
818
+ .replace(`{${'domainId'}}`, encodeURIComponent(String(domainId)));
819
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
820
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
821
+ let baseOptions;
822
+ if (configuration) {
823
+ baseOptions = configuration.baseOptions;
824
+ }
825
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
826
+ const localVarHeaderParameter = {};
827
+ const localVarQueryParameter = {};
828
+ // authentication adminAuth required
829
+ await setApiKeyToObject(localVarHeaderParameter, 'x-takaro-admin-token', configuration);
830
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
831
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
832
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
833
+ return {
834
+ url: toPathString(localVarUrlObj),
835
+ options: localVarRequestOptions,
836
+ };
837
+ },
838
+ /**
839
+ * Idempotent: disabling an already-disabled distributor succeeds and returns the unchanged row. There is no delete verb — a distributor is disabled so the attribution its domains carry stays resolvable.<br> OperationId: `DistributorControllerDisable`
840
+ * @summary Disable a distributor
841
+ * @param {string} id
842
+ * @param {*} [options] Override http request option.
843
+ * @throws {RequiredError}
844
+ */
845
+ distributorControllerDisable: async (id, options = {}) => {
846
+ // verify required parameter 'id' is not null or undefined
847
+ assertParamExists('distributorControllerDisable', 'id', id);
848
+ const localVarPath = `/distributor/{id}/disable`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
849
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
850
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
851
+ let baseOptions;
852
+ if (configuration) {
853
+ baseOptions = configuration.baseOptions;
854
+ }
855
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
856
+ const localVarHeaderParameter = {};
857
+ const localVarQueryParameter = {};
858
+ // authentication adminAuth required
859
+ await setApiKeyToObject(localVarHeaderParameter, 'x-takaro-admin-token', configuration);
860
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
861
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
862
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
863
+ return {
864
+ url: toPathString(localVarUrlObj),
865
+ options: localVarRequestOptions,
866
+ };
867
+ },
868
+ /**
869
+ * Idempotent: enabling an already-enabled distributor succeeds and returns the unchanged row. Enabling is its own verb rather than a field on the update route, so there is exactly one way to flip the flag.<br> OperationId: `DistributorControllerEnable`
870
+ * @summary Enable a distributor
871
+ * @param {string} id
872
+ * @param {*} [options] Override http request option.
873
+ * @throws {RequiredError}
874
+ */
875
+ distributorControllerEnable: async (id, options = {}) => {
876
+ // verify required parameter 'id' is not null or undefined
877
+ assertParamExists('distributorControllerEnable', 'id', id);
878
+ const localVarPath = `/distributor/{id}/enable`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
879
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
880
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
881
+ let baseOptions;
882
+ if (configuration) {
883
+ baseOptions = configuration.baseOptions;
884
+ }
885
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
886
+ const localVarHeaderParameter = {};
887
+ const localVarQueryParameter = {};
888
+ // authentication adminAuth required
889
+ await setApiKeyToObject(localVarHeaderParameter, 'x-takaro-admin-token', configuration);
890
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
891
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
892
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
893
+ return {
894
+ url: toPathString(localVarUrlObj),
895
+ options: localVarRequestOptions,
896
+ };
897
+ },
898
+ /**
899
+ * <br> OperationId: `DistributorControllerGetOne`
900
+ * @summary Get one
901
+ * @param {string} id
902
+ * @param {*} [options] Override http request option.
903
+ * @throws {RequiredError}
904
+ */
905
+ distributorControllerGetOne: async (id, options = {}) => {
906
+ // verify required parameter 'id' is not null or undefined
907
+ assertParamExists('distributorControllerGetOne', 'id', id);
908
+ const localVarPath = `/distributor/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
909
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
910
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
911
+ let baseOptions;
912
+ if (configuration) {
913
+ baseOptions = configuration.baseOptions;
914
+ }
915
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
916
+ const localVarHeaderParameter = {};
917
+ const localVarQueryParameter = {};
918
+ // authentication adminAuth required
919
+ await setApiKeyToObject(localVarHeaderParameter, 'x-takaro-admin-token', configuration);
920
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
921
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
922
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
923
+ return {
924
+ url: toPathString(localVarUrlObj),
925
+ options: localVarRequestOptions,
926
+ };
927
+ },
928
+ /**
929
+ * Idempotent: revoking an already-revoked key succeeds. Both ids are taken so the key’s distributor is explicit in the URL; a mismatched pair is a 404 rather than confirming another distributor’s key id exists.<br> OperationId: `DistributorControllerRevokeKey`
930
+ * @summary Revoke a distributor key
931
+ * @param {string} id
932
+ * @param {string} keyId
933
+ * @param {*} [options] Override http request option.
934
+ * @throws {RequiredError}
935
+ */
936
+ distributorControllerRevokeKey: async (id, keyId, options = {}) => {
937
+ // verify required parameter 'id' is not null or undefined
938
+ assertParamExists('distributorControllerRevokeKey', 'id', id);
939
+ // verify required parameter 'keyId' is not null or undefined
940
+ assertParamExists('distributorControllerRevokeKey', 'keyId', keyId);
941
+ const localVarPath = `/distributor/{id}/key/{keyId}`
942
+ .replace(`{${'id'}}`, encodeURIComponent(String(id)))
943
+ .replace(`{${'keyId'}}`, encodeURIComponent(String(keyId)));
944
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
945
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
946
+ let baseOptions;
947
+ if (configuration) {
948
+ baseOptions = configuration.baseOptions;
949
+ }
950
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
951
+ const localVarHeaderParameter = {};
952
+ const localVarQueryParameter = {};
953
+ // authentication adminAuth required
954
+ await setApiKeyToObject(localVarHeaderParameter, 'x-takaro-admin-token', configuration);
955
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
956
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
957
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
958
+ return {
959
+ url: toPathString(localVarUrlObj),
960
+ options: localVarRequestOptions,
961
+ };
962
+ },
963
+ /**
964
+ * <br> OperationId: `DistributorControllerSearch`
965
+ * @summary Search
966
+ * @param {DistributorSearchInputDTO} [distributorSearchInputDTO] DistributorSearchInputDTO
967
+ * @param {*} [options] Override http request option.
968
+ * @throws {RequiredError}
969
+ */
970
+ distributorControllerSearch: async (distributorSearchInputDTO, options = {}) => {
971
+ const localVarPath = `/distributor/search`;
972
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
973
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
974
+ let baseOptions;
975
+ if (configuration) {
976
+ baseOptions = configuration.baseOptions;
977
+ }
978
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
979
+ const localVarHeaderParameter = {};
980
+ const localVarQueryParameter = {};
981
+ // authentication adminAuth required
982
+ await setApiKeyToObject(localVarHeaderParameter, 'x-takaro-admin-token', configuration);
983
+ localVarHeaderParameter['Content-Type'] = 'application/json';
984
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
985
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
986
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
987
+ localVarRequestOptions.data = serializeDataIfNeeded(distributorSearchInputDTO, localVarRequestOptions, configuration);
988
+ return {
989
+ url: toPathString(localVarUrlObj),
990
+ options: localVarRequestOptions,
991
+ };
992
+ },
993
+ /**
994
+ * <br> OperationId: `DistributorControllerUpdate`
995
+ * @summary Update
996
+ * @param {string} id
997
+ * @param {DistributorUpdateInputDTO} [distributorUpdateInputDTO] DistributorUpdateInputDTO
998
+ * @param {*} [options] Override http request option.
999
+ * @throws {RequiredError}
1000
+ */
1001
+ distributorControllerUpdate: async (id, distributorUpdateInputDTO, options = {}) => {
1002
+ // verify required parameter 'id' is not null or undefined
1003
+ assertParamExists('distributorControllerUpdate', 'id', id);
1004
+ const localVarPath = `/distributor/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
1005
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1006
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1007
+ let baseOptions;
1008
+ if (configuration) {
1009
+ baseOptions = configuration.baseOptions;
1010
+ }
1011
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options };
1012
+ const localVarHeaderParameter = {};
1013
+ const localVarQueryParameter = {};
1014
+ // authentication adminAuth required
1015
+ await setApiKeyToObject(localVarHeaderParameter, 'x-takaro-admin-token', configuration);
1016
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1017
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1018
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1019
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1020
+ localVarRequestOptions.data = serializeDataIfNeeded(distributorUpdateInputDTO, localVarRequestOptions, configuration);
1021
+ return {
1022
+ url: toPathString(localVarUrlObj),
1023
+ options: localVarRequestOptions,
1024
+ };
1025
+ },
1026
+ };
1027
+ };
1028
+ /**
1029
+ * DistributorApi - functional programming interface
1030
+ * @export
1031
+ */
1032
+ export const DistributorApiFp = function (configuration) {
1033
+ const localVarAxiosParamCreator = DistributorApiAxiosParamCreator(configuration);
1034
+ return {
1035
+ /**
1036
+ * Attributes an existing domain to a distributor (ADR 0024 — attribution, never ownership) and creates the domain’s Distributor Service Account, the actor the distributor acts as inside the domain. Idempotent for the same distributor: a second attach returns the same service account id and writes nothing. Four refusals answer 400: the distributor is disabled; the domain still carries a subscription reference; the domain is already attributed to another distributor; the domain is DISABLED. A domain that still carries a subscription reference must be handed over in this order — cancel the subscription in Stripe, then clear the reference with PUT /domain/:id and \"externalReference\": null, then attach. Takaro never cancels a subscription implicitly. An unknown distributor id or domain id is a 404. No Plan is set here, and the domain keeps the limits it has.<br> OperationId: `DistributorControllerAttachDomain`
1037
+ * @summary Attach an existing domain to a distributor
1038
+ * @param {string} id
1039
+ * @param {string} domainId
1040
+ * @param {*} [options] Override http request option.
1041
+ * @throws {RequiredError}
1042
+ */
1043
+ async distributorControllerAttachDomain(id, domainId, options) {
1044
+ const localVarAxiosArgs = await localVarAxiosParamCreator.distributorControllerAttachDomain(id, domainId, options);
1045
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1046
+ const localVarOperationServerBasePath = operationServerMap['DistributorApi.distributorControllerAttachDomain']?.[localVarOperationServerIndex]?.url;
1047
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1048
+ },
1049
+ /**
1050
+ * <br> OperationId: `DistributorControllerCreate`
1051
+ * @summary Create
1052
+ * @param {DistributorCreateInputDTO} [distributorCreateInputDTO] DistributorCreateInputDTO
1053
+ * @param {*} [options] Override http request option.
1054
+ * @throws {RequiredError}
1055
+ */
1056
+ async distributorControllerCreate(distributorCreateInputDTO, options) {
1057
+ const localVarAxiosArgs = await localVarAxiosParamCreator.distributorControllerCreate(distributorCreateInputDTO, options);
1058
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1059
+ const localVarOperationServerBasePath = operationServerMap['DistributorApi.distributorControllerCreate']?.[localVarOperationServerIndex]?.url;
1060
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1061
+ },
1062
+ /**
1063
+ * Mints a Distributor Key and returns the secret ONCE — only its hash is stored, so it cannot be shown again. This is how staff hand a distributor its first credential; afterwards the distributor creates its own keys through the self-service routes. Creating a key for a disabled distributor is a 400.<br> OperationId: `DistributorControllerCreateKey`
1064
+ * @summary Create a distributor key
1065
+ * @param {string} id
1066
+ * @param {DistributorKeyCreateInputDTO} [distributorKeyCreateInputDTO] DistributorKeyCreateInputDTO
1067
+ * @param {*} [options] Override http request option.
1068
+ * @throws {RequiredError}
1069
+ */
1070
+ async distributorControllerCreateKey(id, distributorKeyCreateInputDTO, options) {
1071
+ const localVarAxiosArgs = await localVarAxiosParamCreator.distributorControllerCreateKey(id, distributorKeyCreateInputDTO, options);
1072
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1073
+ const localVarOperationServerBasePath = operationServerMap['DistributorApi.distributorControllerCreateKey']?.[localVarOperationServerIndex]?.url;
1074
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1075
+ },
1076
+ /**
1077
+ * Clears the domain’s distributor attribution and its Plan reference, removes the domain’s Distributor Service Account, and leaves the domain on the self-service path. Both ids are taken so the domain’s distributor is explicit in the URL; a mismatched or unattributed pair is a 404 rather than confirming another distributor’s domain, which also makes a second detach a 404. The domain’s limits, users, roles, game servers and server registration token are left exactly as they are — app-api’s half of the hand-off is this state, and no Stripe object is created or cancelled here.<br> OperationId: `DistributorControllerDetachDomain`
1078
+ * @summary Detach a domain from a distributor
1079
+ * @param {string} id
1080
+ * @param {string} domainId
1081
+ * @param {*} [options] Override http request option.
1082
+ * @throws {RequiredError}
1083
+ */
1084
+ async distributorControllerDetachDomain(id, domainId, options) {
1085
+ const localVarAxiosArgs = await localVarAxiosParamCreator.distributorControllerDetachDomain(id, domainId, options);
1086
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1087
+ const localVarOperationServerBasePath = operationServerMap['DistributorApi.distributorControllerDetachDomain']?.[localVarOperationServerIndex]?.url;
1088
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1089
+ },
1090
+ /**
1091
+ * Idempotent: disabling an already-disabled distributor succeeds and returns the unchanged row. There is no delete verb — a distributor is disabled so the attribution its domains carry stays resolvable.<br> OperationId: `DistributorControllerDisable`
1092
+ * @summary Disable a distributor
1093
+ * @param {string} id
1094
+ * @param {*} [options] Override http request option.
1095
+ * @throws {RequiredError}
1096
+ */
1097
+ async distributorControllerDisable(id, options) {
1098
+ const localVarAxiosArgs = await localVarAxiosParamCreator.distributorControllerDisable(id, options);
1099
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1100
+ const localVarOperationServerBasePath = operationServerMap['DistributorApi.distributorControllerDisable']?.[localVarOperationServerIndex]?.url;
1101
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1102
+ },
1103
+ /**
1104
+ * Idempotent: enabling an already-enabled distributor succeeds and returns the unchanged row. Enabling is its own verb rather than a field on the update route, so there is exactly one way to flip the flag.<br> OperationId: `DistributorControllerEnable`
1105
+ * @summary Enable a distributor
1106
+ * @param {string} id
1107
+ * @param {*} [options] Override http request option.
1108
+ * @throws {RequiredError}
1109
+ */
1110
+ async distributorControllerEnable(id, options) {
1111
+ const localVarAxiosArgs = await localVarAxiosParamCreator.distributorControllerEnable(id, options);
1112
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1113
+ const localVarOperationServerBasePath = operationServerMap['DistributorApi.distributorControllerEnable']?.[localVarOperationServerIndex]?.url;
1114
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1115
+ },
1116
+ /**
1117
+ * <br> OperationId: `DistributorControllerGetOne`
1118
+ * @summary Get one
1119
+ * @param {string} id
1120
+ * @param {*} [options] Override http request option.
1121
+ * @throws {RequiredError}
1122
+ */
1123
+ async distributorControllerGetOne(id, options) {
1124
+ const localVarAxiosArgs = await localVarAxiosParamCreator.distributorControllerGetOne(id, options);
1125
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1126
+ const localVarOperationServerBasePath = operationServerMap['DistributorApi.distributorControllerGetOne']?.[localVarOperationServerIndex]?.url;
1127
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1128
+ },
1129
+ /**
1130
+ * Idempotent: revoking an already-revoked key succeeds. Both ids are taken so the key’s distributor is explicit in the URL; a mismatched pair is a 404 rather than confirming another distributor’s key id exists.<br> OperationId: `DistributorControllerRevokeKey`
1131
+ * @summary Revoke a distributor key
1132
+ * @param {string} id
1133
+ * @param {string} keyId
1134
+ * @param {*} [options] Override http request option.
1135
+ * @throws {RequiredError}
1136
+ */
1137
+ async distributorControllerRevokeKey(id, keyId, options) {
1138
+ const localVarAxiosArgs = await localVarAxiosParamCreator.distributorControllerRevokeKey(id, keyId, options);
1139
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1140
+ const localVarOperationServerBasePath = operationServerMap['DistributorApi.distributorControllerRevokeKey']?.[localVarOperationServerIndex]?.url;
1141
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1142
+ },
1143
+ /**
1144
+ * <br> OperationId: `DistributorControllerSearch`
1145
+ * @summary Search
1146
+ * @param {DistributorSearchInputDTO} [distributorSearchInputDTO] DistributorSearchInputDTO
1147
+ * @param {*} [options] Override http request option.
1148
+ * @throws {RequiredError}
1149
+ */
1150
+ async distributorControllerSearch(distributorSearchInputDTO, options) {
1151
+ const localVarAxiosArgs = await localVarAxiosParamCreator.distributorControllerSearch(distributorSearchInputDTO, options);
1152
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1153
+ const localVarOperationServerBasePath = operationServerMap['DistributorApi.distributorControllerSearch']?.[localVarOperationServerIndex]?.url;
1154
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1155
+ },
1156
+ /**
1157
+ * <br> OperationId: `DistributorControllerUpdate`
1158
+ * @summary Update
1159
+ * @param {string} id
1160
+ * @param {DistributorUpdateInputDTO} [distributorUpdateInputDTO] DistributorUpdateInputDTO
1161
+ * @param {*} [options] Override http request option.
1162
+ * @throws {RequiredError}
1163
+ */
1164
+ async distributorControllerUpdate(id, distributorUpdateInputDTO, options) {
1165
+ const localVarAxiosArgs = await localVarAxiosParamCreator.distributorControllerUpdate(id, distributorUpdateInputDTO, options);
1166
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1167
+ const localVarOperationServerBasePath = operationServerMap['DistributorApi.distributorControllerUpdate']?.[localVarOperationServerIndex]?.url;
1168
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1169
+ },
1170
+ };
1171
+ };
1172
+ /**
1173
+ * DistributorApi - factory interface
1174
+ * @export
1175
+ */
1176
+ export const DistributorApiFactory = function (configuration, basePath, axios) {
1177
+ const localVarFp = DistributorApiFp(configuration);
1178
+ return {
1179
+ /**
1180
+ * Attributes an existing domain to a distributor (ADR 0024 — attribution, never ownership) and creates the domain’s Distributor Service Account, the actor the distributor acts as inside the domain. Idempotent for the same distributor: a second attach returns the same service account id and writes nothing. Four refusals answer 400: the distributor is disabled; the domain still carries a subscription reference; the domain is already attributed to another distributor; the domain is DISABLED. A domain that still carries a subscription reference must be handed over in this order — cancel the subscription in Stripe, then clear the reference with PUT /domain/:id and \"externalReference\": null, then attach. Takaro never cancels a subscription implicitly. An unknown distributor id or domain id is a 404. No Plan is set here, and the domain keeps the limits it has.<br> OperationId: `DistributorControllerAttachDomain`
1181
+ * @summary Attach an existing domain to a distributor
1182
+ * @param {string} id
1183
+ * @param {string} domainId
1184
+ * @param {*} [options] Override http request option.
1185
+ * @throws {RequiredError}
1186
+ */
1187
+ distributorControllerAttachDomain(id, domainId, options) {
1188
+ return localVarFp
1189
+ .distributorControllerAttachDomain(id, domainId, options)
1190
+ .then((request) => request(axios, basePath));
1191
+ },
1192
+ /**
1193
+ * <br> OperationId: `DistributorControllerCreate`
1194
+ * @summary Create
1195
+ * @param {DistributorCreateInputDTO} [distributorCreateInputDTO] DistributorCreateInputDTO
1196
+ * @param {*} [options] Override http request option.
1197
+ * @throws {RequiredError}
1198
+ */
1199
+ distributorControllerCreate(distributorCreateInputDTO, options) {
1200
+ return localVarFp
1201
+ .distributorControllerCreate(distributorCreateInputDTO, options)
1202
+ .then((request) => request(axios, basePath));
1203
+ },
1204
+ /**
1205
+ * Mints a Distributor Key and returns the secret ONCE — only its hash is stored, so it cannot be shown again. This is how staff hand a distributor its first credential; afterwards the distributor creates its own keys through the self-service routes. Creating a key for a disabled distributor is a 400.<br> OperationId: `DistributorControllerCreateKey`
1206
+ * @summary Create a distributor key
1207
+ * @param {string} id
1208
+ * @param {DistributorKeyCreateInputDTO} [distributorKeyCreateInputDTO] DistributorKeyCreateInputDTO
1209
+ * @param {*} [options] Override http request option.
1210
+ * @throws {RequiredError}
1211
+ */
1212
+ distributorControllerCreateKey(id, distributorKeyCreateInputDTO, options) {
1213
+ return localVarFp
1214
+ .distributorControllerCreateKey(id, distributorKeyCreateInputDTO, options)
1215
+ .then((request) => request(axios, basePath));
1216
+ },
1217
+ /**
1218
+ * Clears the domain’s distributor attribution and its Plan reference, removes the domain’s Distributor Service Account, and leaves the domain on the self-service path. Both ids are taken so the domain’s distributor is explicit in the URL; a mismatched or unattributed pair is a 404 rather than confirming another distributor’s domain, which also makes a second detach a 404. The domain’s limits, users, roles, game servers and server registration token are left exactly as they are — app-api’s half of the hand-off is this state, and no Stripe object is created or cancelled here.<br> OperationId: `DistributorControllerDetachDomain`
1219
+ * @summary Detach a domain from a distributor
1220
+ * @param {string} id
1221
+ * @param {string} domainId
1222
+ * @param {*} [options] Override http request option.
1223
+ * @throws {RequiredError}
1224
+ */
1225
+ distributorControllerDetachDomain(id, domainId, options) {
1226
+ return localVarFp
1227
+ .distributorControllerDetachDomain(id, domainId, options)
1228
+ .then((request) => request(axios, basePath));
1229
+ },
1230
+ /**
1231
+ * Idempotent: disabling an already-disabled distributor succeeds and returns the unchanged row. There is no delete verb — a distributor is disabled so the attribution its domains carry stays resolvable.<br> OperationId: `DistributorControllerDisable`
1232
+ * @summary Disable a distributor
1233
+ * @param {string} id
1234
+ * @param {*} [options] Override http request option.
1235
+ * @throws {RequiredError}
1236
+ */
1237
+ distributorControllerDisable(id, options) {
1238
+ return localVarFp.distributorControllerDisable(id, options).then((request) => request(axios, basePath));
1239
+ },
1240
+ /**
1241
+ * Idempotent: enabling an already-enabled distributor succeeds and returns the unchanged row. Enabling is its own verb rather than a field on the update route, so there is exactly one way to flip the flag.<br> OperationId: `DistributorControllerEnable`
1242
+ * @summary Enable a distributor
1243
+ * @param {string} id
1244
+ * @param {*} [options] Override http request option.
1245
+ * @throws {RequiredError}
1246
+ */
1247
+ distributorControllerEnable(id, options) {
1248
+ return localVarFp.distributorControllerEnable(id, options).then((request) => request(axios, basePath));
1249
+ },
1250
+ /**
1251
+ * <br> OperationId: `DistributorControllerGetOne`
1252
+ * @summary Get one
1253
+ * @param {string} id
1254
+ * @param {*} [options] Override http request option.
1255
+ * @throws {RequiredError}
1256
+ */
1257
+ distributorControllerGetOne(id, options) {
1258
+ return localVarFp.distributorControllerGetOne(id, options).then((request) => request(axios, basePath));
1259
+ },
1260
+ /**
1261
+ * Idempotent: revoking an already-revoked key succeeds. Both ids are taken so the key’s distributor is explicit in the URL; a mismatched pair is a 404 rather than confirming another distributor’s key id exists.<br> OperationId: `DistributorControllerRevokeKey`
1262
+ * @summary Revoke a distributor key
1263
+ * @param {string} id
1264
+ * @param {string} keyId
1265
+ * @param {*} [options] Override http request option.
1266
+ * @throws {RequiredError}
1267
+ */
1268
+ distributorControllerRevokeKey(id, keyId, options) {
1269
+ return localVarFp.distributorControllerRevokeKey(id, keyId, options).then((request) => request(axios, basePath));
1270
+ },
1271
+ /**
1272
+ * <br> OperationId: `DistributorControllerSearch`
1273
+ * @summary Search
1274
+ * @param {DistributorSearchInputDTO} [distributorSearchInputDTO] DistributorSearchInputDTO
1275
+ * @param {*} [options] Override http request option.
1276
+ * @throws {RequiredError}
1277
+ */
1278
+ distributorControllerSearch(distributorSearchInputDTO, options) {
1279
+ return localVarFp
1280
+ .distributorControllerSearch(distributorSearchInputDTO, options)
1281
+ .then((request) => request(axios, basePath));
1282
+ },
1283
+ /**
1284
+ * <br> OperationId: `DistributorControllerUpdate`
1285
+ * @summary Update
1286
+ * @param {string} id
1287
+ * @param {DistributorUpdateInputDTO} [distributorUpdateInputDTO] DistributorUpdateInputDTO
1288
+ * @param {*} [options] Override http request option.
1289
+ * @throws {RequiredError}
1290
+ */
1291
+ distributorControllerUpdate(id, distributorUpdateInputDTO, options) {
1292
+ return localVarFp
1293
+ .distributorControllerUpdate(id, distributorUpdateInputDTO, options)
1294
+ .then((request) => request(axios, basePath));
1295
+ },
1296
+ };
1297
+ };
1298
+ /**
1299
+ * DistributorApi - object-oriented interface
1300
+ * @export
1301
+ * @class DistributorApi
1302
+ * @extends {BaseAPI}
1303
+ */
1304
+ export class DistributorApi extends BaseAPI {
1305
+ /**
1306
+ * Attributes an existing domain to a distributor (ADR 0024 — attribution, never ownership) and creates the domain’s Distributor Service Account, the actor the distributor acts as inside the domain. Idempotent for the same distributor: a second attach returns the same service account id and writes nothing. Four refusals answer 400: the distributor is disabled; the domain still carries a subscription reference; the domain is already attributed to another distributor; the domain is DISABLED. A domain that still carries a subscription reference must be handed over in this order — cancel the subscription in Stripe, then clear the reference with PUT /domain/:id and \"externalReference\": null, then attach. Takaro never cancels a subscription implicitly. An unknown distributor id or domain id is a 404. No Plan is set here, and the domain keeps the limits it has.<br> OperationId: `DistributorControllerAttachDomain`
1307
+ * @summary Attach an existing domain to a distributor
1308
+ * @param {string} id
1309
+ * @param {string} domainId
1310
+ * @param {*} [options] Override http request option.
1311
+ * @throws {RequiredError}
1312
+ * @memberof DistributorApi
1313
+ */
1314
+ distributorControllerAttachDomain(id, domainId, options) {
1315
+ return DistributorApiFp(this.configuration)
1316
+ .distributorControllerAttachDomain(id, domainId, options)
1317
+ .then((request) => request(this.axios, this.basePath));
1318
+ }
1319
+ /**
1320
+ * <br> OperationId: `DistributorControllerCreate`
1321
+ * @summary Create
1322
+ * @param {DistributorCreateInputDTO} [distributorCreateInputDTO] DistributorCreateInputDTO
1323
+ * @param {*} [options] Override http request option.
1324
+ * @throws {RequiredError}
1325
+ * @memberof DistributorApi
1326
+ */
1327
+ distributorControllerCreate(distributorCreateInputDTO, options) {
1328
+ return DistributorApiFp(this.configuration)
1329
+ .distributorControllerCreate(distributorCreateInputDTO, options)
1330
+ .then((request) => request(this.axios, this.basePath));
1331
+ }
1332
+ /**
1333
+ * Mints a Distributor Key and returns the secret ONCE — only its hash is stored, so it cannot be shown again. This is how staff hand a distributor its first credential; afterwards the distributor creates its own keys through the self-service routes. Creating a key for a disabled distributor is a 400.<br> OperationId: `DistributorControllerCreateKey`
1334
+ * @summary Create a distributor key
1335
+ * @param {string} id
1336
+ * @param {DistributorKeyCreateInputDTO} [distributorKeyCreateInputDTO] DistributorKeyCreateInputDTO
1337
+ * @param {*} [options] Override http request option.
1338
+ * @throws {RequiredError}
1339
+ * @memberof DistributorApi
1340
+ */
1341
+ distributorControllerCreateKey(id, distributorKeyCreateInputDTO, options) {
1342
+ return DistributorApiFp(this.configuration)
1343
+ .distributorControllerCreateKey(id, distributorKeyCreateInputDTO, options)
1344
+ .then((request) => request(this.axios, this.basePath));
1345
+ }
1346
+ /**
1347
+ * Clears the domain’s distributor attribution and its Plan reference, removes the domain’s Distributor Service Account, and leaves the domain on the self-service path. Both ids are taken so the domain’s distributor is explicit in the URL; a mismatched or unattributed pair is a 404 rather than confirming another distributor’s domain, which also makes a second detach a 404. The domain’s limits, users, roles, game servers and server registration token are left exactly as they are — app-api’s half of the hand-off is this state, and no Stripe object is created or cancelled here.<br> OperationId: `DistributorControllerDetachDomain`
1348
+ * @summary Detach a domain from a distributor
1349
+ * @param {string} id
1350
+ * @param {string} domainId
1351
+ * @param {*} [options] Override http request option.
1352
+ * @throws {RequiredError}
1353
+ * @memberof DistributorApi
1354
+ */
1355
+ distributorControllerDetachDomain(id, domainId, options) {
1356
+ return DistributorApiFp(this.configuration)
1357
+ .distributorControllerDetachDomain(id, domainId, options)
1358
+ .then((request) => request(this.axios, this.basePath));
1359
+ }
1360
+ /**
1361
+ * Idempotent: disabling an already-disabled distributor succeeds and returns the unchanged row. There is no delete verb — a distributor is disabled so the attribution its domains carry stays resolvable.<br> OperationId: `DistributorControllerDisable`
1362
+ * @summary Disable a distributor
1363
+ * @param {string} id
1364
+ * @param {*} [options] Override http request option.
1365
+ * @throws {RequiredError}
1366
+ * @memberof DistributorApi
1367
+ */
1368
+ distributorControllerDisable(id, options) {
1369
+ return DistributorApiFp(this.configuration)
1370
+ .distributorControllerDisable(id, options)
1371
+ .then((request) => request(this.axios, this.basePath));
1372
+ }
1373
+ /**
1374
+ * Idempotent: enabling an already-enabled distributor succeeds and returns the unchanged row. Enabling is its own verb rather than a field on the update route, so there is exactly one way to flip the flag.<br> OperationId: `DistributorControllerEnable`
1375
+ * @summary Enable a distributor
1376
+ * @param {string} id
1377
+ * @param {*} [options] Override http request option.
1378
+ * @throws {RequiredError}
1379
+ * @memberof DistributorApi
1380
+ */
1381
+ distributorControllerEnable(id, options) {
1382
+ return DistributorApiFp(this.configuration)
1383
+ .distributorControllerEnable(id, options)
1384
+ .then((request) => request(this.axios, this.basePath));
1385
+ }
1386
+ /**
1387
+ * <br> OperationId: `DistributorControllerGetOne`
1388
+ * @summary Get one
1389
+ * @param {string} id
1390
+ * @param {*} [options] Override http request option.
1391
+ * @throws {RequiredError}
1392
+ * @memberof DistributorApi
1393
+ */
1394
+ distributorControllerGetOne(id, options) {
1395
+ return DistributorApiFp(this.configuration)
1396
+ .distributorControllerGetOne(id, options)
1397
+ .then((request) => request(this.axios, this.basePath));
1398
+ }
1399
+ /**
1400
+ * Idempotent: revoking an already-revoked key succeeds. Both ids are taken so the key’s distributor is explicit in the URL; a mismatched pair is a 404 rather than confirming another distributor’s key id exists.<br> OperationId: `DistributorControllerRevokeKey`
1401
+ * @summary Revoke a distributor key
1402
+ * @param {string} id
1403
+ * @param {string} keyId
1404
+ * @param {*} [options] Override http request option.
1405
+ * @throws {RequiredError}
1406
+ * @memberof DistributorApi
1407
+ */
1408
+ distributorControllerRevokeKey(id, keyId, options) {
1409
+ return DistributorApiFp(this.configuration)
1410
+ .distributorControllerRevokeKey(id, keyId, options)
1411
+ .then((request) => request(this.axios, this.basePath));
1412
+ }
1413
+ /**
1414
+ * <br> OperationId: `DistributorControllerSearch`
1415
+ * @summary Search
1416
+ * @param {DistributorSearchInputDTO} [distributorSearchInputDTO] DistributorSearchInputDTO
1417
+ * @param {*} [options] Override http request option.
1418
+ * @throws {RequiredError}
1419
+ * @memberof DistributorApi
1420
+ */
1421
+ distributorControllerSearch(distributorSearchInputDTO, options) {
1422
+ return DistributorApiFp(this.configuration)
1423
+ .distributorControllerSearch(distributorSearchInputDTO, options)
1424
+ .then((request) => request(this.axios, this.basePath));
1425
+ }
1426
+ /**
1427
+ * <br> OperationId: `DistributorControllerUpdate`
1428
+ * @summary Update
1429
+ * @param {string} id
1430
+ * @param {DistributorUpdateInputDTO} [distributorUpdateInputDTO] DistributorUpdateInputDTO
1431
+ * @param {*} [options] Override http request option.
1432
+ * @throws {RequiredError}
1433
+ * @memberof DistributorApi
1434
+ */
1435
+ distributorControllerUpdate(id, distributorUpdateInputDTO, options) {
1436
+ return DistributorApiFp(this.configuration)
1437
+ .distributorControllerUpdate(id, distributorUpdateInputDTO, options)
1438
+ .then((request) => request(this.axios, this.basePath));
1439
+ }
1440
+ }
1441
+ /**
1442
+ * DistributorSelfServiceApi - axios parameter creator
1443
+ * @export
1444
+ */
1445
+ export const DistributorSelfServiceApiAxiosParamCreator = function (configuration) {
1446
+ return {
1447
+ /**
1448
+ * Creates a domain attributed to the calling distributor (ADR 0024 — attribution, never ownership). The response carries the domain and its `serverRegistrationToken`, so a provisioning script can inject the token into a game server without a second call. Limits come from the chosen Plan, applied by the billing reconciler within seconds; a domain created without a `planId` starts on the platform defaults. A Plan outside `allowedPlans` is refused with a 400. A Distributor Service Account holding the domain’s root role is created with the domain; every management verb on the domain is recorded in its event feed as that account.<br> OperationId: `DistributorSelfServiceControllerCreateDomain`
1449
+ * @summary Create a domain
1450
+ * @param {DistributorDomainCreateInputDTO} [distributorDomainCreateInputDTO] DistributorDomainCreateInputDTO
1451
+ * @param {*} [options] Override http request option.
1452
+ * @throws {RequiredError}
1453
+ */
1454
+ distributorSelfServiceControllerCreateDomain: async (distributorDomainCreateInputDTO, options = {}) => {
1455
+ const localVarPath = `/me/domain`;
1456
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1457
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1458
+ let baseOptions;
1459
+ if (configuration) {
1460
+ baseOptions = configuration.baseOptions;
1461
+ }
1462
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1463
+ const localVarHeaderParameter = {};
1464
+ const localVarQueryParameter = {};
1465
+ // authentication distributorAuth required
1466
+ // http bearer authentication required
1467
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
1468
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1469
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1470
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1471
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1472
+ localVarRequestOptions.data = serializeDataIfNeeded(distributorDomainCreateInputDTO, localVarRequestOptions, configuration);
1473
+ return {
1474
+ url: toPathString(localVarUrlObj),
1475
+ options: localVarRequestOptions,
1476
+ };
1477
+ },
1478
+ /**
1479
+ * Onboards the distributor’s customer into the domain. The `token` and `inviteUrl` fields are returned ONCE and are not stored on the server — distribute securely. The link grants the domain’s seeded `Admin` role, so the customer who redeems it operates their own domain; `roleIds` is deliberately not accepted. Defaults to 7 days and a single use. Attribution is the domain’s Distributor Service Account, so the event feed names the distributor.<br> OperationId: `DistributorSelfServiceControllerCreateInviteLink`
1480
+ * @summary Create an invite link for one of my domains
1481
+ * @param {string} id
1482
+ * @param {DistributorInviteLinkCreateInputDTO} [distributorInviteLinkCreateInputDTO] DistributorInviteLinkCreateInputDTO
1483
+ * @param {*} [options] Override http request option.
1484
+ * @throws {RequiredError}
1485
+ */
1486
+ distributorSelfServiceControllerCreateInviteLink: async (id, distributorInviteLinkCreateInputDTO, options = {}) => {
1487
+ // verify required parameter 'id' is not null or undefined
1488
+ assertParamExists('distributorSelfServiceControllerCreateInviteLink', 'id', id);
1489
+ const localVarPath = `/me/domain/{id}/invite-link`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
1490
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1491
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1492
+ let baseOptions;
1493
+ if (configuration) {
1494
+ baseOptions = configuration.baseOptions;
1495
+ }
1496
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1497
+ const localVarHeaderParameter = {};
1498
+ const localVarQueryParameter = {};
1499
+ // authentication distributorAuth required
1500
+ // http bearer authentication required
1501
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
1502
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1503
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1504
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1505
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1506
+ localVarRequestOptions.data = serializeDataIfNeeded(distributorInviteLinkCreateInputDTO, localVarRequestOptions, configuration);
1507
+ return {
1508
+ url: toPathString(localVarUrlObj),
1509
+ options: localVarRequestOptions,
1510
+ };
1511
+ },
1512
+ /**
1513
+ * Creates another key for the calling distributor and returns the secret ONCE. Requires a valid existing key: a distributor whose every key is revoked goes back to staff for a new one.<br> OperationId: `DistributorSelfServiceControllerCreateKey`
1514
+ * @summary Create a distributor key
1515
+ * @param {DistributorKeyCreateInputDTO} [distributorKeyCreateInputDTO] DistributorKeyCreateInputDTO
1516
+ * @param {*} [options] Override http request option.
1517
+ * @throws {RequiredError}
1518
+ */
1519
+ distributorSelfServiceControllerCreateKey: async (distributorKeyCreateInputDTO, options = {}) => {
1520
+ const localVarPath = `/me/key`;
1521
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1522
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1523
+ let baseOptions;
1524
+ if (configuration) {
1525
+ baseOptions = configuration.baseOptions;
1526
+ }
1527
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1528
+ const localVarHeaderParameter = {};
1529
+ const localVarQueryParameter = {};
1530
+ // authentication distributorAuth required
1531
+ // http bearer authentication required
1532
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
1533
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1534
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1535
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1536
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1537
+ localVarRequestOptions.data = serializeDataIfNeeded(distributorKeyCreateInputDTO, localVarRequestOptions, configuration);
1538
+ return {
1539
+ url: toPathString(localVarUrlObj),
1540
+ options: localVarRequestOptions,
1541
+ };
1542
+ },
1543
+ /**
1544
+ * Includes the domain’s `serverRegistrationToken`. Another distributor’s domain, an unattributed domain and an id that was never issued are all a 404 — never a 403, so existence does not leak.<br> OperationId: `DistributorSelfServiceControllerGetDomain`
1545
+ * @summary Get one of my domains
1546
+ * @param {string} id
1547
+ * @param {*} [options] Override http request option.
1548
+ * @throws {RequiredError}
1549
+ */
1550
+ distributorSelfServiceControllerGetDomain: async (id, options = {}) => {
1551
+ // verify required parameter 'id' is not null or undefined
1552
+ assertParamExists('distributorSelfServiceControllerGetDomain', 'id', id);
1553
+ const localVarPath = `/me/domain/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
1554
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1555
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1556
+ let baseOptions;
1557
+ if (configuration) {
1558
+ baseOptions = configuration.baseOptions;
1559
+ }
1560
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1561
+ const localVarHeaderParameter = {};
1562
+ const localVarQueryParameter = {};
1563
+ // authentication distributorAuth required
1564
+ // http bearer authentication required
1565
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
1566
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1567
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1568
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1569
+ return {
1570
+ url: toPathString(localVarUrlObj),
1571
+ options: localVarRequestOptions,
1572
+ };
1573
+ },
1574
+ /**
1575
+ * The distributor the presented Distributor Key belongs to — its own record, as staff see it.<br> OperationId: `DistributorSelfServiceControllerMe`
1576
+ * @summary Who am I
1577
+ * @param {*} [options] Override http request option.
1578
+ * @throws {RequiredError}
1579
+ */
1580
+ distributorSelfServiceControllerMe: async (options = {}) => {
1581
+ const localVarPath = `/me`;
1582
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1583
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1584
+ let baseOptions;
1585
+ if (configuration) {
1586
+ baseOptions = configuration.baseOptions;
1587
+ }
1588
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1589
+ const localVarHeaderParameter = {};
1590
+ const localVarQueryParameter = {};
1591
+ // authentication distributorAuth required
1592
+ // http bearer authentication required
1593
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
1594
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1595
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1596
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1597
+ return {
1598
+ url: toPathString(localVarUrlObj),
1599
+ options: localVarRequestOptions,
1600
+ };
1601
+ },
1602
+ /**
1603
+ * Replaces the domain’s server registration token and resets the connector connection of every GENERIC game server in it, so a leaked token cannot keep a server registered. The old token stops resolving immediately. A POST because it mints a new credential.<br> OperationId: `DistributorSelfServiceControllerRegenerateRegistrationToken`
1604
+ * @summary Regenerate a domain’s server registration token
1605
+ * @param {string} id
1606
+ * @param {*} [options] Override http request option.
1607
+ * @throws {RequiredError}
1608
+ */
1609
+ distributorSelfServiceControllerRegenerateRegistrationToken: async (id, options = {}) => {
1610
+ // verify required parameter 'id' is not null or undefined
1611
+ assertParamExists('distributorSelfServiceControllerRegenerateRegistrationToken', 'id', id);
1612
+ const localVarPath = `/me/domain/{id}/registration-token`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
1613
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1614
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1615
+ let baseOptions;
1616
+ if (configuration) {
1617
+ baseOptions = configuration.baseOptions;
1618
+ }
1619
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1620
+ const localVarHeaderParameter = {};
1621
+ const localVarQueryParameter = {};
1622
+ // authentication distributorAuth required
1623
+ // http bearer authentication required
1624
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
1625
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1626
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1627
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1628
+ return {
1629
+ url: toPathString(localVarUrlObj),
1630
+ options: localVarRequestOptions,
1631
+ };
1632
+ },
1633
+ /**
1634
+ * Idempotent. The key stays listed as REVOKED for 30 days and is then hard-deleted. Revoking the key you are currently presenting is allowed and takes effect on the next request; another distributor’s key is a 404.<br> OperationId: `DistributorSelfServiceControllerRevokeKey`
1635
+ * @summary Revoke a distributor key
1636
+ * @param {string} id
1637
+ * @param {*} [options] Override http request option.
1638
+ * @throws {RequiredError}
1639
+ */
1640
+ distributorSelfServiceControllerRevokeKey: async (id, options = {}) => {
1641
+ // verify required parameter 'id' is not null or undefined
1642
+ assertParamExists('distributorSelfServiceControllerRevokeKey', 'id', id);
1643
+ const localVarPath = `/me/key/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
1644
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1645
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1646
+ let baseOptions;
1647
+ if (configuration) {
1648
+ baseOptions = configuration.baseOptions;
1649
+ }
1650
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
1651
+ const localVarHeaderParameter = {};
1652
+ const localVarQueryParameter = {};
1653
+ // authentication distributorAuth required
1654
+ // http bearer authentication required
1655
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
1656
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1657
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1658
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1659
+ return {
1660
+ url: toPathString(localVarUrlObj),
1661
+ options: localVarRequestOptions,
1662
+ };
1663
+ },
1664
+ /**
1665
+ * Writes a new secret onto the same key row and returns it ONCE; the old secret stops working immediately. The key being rotated need not be the key presented — rotating without downtime means authenticating with one key while rotating another. A revoked key cannot be rotated (400); another distributor’s key is a 404.<br> OperationId: `DistributorSelfServiceControllerRotateKey`
1666
+ * @summary Rotate a distributor key
1667
+ * @param {string} id
1668
+ * @param {*} [options] Override http request option.
1669
+ * @throws {RequiredError}
1670
+ */
1671
+ distributorSelfServiceControllerRotateKey: async (id, options = {}) => {
1672
+ // verify required parameter 'id' is not null or undefined
1673
+ assertParamExists('distributorSelfServiceControllerRotateKey', 'id', id);
1674
+ const localVarPath = `/me/key/{id}/rotate`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
1675
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1676
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1677
+ let baseOptions;
1678
+ if (configuration) {
1679
+ baseOptions = configuration.baseOptions;
1680
+ }
1681
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1682
+ const localVarHeaderParameter = {};
1683
+ const localVarQueryParameter = {};
1684
+ // authentication distributorAuth required
1685
+ // http bearer authentication required
1686
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
1687
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1688
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1689
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1690
+ return {
1691
+ url: toPathString(localVarUrlObj),
1692
+ options: localVarRequestOptions,
1693
+ };
1694
+ },
1695
+ /**
1696
+ * Returns the domains attributed to the calling distributor, and only those. A `distributorId` filter is not offered: ownership is taken from the presented key, not from the body.<br> OperationId: `DistributorSelfServiceControllerSearchDomains`
1697
+ * @summary Search my domains
1698
+ * @param {DistributorDomainSearchInputDTO} [distributorDomainSearchInputDTO] DistributorDomainSearchInputDTO
1699
+ * @param {*} [options] Override http request option.
1700
+ * @throws {RequiredError}
1701
+ */
1702
+ distributorSelfServiceControllerSearchDomains: async (distributorDomainSearchInputDTO, options = {}) => {
1703
+ const localVarPath = `/me/domain/search`;
1704
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1705
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1706
+ let baseOptions;
1707
+ if (configuration) {
1708
+ baseOptions = configuration.baseOptions;
1709
+ }
1710
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1711
+ const localVarHeaderParameter = {};
1712
+ const localVarQueryParameter = {};
1713
+ // authentication distributorAuth required
1714
+ // http bearer authentication required
1715
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
1716
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1717
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1718
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1719
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1720
+ localVarRequestOptions.data = serializeDataIfNeeded(distributorDomainSearchInputDTO, localVarRequestOptions, configuration);
1721
+ return {
1722
+ url: toPathString(localVarUrlObj),
1723
+ options: localVarRequestOptions,
1724
+ };
1725
+ },
1726
+ /**
1727
+ * Returns the calling distributor’s own keys with prefix, suffix, created and last-used. Public fields only: never the secret or its hash.<br> OperationId: `DistributorSelfServiceControllerSearchKeys`
1728
+ * @summary Search my distributor keys
1729
+ * @param {DistributorKeySearchInputDTO} [distributorKeySearchInputDTO] DistributorKeySearchInputDTO
1730
+ * @param {*} [options] Override http request option.
1731
+ * @throws {RequiredError}
1732
+ */
1733
+ distributorSelfServiceControllerSearchKeys: async (distributorKeySearchInputDTO, options = {}) => {
1734
+ const localVarPath = `/me/key/search`;
1735
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1736
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1737
+ let baseOptions;
1738
+ if (configuration) {
1739
+ baseOptions = configuration.baseOptions;
1740
+ }
1741
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1742
+ const localVarHeaderParameter = {};
1743
+ const localVarQueryParameter = {};
1744
+ // authentication distributorAuth required
1745
+ // http bearer authentication required
1746
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
1747
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1748
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1749
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1750
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1751
+ localVarRequestOptions.data = serializeDataIfNeeded(distributorKeySearchInputDTO, localVarRequestOptions, configuration);
1752
+ return {
1753
+ url: toPathString(localVarUrlObj),
1754
+ options: localVarRequestOptions,
1755
+ };
1756
+ },
1757
+ /**
1758
+ * Moves the domain onto another of the Plans allowed for the calling distributor and enqueues the reconciliation that writes the Plan’s limits onto the domain, normally within seconds. Downgrading a customer who cancelled means moving the domain to the free Plan — it keeps running at free limits, and its state never changes. A Plan outside the allowed list is a 400; another distributor’s domain is a 404, never a 403. Idempotent: setting the Plan the domain is already on re-runs the reconciliation and writes nothing.<br> OperationId: `DistributorSelfServiceControllerSetDomainPlan`
1759
+ * @summary Change one of my domains’ Plan
1760
+ * @param {string} id
1761
+ * @param {DistributorDomainPlanInputDTO} [distributorDomainPlanInputDTO] DistributorDomainPlanInputDTO
1762
+ * @param {*} [options] Override http request option.
1763
+ * @throws {RequiredError}
1764
+ */
1765
+ distributorSelfServiceControllerSetDomainPlan: async (id, distributorDomainPlanInputDTO, options = {}) => {
1766
+ // verify required parameter 'id' is not null or undefined
1767
+ assertParamExists('distributorSelfServiceControllerSetDomainPlan', 'id', id);
1768
+ const localVarPath = `/me/domain/{id}/plan`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
1769
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1770
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1771
+ let baseOptions;
1772
+ if (configuration) {
1773
+ baseOptions = configuration.baseOptions;
1774
+ }
1775
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options };
1776
+ const localVarHeaderParameter = {};
1777
+ const localVarQueryParameter = {};
1778
+ // authentication distributorAuth required
1779
+ // http bearer authentication required
1780
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
1781
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1782
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1783
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1784
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1785
+ localVarRequestOptions.data = serializeDataIfNeeded(distributorDomainPlanInputDTO, localVarRequestOptions, configuration);
1786
+ return {
1787
+ url: toPathString(localVarUrlObj),
1788
+ options: localVarRequestOptions,
1789
+ };
1790
+ },
1791
+ };
1792
+ };
1793
+ /**
1794
+ * DistributorSelfServiceApi - functional programming interface
1795
+ * @export
1796
+ */
1797
+ export const DistributorSelfServiceApiFp = function (configuration) {
1798
+ const localVarAxiosParamCreator = DistributorSelfServiceApiAxiosParamCreator(configuration);
1799
+ return {
1800
+ /**
1801
+ * Creates a domain attributed to the calling distributor (ADR 0024 — attribution, never ownership). The response carries the domain and its `serverRegistrationToken`, so a provisioning script can inject the token into a game server without a second call. Limits come from the chosen Plan, applied by the billing reconciler within seconds; a domain created without a `planId` starts on the platform defaults. A Plan outside `allowedPlans` is refused with a 400. A Distributor Service Account holding the domain’s root role is created with the domain; every management verb on the domain is recorded in its event feed as that account.<br> OperationId: `DistributorSelfServiceControllerCreateDomain`
1802
+ * @summary Create a domain
1803
+ * @param {DistributorDomainCreateInputDTO} [distributorDomainCreateInputDTO] DistributorDomainCreateInputDTO
1804
+ * @param {*} [options] Override http request option.
1805
+ * @throws {RequiredError}
1806
+ */
1807
+ async distributorSelfServiceControllerCreateDomain(distributorDomainCreateInputDTO, options) {
1808
+ const localVarAxiosArgs = await localVarAxiosParamCreator.distributorSelfServiceControllerCreateDomain(distributorDomainCreateInputDTO, options);
1809
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1810
+ const localVarOperationServerBasePath = operationServerMap['DistributorSelfServiceApi.distributorSelfServiceControllerCreateDomain']?.[localVarOperationServerIndex]?.url;
1811
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1812
+ },
1813
+ /**
1814
+ * Onboards the distributor’s customer into the domain. The `token` and `inviteUrl` fields are returned ONCE and are not stored on the server — distribute securely. The link grants the domain’s seeded `Admin` role, so the customer who redeems it operates their own domain; `roleIds` is deliberately not accepted. Defaults to 7 days and a single use. Attribution is the domain’s Distributor Service Account, so the event feed names the distributor.<br> OperationId: `DistributorSelfServiceControllerCreateInviteLink`
1815
+ * @summary Create an invite link for one of my domains
1816
+ * @param {string} id
1817
+ * @param {DistributorInviteLinkCreateInputDTO} [distributorInviteLinkCreateInputDTO] DistributorInviteLinkCreateInputDTO
1818
+ * @param {*} [options] Override http request option.
1819
+ * @throws {RequiredError}
1820
+ */
1821
+ async distributorSelfServiceControllerCreateInviteLink(id, distributorInviteLinkCreateInputDTO, options) {
1822
+ const localVarAxiosArgs = await localVarAxiosParamCreator.distributorSelfServiceControllerCreateInviteLink(id, distributorInviteLinkCreateInputDTO, options);
1823
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1824
+ const localVarOperationServerBasePath = operationServerMap['DistributorSelfServiceApi.distributorSelfServiceControllerCreateInviteLink']?.[localVarOperationServerIndex]?.url;
1825
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1826
+ },
1827
+ /**
1828
+ * Creates another key for the calling distributor and returns the secret ONCE. Requires a valid existing key: a distributor whose every key is revoked goes back to staff for a new one.<br> OperationId: `DistributorSelfServiceControllerCreateKey`
1829
+ * @summary Create a distributor key
1830
+ * @param {DistributorKeyCreateInputDTO} [distributorKeyCreateInputDTO] DistributorKeyCreateInputDTO
1831
+ * @param {*} [options] Override http request option.
1832
+ * @throws {RequiredError}
1833
+ */
1834
+ async distributorSelfServiceControllerCreateKey(distributorKeyCreateInputDTO, options) {
1835
+ const localVarAxiosArgs = await localVarAxiosParamCreator.distributorSelfServiceControllerCreateKey(distributorKeyCreateInputDTO, options);
1836
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1837
+ const localVarOperationServerBasePath = operationServerMap['DistributorSelfServiceApi.distributorSelfServiceControllerCreateKey']?.[localVarOperationServerIndex]?.url;
1838
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1839
+ },
1840
+ /**
1841
+ * Includes the domain’s `serverRegistrationToken`. Another distributor’s domain, an unattributed domain and an id that was never issued are all a 404 — never a 403, so existence does not leak.<br> OperationId: `DistributorSelfServiceControllerGetDomain`
1842
+ * @summary Get one of my domains
1843
+ * @param {string} id
1844
+ * @param {*} [options] Override http request option.
1845
+ * @throws {RequiredError}
1846
+ */
1847
+ async distributorSelfServiceControllerGetDomain(id, options) {
1848
+ const localVarAxiosArgs = await localVarAxiosParamCreator.distributorSelfServiceControllerGetDomain(id, options);
1849
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1850
+ const localVarOperationServerBasePath = operationServerMap['DistributorSelfServiceApi.distributorSelfServiceControllerGetDomain']?.[localVarOperationServerIndex]?.url;
1851
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1852
+ },
1853
+ /**
1854
+ * The distributor the presented Distributor Key belongs to — its own record, as staff see it.<br> OperationId: `DistributorSelfServiceControllerMe`
1855
+ * @summary Who am I
1856
+ * @param {*} [options] Override http request option.
1857
+ * @throws {RequiredError}
1858
+ */
1859
+ async distributorSelfServiceControllerMe(options) {
1860
+ const localVarAxiosArgs = await localVarAxiosParamCreator.distributorSelfServiceControllerMe(options);
1861
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1862
+ const localVarOperationServerBasePath = operationServerMap['DistributorSelfServiceApi.distributorSelfServiceControllerMe']?.[localVarOperationServerIndex]?.url;
1863
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1864
+ },
1865
+ /**
1866
+ * Replaces the domain’s server registration token and resets the connector connection of every GENERIC game server in it, so a leaked token cannot keep a server registered. The old token stops resolving immediately. A POST because it mints a new credential.<br> OperationId: `DistributorSelfServiceControllerRegenerateRegistrationToken`
1867
+ * @summary Regenerate a domain’s server registration token
1868
+ * @param {string} id
1869
+ * @param {*} [options] Override http request option.
1870
+ * @throws {RequiredError}
1871
+ */
1872
+ async distributorSelfServiceControllerRegenerateRegistrationToken(id, options) {
1873
+ const localVarAxiosArgs = await localVarAxiosParamCreator.distributorSelfServiceControllerRegenerateRegistrationToken(id, options);
1874
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1875
+ const localVarOperationServerBasePath = operationServerMap['DistributorSelfServiceApi.distributorSelfServiceControllerRegenerateRegistrationToken']?.[localVarOperationServerIndex]?.url;
1876
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1877
+ },
1878
+ /**
1879
+ * Idempotent. The key stays listed as REVOKED for 30 days and is then hard-deleted. Revoking the key you are currently presenting is allowed and takes effect on the next request; another distributor’s key is a 404.<br> OperationId: `DistributorSelfServiceControllerRevokeKey`
1880
+ * @summary Revoke a distributor key
1881
+ * @param {string} id
1882
+ * @param {*} [options] Override http request option.
1883
+ * @throws {RequiredError}
1884
+ */
1885
+ async distributorSelfServiceControllerRevokeKey(id, options) {
1886
+ const localVarAxiosArgs = await localVarAxiosParamCreator.distributorSelfServiceControllerRevokeKey(id, options);
1887
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1888
+ const localVarOperationServerBasePath = operationServerMap['DistributorSelfServiceApi.distributorSelfServiceControllerRevokeKey']?.[localVarOperationServerIndex]?.url;
1889
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1890
+ },
1891
+ /**
1892
+ * Writes a new secret onto the same key row and returns it ONCE; the old secret stops working immediately. The key being rotated need not be the key presented — rotating without downtime means authenticating with one key while rotating another. A revoked key cannot be rotated (400); another distributor’s key is a 404.<br> OperationId: `DistributorSelfServiceControllerRotateKey`
1893
+ * @summary Rotate a distributor key
1894
+ * @param {string} id
1895
+ * @param {*} [options] Override http request option.
1896
+ * @throws {RequiredError}
1897
+ */
1898
+ async distributorSelfServiceControllerRotateKey(id, options) {
1899
+ const localVarAxiosArgs = await localVarAxiosParamCreator.distributorSelfServiceControllerRotateKey(id, options);
1900
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1901
+ const localVarOperationServerBasePath = operationServerMap['DistributorSelfServiceApi.distributorSelfServiceControllerRotateKey']?.[localVarOperationServerIndex]?.url;
1902
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1903
+ },
1904
+ /**
1905
+ * Returns the domains attributed to the calling distributor, and only those. A `distributorId` filter is not offered: ownership is taken from the presented key, not from the body.<br> OperationId: `DistributorSelfServiceControllerSearchDomains`
1906
+ * @summary Search my domains
1907
+ * @param {DistributorDomainSearchInputDTO} [distributorDomainSearchInputDTO] DistributorDomainSearchInputDTO
1908
+ * @param {*} [options] Override http request option.
1909
+ * @throws {RequiredError}
1910
+ */
1911
+ async distributorSelfServiceControllerSearchDomains(distributorDomainSearchInputDTO, options) {
1912
+ const localVarAxiosArgs = await localVarAxiosParamCreator.distributorSelfServiceControllerSearchDomains(distributorDomainSearchInputDTO, options);
1913
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1914
+ const localVarOperationServerBasePath = operationServerMap['DistributorSelfServiceApi.distributorSelfServiceControllerSearchDomains']?.[localVarOperationServerIndex]?.url;
1915
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1916
+ },
1917
+ /**
1918
+ * Returns the calling distributor’s own keys with prefix, suffix, created and last-used. Public fields only: never the secret or its hash.<br> OperationId: `DistributorSelfServiceControllerSearchKeys`
1919
+ * @summary Search my distributor keys
1920
+ * @param {DistributorKeySearchInputDTO} [distributorKeySearchInputDTO] DistributorKeySearchInputDTO
1921
+ * @param {*} [options] Override http request option.
1922
+ * @throws {RequiredError}
1923
+ */
1924
+ async distributorSelfServiceControllerSearchKeys(distributorKeySearchInputDTO, options) {
1925
+ const localVarAxiosArgs = await localVarAxiosParamCreator.distributorSelfServiceControllerSearchKeys(distributorKeySearchInputDTO, options);
1926
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1927
+ const localVarOperationServerBasePath = operationServerMap['DistributorSelfServiceApi.distributorSelfServiceControllerSearchKeys']?.[localVarOperationServerIndex]?.url;
1928
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1929
+ },
1930
+ /**
1931
+ * Moves the domain onto another of the Plans allowed for the calling distributor and enqueues the reconciliation that writes the Plan’s limits onto the domain, normally within seconds. Downgrading a customer who cancelled means moving the domain to the free Plan — it keeps running at free limits, and its state never changes. A Plan outside the allowed list is a 400; another distributor’s domain is a 404, never a 403. Idempotent: setting the Plan the domain is already on re-runs the reconciliation and writes nothing.<br> OperationId: `DistributorSelfServiceControllerSetDomainPlan`
1932
+ * @summary Change one of my domains’ Plan
1933
+ * @param {string} id
1934
+ * @param {DistributorDomainPlanInputDTO} [distributorDomainPlanInputDTO] DistributorDomainPlanInputDTO
1935
+ * @param {*} [options] Override http request option.
1936
+ * @throws {RequiredError}
1937
+ */
1938
+ async distributorSelfServiceControllerSetDomainPlan(id, distributorDomainPlanInputDTO, options) {
1939
+ const localVarAxiosArgs = await localVarAxiosParamCreator.distributorSelfServiceControllerSetDomainPlan(id, distributorDomainPlanInputDTO, options);
1940
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1941
+ const localVarOperationServerBasePath = operationServerMap['DistributorSelfServiceApi.distributorSelfServiceControllerSetDomainPlan']?.[localVarOperationServerIndex]?.url;
1942
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1943
+ },
1944
+ };
1945
+ };
1946
+ /**
1947
+ * DistributorSelfServiceApi - factory interface
1948
+ * @export
1949
+ */
1950
+ export const DistributorSelfServiceApiFactory = function (configuration, basePath, axios) {
1951
+ const localVarFp = DistributorSelfServiceApiFp(configuration);
1952
+ return {
1953
+ /**
1954
+ * Creates a domain attributed to the calling distributor (ADR 0024 — attribution, never ownership). The response carries the domain and its `serverRegistrationToken`, so a provisioning script can inject the token into a game server without a second call. Limits come from the chosen Plan, applied by the billing reconciler within seconds; a domain created without a `planId` starts on the platform defaults. A Plan outside `allowedPlans` is refused with a 400. A Distributor Service Account holding the domain’s root role is created with the domain; every management verb on the domain is recorded in its event feed as that account.<br> OperationId: `DistributorSelfServiceControllerCreateDomain`
1955
+ * @summary Create a domain
1956
+ * @param {DistributorDomainCreateInputDTO} [distributorDomainCreateInputDTO] DistributorDomainCreateInputDTO
1957
+ * @param {*} [options] Override http request option.
1958
+ * @throws {RequiredError}
1959
+ */
1960
+ distributorSelfServiceControllerCreateDomain(distributorDomainCreateInputDTO, options) {
1961
+ return localVarFp
1962
+ .distributorSelfServiceControllerCreateDomain(distributorDomainCreateInputDTO, options)
1963
+ .then((request) => request(axios, basePath));
1964
+ },
1965
+ /**
1966
+ * Onboards the distributor’s customer into the domain. The `token` and `inviteUrl` fields are returned ONCE and are not stored on the server — distribute securely. The link grants the domain’s seeded `Admin` role, so the customer who redeems it operates their own domain; `roleIds` is deliberately not accepted. Defaults to 7 days and a single use. Attribution is the domain’s Distributor Service Account, so the event feed names the distributor.<br> OperationId: `DistributorSelfServiceControllerCreateInviteLink`
1967
+ * @summary Create an invite link for one of my domains
1968
+ * @param {string} id
1969
+ * @param {DistributorInviteLinkCreateInputDTO} [distributorInviteLinkCreateInputDTO] DistributorInviteLinkCreateInputDTO
1970
+ * @param {*} [options] Override http request option.
1971
+ * @throws {RequiredError}
1972
+ */
1973
+ distributorSelfServiceControllerCreateInviteLink(id, distributorInviteLinkCreateInputDTO, options) {
1974
+ return localVarFp
1975
+ .distributorSelfServiceControllerCreateInviteLink(id, distributorInviteLinkCreateInputDTO, options)
1976
+ .then((request) => request(axios, basePath));
1977
+ },
1978
+ /**
1979
+ * Creates another key for the calling distributor and returns the secret ONCE. Requires a valid existing key: a distributor whose every key is revoked goes back to staff for a new one.<br> OperationId: `DistributorSelfServiceControllerCreateKey`
1980
+ * @summary Create a distributor key
1981
+ * @param {DistributorKeyCreateInputDTO} [distributorKeyCreateInputDTO] DistributorKeyCreateInputDTO
1982
+ * @param {*} [options] Override http request option.
1983
+ * @throws {RequiredError}
1984
+ */
1985
+ distributorSelfServiceControllerCreateKey(distributorKeyCreateInputDTO, options) {
1986
+ return localVarFp
1987
+ .distributorSelfServiceControllerCreateKey(distributorKeyCreateInputDTO, options)
1988
+ .then((request) => request(axios, basePath));
1989
+ },
1990
+ /**
1991
+ * Includes the domain’s `serverRegistrationToken`. Another distributor’s domain, an unattributed domain and an id that was never issued are all a 404 — never a 403, so existence does not leak.<br> OperationId: `DistributorSelfServiceControllerGetDomain`
1992
+ * @summary Get one of my domains
1993
+ * @param {string} id
1994
+ * @param {*} [options] Override http request option.
1995
+ * @throws {RequiredError}
1996
+ */
1997
+ distributorSelfServiceControllerGetDomain(id, options) {
1998
+ return localVarFp
1999
+ .distributorSelfServiceControllerGetDomain(id, options)
2000
+ .then((request) => request(axios, basePath));
2001
+ },
2002
+ /**
2003
+ * The distributor the presented Distributor Key belongs to — its own record, as staff see it.<br> OperationId: `DistributorSelfServiceControllerMe`
2004
+ * @summary Who am I
2005
+ * @param {*} [options] Override http request option.
2006
+ * @throws {RequiredError}
2007
+ */
2008
+ distributorSelfServiceControllerMe(options) {
2009
+ return localVarFp.distributorSelfServiceControllerMe(options).then((request) => request(axios, basePath));
2010
+ },
2011
+ /**
2012
+ * Replaces the domain’s server registration token and resets the connector connection of every GENERIC game server in it, so a leaked token cannot keep a server registered. The old token stops resolving immediately. A POST because it mints a new credential.<br> OperationId: `DistributorSelfServiceControllerRegenerateRegistrationToken`
2013
+ * @summary Regenerate a domain’s server registration token
2014
+ * @param {string} id
2015
+ * @param {*} [options] Override http request option.
2016
+ * @throws {RequiredError}
2017
+ */
2018
+ distributorSelfServiceControllerRegenerateRegistrationToken(id, options) {
2019
+ return localVarFp
2020
+ .distributorSelfServiceControllerRegenerateRegistrationToken(id, options)
2021
+ .then((request) => request(axios, basePath));
2022
+ },
2023
+ /**
2024
+ * Idempotent. The key stays listed as REVOKED for 30 days and is then hard-deleted. Revoking the key you are currently presenting is allowed and takes effect on the next request; another distributor’s key is a 404.<br> OperationId: `DistributorSelfServiceControllerRevokeKey`
2025
+ * @summary Revoke a distributor key
2026
+ * @param {string} id
2027
+ * @param {*} [options] Override http request option.
2028
+ * @throws {RequiredError}
2029
+ */
2030
+ distributorSelfServiceControllerRevokeKey(id, options) {
2031
+ return localVarFp
2032
+ .distributorSelfServiceControllerRevokeKey(id, options)
2033
+ .then((request) => request(axios, basePath));
2034
+ },
2035
+ /**
2036
+ * Writes a new secret onto the same key row and returns it ONCE; the old secret stops working immediately. The key being rotated need not be the key presented — rotating without downtime means authenticating with one key while rotating another. A revoked key cannot be rotated (400); another distributor’s key is a 404.<br> OperationId: `DistributorSelfServiceControllerRotateKey`
2037
+ * @summary Rotate a distributor key
2038
+ * @param {string} id
2039
+ * @param {*} [options] Override http request option.
2040
+ * @throws {RequiredError}
2041
+ */
2042
+ distributorSelfServiceControllerRotateKey(id, options) {
2043
+ return localVarFp
2044
+ .distributorSelfServiceControllerRotateKey(id, options)
2045
+ .then((request) => request(axios, basePath));
2046
+ },
2047
+ /**
2048
+ * Returns the domains attributed to the calling distributor, and only those. A `distributorId` filter is not offered: ownership is taken from the presented key, not from the body.<br> OperationId: `DistributorSelfServiceControllerSearchDomains`
2049
+ * @summary Search my domains
2050
+ * @param {DistributorDomainSearchInputDTO} [distributorDomainSearchInputDTO] DistributorDomainSearchInputDTO
2051
+ * @param {*} [options] Override http request option.
2052
+ * @throws {RequiredError}
2053
+ */
2054
+ distributorSelfServiceControllerSearchDomains(distributorDomainSearchInputDTO, options) {
2055
+ return localVarFp
2056
+ .distributorSelfServiceControllerSearchDomains(distributorDomainSearchInputDTO, options)
2057
+ .then((request) => request(axios, basePath));
2058
+ },
2059
+ /**
2060
+ * Returns the calling distributor’s own keys with prefix, suffix, created and last-used. Public fields only: never the secret or its hash.<br> OperationId: `DistributorSelfServiceControllerSearchKeys`
2061
+ * @summary Search my distributor keys
2062
+ * @param {DistributorKeySearchInputDTO} [distributorKeySearchInputDTO] DistributorKeySearchInputDTO
2063
+ * @param {*} [options] Override http request option.
2064
+ * @throws {RequiredError}
2065
+ */
2066
+ distributorSelfServiceControllerSearchKeys(distributorKeySearchInputDTO, options) {
2067
+ return localVarFp
2068
+ .distributorSelfServiceControllerSearchKeys(distributorKeySearchInputDTO, options)
2069
+ .then((request) => request(axios, basePath));
2070
+ },
2071
+ /**
2072
+ * Moves the domain onto another of the Plans allowed for the calling distributor and enqueues the reconciliation that writes the Plan’s limits onto the domain, normally within seconds. Downgrading a customer who cancelled means moving the domain to the free Plan — it keeps running at free limits, and its state never changes. A Plan outside the allowed list is a 400; another distributor’s domain is a 404, never a 403. Idempotent: setting the Plan the domain is already on re-runs the reconciliation and writes nothing.<br> OperationId: `DistributorSelfServiceControllerSetDomainPlan`
2073
+ * @summary Change one of my domains’ Plan
2074
+ * @param {string} id
2075
+ * @param {DistributorDomainPlanInputDTO} [distributorDomainPlanInputDTO] DistributorDomainPlanInputDTO
2076
+ * @param {*} [options] Override http request option.
2077
+ * @throws {RequiredError}
2078
+ */
2079
+ distributorSelfServiceControllerSetDomainPlan(id, distributorDomainPlanInputDTO, options) {
2080
+ return localVarFp
2081
+ .distributorSelfServiceControllerSetDomainPlan(id, distributorDomainPlanInputDTO, options)
2082
+ .then((request) => request(axios, basePath));
2083
+ },
2084
+ };
2085
+ };
2086
+ /**
2087
+ * DistributorSelfServiceApi - object-oriented interface
2088
+ * @export
2089
+ * @class DistributorSelfServiceApi
2090
+ * @extends {BaseAPI}
2091
+ */
2092
+ export class DistributorSelfServiceApi extends BaseAPI {
2093
+ /**
2094
+ * Creates a domain attributed to the calling distributor (ADR 0024 — attribution, never ownership). The response carries the domain and its `serverRegistrationToken`, so a provisioning script can inject the token into a game server without a second call. Limits come from the chosen Plan, applied by the billing reconciler within seconds; a domain created without a `planId` starts on the platform defaults. A Plan outside `allowedPlans` is refused with a 400. A Distributor Service Account holding the domain’s root role is created with the domain; every management verb on the domain is recorded in its event feed as that account.<br> OperationId: `DistributorSelfServiceControllerCreateDomain`
2095
+ * @summary Create a domain
2096
+ * @param {DistributorDomainCreateInputDTO} [distributorDomainCreateInputDTO] DistributorDomainCreateInputDTO
2097
+ * @param {*} [options] Override http request option.
2098
+ * @throws {RequiredError}
2099
+ * @memberof DistributorSelfServiceApi
2100
+ */
2101
+ distributorSelfServiceControllerCreateDomain(distributorDomainCreateInputDTO, options) {
2102
+ return DistributorSelfServiceApiFp(this.configuration)
2103
+ .distributorSelfServiceControllerCreateDomain(distributorDomainCreateInputDTO, options)
2104
+ .then((request) => request(this.axios, this.basePath));
2105
+ }
2106
+ /**
2107
+ * Onboards the distributor’s customer into the domain. The `token` and `inviteUrl` fields are returned ONCE and are not stored on the server — distribute securely. The link grants the domain’s seeded `Admin` role, so the customer who redeems it operates their own domain; `roleIds` is deliberately not accepted. Defaults to 7 days and a single use. Attribution is the domain’s Distributor Service Account, so the event feed names the distributor.<br> OperationId: `DistributorSelfServiceControllerCreateInviteLink`
2108
+ * @summary Create an invite link for one of my domains
2109
+ * @param {string} id
2110
+ * @param {DistributorInviteLinkCreateInputDTO} [distributorInviteLinkCreateInputDTO] DistributorInviteLinkCreateInputDTO
2111
+ * @param {*} [options] Override http request option.
2112
+ * @throws {RequiredError}
2113
+ * @memberof DistributorSelfServiceApi
2114
+ */
2115
+ distributorSelfServiceControllerCreateInviteLink(id, distributorInviteLinkCreateInputDTO, options) {
2116
+ return DistributorSelfServiceApiFp(this.configuration)
2117
+ .distributorSelfServiceControllerCreateInviteLink(id, distributorInviteLinkCreateInputDTO, options)
2118
+ .then((request) => request(this.axios, this.basePath));
2119
+ }
2120
+ /**
2121
+ * Creates another key for the calling distributor and returns the secret ONCE. Requires a valid existing key: a distributor whose every key is revoked goes back to staff for a new one.<br> OperationId: `DistributorSelfServiceControllerCreateKey`
2122
+ * @summary Create a distributor key
2123
+ * @param {DistributorKeyCreateInputDTO} [distributorKeyCreateInputDTO] DistributorKeyCreateInputDTO
2124
+ * @param {*} [options] Override http request option.
2125
+ * @throws {RequiredError}
2126
+ * @memberof DistributorSelfServiceApi
2127
+ */
2128
+ distributorSelfServiceControllerCreateKey(distributorKeyCreateInputDTO, options) {
2129
+ return DistributorSelfServiceApiFp(this.configuration)
2130
+ .distributorSelfServiceControllerCreateKey(distributorKeyCreateInputDTO, options)
2131
+ .then((request) => request(this.axios, this.basePath));
2132
+ }
2133
+ /**
2134
+ * Includes the domain’s `serverRegistrationToken`. Another distributor’s domain, an unattributed domain and an id that was never issued are all a 404 — never a 403, so existence does not leak.<br> OperationId: `DistributorSelfServiceControllerGetDomain`
2135
+ * @summary Get one of my domains
2136
+ * @param {string} id
2137
+ * @param {*} [options] Override http request option.
2138
+ * @throws {RequiredError}
2139
+ * @memberof DistributorSelfServiceApi
2140
+ */
2141
+ distributorSelfServiceControllerGetDomain(id, options) {
2142
+ return DistributorSelfServiceApiFp(this.configuration)
2143
+ .distributorSelfServiceControllerGetDomain(id, options)
2144
+ .then((request) => request(this.axios, this.basePath));
2145
+ }
2146
+ /**
2147
+ * The distributor the presented Distributor Key belongs to — its own record, as staff see it.<br> OperationId: `DistributorSelfServiceControllerMe`
2148
+ * @summary Who am I
2149
+ * @param {*} [options] Override http request option.
2150
+ * @throws {RequiredError}
2151
+ * @memberof DistributorSelfServiceApi
2152
+ */
2153
+ distributorSelfServiceControllerMe(options) {
2154
+ return DistributorSelfServiceApiFp(this.configuration)
2155
+ .distributorSelfServiceControllerMe(options)
2156
+ .then((request) => request(this.axios, this.basePath));
2157
+ }
2158
+ /**
2159
+ * Replaces the domain’s server registration token and resets the connector connection of every GENERIC game server in it, so a leaked token cannot keep a server registered. The old token stops resolving immediately. A POST because it mints a new credential.<br> OperationId: `DistributorSelfServiceControllerRegenerateRegistrationToken`
2160
+ * @summary Regenerate a domain’s server registration token
2161
+ * @param {string} id
2162
+ * @param {*} [options] Override http request option.
2163
+ * @throws {RequiredError}
2164
+ * @memberof DistributorSelfServiceApi
2165
+ */
2166
+ distributorSelfServiceControllerRegenerateRegistrationToken(id, options) {
2167
+ return DistributorSelfServiceApiFp(this.configuration)
2168
+ .distributorSelfServiceControllerRegenerateRegistrationToken(id, options)
2169
+ .then((request) => request(this.axios, this.basePath));
2170
+ }
2171
+ /**
2172
+ * Idempotent. The key stays listed as REVOKED for 30 days and is then hard-deleted. Revoking the key you are currently presenting is allowed and takes effect on the next request; another distributor’s key is a 404.<br> OperationId: `DistributorSelfServiceControllerRevokeKey`
2173
+ * @summary Revoke a distributor key
2174
+ * @param {string} id
2175
+ * @param {*} [options] Override http request option.
2176
+ * @throws {RequiredError}
2177
+ * @memberof DistributorSelfServiceApi
2178
+ */
2179
+ distributorSelfServiceControllerRevokeKey(id, options) {
2180
+ return DistributorSelfServiceApiFp(this.configuration)
2181
+ .distributorSelfServiceControllerRevokeKey(id, options)
2182
+ .then((request) => request(this.axios, this.basePath));
2183
+ }
2184
+ /**
2185
+ * Writes a new secret onto the same key row and returns it ONCE; the old secret stops working immediately. The key being rotated need not be the key presented — rotating without downtime means authenticating with one key while rotating another. A revoked key cannot be rotated (400); another distributor’s key is a 404.<br> OperationId: `DistributorSelfServiceControllerRotateKey`
2186
+ * @summary Rotate a distributor key
2187
+ * @param {string} id
2188
+ * @param {*} [options] Override http request option.
2189
+ * @throws {RequiredError}
2190
+ * @memberof DistributorSelfServiceApi
2191
+ */
2192
+ distributorSelfServiceControllerRotateKey(id, options) {
2193
+ return DistributorSelfServiceApiFp(this.configuration)
2194
+ .distributorSelfServiceControllerRotateKey(id, options)
2195
+ .then((request) => request(this.axios, this.basePath));
2196
+ }
2197
+ /**
2198
+ * Returns the domains attributed to the calling distributor, and only those. A `distributorId` filter is not offered: ownership is taken from the presented key, not from the body.<br> OperationId: `DistributorSelfServiceControllerSearchDomains`
2199
+ * @summary Search my domains
2200
+ * @param {DistributorDomainSearchInputDTO} [distributorDomainSearchInputDTO] DistributorDomainSearchInputDTO
2201
+ * @param {*} [options] Override http request option.
2202
+ * @throws {RequiredError}
2203
+ * @memberof DistributorSelfServiceApi
2204
+ */
2205
+ distributorSelfServiceControllerSearchDomains(distributorDomainSearchInputDTO, options) {
2206
+ return DistributorSelfServiceApiFp(this.configuration)
2207
+ .distributorSelfServiceControllerSearchDomains(distributorDomainSearchInputDTO, options)
2208
+ .then((request) => request(this.axios, this.basePath));
2209
+ }
2210
+ /**
2211
+ * Returns the calling distributor’s own keys with prefix, suffix, created and last-used. Public fields only: never the secret or its hash.<br> OperationId: `DistributorSelfServiceControllerSearchKeys`
2212
+ * @summary Search my distributor keys
2213
+ * @param {DistributorKeySearchInputDTO} [distributorKeySearchInputDTO] DistributorKeySearchInputDTO
2214
+ * @param {*} [options] Override http request option.
2215
+ * @throws {RequiredError}
2216
+ * @memberof DistributorSelfServiceApi
2217
+ */
2218
+ distributorSelfServiceControllerSearchKeys(distributorKeySearchInputDTO, options) {
2219
+ return DistributorSelfServiceApiFp(this.configuration)
2220
+ .distributorSelfServiceControllerSearchKeys(distributorKeySearchInputDTO, options)
2221
+ .then((request) => request(this.axios, this.basePath));
2222
+ }
2223
+ /**
2224
+ * Moves the domain onto another of the Plans allowed for the calling distributor and enqueues the reconciliation that writes the Plan’s limits onto the domain, normally within seconds. Downgrading a customer who cancelled means moving the domain to the free Plan — it keeps running at free limits, and its state never changes. A Plan outside the allowed list is a 400; another distributor’s domain is a 404, never a 403. Idempotent: setting the Plan the domain is already on re-runs the reconciliation and writes nothing.<br> OperationId: `DistributorSelfServiceControllerSetDomainPlan`
2225
+ * @summary Change one of my domains’ Plan
2226
+ * @param {string} id
2227
+ * @param {DistributorDomainPlanInputDTO} [distributorDomainPlanInputDTO] DistributorDomainPlanInputDTO
2228
+ * @param {*} [options] Override http request option.
2229
+ * @throws {RequiredError}
2230
+ * @memberof DistributorSelfServiceApi
2231
+ */
2232
+ distributorSelfServiceControllerSetDomainPlan(id, distributorDomainPlanInputDTO, options) {
2233
+ return DistributorSelfServiceApiFp(this.configuration)
2234
+ .distributorSelfServiceControllerSetDomainPlan(id, distributorDomainPlanInputDTO, options)
2235
+ .then((request) => request(this.axios, this.basePath));
2236
+ }
2237
+ }
2238
+ /**
2239
+ * DomainApi - axios parameter creator
2240
+ * @export
2241
+ */
2242
+ export const DomainApiAxiosParamCreator = function (configuration) {
2243
+ return {
2244
+ /**
2245
+ * <br> OperationId: `DomainControllerCreate`
2246
+ * @summary Create
2247
+ * @param {DomainCreateInputDTO} [domainCreateInputDTO] DomainCreateInputDTO
2248
+ * @param {*} [options] Override http request option.
2249
+ * @throws {RequiredError}
2250
+ */
2251
+ domainControllerCreate: async (domainCreateInputDTO, options = {}) => {
2252
+ const localVarPath = `/domain`;
2253
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2254
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2255
+ let baseOptions;
2256
+ if (configuration) {
2257
+ baseOptions = configuration.baseOptions;
2258
+ }
2259
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
2260
+ const localVarHeaderParameter = {};
2261
+ const localVarQueryParameter = {};
2262
+ // authentication adminAuth required
2263
+ await setApiKeyToObject(localVarHeaderParameter, 'x-takaro-admin-token', configuration);
2264
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2265
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2266
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2267
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2268
+ localVarRequestOptions.data = serializeDataIfNeeded(domainCreateInputDTO, localVarRequestOptions, configuration);
2269
+ return {
2270
+ url: toPathString(localVarUrlObj),
2271
+ options: localVarRequestOptions,
2272
+ };
2273
+ },
2274
+ /**
2275
+ * Mints a Domain Key scoped to the target domain, so a non-interactive caller (domain provisioning, the billing reconciler, an end-to-end suite) can act in a freshly created domain without a human login. The `key` field is returned ONCE and is not stored on the server — Takaro keeps only a hash. Hardened for provisioning use: `kind` is forced to `domain`, the scope is forced to unrestricted, and the expiry is forced to ONE HOUR, regardless of request body values — mint a key through `POST /apikey` for anything longer-lived. roleIds is passed through as-is and every id must name a role in this domain; omit it to mint a powerless key. Attribution is limited: the admin secret is a single shared identity, so the key records the domain\'s system root user as its creator and cannot name the individual staff caller.<br> OperationId: `DomainControllerCreateApiKey`
2276
+ * @summary Mint a Domain Key for a domain
2277
+ * @param {string} id
2278
+ * @param {DomainApiKeyCreateInputDTO} [domainApiKeyCreateInputDTO] DomainApiKeyCreateInputDTO
2279
+ * @param {*} [options] Override http request option.
2280
+ * @throws {RequiredError}
2281
+ */
2282
+ domainControllerCreateApiKey: async (id, domainApiKeyCreateInputDTO, options = {}) => {
2283
+ // verify required parameter 'id' is not null or undefined
2284
+ assertParamExists('domainControllerCreateApiKey', 'id', id);
2285
+ const localVarPath = `/domain/{id}/api-key`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
2286
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2287
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2288
+ let baseOptions;
2289
+ if (configuration) {
2290
+ baseOptions = configuration.baseOptions;
2291
+ }
2292
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
2293
+ const localVarHeaderParameter = {};
2294
+ const localVarQueryParameter = {};
2295
+ // authentication adminAuth required
2296
+ await setApiKeyToObject(localVarHeaderParameter, 'x-takaro-admin-token', configuration);
2297
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2298
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2299
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2300
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2301
+ localVarRequestOptions.data = serializeDataIfNeeded(domainApiKeyCreateInputDTO, localVarRequestOptions, configuration);
2302
+ return {
2303
+ url: toPathString(localVarUrlObj),
2304
+ options: localVarRequestOptions,
2305
+ };
2306
+ },
2307
+ /**
2308
+ * Creates a staff-recovery invite link scoped to the target domain. The `token` and `inviteUrl` fields are returned ONCE and are not stored on the server — distribute securely. Hardened for recovery use: expiry is forced to 24 hours and maxUses is forced to 1, regardless of request body values. roleIds is passed through as-is; omit it to grant no extra roles (plain member). Attribution is limited: the admin secret is a single shared identity; this event records that staff acted on the domain but cannot name the individual.<br> OperationId: `DomainControllerCreateInviteLink`
2309
+ * @summary Create staff-recovery invite link for a domain
2310
+ * @param {string} id
2311
+ * @param {InviteLinkCreateInputDTO} [inviteLinkCreateInputDTO] InviteLinkCreateInputDTO
2312
+ * @param {*} [options] Override http request option.
2313
+ * @throws {RequiredError}
2314
+ */
2315
+ domainControllerCreateInviteLink: async (id, inviteLinkCreateInputDTO, options = {}) => {
2316
+ // verify required parameter 'id' is not null or undefined
2317
+ assertParamExists('domainControllerCreateInviteLink', 'id', id);
2318
+ const localVarPath = `/domain/{id}/invite-link`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
2319
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2320
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2321
+ let baseOptions;
2322
+ if (configuration) {
2323
+ baseOptions = configuration.baseOptions;
2324
+ }
2325
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
2326
+ const localVarHeaderParameter = {};
2327
+ const localVarQueryParameter = {};
2328
+ // authentication adminAuth required
2329
+ await setApiKeyToObject(localVarHeaderParameter, 'x-takaro-admin-token', configuration);
2330
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2331
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2332
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2333
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2334
+ localVarRequestOptions.data = serializeDataIfNeeded(inviteLinkCreateInputDTO, localVarRequestOptions, configuration);
2335
+ return {
2336
+ url: toPathString(localVarUrlObj),
2337
+ options: localVarRequestOptions,
2338
+ };
2339
+ },
2340
+ /**
2341
+ * <br> OperationId: `DomainControllerGetOne`
2342
+ * @summary Get one
2343
+ * @param {string} id
2344
+ * @param {*} [options] Override http request option.
2345
+ * @throws {RequiredError}
2346
+ */
2347
+ domainControllerGetOne: async (id, options = {}) => {
2348
+ // verify required parameter 'id' is not null or undefined
2349
+ assertParamExists('domainControllerGetOne', 'id', id);
2350
+ const localVarPath = `/domain/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
2351
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2352
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2353
+ let baseOptions;
2354
+ if (configuration) {
2355
+ baseOptions = configuration.baseOptions;
2356
+ }
2357
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
2358
+ const localVarHeaderParameter = {};
2359
+ const localVarQueryParameter = {};
2360
+ // authentication adminAuth required
2361
+ await setApiKeyToObject(localVarHeaderParameter, 'x-takaro-admin-token', configuration);
2362
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2363
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2364
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2365
+ return {
2366
+ url: toPathString(localVarUrlObj),
2367
+ options: localVarRequestOptions,
2368
+ };
2369
+ },
2370
+ /**
2371
+ * <br> OperationId: `DomainControllerGetToken`
2372
+ * @summary Get token
2373
+ * @param {TokenInputDTO} [tokenInputDTO] TokenInputDTO
2374
+ * @param {*} [options] Override http request option.
2375
+ * @throws {RequiredError}
2376
+ */
2377
+ domainControllerGetToken: async (tokenInputDTO, options = {}) => {
2378
+ const localVarPath = `/token`;
2379
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2380
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2381
+ let baseOptions;
2382
+ if (configuration) {
2383
+ baseOptions = configuration.baseOptions;
2384
+ }
2385
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
2386
+ const localVarHeaderParameter = {};
2387
+ const localVarQueryParameter = {};
2388
+ // authentication adminAuth required
2389
+ await setApiKeyToObject(localVarHeaderParameter, 'x-takaro-admin-token', configuration);
2390
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2391
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2392
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2393
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2394
+ localVarRequestOptions.data = serializeDataIfNeeded(tokenInputDTO, localVarRequestOptions, configuration);
2395
+ return {
2396
+ url: toPathString(localVarUrlObj),
2397
+ options: localVarRequestOptions,
2398
+ };
2399
+ },
2400
+ /**
2401
+ * <br> OperationId: `DomainControllerRemove`
2402
+ * @summary Remove
2403
+ * @param {string} id
2404
+ * @param {any} [hardDelete]
2405
+ * @param {*} [options] Override http request option.
2406
+ * @throws {RequiredError}
2407
+ */
2408
+ domainControllerRemove: async (id, hardDelete, options = {}) => {
2409
+ // verify required parameter 'id' is not null or undefined
2410
+ assertParamExists('domainControllerRemove', 'id', id);
2411
+ const localVarPath = `/domain/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
2412
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2413
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2414
+ let baseOptions;
2415
+ if (configuration) {
2416
+ baseOptions = configuration.baseOptions;
2417
+ }
2418
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
2419
+ const localVarHeaderParameter = {};
2420
+ const localVarQueryParameter = {};
2421
+ // authentication adminAuth required
2422
+ await setApiKeyToObject(localVarHeaderParameter, 'x-takaro-admin-token', configuration);
2423
+ if (hardDelete !== undefined) {
2424
+ for (const [key, value] of Object.entries(hardDelete)) {
2425
+ localVarQueryParameter[key] = value;
2426
+ }
2427
+ }
2428
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2429
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2430
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2431
+ return {
2432
+ url: toPathString(localVarUrlObj),
2433
+ options: localVarRequestOptions,
2434
+ };
2435
+ },
2436
+ /**
2437
+ * <br> OperationId: `DomainControllerResolveRegistrationToken`
2438
+ * @summary Resolve registration token
2439
+ * @param {ResolveRegistrationTokenInputDTO} [resolveRegistrationTokenInputDTO] ResolveRegistrationTokenInputDTO
2440
+ * @param {*} [options] Override http request option.
2441
+ * @throws {RequiredError}
2442
+ */
2443
+ domainControllerResolveRegistrationToken: async (resolveRegistrationTokenInputDTO, options = {}) => {
2444
+ const localVarPath = `/resolve-registration-token`;
2445
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2446
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2447
+ let baseOptions;
2448
+ if (configuration) {
2449
+ baseOptions = configuration.baseOptions;
2450
+ }
2451
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
2452
+ const localVarHeaderParameter = {};
2453
+ const localVarQueryParameter = {};
2454
+ // authentication adminAuth required
2455
+ await setApiKeyToObject(localVarHeaderParameter, 'x-takaro-admin-token', configuration);
2456
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2457
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2458
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2459
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2460
+ localVarRequestOptions.data = serializeDataIfNeeded(resolveRegistrationTokenInputDTO, localVarRequestOptions, configuration);
2461
+ return {
2462
+ url: toPathString(localVarUrlObj),
2463
+ options: localVarRequestOptions,
2464
+ };
2465
+ },
2466
+ /**
2467
+ * <br> OperationId: `DomainControllerSearch`
2468
+ * @summary Search
2469
+ * @param {DomainSearchInputDTO} [domainSearchInputDTO] DomainSearchInputDTO
2470
+ * @param {*} [options] Override http request option.
2471
+ * @throws {RequiredError}
2472
+ */
2473
+ domainControllerSearch: async (domainSearchInputDTO, options = {}) => {
2474
+ const localVarPath = `/domain/search`;
2475
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2476
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2477
+ let baseOptions;
2478
+ if (configuration) {
2479
+ baseOptions = configuration.baseOptions;
2480
+ }
2481
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
2482
+ const localVarHeaderParameter = {};
2483
+ const localVarQueryParameter = {};
2484
+ // authentication adminAuth required
2485
+ await setApiKeyToObject(localVarHeaderParameter, 'x-takaro-admin-token', configuration);
2486
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2487
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2488
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2489
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2490
+ localVarRequestOptions.data = serializeDataIfNeeded(domainSearchInputDTO, localVarRequestOptions, configuration);
2491
+ return {
2492
+ url: toPathString(localVarUrlObj),
2493
+ options: localVarRequestOptions,
2494
+ };
2495
+ },
2496
+ /**
2497
+ * The domains attributed to a distributor, with the Plan their limits come from. This is the billing reconciler’s read: `POST /domain/search` deliberately does not expose `planId`. Never returns a subscription-backed domain.<br> OperationId: `DomainControllerSearchDistributorBacked`
2498
+ * @summary Search distributor-backed domains
2499
+ * @param {DistributorBackedDomainSearchInputDTO} [distributorBackedDomainSearchInputDTO] DistributorBackedDomainSearchInputDTO
2500
+ * @param {*} [options] Override http request option.
2501
+ * @throws {RequiredError}
2502
+ */
2503
+ domainControllerSearchDistributorBacked: async (distributorBackedDomainSearchInputDTO, options = {}) => {
2504
+ const localVarPath = `/domain/distributor-backed/search`;
2505
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2506
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2507
+ let baseOptions;
2508
+ if (configuration) {
2509
+ baseOptions = configuration.baseOptions;
2510
+ }
2511
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
2512
+ const localVarHeaderParameter = {};
2513
+ const localVarQueryParameter = {};
2514
+ // authentication adminAuth required
2515
+ await setApiKeyToObject(localVarHeaderParameter, 'x-takaro-admin-token', configuration);
2516
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2517
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2518
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2519
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2520
+ localVarRequestOptions.data = serializeDataIfNeeded(distributorBackedDomainSearchInputDTO, localVarRequestOptions, configuration);
2521
+ return {
2522
+ url: toPathString(localVarUrlObj),
2523
+ options: localVarRequestOptions,
2524
+ };
2525
+ },
2526
+ /**
2527
+ * <br> OperationId: `DomainControllerUpdate`
2528
+ * @summary Update
2529
+ * @param {string} id
2530
+ * @param {DomainUpdateInputDTO} [domainUpdateInputDTO] DomainUpdateInputDTO
2531
+ * @param {*} [options] Override http request option.
2532
+ * @throws {RequiredError}
2533
+ */
2534
+ domainControllerUpdate: async (id, domainUpdateInputDTO, options = {}) => {
2535
+ // verify required parameter 'id' is not null or undefined
2536
+ assertParamExists('domainControllerUpdate', 'id', id);
2537
+ const localVarPath = `/domain/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
2538
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2539
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2540
+ let baseOptions;
2541
+ if (configuration) {
2542
+ baseOptions = configuration.baseOptions;
2543
+ }
2544
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options };
2545
+ const localVarHeaderParameter = {};
2546
+ const localVarQueryParameter = {};
2547
+ // authentication adminAuth required
2548
+ await setApiKeyToObject(localVarHeaderParameter, 'x-takaro-admin-token', configuration);
2549
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2550
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2551
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2552
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2553
+ localVarRequestOptions.data = serializeDataIfNeeded(domainUpdateInputDTO, localVarRequestOptions, configuration);
2554
+ return {
2555
+ url: toPathString(localVarUrlObj),
2556
+ options: localVarRequestOptions,
2557
+ };
2558
+ },
2559
+ };
2560
+ };
2561
+ /**
2562
+ * DomainApi - functional programming interface
2563
+ * @export
2564
+ */
2565
+ export const DomainApiFp = function (configuration) {
2566
+ const localVarAxiosParamCreator = DomainApiAxiosParamCreator(configuration);
2567
+ return {
2568
+ /**
2569
+ * <br> OperationId: `DomainControllerCreate`
2570
+ * @summary Create
2571
+ * @param {DomainCreateInputDTO} [domainCreateInputDTO] DomainCreateInputDTO
2572
+ * @param {*} [options] Override http request option.
2573
+ * @throws {RequiredError}
2574
+ */
2575
+ async domainControllerCreate(domainCreateInputDTO, options) {
2576
+ const localVarAxiosArgs = await localVarAxiosParamCreator.domainControllerCreate(domainCreateInputDTO, options);
2577
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2578
+ const localVarOperationServerBasePath = operationServerMap['DomainApi.domainControllerCreate']?.[localVarOperationServerIndex]?.url;
2579
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2580
+ },
2581
+ /**
2582
+ * Mints a Domain Key scoped to the target domain, so a non-interactive caller (domain provisioning, the billing reconciler, an end-to-end suite) can act in a freshly created domain without a human login. The `key` field is returned ONCE and is not stored on the server — Takaro keeps only a hash. Hardened for provisioning use: `kind` is forced to `domain`, the scope is forced to unrestricted, and the expiry is forced to ONE HOUR, regardless of request body values — mint a key through `POST /apikey` for anything longer-lived. roleIds is passed through as-is and every id must name a role in this domain; omit it to mint a powerless key. Attribution is limited: the admin secret is a single shared identity, so the key records the domain\'s system root user as its creator and cannot name the individual staff caller.<br> OperationId: `DomainControllerCreateApiKey`
2583
+ * @summary Mint a Domain Key for a domain
2584
+ * @param {string} id
2585
+ * @param {DomainApiKeyCreateInputDTO} [domainApiKeyCreateInputDTO] DomainApiKeyCreateInputDTO
2586
+ * @param {*} [options] Override http request option.
2587
+ * @throws {RequiredError}
2588
+ */
2589
+ async domainControllerCreateApiKey(id, domainApiKeyCreateInputDTO, options) {
2590
+ const localVarAxiosArgs = await localVarAxiosParamCreator.domainControllerCreateApiKey(id, domainApiKeyCreateInputDTO, options);
2591
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2592
+ const localVarOperationServerBasePath = operationServerMap['DomainApi.domainControllerCreateApiKey']?.[localVarOperationServerIndex]?.url;
2593
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2594
+ },
2595
+ /**
2596
+ * Creates a staff-recovery invite link scoped to the target domain. The `token` and `inviteUrl` fields are returned ONCE and are not stored on the server — distribute securely. Hardened for recovery use: expiry is forced to 24 hours and maxUses is forced to 1, regardless of request body values. roleIds is passed through as-is; omit it to grant no extra roles (plain member). Attribution is limited: the admin secret is a single shared identity; this event records that staff acted on the domain but cannot name the individual.<br> OperationId: `DomainControllerCreateInviteLink`
2597
+ * @summary Create staff-recovery invite link for a domain
2598
+ * @param {string} id
2599
+ * @param {InviteLinkCreateInputDTO} [inviteLinkCreateInputDTO] InviteLinkCreateInputDTO
2600
+ * @param {*} [options] Override http request option.
2601
+ * @throws {RequiredError}
2602
+ */
2603
+ async domainControllerCreateInviteLink(id, inviteLinkCreateInputDTO, options) {
2604
+ const localVarAxiosArgs = await localVarAxiosParamCreator.domainControllerCreateInviteLink(id, inviteLinkCreateInputDTO, options);
2605
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2606
+ const localVarOperationServerBasePath = operationServerMap['DomainApi.domainControllerCreateInviteLink']?.[localVarOperationServerIndex]?.url;
2607
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2608
+ },
2609
+ /**
2610
+ * <br> OperationId: `DomainControllerGetOne`
2611
+ * @summary Get one
2612
+ * @param {string} id
2613
+ * @param {*} [options] Override http request option.
2614
+ * @throws {RequiredError}
2615
+ */
2616
+ async domainControllerGetOne(id, options) {
2617
+ const localVarAxiosArgs = await localVarAxiosParamCreator.domainControllerGetOne(id, options);
2618
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2619
+ const localVarOperationServerBasePath = operationServerMap['DomainApi.domainControllerGetOne']?.[localVarOperationServerIndex]?.url;
2620
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2621
+ },
2622
+ /**
2623
+ * <br> OperationId: `DomainControllerGetToken`
2624
+ * @summary Get token
2625
+ * @param {TokenInputDTO} [tokenInputDTO] TokenInputDTO
2626
+ * @param {*} [options] Override http request option.
2627
+ * @throws {RequiredError}
2628
+ */
2629
+ async domainControllerGetToken(tokenInputDTO, options) {
2630
+ const localVarAxiosArgs = await localVarAxiosParamCreator.domainControllerGetToken(tokenInputDTO, options);
2631
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2632
+ const localVarOperationServerBasePath = operationServerMap['DomainApi.domainControllerGetToken']?.[localVarOperationServerIndex]?.url;
2633
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2634
+ },
2635
+ /**
2636
+ * <br> OperationId: `DomainControllerRemove`
2637
+ * @summary Remove
2638
+ * @param {string} id
2639
+ * @param {any} [hardDelete]
2640
+ * @param {*} [options] Override http request option.
2641
+ * @throws {RequiredError}
2642
+ */
2643
+ async domainControllerRemove(id, hardDelete, options) {
2644
+ const localVarAxiosArgs = await localVarAxiosParamCreator.domainControllerRemove(id, hardDelete, options);
2645
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2646
+ const localVarOperationServerBasePath = operationServerMap['DomainApi.domainControllerRemove']?.[localVarOperationServerIndex]?.url;
2647
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2648
+ },
2649
+ /**
2650
+ * <br> OperationId: `DomainControllerResolveRegistrationToken`
2651
+ * @summary Resolve registration token
2652
+ * @param {ResolveRegistrationTokenInputDTO} [resolveRegistrationTokenInputDTO] ResolveRegistrationTokenInputDTO
2653
+ * @param {*} [options] Override http request option.
2654
+ * @throws {RequiredError}
2655
+ */
2656
+ async domainControllerResolveRegistrationToken(resolveRegistrationTokenInputDTO, options) {
2657
+ const localVarAxiosArgs = await localVarAxiosParamCreator.domainControllerResolveRegistrationToken(resolveRegistrationTokenInputDTO, options);
2658
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2659
+ const localVarOperationServerBasePath = operationServerMap['DomainApi.domainControllerResolveRegistrationToken']?.[localVarOperationServerIndex]?.url;
2660
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2661
+ },
2662
+ /**
2663
+ * <br> OperationId: `DomainControllerSearch`
2664
+ * @summary Search
2665
+ * @param {DomainSearchInputDTO} [domainSearchInputDTO] DomainSearchInputDTO
2666
+ * @param {*} [options] Override http request option.
2667
+ * @throws {RequiredError}
2668
+ */
2669
+ async domainControllerSearch(domainSearchInputDTO, options) {
2670
+ const localVarAxiosArgs = await localVarAxiosParamCreator.domainControllerSearch(domainSearchInputDTO, options);
2671
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2672
+ const localVarOperationServerBasePath = operationServerMap['DomainApi.domainControllerSearch']?.[localVarOperationServerIndex]?.url;
2673
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2674
+ },
2675
+ /**
2676
+ * The domains attributed to a distributor, with the Plan their limits come from. This is the billing reconciler’s read: `POST /domain/search` deliberately does not expose `planId`. Never returns a subscription-backed domain.<br> OperationId: `DomainControllerSearchDistributorBacked`
2677
+ * @summary Search distributor-backed domains
2678
+ * @param {DistributorBackedDomainSearchInputDTO} [distributorBackedDomainSearchInputDTO] DistributorBackedDomainSearchInputDTO
2679
+ * @param {*} [options] Override http request option.
2680
+ * @throws {RequiredError}
2681
+ */
2682
+ async domainControllerSearchDistributorBacked(distributorBackedDomainSearchInputDTO, options) {
2683
+ const localVarAxiosArgs = await localVarAxiosParamCreator.domainControllerSearchDistributorBacked(distributorBackedDomainSearchInputDTO, options);
2684
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2685
+ const localVarOperationServerBasePath = operationServerMap['DomainApi.domainControllerSearchDistributorBacked']?.[localVarOperationServerIndex]?.url;
2686
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2687
+ },
2688
+ /**
2689
+ * <br> OperationId: `DomainControllerUpdate`
2690
+ * @summary Update
2691
+ * @param {string} id
2692
+ * @param {DomainUpdateInputDTO} [domainUpdateInputDTO] DomainUpdateInputDTO
2693
+ * @param {*} [options] Override http request option.
2694
+ * @throws {RequiredError}
2695
+ */
2696
+ async domainControllerUpdate(id, domainUpdateInputDTO, options) {
2697
+ const localVarAxiosArgs = await localVarAxiosParamCreator.domainControllerUpdate(id, domainUpdateInputDTO, options);
2698
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2699
+ const localVarOperationServerBasePath = operationServerMap['DomainApi.domainControllerUpdate']?.[localVarOperationServerIndex]?.url;
2700
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2701
+ },
2702
+ };
2703
+ };
2704
+ /**
2705
+ * DomainApi - factory interface
2706
+ * @export
2707
+ */
2708
+ export const DomainApiFactory = function (configuration, basePath, axios) {
2709
+ const localVarFp = DomainApiFp(configuration);
2710
+ return {
2711
+ /**
2712
+ * <br> OperationId: `DomainControllerCreate`
2713
+ * @summary Create
2714
+ * @param {DomainCreateInputDTO} [domainCreateInputDTO] DomainCreateInputDTO
2715
+ * @param {*} [options] Override http request option.
2716
+ * @throws {RequiredError}
2717
+ */
2718
+ domainControllerCreate(domainCreateInputDTO, options) {
2719
+ return localVarFp
2720
+ .domainControllerCreate(domainCreateInputDTO, options)
2721
+ .then((request) => request(axios, basePath));
2722
+ },
2723
+ /**
2724
+ * Mints a Domain Key scoped to the target domain, so a non-interactive caller (domain provisioning, the billing reconciler, an end-to-end suite) can act in a freshly created domain without a human login. The `key` field is returned ONCE and is not stored on the server — Takaro keeps only a hash. Hardened for provisioning use: `kind` is forced to `domain`, the scope is forced to unrestricted, and the expiry is forced to ONE HOUR, regardless of request body values — mint a key through `POST /apikey` for anything longer-lived. roleIds is passed through as-is and every id must name a role in this domain; omit it to mint a powerless key. Attribution is limited: the admin secret is a single shared identity, so the key records the domain\'s system root user as its creator and cannot name the individual staff caller.<br> OperationId: `DomainControllerCreateApiKey`
2725
+ * @summary Mint a Domain Key for a domain
2726
+ * @param {string} id
2727
+ * @param {DomainApiKeyCreateInputDTO} [domainApiKeyCreateInputDTO] DomainApiKeyCreateInputDTO
2728
+ * @param {*} [options] Override http request option.
2729
+ * @throws {RequiredError}
2730
+ */
2731
+ domainControllerCreateApiKey(id, domainApiKeyCreateInputDTO, options) {
2732
+ return localVarFp
2733
+ .domainControllerCreateApiKey(id, domainApiKeyCreateInputDTO, options)
2734
+ .then((request) => request(axios, basePath));
2735
+ },
2736
+ /**
2737
+ * Creates a staff-recovery invite link scoped to the target domain. The `token` and `inviteUrl` fields are returned ONCE and are not stored on the server — distribute securely. Hardened for recovery use: expiry is forced to 24 hours and maxUses is forced to 1, regardless of request body values. roleIds is passed through as-is; omit it to grant no extra roles (plain member). Attribution is limited: the admin secret is a single shared identity; this event records that staff acted on the domain but cannot name the individual.<br> OperationId: `DomainControllerCreateInviteLink`
2738
+ * @summary Create staff-recovery invite link for a domain
2739
+ * @param {string} id
2740
+ * @param {InviteLinkCreateInputDTO} [inviteLinkCreateInputDTO] InviteLinkCreateInputDTO
2741
+ * @param {*} [options] Override http request option.
2742
+ * @throws {RequiredError}
2743
+ */
2744
+ domainControllerCreateInviteLink(id, inviteLinkCreateInputDTO, options) {
2745
+ return localVarFp
2746
+ .domainControllerCreateInviteLink(id, inviteLinkCreateInputDTO, options)
2747
+ .then((request) => request(axios, basePath));
2748
+ },
2749
+ /**
2750
+ * <br> OperationId: `DomainControllerGetOne`
2751
+ * @summary Get one
2752
+ * @param {string} id
2753
+ * @param {*} [options] Override http request option.
2754
+ * @throws {RequiredError}
2755
+ */
2756
+ domainControllerGetOne(id, options) {
2757
+ return localVarFp.domainControllerGetOne(id, options).then((request) => request(axios, basePath));
2758
+ },
2759
+ /**
2760
+ * <br> OperationId: `DomainControllerGetToken`
2761
+ * @summary Get token
2762
+ * @param {TokenInputDTO} [tokenInputDTO] TokenInputDTO
2763
+ * @param {*} [options] Override http request option.
2764
+ * @throws {RequiredError}
2765
+ */
2766
+ domainControllerGetToken(tokenInputDTO, options) {
2767
+ return localVarFp.domainControllerGetToken(tokenInputDTO, options).then((request) => request(axios, basePath));
2768
+ },
2769
+ /**
2770
+ * <br> OperationId: `DomainControllerRemove`
2771
+ * @summary Remove
2772
+ * @param {string} id
2773
+ * @param {any} [hardDelete]
2774
+ * @param {*} [options] Override http request option.
2775
+ * @throws {RequiredError}
2776
+ */
2777
+ domainControllerRemove(id, hardDelete, options) {
2778
+ return localVarFp.domainControllerRemove(id, hardDelete, options).then((request) => request(axios, basePath));
2779
+ },
2780
+ /**
2781
+ * <br> OperationId: `DomainControllerResolveRegistrationToken`
2782
+ * @summary Resolve registration token
2783
+ * @param {ResolveRegistrationTokenInputDTO} [resolveRegistrationTokenInputDTO] ResolveRegistrationTokenInputDTO
2784
+ * @param {*} [options] Override http request option.
2785
+ * @throws {RequiredError}
2786
+ */
2787
+ domainControllerResolveRegistrationToken(resolveRegistrationTokenInputDTO, options) {
2788
+ return localVarFp
2789
+ .domainControllerResolveRegistrationToken(resolveRegistrationTokenInputDTO, options)
2790
+ .then((request) => request(axios, basePath));
2791
+ },
2792
+ /**
2793
+ * <br> OperationId: `DomainControllerSearch`
2794
+ * @summary Search
2795
+ * @param {DomainSearchInputDTO} [domainSearchInputDTO] DomainSearchInputDTO
2796
+ * @param {*} [options] Override http request option.
2797
+ * @throws {RequiredError}
2798
+ */
2799
+ domainControllerSearch(domainSearchInputDTO, options) {
2800
+ return localVarFp
2801
+ .domainControllerSearch(domainSearchInputDTO, options)
2802
+ .then((request) => request(axios, basePath));
2803
+ },
2804
+ /**
2805
+ * The domains attributed to a distributor, with the Plan their limits come from. This is the billing reconciler’s read: `POST /domain/search` deliberately does not expose `planId`. Never returns a subscription-backed domain.<br> OperationId: `DomainControllerSearchDistributorBacked`
2806
+ * @summary Search distributor-backed domains
2807
+ * @param {DistributorBackedDomainSearchInputDTO} [distributorBackedDomainSearchInputDTO] DistributorBackedDomainSearchInputDTO
2808
+ * @param {*} [options] Override http request option.
2809
+ * @throws {RequiredError}
2810
+ */
2811
+ domainControllerSearchDistributorBacked(distributorBackedDomainSearchInputDTO, options) {
2812
+ return localVarFp
2813
+ .domainControllerSearchDistributorBacked(distributorBackedDomainSearchInputDTO, options)
2814
+ .then((request) => request(axios, basePath));
2815
+ },
2816
+ /**
2817
+ * <br> OperationId: `DomainControllerUpdate`
2818
+ * @summary Update
2819
+ * @param {string} id
2820
+ * @param {DomainUpdateInputDTO} [domainUpdateInputDTO] DomainUpdateInputDTO
2821
+ * @param {*} [options] Override http request option.
2822
+ * @throws {RequiredError}
2823
+ */
2824
+ domainControllerUpdate(id, domainUpdateInputDTO, options) {
2825
+ return localVarFp
2826
+ .domainControllerUpdate(id, domainUpdateInputDTO, options)
2827
+ .then((request) => request(axios, basePath));
2828
+ },
2829
+ };
2830
+ };
2831
+ /**
2832
+ * DomainApi - object-oriented interface
2833
+ * @export
2834
+ * @class DomainApi
2835
+ * @extends {BaseAPI}
2836
+ */
2837
+ export class DomainApi extends BaseAPI {
2838
+ /**
2839
+ * <br> OperationId: `DomainControllerCreate`
2840
+ * @summary Create
2841
+ * @param {DomainCreateInputDTO} [domainCreateInputDTO] DomainCreateInputDTO
2842
+ * @param {*} [options] Override http request option.
2843
+ * @throws {RequiredError}
2844
+ * @memberof DomainApi
2845
+ */
2846
+ domainControllerCreate(domainCreateInputDTO, options) {
2847
+ return DomainApiFp(this.configuration)
2848
+ .domainControllerCreate(domainCreateInputDTO, options)
2849
+ .then((request) => request(this.axios, this.basePath));
2850
+ }
2851
+ /**
2852
+ * Mints a Domain Key scoped to the target domain, so a non-interactive caller (domain provisioning, the billing reconciler, an end-to-end suite) can act in a freshly created domain without a human login. The `key` field is returned ONCE and is not stored on the server — Takaro keeps only a hash. Hardened for provisioning use: `kind` is forced to `domain`, the scope is forced to unrestricted, and the expiry is forced to ONE HOUR, regardless of request body values — mint a key through `POST /apikey` for anything longer-lived. roleIds is passed through as-is and every id must name a role in this domain; omit it to mint a powerless key. Attribution is limited: the admin secret is a single shared identity, so the key records the domain\'s system root user as its creator and cannot name the individual staff caller.<br> OperationId: `DomainControllerCreateApiKey`
2853
+ * @summary Mint a Domain Key for a domain
2854
+ * @param {string} id
2855
+ * @param {DomainApiKeyCreateInputDTO} [domainApiKeyCreateInputDTO] DomainApiKeyCreateInputDTO
2856
+ * @param {*} [options] Override http request option.
2857
+ * @throws {RequiredError}
2858
+ * @memberof DomainApi
2859
+ */
2860
+ domainControllerCreateApiKey(id, domainApiKeyCreateInputDTO, options) {
2861
+ return DomainApiFp(this.configuration)
2862
+ .domainControllerCreateApiKey(id, domainApiKeyCreateInputDTO, options)
2863
+ .then((request) => request(this.axios, this.basePath));
2864
+ }
2865
+ /**
2866
+ * Creates a staff-recovery invite link scoped to the target domain. The `token` and `inviteUrl` fields are returned ONCE and are not stored on the server — distribute securely. Hardened for recovery use: expiry is forced to 24 hours and maxUses is forced to 1, regardless of request body values. roleIds is passed through as-is; omit it to grant no extra roles (plain member). Attribution is limited: the admin secret is a single shared identity; this event records that staff acted on the domain but cannot name the individual.<br> OperationId: `DomainControllerCreateInviteLink`
2867
+ * @summary Create staff-recovery invite link for a domain
2868
+ * @param {string} id
2869
+ * @param {InviteLinkCreateInputDTO} [inviteLinkCreateInputDTO] InviteLinkCreateInputDTO
2870
+ * @param {*} [options] Override http request option.
2871
+ * @throws {RequiredError}
2872
+ * @memberof DomainApi
2873
+ */
2874
+ domainControllerCreateInviteLink(id, inviteLinkCreateInputDTO, options) {
2875
+ return DomainApiFp(this.configuration)
2876
+ .domainControllerCreateInviteLink(id, inviteLinkCreateInputDTO, options)
2877
+ .then((request) => request(this.axios, this.basePath));
2878
+ }
2879
+ /**
2880
+ * <br> OperationId: `DomainControllerGetOne`
2881
+ * @summary Get one
2882
+ * @param {string} id
2883
+ * @param {*} [options] Override http request option.
2884
+ * @throws {RequiredError}
2885
+ * @memberof DomainApi
2886
+ */
2887
+ domainControllerGetOne(id, options) {
2888
+ return DomainApiFp(this.configuration)
2889
+ .domainControllerGetOne(id, options)
2890
+ .then((request) => request(this.axios, this.basePath));
2891
+ }
2892
+ /**
2893
+ * <br> OperationId: `DomainControllerGetToken`
2894
+ * @summary Get token
2895
+ * @param {TokenInputDTO} [tokenInputDTO] TokenInputDTO
2896
+ * @param {*} [options] Override http request option.
2897
+ * @throws {RequiredError}
2898
+ * @memberof DomainApi
2899
+ */
2900
+ domainControllerGetToken(tokenInputDTO, options) {
2901
+ return DomainApiFp(this.configuration)
2902
+ .domainControllerGetToken(tokenInputDTO, options)
2903
+ .then((request) => request(this.axios, this.basePath));
2904
+ }
2905
+ /**
2906
+ * <br> OperationId: `DomainControllerRemove`
2907
+ * @summary Remove
2908
+ * @param {string} id
2909
+ * @param {any} [hardDelete]
2910
+ * @param {*} [options] Override http request option.
2911
+ * @throws {RequiredError}
2912
+ * @memberof DomainApi
2913
+ */
2914
+ domainControllerRemove(id, hardDelete, options) {
2915
+ return DomainApiFp(this.configuration)
2916
+ .domainControllerRemove(id, hardDelete, options)
2917
+ .then((request) => request(this.axios, this.basePath));
2918
+ }
2919
+ /**
2920
+ * <br> OperationId: `DomainControllerResolveRegistrationToken`
2921
+ * @summary Resolve registration token
2922
+ * @param {ResolveRegistrationTokenInputDTO} [resolveRegistrationTokenInputDTO] ResolveRegistrationTokenInputDTO
2923
+ * @param {*} [options] Override http request option.
2924
+ * @throws {RequiredError}
2925
+ * @memberof DomainApi
2926
+ */
2927
+ domainControllerResolveRegistrationToken(resolveRegistrationTokenInputDTO, options) {
2928
+ return DomainApiFp(this.configuration)
2929
+ .domainControllerResolveRegistrationToken(resolveRegistrationTokenInputDTO, options)
2930
+ .then((request) => request(this.axios, this.basePath));
2931
+ }
2932
+ /**
2933
+ * <br> OperationId: `DomainControllerSearch`
2934
+ * @summary Search
2935
+ * @param {DomainSearchInputDTO} [domainSearchInputDTO] DomainSearchInputDTO
2936
+ * @param {*} [options] Override http request option.
2937
+ * @throws {RequiredError}
2938
+ * @memberof DomainApi
2939
+ */
2940
+ domainControllerSearch(domainSearchInputDTO, options) {
2941
+ return DomainApiFp(this.configuration)
2942
+ .domainControllerSearch(domainSearchInputDTO, options)
2943
+ .then((request) => request(this.axios, this.basePath));
2944
+ }
2945
+ /**
2946
+ * The domains attributed to a distributor, with the Plan their limits come from. This is the billing reconciler’s read: `POST /domain/search` deliberately does not expose `planId`. Never returns a subscription-backed domain.<br> OperationId: `DomainControllerSearchDistributorBacked`
2947
+ * @summary Search distributor-backed domains
2948
+ * @param {DistributorBackedDomainSearchInputDTO} [distributorBackedDomainSearchInputDTO] DistributorBackedDomainSearchInputDTO
2949
+ * @param {*} [options] Override http request option.
2950
+ * @throws {RequiredError}
2951
+ * @memberof DomainApi
2952
+ */
2953
+ domainControllerSearchDistributorBacked(distributorBackedDomainSearchInputDTO, options) {
2954
+ return DomainApiFp(this.configuration)
2955
+ .domainControllerSearchDistributorBacked(distributorBackedDomainSearchInputDTO, options)
2956
+ .then((request) => request(this.axios, this.basePath));
2957
+ }
2958
+ /**
2959
+ * <br> OperationId: `DomainControllerUpdate`
2960
+ * @summary Update
2961
+ * @param {string} id
2962
+ * @param {DomainUpdateInputDTO} [domainUpdateInputDTO] DomainUpdateInputDTO
2963
+ * @param {*} [options] Override http request option.
2964
+ * @throws {RequiredError}
2965
+ * @memberof DomainApi
2966
+ */
2967
+ domainControllerUpdate(id, domainUpdateInputDTO, options) {
2968
+ return DomainApiFp(this.configuration)
2969
+ .domainControllerUpdate(id, domainUpdateInputDTO, options)
2970
+ .then((request) => request(this.axios, this.basePath));
2971
+ }
2972
+ }
2973
+ /**
2974
+ * MetaApi - axios parameter creator
2975
+ * @export
2976
+ */
2977
+ export const MetaApiAxiosParamCreator = function (configuration) {
2978
+ return {
2979
+ /**
2980
+ * <br> OperationId: `MetaGetHealth`
2981
+ * @summary Get health
2982
+ * @param {*} [options] Override http request option.
2983
+ * @throws {RequiredError}
2984
+ */
2985
+ metaGetHealth: async (options = {}) => {
2986
+ const localVarPath = `/healthz`;
2987
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2988
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2989
+ let baseOptions;
2990
+ if (configuration) {
2991
+ baseOptions = configuration.baseOptions;
2992
+ }
2993
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
2994
+ const localVarHeaderParameter = {};
2995
+ const localVarQueryParameter = {};
2996
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2997
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2998
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2999
+ return {
3000
+ url: toPathString(localVarUrlObj),
3001
+ options: localVarRequestOptions,
3002
+ };
3003
+ },
3004
+ /**
3005
+ * <br> OperationId: `MetaGetLiveness`
3006
+ * @summary Get liveness
3007
+ * @param {*} [options] Override http request option.
3008
+ * @throws {RequiredError}
3009
+ */
3010
+ metaGetLiveness: async (options = {}) => {
3011
+ const localVarPath = `/livez`;
3012
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3013
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3014
+ let baseOptions;
3015
+ if (configuration) {
3016
+ baseOptions = configuration.baseOptions;
3017
+ }
3018
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
3019
+ const localVarHeaderParameter = {};
3020
+ const localVarQueryParameter = {};
3021
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3022
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3023
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
3024
+ return {
3025
+ url: toPathString(localVarUrlObj),
3026
+ options: localVarRequestOptions,
3027
+ };
3028
+ },
3029
+ /**
3030
+ * <br> OperationId: `MetaGetMetrics`
3031
+ * @summary Get metrics
3032
+ * @param {*} [options] Override http request option.
3033
+ * @throws {RequiredError}
3034
+ */
3035
+ metaGetMetrics: async (options = {}) => {
3036
+ const localVarPath = `/metrics`;
3037
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3038
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3039
+ let baseOptions;
3040
+ if (configuration) {
3041
+ baseOptions = configuration.baseOptions;
3042
+ }
3043
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
3044
+ const localVarHeaderParameter = {};
3045
+ const localVarQueryParameter = {};
3046
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3047
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3048
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
3049
+ return {
3050
+ url: toPathString(localVarUrlObj),
3051
+ options: localVarRequestOptions,
3052
+ };
3053
+ },
3054
+ /**
3055
+ * <br> OperationId: `MetaGetOpenApi`
3056
+ * @summary Get open api
3057
+ * @param {*} [options] Override http request option.
3058
+ * @throws {RequiredError}
3059
+ */
3060
+ metaGetOpenApi: async (options = {}) => {
3061
+ const localVarPath = `/openapi.json`;
3062
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3063
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3064
+ let baseOptions;
3065
+ if (configuration) {
3066
+ baseOptions = configuration.baseOptions;
3067
+ }
3068
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
3069
+ const localVarHeaderParameter = {};
3070
+ const localVarQueryParameter = {};
3071
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3072
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3073
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
3074
+ return {
3075
+ url: toPathString(localVarUrlObj),
3076
+ options: localVarRequestOptions,
3077
+ };
3078
+ },
3079
+ /**
3080
+ * <br> OperationId: `MetaGetOpenApiHtml`
3081
+ * @summary Get open api html
3082
+ * @param {*} [options] Override http request option.
3083
+ * @throws {RequiredError}
3084
+ */
3085
+ metaGetOpenApiHtml: async (options = {}) => {
3086
+ const localVarPath = `/api.html`;
3087
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3088
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3089
+ let baseOptions;
3090
+ if (configuration) {
3091
+ baseOptions = configuration.baseOptions;
3092
+ }
3093
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
3094
+ const localVarHeaderParameter = {};
3095
+ const localVarQueryParameter = {};
3096
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3097
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3098
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
3099
+ return {
3100
+ url: toPathString(localVarUrlObj),
3101
+ options: localVarRequestOptions,
3102
+ };
3103
+ },
3104
+ /**
3105
+ * <br> OperationId: `MetaGetReadiness`
3106
+ * @summary Get readiness
3107
+ * @param {*} [options] Override http request option.
3108
+ * @throws {RequiredError}
3109
+ */
3110
+ metaGetReadiness: async (options = {}) => {
3111
+ const localVarPath = `/readyz`;
3112
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3113
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3114
+ let baseOptions;
3115
+ if (configuration) {
3116
+ baseOptions = configuration.baseOptions;
3117
+ }
3118
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
3119
+ const localVarHeaderParameter = {};
3120
+ const localVarQueryParameter = {};
3121
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3122
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3123
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
3124
+ return {
3125
+ url: toPathString(localVarUrlObj),
3126
+ options: localVarRequestOptions,
3127
+ };
3128
+ },
3129
+ /**
3130
+ * <br> OperationId: `MetaGetRoot`
3131
+ * @summary Get root
3132
+ * @param {*} [options] Override http request option.
3133
+ * @throws {RequiredError}
3134
+ */
3135
+ metaGetRoot: async (options = {}) => {
3136
+ const localVarPath = `/`;
3137
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3138
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3139
+ let baseOptions;
3140
+ if (configuration) {
3141
+ baseOptions = configuration.baseOptions;
3142
+ }
3143
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
3144
+ const localVarHeaderParameter = {};
3145
+ const localVarQueryParameter = {};
3146
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3147
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3148
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
3149
+ return {
3150
+ url: toPathString(localVarUrlObj),
3151
+ options: localVarRequestOptions,
3152
+ };
3153
+ },
3154
+ };
3155
+ };
3156
+ /**
3157
+ * MetaApi - functional programming interface
3158
+ * @export
3159
+ */
3160
+ export const MetaApiFp = function (configuration) {
3161
+ const localVarAxiosParamCreator = MetaApiAxiosParamCreator(configuration);
3162
+ return {
3163
+ /**
3164
+ * <br> OperationId: `MetaGetHealth`
3165
+ * @summary Get health
3166
+ * @param {*} [options] Override http request option.
3167
+ * @throws {RequiredError}
3168
+ */
3169
+ async metaGetHealth(options) {
3170
+ const localVarAxiosArgs = await localVarAxiosParamCreator.metaGetHealth(options);
3171
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3172
+ const localVarOperationServerBasePath = operationServerMap['MetaApi.metaGetHealth']?.[localVarOperationServerIndex]?.url;
3173
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3174
+ },
3175
+ /**
3176
+ * <br> OperationId: `MetaGetLiveness`
3177
+ * @summary Get liveness
3178
+ * @param {*} [options] Override http request option.
3179
+ * @throws {RequiredError}
3180
+ */
3181
+ async metaGetLiveness(options) {
3182
+ const localVarAxiosArgs = await localVarAxiosParamCreator.metaGetLiveness(options);
3183
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3184
+ const localVarOperationServerBasePath = operationServerMap['MetaApi.metaGetLiveness']?.[localVarOperationServerIndex]?.url;
3185
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3186
+ },
3187
+ /**
3188
+ * <br> OperationId: `MetaGetMetrics`
3189
+ * @summary Get metrics
3190
+ * @param {*} [options] Override http request option.
3191
+ * @throws {RequiredError}
3192
+ */
3193
+ async metaGetMetrics(options) {
3194
+ const localVarAxiosArgs = await localVarAxiosParamCreator.metaGetMetrics(options);
3195
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3196
+ const localVarOperationServerBasePath = operationServerMap['MetaApi.metaGetMetrics']?.[localVarOperationServerIndex]?.url;
3197
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3198
+ },
3199
+ /**
3200
+ * <br> OperationId: `MetaGetOpenApi`
3201
+ * @summary Get open api
3202
+ * @param {*} [options] Override http request option.
3203
+ * @throws {RequiredError}
3204
+ */
3205
+ async metaGetOpenApi(options) {
3206
+ const localVarAxiosArgs = await localVarAxiosParamCreator.metaGetOpenApi(options);
3207
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3208
+ const localVarOperationServerBasePath = operationServerMap['MetaApi.metaGetOpenApi']?.[localVarOperationServerIndex]?.url;
3209
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3210
+ },
3211
+ /**
3212
+ * <br> OperationId: `MetaGetOpenApiHtml`
3213
+ * @summary Get open api html
3214
+ * @param {*} [options] Override http request option.
3215
+ * @throws {RequiredError}
3216
+ */
3217
+ async metaGetOpenApiHtml(options) {
3218
+ const localVarAxiosArgs = await localVarAxiosParamCreator.metaGetOpenApiHtml(options);
3219
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3220
+ const localVarOperationServerBasePath = operationServerMap['MetaApi.metaGetOpenApiHtml']?.[localVarOperationServerIndex]?.url;
3221
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3222
+ },
3223
+ /**
3224
+ * <br> OperationId: `MetaGetReadiness`
3225
+ * @summary Get readiness
3226
+ * @param {*} [options] Override http request option.
3227
+ * @throws {RequiredError}
3228
+ */
3229
+ async metaGetReadiness(options) {
3230
+ const localVarAxiosArgs = await localVarAxiosParamCreator.metaGetReadiness(options);
3231
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3232
+ const localVarOperationServerBasePath = operationServerMap['MetaApi.metaGetReadiness']?.[localVarOperationServerIndex]?.url;
3233
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3234
+ },
3235
+ /**
3236
+ * <br> OperationId: `MetaGetRoot`
3237
+ * @summary Get root
3238
+ * @param {*} [options] Override http request option.
3239
+ * @throws {RequiredError}
3240
+ */
3241
+ async metaGetRoot(options) {
3242
+ const localVarAxiosArgs = await localVarAxiosParamCreator.metaGetRoot(options);
3243
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3244
+ const localVarOperationServerBasePath = operationServerMap['MetaApi.metaGetRoot']?.[localVarOperationServerIndex]?.url;
3245
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3246
+ },
3247
+ };
3248
+ };
3249
+ /**
3250
+ * MetaApi - factory interface
3251
+ * @export
3252
+ */
3253
+ export const MetaApiFactory = function (configuration, basePath, axios) {
3254
+ const localVarFp = MetaApiFp(configuration);
3255
+ return {
3256
+ /**
3257
+ * <br> OperationId: `MetaGetHealth`
3258
+ * @summary Get health
3259
+ * @param {*} [options] Override http request option.
3260
+ * @throws {RequiredError}
3261
+ */
3262
+ metaGetHealth(options) {
3263
+ return localVarFp.metaGetHealth(options).then((request) => request(axios, basePath));
3264
+ },
3265
+ /**
3266
+ * <br> OperationId: `MetaGetLiveness`
3267
+ * @summary Get liveness
3268
+ * @param {*} [options] Override http request option.
3269
+ * @throws {RequiredError}
3270
+ */
3271
+ metaGetLiveness(options) {
3272
+ return localVarFp.metaGetLiveness(options).then((request) => request(axios, basePath));
3273
+ },
3274
+ /**
3275
+ * <br> OperationId: `MetaGetMetrics`
3276
+ * @summary Get metrics
3277
+ * @param {*} [options] Override http request option.
3278
+ * @throws {RequiredError}
3279
+ */
3280
+ metaGetMetrics(options) {
3281
+ return localVarFp.metaGetMetrics(options).then((request) => request(axios, basePath));
3282
+ },
3283
+ /**
3284
+ * <br> OperationId: `MetaGetOpenApi`
3285
+ * @summary Get open api
3286
+ * @param {*} [options] Override http request option.
3287
+ * @throws {RequiredError}
3288
+ */
3289
+ metaGetOpenApi(options) {
3290
+ return localVarFp.metaGetOpenApi(options).then((request) => request(axios, basePath));
3291
+ },
3292
+ /**
3293
+ * <br> OperationId: `MetaGetOpenApiHtml`
3294
+ * @summary Get open api html
3295
+ * @param {*} [options] Override http request option.
3296
+ * @throws {RequiredError}
3297
+ */
3298
+ metaGetOpenApiHtml(options) {
3299
+ return localVarFp.metaGetOpenApiHtml(options).then((request) => request(axios, basePath));
3300
+ },
3301
+ /**
3302
+ * <br> OperationId: `MetaGetReadiness`
3303
+ * @summary Get readiness
3304
+ * @param {*} [options] Override http request option.
3305
+ * @throws {RequiredError}
3306
+ */
3307
+ metaGetReadiness(options) {
3308
+ return localVarFp.metaGetReadiness(options).then((request) => request(axios, basePath));
3309
+ },
3310
+ /**
3311
+ * <br> OperationId: `MetaGetRoot`
3312
+ * @summary Get root
3313
+ * @param {*} [options] Override http request option.
3314
+ * @throws {RequiredError}
3315
+ */
3316
+ metaGetRoot(options) {
3317
+ return localVarFp.metaGetRoot(options).then((request) => request(axios, basePath));
3318
+ },
3319
+ };
3320
+ };
3321
+ /**
3322
+ * MetaApi - object-oriented interface
3323
+ * @export
3324
+ * @class MetaApi
3325
+ * @extends {BaseAPI}
3326
+ */
3327
+ export class MetaApi extends BaseAPI {
3328
+ /**
3329
+ * <br> OperationId: `MetaGetHealth`
3330
+ * @summary Get health
3331
+ * @param {*} [options] Override http request option.
3332
+ * @throws {RequiredError}
3333
+ * @memberof MetaApi
3334
+ */
3335
+ metaGetHealth(options) {
3336
+ return MetaApiFp(this.configuration)
3337
+ .metaGetHealth(options)
3338
+ .then((request) => request(this.axios, this.basePath));
3339
+ }
3340
+ /**
3341
+ * <br> OperationId: `MetaGetLiveness`
3342
+ * @summary Get liveness
3343
+ * @param {*} [options] Override http request option.
3344
+ * @throws {RequiredError}
3345
+ * @memberof MetaApi
3346
+ */
3347
+ metaGetLiveness(options) {
3348
+ return MetaApiFp(this.configuration)
3349
+ .metaGetLiveness(options)
3350
+ .then((request) => request(this.axios, this.basePath));
3351
+ }
3352
+ /**
3353
+ * <br> OperationId: `MetaGetMetrics`
3354
+ * @summary Get metrics
3355
+ * @param {*} [options] Override http request option.
3356
+ * @throws {RequiredError}
3357
+ * @memberof MetaApi
3358
+ */
3359
+ metaGetMetrics(options) {
3360
+ return MetaApiFp(this.configuration)
3361
+ .metaGetMetrics(options)
3362
+ .then((request) => request(this.axios, this.basePath));
3363
+ }
3364
+ /**
3365
+ * <br> OperationId: `MetaGetOpenApi`
3366
+ * @summary Get open api
3367
+ * @param {*} [options] Override http request option.
3368
+ * @throws {RequiredError}
3369
+ * @memberof MetaApi
3370
+ */
3371
+ metaGetOpenApi(options) {
3372
+ return MetaApiFp(this.configuration)
3373
+ .metaGetOpenApi(options)
3374
+ .then((request) => request(this.axios, this.basePath));
3375
+ }
3376
+ /**
3377
+ * <br> OperationId: `MetaGetOpenApiHtml`
3378
+ * @summary Get open api html
3379
+ * @param {*} [options] Override http request option.
3380
+ * @throws {RequiredError}
3381
+ * @memberof MetaApi
3382
+ */
3383
+ metaGetOpenApiHtml(options) {
3384
+ return MetaApiFp(this.configuration)
3385
+ .metaGetOpenApiHtml(options)
3386
+ .then((request) => request(this.axios, this.basePath));
3387
+ }
3388
+ /**
3389
+ * <br> OperationId: `MetaGetReadiness`
3390
+ * @summary Get readiness
3391
+ * @param {*} [options] Override http request option.
3392
+ * @throws {RequiredError}
3393
+ * @memberof MetaApi
3394
+ */
3395
+ metaGetReadiness(options) {
3396
+ return MetaApiFp(this.configuration)
3397
+ .metaGetReadiness(options)
3398
+ .then((request) => request(this.axios, this.basePath));
3399
+ }
3400
+ /**
3401
+ * <br> OperationId: `MetaGetRoot`
3402
+ * @summary Get root
3403
+ * @param {*} [options] Override http request option.
3404
+ * @throws {RequiredError}
3405
+ * @memberof MetaApi
3406
+ */
3407
+ metaGetRoot(options) {
3408
+ return MetaApiFp(this.configuration)
3409
+ .metaGetRoot(options)
3410
+ .then((request) => request(this.axios, this.basePath));
3411
+ }
3412
+ }
3413
+ //# sourceMappingURL=api.js.map