@platformatic/watt-extra 0.1.0

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 (95) hide show
  1. package/README.md +87 -0
  2. package/app.js +124 -0
  3. package/cli.js +141 -0
  4. package/clients/compliance/compliance-types.d.ts +887 -0
  5. package/clients/compliance/compliance.mjs +1049 -0
  6. package/clients/compliance/compliance.openapi.json +6127 -0
  7. package/clients/control-plane/control-plane-types.d.ts +2696 -0
  8. package/clients/control-plane/control-plane.mjs +3051 -0
  9. package/clients/control-plane/control-plane.openapi.json +13693 -0
  10. package/clients/cron/cron-types.d.ts +1479 -0
  11. package/clients/cron/cron.mjs +872 -0
  12. package/clients/cron/cron.openapi.json +9330 -0
  13. package/compliance/index.js +21 -0
  14. package/compliance/rules/dependencies.js +76 -0
  15. package/compliance/rules/utils.js +12 -0
  16. package/eslint.config.js +11 -0
  17. package/help/start.txt +12 -0
  18. package/help/watt-extra.txt +12 -0
  19. package/index.js +45 -0
  20. package/lib/banner.js +22 -0
  21. package/lib/errors.js +34 -0
  22. package/lib/utils.js +34 -0
  23. package/lib/wattpro.js +580 -0
  24. package/package.json +50 -0
  25. package/plugins/alerts.js +115 -0
  26. package/plugins/auth.js +89 -0
  27. package/plugins/compliancy.js +70 -0
  28. package/plugins/env.js +58 -0
  29. package/plugins/flamegraphs.js +100 -0
  30. package/plugins/init.js +70 -0
  31. package/plugins/metadata.js +84 -0
  32. package/plugins/scheduler.js +48 -0
  33. package/plugins/update.js +128 -0
  34. package/renovate.json +6 -0
  35. package/test/alerts.test.js +607 -0
  36. package/test/auth.test.js +128 -0
  37. package/test/auto-cache.test.js +401 -0
  38. package/test/cli.test.js +75 -0
  39. package/test/compliancy.test.js +87 -0
  40. package/test/fixtures/runtime-domains/alpha/package.json +5 -0
  41. package/test/fixtures/runtime-domains/alpha/platformatic.json +6 -0
  42. package/test/fixtures/runtime-domains/alpha/plugin.js +16 -0
  43. package/test/fixtures/runtime-domains/beta/package.json +5 -0
  44. package/test/fixtures/runtime-domains/beta/platformatic.json +6 -0
  45. package/test/fixtures/runtime-domains/beta/plugin.js +7 -0
  46. package/test/fixtures/runtime-domains/composer/package.json +5 -0
  47. package/test/fixtures/runtime-domains/composer/platformatic.json +19 -0
  48. package/test/fixtures/runtime-domains/package.json +1 -0
  49. package/test/fixtures/runtime-domains/platformatic.json +27 -0
  50. package/test/fixtures/runtime-health/package.json +20 -0
  51. package/test/fixtures/runtime-health/platformatic.json +16 -0
  52. package/test/fixtures/runtime-health/services/service-1/package.json +17 -0
  53. package/test/fixtures/runtime-health/services/service-1/platformatic.json +16 -0
  54. package/test/fixtures/runtime-health/services/service-1/plugins/example.js +6 -0
  55. package/test/fixtures/runtime-health/services/service-1/routes/root.cjs +8 -0
  56. package/test/fixtures/runtime-health/services/service-2/package.json +17 -0
  57. package/test/fixtures/runtime-health/services/service-2/platformatic.json +16 -0
  58. package/test/fixtures/runtime-health/services/service-2/plugins/example.js +6 -0
  59. package/test/fixtures/runtime-health/services/service-2/routes/root.cjs +8 -0
  60. package/test/fixtures/runtime-next/package.json +5 -0
  61. package/test/fixtures/runtime-next/platformatic.json +9 -0
  62. package/test/fixtures/runtime-next/web/next/next.config.js +2 -0
  63. package/test/fixtures/runtime-next/web/next/package.json +7 -0
  64. package/test/fixtures/runtime-next/web/next/platformatic.json +9 -0
  65. package/test/fixtures/runtime-next/web/next/src/app/direct/route.js +3 -0
  66. package/test/fixtures/runtime-next/web/next/src/app/layout.jsx +7 -0
  67. package/test/fixtures/runtime-next/web/next/src/app/page.jsx +3 -0
  68. package/test/fixtures/runtime-scheduler/main/package.json +5 -0
  69. package/test/fixtures/runtime-scheduler/main/platformatic.json +9 -0
  70. package/test/fixtures/runtime-scheduler/main/routes/root.cjs +11 -0
  71. package/test/fixtures/runtime-scheduler/package.json +1 -0
  72. package/test/fixtures/runtime-scheduler/platformatic.json +27 -0
  73. package/test/fixtures/runtime-service/main/package.json +5 -0
  74. package/test/fixtures/runtime-service/main/platformatic.json +12 -0
  75. package/test/fixtures/runtime-service/main/routes/root.cjs +11 -0
  76. package/test/fixtures/runtime-service/package.json +1 -0
  77. package/test/fixtures/runtime-service/platformatic.json +19 -0
  78. package/test/fixtures/service-1/package.json +7 -0
  79. package/test/fixtures/service-1/platformatic.json +18 -0
  80. package/test/fixtures/service-1/routes/root.cjs +48 -0
  81. package/test/fixtures/service-2/platformatic.json +21 -0
  82. package/test/fixtures/service-2/routes/root.cjs +5 -0
  83. package/test/fixtures/service-3/package.json +5 -0
  84. package/test/fixtures/service-3/platformatic.json +21 -0
  85. package/test/fixtures/service-3/routes/root.cjs +8 -0
  86. package/test/health.test.js +44 -0
  87. package/test/helper.js +274 -0
  88. package/test/init.test.js +243 -0
  89. package/test/patch-config.test.js +434 -0
  90. package/test/scheduler.test.js +71 -0
  91. package/test/send-to-icc-retry.test.js +138 -0
  92. package/test/shared-context.test.js +82 -0
  93. package/test/spawn.test.js +110 -0
  94. package/test/trigger-flamegraphs.test.js +226 -0
  95. package/test/update.test.js +519 -0
@@ -0,0 +1,3051 @@
1
+ // This client was generated by Platformatic from an OpenAPI specification.
2
+
3
+ // The base URL for the API. This can be overridden by calling `setBaseUrl`.
4
+ let baseUrl = ''
5
+ // The default headers to send within each request. This can be overridden by calling `setDefaultHeaders`.
6
+ let defaultHeaders = {}
7
+ // The additional parameters you want to pass to the `fetch` instance.
8
+ let defaultFetchParams = {}
9
+ const defaultJsonType = { 'Content-type': 'application/json; charset=utf-8' }
10
+
11
+ function sanitizeUrl(url) {
12
+ if (url.endsWith('/')) { return url.slice(0, -1) } else { return url }
13
+ }
14
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['setBaseUrl']} */
15
+ export const setBaseUrl = (newUrl) => { baseUrl = sanitizeUrl(newUrl) }
16
+
17
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['setDefaultHeaders']} */
18
+ export const setDefaultHeaders = (headers) => { defaultHeaders = headers }
19
+
20
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['setDefaultFetchParams']} */
21
+ export const setDefaultFetchParams = (fetchParams) => { defaultFetchParams = fetchParams }
22
+
23
+ function headersToJSON(headers) {
24
+ const output = {}
25
+ headers.forEach((value, key) => {
26
+ output[key] = value
27
+ })
28
+ return output
29
+ }
30
+
31
+ async function _getGenerations (url, request) {
32
+ const queryParameters = ['limit', 'offset', 'totalCount', 'fields', 'where.createdAt.eq', 'where.createdAt.neq', 'where.createdAt.gt', 'where.createdAt.gte', 'where.createdAt.lt', 'where.createdAt.lte', 'where.createdAt.like', 'where.createdAt.ilike', 'where.createdAt.in', 'where.createdAt.nin', 'where.createdAt.contains', 'where.createdAt.contained', 'where.createdAt.overlaps', 'where.id.eq', 'where.id.neq', 'where.id.gt', 'where.id.gte', 'where.id.lt', 'where.id.lte', 'where.id.like', 'where.id.ilike', 'where.id.in', 'where.id.nin', 'where.id.contains', 'where.id.contained', 'where.id.overlaps', 'where.version.eq', 'where.version.neq', 'where.version.gt', 'where.version.gte', 'where.version.lt', 'where.version.lte', 'where.version.like', 'where.version.ilike', 'where.version.in', 'where.version.nin', 'where.version.contains', 'where.version.contained', 'where.version.overlaps', 'where.or', 'orderby.createdAt', 'orderby.id', 'orderby.version']
33
+ const searchParams = new URLSearchParams()
34
+ if (request) {
35
+ queryParameters.forEach((qp) => {
36
+ const queryValue = request?.[qp]
37
+ if (queryValue) {
38
+ if (Array.isArray(queryValue)) {
39
+ queryValue.forEach((p) => searchParams.append(qp, p))
40
+ } else {
41
+ searchParams.append(qp, queryValue.toString())
42
+ }
43
+ }
44
+ delete request?.[qp]
45
+ })
46
+ }
47
+
48
+ const headers = {
49
+ ...defaultHeaders
50
+ }
51
+
52
+ const response = await fetch(`${url}/generations/?${searchParams.toString()}`, {
53
+ headers,
54
+ ...defaultFetchParams
55
+ })
56
+
57
+ if (!response.ok) {
58
+ throw new Error(await response.text())
59
+ }
60
+
61
+ return await response.json()
62
+ }
63
+
64
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getGenerations']} */
65
+ export const getGenerations = async (request) => {
66
+ return await _getGenerations(baseUrl, request)
67
+ }
68
+ async function _createGeneration (url, request) {
69
+ const body = request
70
+ const isFormData = body instanceof FormData
71
+ const headers = {
72
+ ...defaultHeaders,
73
+ ...(isFormData ? {} : defaultJsonType)
74
+ }
75
+
76
+ const response = await fetch(`${url}/generations/`, {
77
+ method: 'POST',
78
+ body: isFormData ? body : JSON.stringify(body),
79
+ headers,
80
+ ...defaultFetchParams
81
+ })
82
+
83
+ if (!response.ok) {
84
+ throw new Error(await response.text())
85
+ }
86
+
87
+ return await response.json()
88
+ }
89
+
90
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['createGeneration']} */
91
+ export const createGeneration = async (request) => {
92
+ return await _createGeneration(baseUrl, request)
93
+ }
94
+ async function _updateGenerations (url, request) {
95
+ const queryParameters = ['fields', 'where.createdAt.eq', 'where.createdAt.neq', 'where.createdAt.gt', 'where.createdAt.gte', 'where.createdAt.lt', 'where.createdAt.lte', 'where.createdAt.like', 'where.createdAt.ilike', 'where.createdAt.in', 'where.createdAt.nin', 'where.createdAt.contains', 'where.createdAt.contained', 'where.createdAt.overlaps', 'where.id.eq', 'where.id.neq', 'where.id.gt', 'where.id.gte', 'where.id.lt', 'where.id.lte', 'where.id.like', 'where.id.ilike', 'where.id.in', 'where.id.nin', 'where.id.contains', 'where.id.contained', 'where.id.overlaps', 'where.version.eq', 'where.version.neq', 'where.version.gt', 'where.version.gte', 'where.version.lt', 'where.version.lte', 'where.version.like', 'where.version.ilike', 'where.version.in', 'where.version.nin', 'where.version.contains', 'where.version.contained', 'where.version.overlaps', 'where.or']
96
+ const searchParams = new URLSearchParams()
97
+ if (request) {
98
+ queryParameters.forEach((qp) => {
99
+ const queryValue = request?.[qp]
100
+ if (queryValue) {
101
+ if (Array.isArray(queryValue)) {
102
+ queryValue.forEach((p) => searchParams.append(qp, p))
103
+ } else {
104
+ searchParams.append(qp, queryValue.toString())
105
+ }
106
+ }
107
+ delete request?.[qp]
108
+ })
109
+ }
110
+
111
+ const body = request
112
+ const isFormData = body instanceof FormData
113
+ const headers = {
114
+ ...defaultHeaders,
115
+ ...(isFormData ? {} : defaultJsonType)
116
+ }
117
+
118
+ const response = await fetch(`${url}/generations/?${searchParams.toString()}`, {
119
+ method: 'PUT',
120
+ body: isFormData ? body : JSON.stringify(body),
121
+ headers,
122
+ ...defaultFetchParams
123
+ })
124
+
125
+ if (!response.ok) {
126
+ throw new Error(await response.text())
127
+ }
128
+
129
+ return await response.json()
130
+ }
131
+
132
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['updateGenerations']} */
133
+ export const updateGenerations = async (request) => {
134
+ return await _updateGenerations(baseUrl, request)
135
+ }
136
+ async function _getGenerationById (url, request) {
137
+ const queryParameters = ['fields']
138
+ const searchParams = new URLSearchParams()
139
+ if (request) {
140
+ queryParameters.forEach((qp) => {
141
+ const queryValue = request?.[qp]
142
+ if (queryValue) {
143
+ if (Array.isArray(queryValue)) {
144
+ queryValue.forEach((p) => searchParams.append(qp, p))
145
+ } else {
146
+ searchParams.append(qp, queryValue.toString())
147
+ }
148
+ }
149
+ delete request?.[qp]
150
+ })
151
+ }
152
+
153
+ const headers = {
154
+ ...defaultHeaders
155
+ }
156
+
157
+ const response = await fetch(`${url}/generations/${request['id']}?${searchParams.toString()}`, {
158
+ headers,
159
+ ...defaultFetchParams
160
+ })
161
+
162
+ if (!response.ok) {
163
+ throw new Error(await response.text())
164
+ }
165
+
166
+ return await response.json()
167
+ }
168
+
169
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getGenerationById']} */
170
+ export const getGenerationById = async (request) => {
171
+ return await _getGenerationById(baseUrl, request)
172
+ }
173
+ async function _updateGeneration (url, request) {
174
+ const queryParameters = ['fields']
175
+ const searchParams = new URLSearchParams()
176
+ if (request) {
177
+ queryParameters.forEach((qp) => {
178
+ const queryValue = request?.[qp]
179
+ if (queryValue) {
180
+ if (Array.isArray(queryValue)) {
181
+ queryValue.forEach((p) => searchParams.append(qp, p))
182
+ } else {
183
+ searchParams.append(qp, queryValue.toString())
184
+ }
185
+ }
186
+ delete request?.[qp]
187
+ })
188
+ }
189
+
190
+ const body = request
191
+ const isFormData = body instanceof FormData
192
+ const headers = {
193
+ ...defaultHeaders,
194
+ ...(isFormData ? {} : defaultJsonType)
195
+ }
196
+
197
+ const response = await fetch(`${url}/generations/${request['id']}?${searchParams.toString()}`, {
198
+ method: 'PUT',
199
+ body: isFormData ? body : JSON.stringify(body),
200
+ headers,
201
+ ...defaultFetchParams
202
+ })
203
+
204
+ if (!response.ok) {
205
+ throw new Error(await response.text())
206
+ }
207
+
208
+ return await response.json()
209
+ }
210
+
211
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['updateGeneration']} */
212
+ export const updateGeneration = async (request) => {
213
+ return await _updateGeneration(baseUrl, request)
214
+ }
215
+ async function _deleteGenerations (url, request) {
216
+ const queryParameters = ['fields']
217
+ const searchParams = new URLSearchParams()
218
+ if (request) {
219
+ queryParameters.forEach((qp) => {
220
+ const queryValue = request?.[qp]
221
+ if (queryValue) {
222
+ if (Array.isArray(queryValue)) {
223
+ queryValue.forEach((p) => searchParams.append(qp, p))
224
+ } else {
225
+ searchParams.append(qp, queryValue.toString())
226
+ }
227
+ }
228
+ delete request?.[qp]
229
+ })
230
+ }
231
+
232
+ const body = request
233
+ const isFormData = body instanceof FormData
234
+ const headers = {
235
+ ...defaultHeaders,
236
+ ...(isFormData ? {} : defaultJsonType)
237
+ }
238
+
239
+ const response = await fetch(`${url}/generations/${request['id']}?${searchParams.toString()}`, {
240
+ method: 'DELETE',
241
+ body: isFormData ? body : JSON.stringify(body),
242
+ headers,
243
+ ...defaultFetchParams
244
+ })
245
+
246
+ if (!response.ok) {
247
+ throw new Error(await response.text())
248
+ }
249
+
250
+ return await response.json()
251
+ }
252
+
253
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['deleteGenerations']} */
254
+ export const deleteGenerations = async (request) => {
255
+ return await _deleteGenerations(baseUrl, request)
256
+ }
257
+ async function _getGraphsForGeneration (url, request) {
258
+ const queryParameters = ['fields']
259
+ const searchParams = new URLSearchParams()
260
+ if (request) {
261
+ queryParameters.forEach((qp) => {
262
+ const queryValue = request?.[qp]
263
+ if (queryValue) {
264
+ if (Array.isArray(queryValue)) {
265
+ queryValue.forEach((p) => searchParams.append(qp, p))
266
+ } else {
267
+ searchParams.append(qp, queryValue.toString())
268
+ }
269
+ }
270
+ delete request?.[qp]
271
+ })
272
+ }
273
+
274
+ const headers = {
275
+ ...defaultHeaders
276
+ }
277
+
278
+ const response = await fetch(`${url}/generations/${request['id']}/graphs?${searchParams.toString()}`, {
279
+ headers,
280
+ ...defaultFetchParams
281
+ })
282
+
283
+ if (!response.ok) {
284
+ throw new Error(await response.text())
285
+ }
286
+
287
+ return await response.json()
288
+ }
289
+
290
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getGraphsForGeneration']} */
291
+ export const getGraphsForGeneration = async (request) => {
292
+ return await _getGraphsForGeneration(baseUrl, request)
293
+ }
294
+ async function _getGenerationsDeploymentsForGeneration (url, request) {
295
+ const queryParameters = ['fields']
296
+ const searchParams = new URLSearchParams()
297
+ if (request) {
298
+ queryParameters.forEach((qp) => {
299
+ const queryValue = request?.[qp]
300
+ if (queryValue) {
301
+ if (Array.isArray(queryValue)) {
302
+ queryValue.forEach((p) => searchParams.append(qp, p))
303
+ } else {
304
+ searchParams.append(qp, queryValue.toString())
305
+ }
306
+ }
307
+ delete request?.[qp]
308
+ })
309
+ }
310
+
311
+ const headers = {
312
+ ...defaultHeaders
313
+ }
314
+
315
+ const response = await fetch(`${url}/generations/${request['id']}/generationsDeploymentGenerationId?${searchParams.toString()}`, {
316
+ headers,
317
+ ...defaultFetchParams
318
+ })
319
+
320
+ if (!response.ok) {
321
+ throw new Error(await response.text())
322
+ }
323
+
324
+ return await response.json()
325
+ }
326
+
327
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getGenerationsDeploymentsForGeneration']} */
328
+ export const getGenerationsDeploymentsForGeneration = async (request) => {
329
+ return await _getGenerationsDeploymentsForGeneration(baseUrl, request)
330
+ }
331
+ async function _getGenerationsApplicationsConfigsForGeneration (url, request) {
332
+ const queryParameters = ['fields']
333
+ const searchParams = new URLSearchParams()
334
+ if (request) {
335
+ queryParameters.forEach((qp) => {
336
+ const queryValue = request?.[qp]
337
+ if (queryValue) {
338
+ if (Array.isArray(queryValue)) {
339
+ queryValue.forEach((p) => searchParams.append(qp, p))
340
+ } else {
341
+ searchParams.append(qp, queryValue.toString())
342
+ }
343
+ }
344
+ delete request?.[qp]
345
+ })
346
+ }
347
+
348
+ const headers = {
349
+ ...defaultHeaders
350
+ }
351
+
352
+ const response = await fetch(`${url}/generations/${request['id']}/generationsApplicationsConfigGenerationId?${searchParams.toString()}`, {
353
+ headers,
354
+ ...defaultFetchParams
355
+ })
356
+
357
+ if (!response.ok) {
358
+ throw new Error(await response.text())
359
+ }
360
+
361
+ return await response.json()
362
+ }
363
+
364
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getGenerationsApplicationsConfigsForGeneration']} */
365
+ export const getGenerationsApplicationsConfigsForGeneration = async (request) => {
366
+ return await _getGenerationsApplicationsConfigsForGeneration(baseUrl, request)
367
+ }
368
+ async function _getGraphs (url, request) {
369
+ const queryParameters = ['limit', 'offset', 'totalCount', 'fields', 'where.createdAt.eq', 'where.createdAt.neq', 'where.createdAt.gt', 'where.createdAt.gte', 'where.createdAt.lt', 'where.createdAt.lte', 'where.createdAt.like', 'where.createdAt.ilike', 'where.createdAt.in', 'where.createdAt.nin', 'where.createdAt.contains', 'where.createdAt.contained', 'where.createdAt.overlaps', 'where.generationId.eq', 'where.generationId.neq', 'where.generationId.gt', 'where.generationId.gte', 'where.generationId.lt', 'where.generationId.lte', 'where.generationId.like', 'where.generationId.ilike', 'where.generationId.in', 'where.generationId.nin', 'where.generationId.contains', 'where.generationId.contained', 'where.generationId.overlaps', 'where.graph.eq', 'where.graph.neq', 'where.graph.gt', 'where.graph.gte', 'where.graph.lt', 'where.graph.lte', 'where.graph.like', 'where.graph.ilike', 'where.graph.in', 'where.graph.nin', 'where.graph.contains', 'where.graph.contained', 'where.graph.overlaps', 'where.id.eq', 'where.id.neq', 'where.id.gt', 'where.id.gte', 'where.id.lt', 'where.id.lte', 'where.id.like', 'where.id.ilike', 'where.id.in', 'where.id.nin', 'where.id.contains', 'where.id.contained', 'where.id.overlaps', 'where.or', 'orderby.createdAt', 'orderby.generationId', 'orderby.graph', 'orderby.id']
370
+ const searchParams = new URLSearchParams()
371
+ if (request) {
372
+ queryParameters.forEach((qp) => {
373
+ const queryValue = request?.[qp]
374
+ if (queryValue) {
375
+ if (Array.isArray(queryValue)) {
376
+ queryValue.forEach((p) => searchParams.append(qp, p))
377
+ } else {
378
+ searchParams.append(qp, queryValue.toString())
379
+ }
380
+ }
381
+ delete request?.[qp]
382
+ })
383
+ }
384
+
385
+ const headers = {
386
+ ...defaultHeaders
387
+ }
388
+
389
+ const response = await fetch(`${url}/graphs/?${searchParams.toString()}`, {
390
+ headers,
391
+ ...defaultFetchParams
392
+ })
393
+
394
+ if (!response.ok) {
395
+ throw new Error(await response.text())
396
+ }
397
+
398
+ return await response.json()
399
+ }
400
+
401
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getGraphs']} */
402
+ export const getGraphs = async (request) => {
403
+ return await _getGraphs(baseUrl, request)
404
+ }
405
+ async function _createGraph (url, request) {
406
+ const body = request
407
+ const isFormData = body instanceof FormData
408
+ const headers = {
409
+ ...defaultHeaders,
410
+ ...(isFormData ? {} : defaultJsonType)
411
+ }
412
+
413
+ const response = await fetch(`${url}/graphs/`, {
414
+ method: 'POST',
415
+ body: isFormData ? body : JSON.stringify(body),
416
+ headers,
417
+ ...defaultFetchParams
418
+ })
419
+
420
+ if (!response.ok) {
421
+ throw new Error(await response.text())
422
+ }
423
+
424
+ return await response.json()
425
+ }
426
+
427
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['createGraph']} */
428
+ export const createGraph = async (request) => {
429
+ return await _createGraph(baseUrl, request)
430
+ }
431
+ async function _updateGraphs (url, request) {
432
+ const queryParameters = ['fields', 'where.createdAt.eq', 'where.createdAt.neq', 'where.createdAt.gt', 'where.createdAt.gte', 'where.createdAt.lt', 'where.createdAt.lte', 'where.createdAt.like', 'where.createdAt.ilike', 'where.createdAt.in', 'where.createdAt.nin', 'where.createdAt.contains', 'where.createdAt.contained', 'where.createdAt.overlaps', 'where.generationId.eq', 'where.generationId.neq', 'where.generationId.gt', 'where.generationId.gte', 'where.generationId.lt', 'where.generationId.lte', 'where.generationId.like', 'where.generationId.ilike', 'where.generationId.in', 'where.generationId.nin', 'where.generationId.contains', 'where.generationId.contained', 'where.generationId.overlaps', 'where.graph.eq', 'where.graph.neq', 'where.graph.gt', 'where.graph.gte', 'where.graph.lt', 'where.graph.lte', 'where.graph.like', 'where.graph.ilike', 'where.graph.in', 'where.graph.nin', 'where.graph.contains', 'where.graph.contained', 'where.graph.overlaps', 'where.id.eq', 'where.id.neq', 'where.id.gt', 'where.id.gte', 'where.id.lt', 'where.id.lte', 'where.id.like', 'where.id.ilike', 'where.id.in', 'where.id.nin', 'where.id.contains', 'where.id.contained', 'where.id.overlaps', 'where.or']
433
+ const searchParams = new URLSearchParams()
434
+ if (request) {
435
+ queryParameters.forEach((qp) => {
436
+ const queryValue = request?.[qp]
437
+ if (queryValue) {
438
+ if (Array.isArray(queryValue)) {
439
+ queryValue.forEach((p) => searchParams.append(qp, p))
440
+ } else {
441
+ searchParams.append(qp, queryValue.toString())
442
+ }
443
+ }
444
+ delete request?.[qp]
445
+ })
446
+ }
447
+
448
+ const body = request
449
+ const isFormData = body instanceof FormData
450
+ const headers = {
451
+ ...defaultHeaders,
452
+ ...(isFormData ? {} : defaultJsonType)
453
+ }
454
+
455
+ const response = await fetch(`${url}/graphs/?${searchParams.toString()}`, {
456
+ method: 'PUT',
457
+ body: isFormData ? body : JSON.stringify(body),
458
+ headers,
459
+ ...defaultFetchParams
460
+ })
461
+
462
+ if (!response.ok) {
463
+ throw new Error(await response.text())
464
+ }
465
+
466
+ return await response.json()
467
+ }
468
+
469
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['updateGraphs']} */
470
+ export const updateGraphs = async (request) => {
471
+ return await _updateGraphs(baseUrl, request)
472
+ }
473
+ async function _getGraphById (url, request) {
474
+ const queryParameters = ['fields']
475
+ const searchParams = new URLSearchParams()
476
+ if (request) {
477
+ queryParameters.forEach((qp) => {
478
+ const queryValue = request?.[qp]
479
+ if (queryValue) {
480
+ if (Array.isArray(queryValue)) {
481
+ queryValue.forEach((p) => searchParams.append(qp, p))
482
+ } else {
483
+ searchParams.append(qp, queryValue.toString())
484
+ }
485
+ }
486
+ delete request?.[qp]
487
+ })
488
+ }
489
+
490
+ const headers = {
491
+ ...defaultHeaders
492
+ }
493
+
494
+ const response = await fetch(`${url}/graphs/${request['id']}?${searchParams.toString()}`, {
495
+ headers,
496
+ ...defaultFetchParams
497
+ })
498
+
499
+ if (!response.ok) {
500
+ throw new Error(await response.text())
501
+ }
502
+
503
+ return await response.json()
504
+ }
505
+
506
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getGraphById']} */
507
+ export const getGraphById = async (request) => {
508
+ return await _getGraphById(baseUrl, request)
509
+ }
510
+ async function _updateGraph (url, request) {
511
+ const queryParameters = ['fields']
512
+ const searchParams = new URLSearchParams()
513
+ if (request) {
514
+ queryParameters.forEach((qp) => {
515
+ const queryValue = request?.[qp]
516
+ if (queryValue) {
517
+ if (Array.isArray(queryValue)) {
518
+ queryValue.forEach((p) => searchParams.append(qp, p))
519
+ } else {
520
+ searchParams.append(qp, queryValue.toString())
521
+ }
522
+ }
523
+ delete request?.[qp]
524
+ })
525
+ }
526
+
527
+ const body = request
528
+ const isFormData = body instanceof FormData
529
+ const headers = {
530
+ ...defaultHeaders,
531
+ ...(isFormData ? {} : defaultJsonType)
532
+ }
533
+
534
+ const response = await fetch(`${url}/graphs/${request['id']}?${searchParams.toString()}`, {
535
+ method: 'PUT',
536
+ body: isFormData ? body : JSON.stringify(body),
537
+ headers,
538
+ ...defaultFetchParams
539
+ })
540
+
541
+ if (!response.ok) {
542
+ throw new Error(await response.text())
543
+ }
544
+
545
+ return await response.json()
546
+ }
547
+
548
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['updateGraph']} */
549
+ export const updateGraph = async (request) => {
550
+ return await _updateGraph(baseUrl, request)
551
+ }
552
+ async function _deleteGraphs (url, request) {
553
+ const queryParameters = ['fields']
554
+ const searchParams = new URLSearchParams()
555
+ if (request) {
556
+ queryParameters.forEach((qp) => {
557
+ const queryValue = request?.[qp]
558
+ if (queryValue) {
559
+ if (Array.isArray(queryValue)) {
560
+ queryValue.forEach((p) => searchParams.append(qp, p))
561
+ } else {
562
+ searchParams.append(qp, queryValue.toString())
563
+ }
564
+ }
565
+ delete request?.[qp]
566
+ })
567
+ }
568
+
569
+ const body = request
570
+ const isFormData = body instanceof FormData
571
+ const headers = {
572
+ ...defaultHeaders,
573
+ ...(isFormData ? {} : defaultJsonType)
574
+ }
575
+
576
+ const response = await fetch(`${url}/graphs/${request['id']}?${searchParams.toString()}`, {
577
+ method: 'DELETE',
578
+ body: isFormData ? body : JSON.stringify(body),
579
+ headers,
580
+ ...defaultFetchParams
581
+ })
582
+
583
+ if (!response.ok) {
584
+ throw new Error(await response.text())
585
+ }
586
+
587
+ return await response.json()
588
+ }
589
+
590
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['deleteGraphs']} */
591
+ export const deleteGraphs = async (request) => {
592
+ return await _deleteGraphs(baseUrl, request)
593
+ }
594
+ async function _getGenerationForGraph (url, request) {
595
+ const queryParameters = ['fields']
596
+ const searchParams = new URLSearchParams()
597
+ if (request) {
598
+ queryParameters.forEach((qp) => {
599
+ const queryValue = request?.[qp]
600
+ if (queryValue) {
601
+ if (Array.isArray(queryValue)) {
602
+ queryValue.forEach((p) => searchParams.append(qp, p))
603
+ } else {
604
+ searchParams.append(qp, queryValue.toString())
605
+ }
606
+ }
607
+ delete request?.[qp]
608
+ })
609
+ }
610
+
611
+ const headers = {
612
+ ...defaultHeaders
613
+ }
614
+
615
+ const response = await fetch(`${url}/graphs/${request['id']}/generation?${searchParams.toString()}`, {
616
+ headers,
617
+ ...defaultFetchParams
618
+ })
619
+
620
+ if (!response.ok) {
621
+ throw new Error(await response.text())
622
+ }
623
+
624
+ return await response.json()
625
+ }
626
+
627
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getGenerationForGraph']} */
628
+ export const getGenerationForGraph = async (request) => {
629
+ return await _getGenerationForGraph(baseUrl, request)
630
+ }
631
+ async function _getApplications (url, request) {
632
+ const queryParameters = ['limit', 'offset', 'totalCount', 'fields', 'where.createdAt.eq', 'where.createdAt.neq', 'where.createdAt.gt', 'where.createdAt.gte', 'where.createdAt.lt', 'where.createdAt.lte', 'where.createdAt.like', 'where.createdAt.ilike', 'where.createdAt.in', 'where.createdAt.nin', 'where.createdAt.contains', 'where.createdAt.contained', 'where.createdAt.overlaps', 'where.id.eq', 'where.id.neq', 'where.id.gt', 'where.id.gte', 'where.id.lt', 'where.id.lte', 'where.id.like', 'where.id.ilike', 'where.id.in', 'where.id.nin', 'where.id.contains', 'where.id.contained', 'where.id.overlaps', 'where.name.eq', 'where.name.neq', 'where.name.gt', 'where.name.gte', 'where.name.lt', 'where.name.lte', 'where.name.like', 'where.name.ilike', 'where.name.in', 'where.name.nin', 'where.name.contains', 'where.name.contained', 'where.name.overlaps', 'where.or', 'orderby.createdAt', 'orderby.id', 'orderby.name']
633
+ const searchParams = new URLSearchParams()
634
+ if (request) {
635
+ queryParameters.forEach((qp) => {
636
+ const queryValue = request?.[qp]
637
+ if (queryValue) {
638
+ if (Array.isArray(queryValue)) {
639
+ queryValue.forEach((p) => searchParams.append(qp, p))
640
+ } else {
641
+ searchParams.append(qp, queryValue.toString())
642
+ }
643
+ }
644
+ delete request?.[qp]
645
+ })
646
+ }
647
+
648
+ const headers = {
649
+ ...defaultHeaders
650
+ }
651
+
652
+ const response = await fetch(`${url}/applications/?${searchParams.toString()}`, {
653
+ headers,
654
+ ...defaultFetchParams
655
+ })
656
+
657
+ if (!response.ok) {
658
+ throw new Error(await response.text())
659
+ }
660
+
661
+ return await response.json()
662
+ }
663
+
664
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getApplications']} */
665
+ export const getApplications = async (request) => {
666
+ return await _getApplications(baseUrl, request)
667
+ }
668
+ async function _createApplication (url, request) {
669
+ const body = request
670
+ const isFormData = body instanceof FormData
671
+ const headers = {
672
+ ...defaultHeaders,
673
+ ...(isFormData ? {} : defaultJsonType)
674
+ }
675
+
676
+ const response = await fetch(`${url}/applications/`, {
677
+ method: 'POST',
678
+ body: isFormData ? body : JSON.stringify(body),
679
+ headers,
680
+ ...defaultFetchParams
681
+ })
682
+
683
+ if (!response.ok) {
684
+ throw new Error(await response.text())
685
+ }
686
+
687
+ return await response.json()
688
+ }
689
+
690
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['createApplication']} */
691
+ export const createApplication = async (request) => {
692
+ return await _createApplication(baseUrl, request)
693
+ }
694
+ async function _updateApplications (url, request) {
695
+ const queryParameters = ['fields', 'where.createdAt.eq', 'where.createdAt.neq', 'where.createdAt.gt', 'where.createdAt.gte', 'where.createdAt.lt', 'where.createdAt.lte', 'where.createdAt.like', 'where.createdAt.ilike', 'where.createdAt.in', 'where.createdAt.nin', 'where.createdAt.contains', 'where.createdAt.contained', 'where.createdAt.overlaps', 'where.id.eq', 'where.id.neq', 'where.id.gt', 'where.id.gte', 'where.id.lt', 'where.id.lte', 'where.id.like', 'where.id.ilike', 'where.id.in', 'where.id.nin', 'where.id.contains', 'where.id.contained', 'where.id.overlaps', 'where.name.eq', 'where.name.neq', 'where.name.gt', 'where.name.gte', 'where.name.lt', 'where.name.lte', 'where.name.like', 'where.name.ilike', 'where.name.in', 'where.name.nin', 'where.name.contains', 'where.name.contained', 'where.name.overlaps', 'where.or']
696
+ const searchParams = new URLSearchParams()
697
+ if (request) {
698
+ queryParameters.forEach((qp) => {
699
+ const queryValue = request?.[qp]
700
+ if (queryValue) {
701
+ if (Array.isArray(queryValue)) {
702
+ queryValue.forEach((p) => searchParams.append(qp, p))
703
+ } else {
704
+ searchParams.append(qp, queryValue.toString())
705
+ }
706
+ }
707
+ delete request?.[qp]
708
+ })
709
+ }
710
+
711
+ const body = request
712
+ const isFormData = body instanceof FormData
713
+ const headers = {
714
+ ...defaultHeaders,
715
+ ...(isFormData ? {} : defaultJsonType)
716
+ }
717
+
718
+ const response = await fetch(`${url}/applications/?${searchParams.toString()}`, {
719
+ method: 'PUT',
720
+ body: isFormData ? body : JSON.stringify(body),
721
+ headers,
722
+ ...defaultFetchParams
723
+ })
724
+
725
+ if (!response.ok) {
726
+ throw new Error(await response.text())
727
+ }
728
+
729
+ return await response.json()
730
+ }
731
+
732
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['updateApplications']} */
733
+ export const updateApplications = async (request) => {
734
+ return await _updateApplications(baseUrl, request)
735
+ }
736
+ async function _getApplicationById (url, request) {
737
+ const queryParameters = ['fields']
738
+ const searchParams = new URLSearchParams()
739
+ if (request) {
740
+ queryParameters.forEach((qp) => {
741
+ const queryValue = request?.[qp]
742
+ if (queryValue) {
743
+ if (Array.isArray(queryValue)) {
744
+ queryValue.forEach((p) => searchParams.append(qp, p))
745
+ } else {
746
+ searchParams.append(qp, queryValue.toString())
747
+ }
748
+ }
749
+ delete request?.[qp]
750
+ })
751
+ }
752
+
753
+ const headers = {
754
+ ...defaultHeaders
755
+ }
756
+
757
+ const response = await fetch(`${url}/applications/${request['id']}?${searchParams.toString()}`, {
758
+ headers,
759
+ ...defaultFetchParams
760
+ })
761
+
762
+ if (!response.ok) {
763
+ throw new Error(await response.text())
764
+ }
765
+
766
+ return await response.json()
767
+ }
768
+
769
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getApplicationById']} */
770
+ export const getApplicationById = async (request) => {
771
+ return await _getApplicationById(baseUrl, request)
772
+ }
773
+ async function _updateApplication (url, request) {
774
+ const queryParameters = ['fields']
775
+ const searchParams = new URLSearchParams()
776
+ if (request) {
777
+ queryParameters.forEach((qp) => {
778
+ const queryValue = request?.[qp]
779
+ if (queryValue) {
780
+ if (Array.isArray(queryValue)) {
781
+ queryValue.forEach((p) => searchParams.append(qp, p))
782
+ } else {
783
+ searchParams.append(qp, queryValue.toString())
784
+ }
785
+ }
786
+ delete request?.[qp]
787
+ })
788
+ }
789
+
790
+ const body = request
791
+ const isFormData = body instanceof FormData
792
+ const headers = {
793
+ ...defaultHeaders,
794
+ ...(isFormData ? {} : defaultJsonType)
795
+ }
796
+
797
+ const response = await fetch(`${url}/applications/${request['id']}?${searchParams.toString()}`, {
798
+ method: 'PUT',
799
+ body: isFormData ? body : JSON.stringify(body),
800
+ headers,
801
+ ...defaultFetchParams
802
+ })
803
+
804
+ if (!response.ok) {
805
+ throw new Error(await response.text())
806
+ }
807
+
808
+ return await response.json()
809
+ }
810
+
811
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['updateApplication']} */
812
+ export const updateApplication = async (request) => {
813
+ return await _updateApplication(baseUrl, request)
814
+ }
815
+ async function _deleteApplications (url, request) {
816
+ const queryParameters = ['fields']
817
+ const searchParams = new URLSearchParams()
818
+ if (request) {
819
+ queryParameters.forEach((qp) => {
820
+ const queryValue = request?.[qp]
821
+ if (queryValue) {
822
+ if (Array.isArray(queryValue)) {
823
+ queryValue.forEach((p) => searchParams.append(qp, p))
824
+ } else {
825
+ searchParams.append(qp, queryValue.toString())
826
+ }
827
+ }
828
+ delete request?.[qp]
829
+ })
830
+ }
831
+
832
+ const body = request
833
+ const isFormData = body instanceof FormData
834
+ const headers = {
835
+ ...defaultHeaders,
836
+ ...(isFormData ? {} : defaultJsonType)
837
+ }
838
+
839
+ const response = await fetch(`${url}/applications/${request['id']}?${searchParams.toString()}`, {
840
+ method: 'DELETE',
841
+ body: isFormData ? body : JSON.stringify(body),
842
+ headers,
843
+ ...defaultFetchParams
844
+ })
845
+
846
+ if (!response.ok) {
847
+ throw new Error(await response.text())
848
+ }
849
+
850
+ return await response.json()
851
+ }
852
+
853
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['deleteApplications']} */
854
+ export const deleteApplications = async (request) => {
855
+ return await _deleteApplications(baseUrl, request)
856
+ }
857
+ async function _getApplicationsConfigsForApplication (url, request) {
858
+ const queryParameters = ['fields']
859
+ const searchParams = new URLSearchParams()
860
+ if (request) {
861
+ queryParameters.forEach((qp) => {
862
+ const queryValue = request?.[qp]
863
+ if (queryValue) {
864
+ if (Array.isArray(queryValue)) {
865
+ queryValue.forEach((p) => searchParams.append(qp, p))
866
+ } else {
867
+ searchParams.append(qp, queryValue.toString())
868
+ }
869
+ }
870
+ delete request?.[qp]
871
+ })
872
+ }
873
+
874
+ const headers = {
875
+ ...defaultHeaders
876
+ }
877
+
878
+ const response = await fetch(`${url}/applications/${request['id']}/applicationsConfigs?${searchParams.toString()}`, {
879
+ headers,
880
+ ...defaultFetchParams
881
+ })
882
+
883
+ if (!response.ok) {
884
+ throw new Error(await response.text())
885
+ }
886
+
887
+ return await response.json()
888
+ }
889
+
890
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getApplicationsConfigsForApplication']} */
891
+ export const getApplicationsConfigsForApplication = async (request) => {
892
+ return await _getApplicationsConfigsForApplication(baseUrl, request)
893
+ }
894
+ async function _getApplicationStatesForApplication (url, request) {
895
+ const queryParameters = ['fields']
896
+ const searchParams = new URLSearchParams()
897
+ if (request) {
898
+ queryParameters.forEach((qp) => {
899
+ const queryValue = request?.[qp]
900
+ if (queryValue) {
901
+ if (Array.isArray(queryValue)) {
902
+ queryValue.forEach((p) => searchParams.append(qp, p))
903
+ } else {
904
+ searchParams.append(qp, queryValue.toString())
905
+ }
906
+ }
907
+ delete request?.[qp]
908
+ })
909
+ }
910
+
911
+ const headers = {
912
+ ...defaultHeaders
913
+ }
914
+
915
+ const response = await fetch(`${url}/applications/${request['id']}/applicationStates?${searchParams.toString()}`, {
916
+ headers,
917
+ ...defaultFetchParams
918
+ })
919
+
920
+ if (!response.ok) {
921
+ throw new Error(await response.text())
922
+ }
923
+
924
+ return await response.json()
925
+ }
926
+
927
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getApplicationStatesForApplication']} */
928
+ export const getApplicationStatesForApplication = async (request) => {
929
+ return await _getApplicationStatesForApplication(baseUrl, request)
930
+ }
931
+ async function _getDeploymentsForApplication (url, request) {
932
+ const queryParameters = ['fields']
933
+ const searchParams = new URLSearchParams()
934
+ if (request) {
935
+ queryParameters.forEach((qp) => {
936
+ const queryValue = request?.[qp]
937
+ if (queryValue) {
938
+ if (Array.isArray(queryValue)) {
939
+ queryValue.forEach((p) => searchParams.append(qp, p))
940
+ } else {
941
+ searchParams.append(qp, queryValue.toString())
942
+ }
943
+ }
944
+ delete request?.[qp]
945
+ })
946
+ }
947
+
948
+ const headers = {
949
+ ...defaultHeaders
950
+ }
951
+
952
+ const response = await fetch(`${url}/applications/${request['id']}/deploymentApplicationId?${searchParams.toString()}`, {
953
+ headers,
954
+ ...defaultFetchParams
955
+ })
956
+
957
+ if (!response.ok) {
958
+ throw new Error(await response.text())
959
+ }
960
+
961
+ return await response.json()
962
+ }
963
+
964
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getDeploymentsForApplication']} */
965
+ export const getDeploymentsForApplication = async (request) => {
966
+ return await _getDeploymentsForApplication(baseUrl, request)
967
+ }
968
+ async function _getDetectedPodsForApplication (url, request) {
969
+ const queryParameters = ['fields']
970
+ const searchParams = new URLSearchParams()
971
+ if (request) {
972
+ queryParameters.forEach((qp) => {
973
+ const queryValue = request?.[qp]
974
+ if (queryValue) {
975
+ if (Array.isArray(queryValue)) {
976
+ queryValue.forEach((p) => searchParams.append(qp, p))
977
+ } else {
978
+ searchParams.append(qp, queryValue.toString())
979
+ }
980
+ }
981
+ delete request?.[qp]
982
+ })
983
+ }
984
+
985
+ const headers = {
986
+ ...defaultHeaders
987
+ }
988
+
989
+ const response = await fetch(`${url}/applications/${request['id']}/detectedPodApplicationId?${searchParams.toString()}`, {
990
+ headers,
991
+ ...defaultFetchParams
992
+ })
993
+
994
+ if (!response.ok) {
995
+ throw new Error(await response.text())
996
+ }
997
+
998
+ return await response.json()
999
+ }
1000
+
1001
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getDetectedPodsForApplication']} */
1002
+ export const getDetectedPodsForApplication = async (request) => {
1003
+ return await _getDetectedPodsForApplication(baseUrl, request)
1004
+ }
1005
+ async function _getApplicationsConfigs (url, request) {
1006
+ const queryParameters = ['limit', 'offset', 'totalCount', 'fields', 'where.applicationId.eq', 'where.applicationId.neq', 'where.applicationId.gt', 'where.applicationId.gte', 'where.applicationId.lt', 'where.applicationId.lte', 'where.applicationId.like', 'where.applicationId.ilike', 'where.applicationId.in', 'where.applicationId.nin', 'where.applicationId.contains', 'where.applicationId.contained', 'where.applicationId.overlaps', 'where.createdAt.eq', 'where.createdAt.neq', 'where.createdAt.gt', 'where.createdAt.gte', 'where.createdAt.lt', 'where.createdAt.lte', 'where.createdAt.like', 'where.createdAt.ilike', 'where.createdAt.in', 'where.createdAt.nin', 'where.createdAt.contains', 'where.createdAt.contained', 'where.createdAt.overlaps', 'where.id.eq', 'where.id.neq', 'where.id.gt', 'where.id.gte', 'where.id.lt', 'where.id.lte', 'where.id.like', 'where.id.ilike', 'where.id.in', 'where.id.nin', 'where.id.contains', 'where.id.contained', 'where.id.overlaps', 'where.resources.eq', 'where.resources.neq', 'where.resources.gt', 'where.resources.gte', 'where.resources.lt', 'where.resources.lte', 'where.resources.like', 'where.resources.ilike', 'where.resources.in', 'where.resources.nin', 'where.resources.contains', 'where.resources.contained', 'where.resources.overlaps', 'where.version.eq', 'where.version.neq', 'where.version.gt', 'where.version.gte', 'where.version.lt', 'where.version.lte', 'where.version.like', 'where.version.ilike', 'where.version.in', 'where.version.nin', 'where.version.contains', 'where.version.contained', 'where.version.overlaps', 'where.or', 'orderby.applicationId', 'orderby.createdAt', 'orderby.id', 'orderby.resources', 'orderby.version']
1007
+ const searchParams = new URLSearchParams()
1008
+ if (request) {
1009
+ queryParameters.forEach((qp) => {
1010
+ const queryValue = request?.[qp]
1011
+ if (queryValue) {
1012
+ if (Array.isArray(queryValue)) {
1013
+ queryValue.forEach((p) => searchParams.append(qp, p))
1014
+ } else {
1015
+ searchParams.append(qp, queryValue.toString())
1016
+ }
1017
+ }
1018
+ delete request?.[qp]
1019
+ })
1020
+ }
1021
+
1022
+ const headers = {
1023
+ ...defaultHeaders
1024
+ }
1025
+
1026
+ const response = await fetch(`${url}/applicationsConfigs/?${searchParams.toString()}`, {
1027
+ headers,
1028
+ ...defaultFetchParams
1029
+ })
1030
+
1031
+ if (!response.ok) {
1032
+ throw new Error(await response.text())
1033
+ }
1034
+
1035
+ return await response.json()
1036
+ }
1037
+
1038
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getApplicationsConfigs']} */
1039
+ export const getApplicationsConfigs = async (request) => {
1040
+ return await _getApplicationsConfigs(baseUrl, request)
1041
+ }
1042
+ async function _createApplicationsConfig (url, request) {
1043
+ const body = request
1044
+ const isFormData = body instanceof FormData
1045
+ const headers = {
1046
+ ...defaultHeaders,
1047
+ ...(isFormData ? {} : defaultJsonType)
1048
+ }
1049
+
1050
+ const response = await fetch(`${url}/applicationsConfigs/`, {
1051
+ method: 'POST',
1052
+ body: isFormData ? body : JSON.stringify(body),
1053
+ headers,
1054
+ ...defaultFetchParams
1055
+ })
1056
+
1057
+ if (!response.ok) {
1058
+ throw new Error(await response.text())
1059
+ }
1060
+
1061
+ return await response.json()
1062
+ }
1063
+
1064
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['createApplicationsConfig']} */
1065
+ export const createApplicationsConfig = async (request) => {
1066
+ return await _createApplicationsConfig(baseUrl, request)
1067
+ }
1068
+ async function _updateApplicationsConfigs (url, request) {
1069
+ const queryParameters = ['fields', 'where.applicationId.eq', 'where.applicationId.neq', 'where.applicationId.gt', 'where.applicationId.gte', 'where.applicationId.lt', 'where.applicationId.lte', 'where.applicationId.like', 'where.applicationId.ilike', 'where.applicationId.in', 'where.applicationId.nin', 'where.applicationId.contains', 'where.applicationId.contained', 'where.applicationId.overlaps', 'where.createdAt.eq', 'where.createdAt.neq', 'where.createdAt.gt', 'where.createdAt.gte', 'where.createdAt.lt', 'where.createdAt.lte', 'where.createdAt.like', 'where.createdAt.ilike', 'where.createdAt.in', 'where.createdAt.nin', 'where.createdAt.contains', 'where.createdAt.contained', 'where.createdAt.overlaps', 'where.id.eq', 'where.id.neq', 'where.id.gt', 'where.id.gte', 'where.id.lt', 'where.id.lte', 'where.id.like', 'where.id.ilike', 'where.id.in', 'where.id.nin', 'where.id.contains', 'where.id.contained', 'where.id.overlaps', 'where.resources.eq', 'where.resources.neq', 'where.resources.gt', 'where.resources.gte', 'where.resources.lt', 'where.resources.lte', 'where.resources.like', 'where.resources.ilike', 'where.resources.in', 'where.resources.nin', 'where.resources.contains', 'where.resources.contained', 'where.resources.overlaps', 'where.version.eq', 'where.version.neq', 'where.version.gt', 'where.version.gte', 'where.version.lt', 'where.version.lte', 'where.version.like', 'where.version.ilike', 'where.version.in', 'where.version.nin', 'where.version.contains', 'where.version.contained', 'where.version.overlaps', 'where.or']
1070
+ const searchParams = new URLSearchParams()
1071
+ if (request) {
1072
+ queryParameters.forEach((qp) => {
1073
+ const queryValue = request?.[qp]
1074
+ if (queryValue) {
1075
+ if (Array.isArray(queryValue)) {
1076
+ queryValue.forEach((p) => searchParams.append(qp, p))
1077
+ } else {
1078
+ searchParams.append(qp, queryValue.toString())
1079
+ }
1080
+ }
1081
+ delete request?.[qp]
1082
+ })
1083
+ }
1084
+
1085
+ const body = request
1086
+ const isFormData = body instanceof FormData
1087
+ const headers = {
1088
+ ...defaultHeaders,
1089
+ ...(isFormData ? {} : defaultJsonType)
1090
+ }
1091
+
1092
+ const response = await fetch(`${url}/applicationsConfigs/?${searchParams.toString()}`, {
1093
+ method: 'PUT',
1094
+ body: isFormData ? body : JSON.stringify(body),
1095
+ headers,
1096
+ ...defaultFetchParams
1097
+ })
1098
+
1099
+ if (!response.ok) {
1100
+ throw new Error(await response.text())
1101
+ }
1102
+
1103
+ return await response.json()
1104
+ }
1105
+
1106
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['updateApplicationsConfigs']} */
1107
+ export const updateApplicationsConfigs = async (request) => {
1108
+ return await _updateApplicationsConfigs(baseUrl, request)
1109
+ }
1110
+ async function _getApplicationsConfigById (url, request) {
1111
+ const queryParameters = ['fields']
1112
+ const searchParams = new URLSearchParams()
1113
+ if (request) {
1114
+ queryParameters.forEach((qp) => {
1115
+ const queryValue = request?.[qp]
1116
+ if (queryValue) {
1117
+ if (Array.isArray(queryValue)) {
1118
+ queryValue.forEach((p) => searchParams.append(qp, p))
1119
+ } else {
1120
+ searchParams.append(qp, queryValue.toString())
1121
+ }
1122
+ }
1123
+ delete request?.[qp]
1124
+ })
1125
+ }
1126
+
1127
+ const headers = {
1128
+ ...defaultHeaders
1129
+ }
1130
+
1131
+ const response = await fetch(`${url}/applicationsConfigs/${request['id']}?${searchParams.toString()}`, {
1132
+ headers,
1133
+ ...defaultFetchParams
1134
+ })
1135
+
1136
+ if (!response.ok) {
1137
+ throw new Error(await response.text())
1138
+ }
1139
+
1140
+ return await response.json()
1141
+ }
1142
+
1143
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getApplicationsConfigById']} */
1144
+ export const getApplicationsConfigById = async (request) => {
1145
+ return await _getApplicationsConfigById(baseUrl, request)
1146
+ }
1147
+ async function _updateApplicationsConfig (url, request) {
1148
+ const queryParameters = ['fields']
1149
+ const searchParams = new URLSearchParams()
1150
+ if (request) {
1151
+ queryParameters.forEach((qp) => {
1152
+ const queryValue = request?.[qp]
1153
+ if (queryValue) {
1154
+ if (Array.isArray(queryValue)) {
1155
+ queryValue.forEach((p) => searchParams.append(qp, p))
1156
+ } else {
1157
+ searchParams.append(qp, queryValue.toString())
1158
+ }
1159
+ }
1160
+ delete request?.[qp]
1161
+ })
1162
+ }
1163
+
1164
+ const body = request
1165
+ const isFormData = body instanceof FormData
1166
+ const headers = {
1167
+ ...defaultHeaders,
1168
+ ...(isFormData ? {} : defaultJsonType)
1169
+ }
1170
+
1171
+ const response = await fetch(`${url}/applicationsConfigs/${request['id']}?${searchParams.toString()}`, {
1172
+ method: 'PUT',
1173
+ body: isFormData ? body : JSON.stringify(body),
1174
+ headers,
1175
+ ...defaultFetchParams
1176
+ })
1177
+
1178
+ if (!response.ok) {
1179
+ throw new Error(await response.text())
1180
+ }
1181
+
1182
+ return await response.json()
1183
+ }
1184
+
1185
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['updateApplicationsConfig']} */
1186
+ export const updateApplicationsConfig = async (request) => {
1187
+ return await _updateApplicationsConfig(baseUrl, request)
1188
+ }
1189
+ async function _deleteApplicationsConfigs (url, request) {
1190
+ const queryParameters = ['fields']
1191
+ const searchParams = new URLSearchParams()
1192
+ if (request) {
1193
+ queryParameters.forEach((qp) => {
1194
+ const queryValue = request?.[qp]
1195
+ if (queryValue) {
1196
+ if (Array.isArray(queryValue)) {
1197
+ queryValue.forEach((p) => searchParams.append(qp, p))
1198
+ } else {
1199
+ searchParams.append(qp, queryValue.toString())
1200
+ }
1201
+ }
1202
+ delete request?.[qp]
1203
+ })
1204
+ }
1205
+
1206
+ const body = request
1207
+ const isFormData = body instanceof FormData
1208
+ const headers = {
1209
+ ...defaultHeaders,
1210
+ ...(isFormData ? {} : defaultJsonType)
1211
+ }
1212
+
1213
+ const response = await fetch(`${url}/applicationsConfigs/${request['id']}?${searchParams.toString()}`, {
1214
+ method: 'DELETE',
1215
+ body: isFormData ? body : JSON.stringify(body),
1216
+ headers,
1217
+ ...defaultFetchParams
1218
+ })
1219
+
1220
+ if (!response.ok) {
1221
+ throw new Error(await response.text())
1222
+ }
1223
+
1224
+ return await response.json()
1225
+ }
1226
+
1227
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['deleteApplicationsConfigs']} */
1228
+ export const deleteApplicationsConfigs = async (request) => {
1229
+ return await _deleteApplicationsConfigs(baseUrl, request)
1230
+ }
1231
+ async function _getGenerationsApplicationsConfigsForApplicationsConfig (url, request) {
1232
+ const queryParameters = ['fields']
1233
+ const searchParams = new URLSearchParams()
1234
+ if (request) {
1235
+ queryParameters.forEach((qp) => {
1236
+ const queryValue = request?.[qp]
1237
+ if (queryValue) {
1238
+ if (Array.isArray(queryValue)) {
1239
+ queryValue.forEach((p) => searchParams.append(qp, p))
1240
+ } else {
1241
+ searchParams.append(qp, queryValue.toString())
1242
+ }
1243
+ }
1244
+ delete request?.[qp]
1245
+ })
1246
+ }
1247
+
1248
+ const headers = {
1249
+ ...defaultHeaders
1250
+ }
1251
+
1252
+ const response = await fetch(`${url}/applicationsConfigs/${request['id']}/generationsApplicationsConfigConfigId?${searchParams.toString()}`, {
1253
+ headers,
1254
+ ...defaultFetchParams
1255
+ })
1256
+
1257
+ if (!response.ok) {
1258
+ throw new Error(await response.text())
1259
+ }
1260
+
1261
+ return await response.json()
1262
+ }
1263
+
1264
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getGenerationsApplicationsConfigsForApplicationsConfig']} */
1265
+ export const getGenerationsApplicationsConfigsForApplicationsConfig = async (request) => {
1266
+ return await _getGenerationsApplicationsConfigsForApplicationsConfig(baseUrl, request)
1267
+ }
1268
+ async function _getApplicationForApplicationsConfig (url, request) {
1269
+ const queryParameters = ['fields']
1270
+ const searchParams = new URLSearchParams()
1271
+ if (request) {
1272
+ queryParameters.forEach((qp) => {
1273
+ const queryValue = request?.[qp]
1274
+ if (queryValue) {
1275
+ if (Array.isArray(queryValue)) {
1276
+ queryValue.forEach((p) => searchParams.append(qp, p))
1277
+ } else {
1278
+ searchParams.append(qp, queryValue.toString())
1279
+ }
1280
+ }
1281
+ delete request?.[qp]
1282
+ })
1283
+ }
1284
+
1285
+ const headers = {
1286
+ ...defaultHeaders
1287
+ }
1288
+
1289
+ const response = await fetch(`${url}/applicationsConfigs/${request['id']}/application?${searchParams.toString()}`, {
1290
+ headers,
1291
+ ...defaultFetchParams
1292
+ })
1293
+
1294
+ if (!response.ok) {
1295
+ throw new Error(await response.text())
1296
+ }
1297
+
1298
+ return await response.json()
1299
+ }
1300
+
1301
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getApplicationForApplicationsConfig']} */
1302
+ export const getApplicationForApplicationsConfig = async (request) => {
1303
+ return await _getApplicationForApplicationsConfig(baseUrl, request)
1304
+ }
1305
+ async function _getApplicationStates (url, request) {
1306
+ const queryParameters = ['limit', 'offset', 'totalCount', 'fields', 'where.applicationId.eq', 'where.applicationId.neq', 'where.applicationId.gt', 'where.applicationId.gte', 'where.applicationId.lt', 'where.applicationId.lte', 'where.applicationId.like', 'where.applicationId.ilike', 'where.applicationId.in', 'where.applicationId.nin', 'where.applicationId.contains', 'where.applicationId.contained', 'where.applicationId.overlaps', 'where.createdAt.eq', 'where.createdAt.neq', 'where.createdAt.gt', 'where.createdAt.gte', 'where.createdAt.lt', 'where.createdAt.lte', 'where.createdAt.like', 'where.createdAt.ilike', 'where.createdAt.in', 'where.createdAt.nin', 'where.createdAt.contains', 'where.createdAt.contained', 'where.createdAt.overlaps', 'where.id.eq', 'where.id.neq', 'where.id.gt', 'where.id.gte', 'where.id.lt', 'where.id.lte', 'where.id.like', 'where.id.ilike', 'where.id.in', 'where.id.nin', 'where.id.contains', 'where.id.contained', 'where.id.overlaps', 'where.pltVersion.eq', 'where.pltVersion.neq', 'where.pltVersion.gt', 'where.pltVersion.gte', 'where.pltVersion.lt', 'where.pltVersion.lte', 'where.pltVersion.like', 'where.pltVersion.ilike', 'where.pltVersion.in', 'where.pltVersion.nin', 'where.pltVersion.contains', 'where.pltVersion.contained', 'where.pltVersion.overlaps', 'where.state.eq', 'where.state.neq', 'where.state.gt', 'where.state.gte', 'where.state.lt', 'where.state.lte', 'where.state.like', 'where.state.ilike', 'where.state.in', 'where.state.nin', 'where.state.contains', 'where.state.contained', 'where.state.overlaps', 'where.or', 'orderby.applicationId', 'orderby.createdAt', 'orderby.id', 'orderby.pltVersion', 'orderby.state']
1307
+ const searchParams = new URLSearchParams()
1308
+ if (request) {
1309
+ queryParameters.forEach((qp) => {
1310
+ const queryValue = request?.[qp]
1311
+ if (queryValue) {
1312
+ if (Array.isArray(queryValue)) {
1313
+ queryValue.forEach((p) => searchParams.append(qp, p))
1314
+ } else {
1315
+ searchParams.append(qp, queryValue.toString())
1316
+ }
1317
+ }
1318
+ delete request?.[qp]
1319
+ })
1320
+ }
1321
+
1322
+ const headers = {
1323
+ ...defaultHeaders
1324
+ }
1325
+
1326
+ const response = await fetch(`${url}/applicationStates/?${searchParams.toString()}`, {
1327
+ headers,
1328
+ ...defaultFetchParams
1329
+ })
1330
+
1331
+ if (!response.ok) {
1332
+ throw new Error(await response.text())
1333
+ }
1334
+
1335
+ return await response.json()
1336
+ }
1337
+
1338
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getApplicationStates']} */
1339
+ export const getApplicationStates = async (request) => {
1340
+ return await _getApplicationStates(baseUrl, request)
1341
+ }
1342
+ async function _createApplicationState (url, request) {
1343
+ const body = request
1344
+ const isFormData = body instanceof FormData
1345
+ const headers = {
1346
+ ...defaultHeaders,
1347
+ ...(isFormData ? {} : defaultJsonType)
1348
+ }
1349
+
1350
+ const response = await fetch(`${url}/applicationStates/`, {
1351
+ method: 'POST',
1352
+ body: isFormData ? body : JSON.stringify(body),
1353
+ headers,
1354
+ ...defaultFetchParams
1355
+ })
1356
+
1357
+ if (!response.ok) {
1358
+ throw new Error(await response.text())
1359
+ }
1360
+
1361
+ return await response.json()
1362
+ }
1363
+
1364
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['createApplicationState']} */
1365
+ export const createApplicationState = async (request) => {
1366
+ return await _createApplicationState(baseUrl, request)
1367
+ }
1368
+ async function _updateApplicationStates (url, request) {
1369
+ const queryParameters = ['fields', 'where.applicationId.eq', 'where.applicationId.neq', 'where.applicationId.gt', 'where.applicationId.gte', 'where.applicationId.lt', 'where.applicationId.lte', 'where.applicationId.like', 'where.applicationId.ilike', 'where.applicationId.in', 'where.applicationId.nin', 'where.applicationId.contains', 'where.applicationId.contained', 'where.applicationId.overlaps', 'where.createdAt.eq', 'where.createdAt.neq', 'where.createdAt.gt', 'where.createdAt.gte', 'where.createdAt.lt', 'where.createdAt.lte', 'where.createdAt.like', 'where.createdAt.ilike', 'where.createdAt.in', 'where.createdAt.nin', 'where.createdAt.contains', 'where.createdAt.contained', 'where.createdAt.overlaps', 'where.id.eq', 'where.id.neq', 'where.id.gt', 'where.id.gte', 'where.id.lt', 'where.id.lte', 'where.id.like', 'where.id.ilike', 'where.id.in', 'where.id.nin', 'where.id.contains', 'where.id.contained', 'where.id.overlaps', 'where.pltVersion.eq', 'where.pltVersion.neq', 'where.pltVersion.gt', 'where.pltVersion.gte', 'where.pltVersion.lt', 'where.pltVersion.lte', 'where.pltVersion.like', 'where.pltVersion.ilike', 'where.pltVersion.in', 'where.pltVersion.nin', 'where.pltVersion.contains', 'where.pltVersion.contained', 'where.pltVersion.overlaps', 'where.state.eq', 'where.state.neq', 'where.state.gt', 'where.state.gte', 'where.state.lt', 'where.state.lte', 'where.state.like', 'where.state.ilike', 'where.state.in', 'where.state.nin', 'where.state.contains', 'where.state.contained', 'where.state.overlaps', 'where.or']
1370
+ const searchParams = new URLSearchParams()
1371
+ if (request) {
1372
+ queryParameters.forEach((qp) => {
1373
+ const queryValue = request?.[qp]
1374
+ if (queryValue) {
1375
+ if (Array.isArray(queryValue)) {
1376
+ queryValue.forEach((p) => searchParams.append(qp, p))
1377
+ } else {
1378
+ searchParams.append(qp, queryValue.toString())
1379
+ }
1380
+ }
1381
+ delete request?.[qp]
1382
+ })
1383
+ }
1384
+
1385
+ const body = request
1386
+ const isFormData = body instanceof FormData
1387
+ const headers = {
1388
+ ...defaultHeaders,
1389
+ ...(isFormData ? {} : defaultJsonType)
1390
+ }
1391
+
1392
+ const response = await fetch(`${url}/applicationStates/?${searchParams.toString()}`, {
1393
+ method: 'PUT',
1394
+ body: isFormData ? body : JSON.stringify(body),
1395
+ headers,
1396
+ ...defaultFetchParams
1397
+ })
1398
+
1399
+ if (!response.ok) {
1400
+ throw new Error(await response.text())
1401
+ }
1402
+
1403
+ return await response.json()
1404
+ }
1405
+
1406
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['updateApplicationStates']} */
1407
+ export const updateApplicationStates = async (request) => {
1408
+ return await _updateApplicationStates(baseUrl, request)
1409
+ }
1410
+ async function _getApplicationStateById (url, request) {
1411
+ const queryParameters = ['fields']
1412
+ const searchParams = new URLSearchParams()
1413
+ if (request) {
1414
+ queryParameters.forEach((qp) => {
1415
+ const queryValue = request?.[qp]
1416
+ if (queryValue) {
1417
+ if (Array.isArray(queryValue)) {
1418
+ queryValue.forEach((p) => searchParams.append(qp, p))
1419
+ } else {
1420
+ searchParams.append(qp, queryValue.toString())
1421
+ }
1422
+ }
1423
+ delete request?.[qp]
1424
+ })
1425
+ }
1426
+
1427
+ const headers = {
1428
+ ...defaultHeaders
1429
+ }
1430
+
1431
+ const response = await fetch(`${url}/applicationStates/${request['id']}?${searchParams.toString()}`, {
1432
+ headers,
1433
+ ...defaultFetchParams
1434
+ })
1435
+
1436
+ if (!response.ok) {
1437
+ throw new Error(await response.text())
1438
+ }
1439
+
1440
+ return await response.json()
1441
+ }
1442
+
1443
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getApplicationStateById']} */
1444
+ export const getApplicationStateById = async (request) => {
1445
+ return await _getApplicationStateById(baseUrl, request)
1446
+ }
1447
+ async function _updateApplicationState (url, request) {
1448
+ const queryParameters = ['fields']
1449
+ const searchParams = new URLSearchParams()
1450
+ if (request) {
1451
+ queryParameters.forEach((qp) => {
1452
+ const queryValue = request?.[qp]
1453
+ if (queryValue) {
1454
+ if (Array.isArray(queryValue)) {
1455
+ queryValue.forEach((p) => searchParams.append(qp, p))
1456
+ } else {
1457
+ searchParams.append(qp, queryValue.toString())
1458
+ }
1459
+ }
1460
+ delete request?.[qp]
1461
+ })
1462
+ }
1463
+
1464
+ const body = request
1465
+ const isFormData = body instanceof FormData
1466
+ const headers = {
1467
+ ...defaultHeaders,
1468
+ ...(isFormData ? {} : defaultJsonType)
1469
+ }
1470
+
1471
+ const response = await fetch(`${url}/applicationStates/${request['id']}?${searchParams.toString()}`, {
1472
+ method: 'PUT',
1473
+ body: isFormData ? body : JSON.stringify(body),
1474
+ headers,
1475
+ ...defaultFetchParams
1476
+ })
1477
+
1478
+ if (!response.ok) {
1479
+ throw new Error(await response.text())
1480
+ }
1481
+
1482
+ return await response.json()
1483
+ }
1484
+
1485
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['updateApplicationState']} */
1486
+ export const updateApplicationState = async (request) => {
1487
+ return await _updateApplicationState(baseUrl, request)
1488
+ }
1489
+ async function _deleteApplicationStates (url, request) {
1490
+ const queryParameters = ['fields']
1491
+ const searchParams = new URLSearchParams()
1492
+ if (request) {
1493
+ queryParameters.forEach((qp) => {
1494
+ const queryValue = request?.[qp]
1495
+ if (queryValue) {
1496
+ if (Array.isArray(queryValue)) {
1497
+ queryValue.forEach((p) => searchParams.append(qp, p))
1498
+ } else {
1499
+ searchParams.append(qp, queryValue.toString())
1500
+ }
1501
+ }
1502
+ delete request?.[qp]
1503
+ })
1504
+ }
1505
+
1506
+ const body = request
1507
+ const isFormData = body instanceof FormData
1508
+ const headers = {
1509
+ ...defaultHeaders,
1510
+ ...(isFormData ? {} : defaultJsonType)
1511
+ }
1512
+
1513
+ const response = await fetch(`${url}/applicationStates/${request['id']}?${searchParams.toString()}`, {
1514
+ method: 'DELETE',
1515
+ body: isFormData ? body : JSON.stringify(body),
1516
+ headers,
1517
+ ...defaultFetchParams
1518
+ })
1519
+
1520
+ if (!response.ok) {
1521
+ throw new Error(await response.text())
1522
+ }
1523
+
1524
+ return await response.json()
1525
+ }
1526
+
1527
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['deleteApplicationStates']} */
1528
+ export const deleteApplicationStates = async (request) => {
1529
+ return await _deleteApplicationStates(baseUrl, request)
1530
+ }
1531
+ async function _getDeploymentsForApplicationState (url, request) {
1532
+ const queryParameters = ['fields']
1533
+ const searchParams = new URLSearchParams()
1534
+ if (request) {
1535
+ queryParameters.forEach((qp) => {
1536
+ const queryValue = request?.[qp]
1537
+ if (queryValue) {
1538
+ if (Array.isArray(queryValue)) {
1539
+ queryValue.forEach((p) => searchParams.append(qp, p))
1540
+ } else {
1541
+ searchParams.append(qp, queryValue.toString())
1542
+ }
1543
+ }
1544
+ delete request?.[qp]
1545
+ })
1546
+ }
1547
+
1548
+ const headers = {
1549
+ ...defaultHeaders
1550
+ }
1551
+
1552
+ const response = await fetch(`${url}/applicationStates/${request['id']}/deploymentApplicationStateId?${searchParams.toString()}`, {
1553
+ headers,
1554
+ ...defaultFetchParams
1555
+ })
1556
+
1557
+ if (!response.ok) {
1558
+ throw new Error(await response.text())
1559
+ }
1560
+
1561
+ return await response.json()
1562
+ }
1563
+
1564
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getDeploymentsForApplicationState']} */
1565
+ export const getDeploymentsForApplicationState = async (request) => {
1566
+ return await _getDeploymentsForApplicationState(baseUrl, request)
1567
+ }
1568
+ async function _getApplicationForApplicationState (url, request) {
1569
+ const queryParameters = ['fields']
1570
+ const searchParams = new URLSearchParams()
1571
+ if (request) {
1572
+ queryParameters.forEach((qp) => {
1573
+ const queryValue = request?.[qp]
1574
+ if (queryValue) {
1575
+ if (Array.isArray(queryValue)) {
1576
+ queryValue.forEach((p) => searchParams.append(qp, p))
1577
+ } else {
1578
+ searchParams.append(qp, queryValue.toString())
1579
+ }
1580
+ }
1581
+ delete request?.[qp]
1582
+ })
1583
+ }
1584
+
1585
+ const headers = {
1586
+ ...defaultHeaders
1587
+ }
1588
+
1589
+ const response = await fetch(`${url}/applicationStates/${request['id']}/application?${searchParams.toString()}`, {
1590
+ headers,
1591
+ ...defaultFetchParams
1592
+ })
1593
+
1594
+ if (!response.ok) {
1595
+ throw new Error(await response.text())
1596
+ }
1597
+
1598
+ return await response.json()
1599
+ }
1600
+
1601
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getApplicationForApplicationState']} */
1602
+ export const getApplicationForApplicationState = async (request) => {
1603
+ return await _getApplicationForApplicationState(baseUrl, request)
1604
+ }
1605
+ async function _getDeployments (url, request) {
1606
+ const queryParameters = ['limit', 'offset', 'totalCount', 'fields', 'where.applicationId.eq', 'where.applicationId.neq', 'where.applicationId.gt', 'where.applicationId.gte', 'where.applicationId.lt', 'where.applicationId.lte', 'where.applicationId.like', 'where.applicationId.ilike', 'where.applicationId.in', 'where.applicationId.nin', 'where.applicationId.contains', 'where.applicationId.contained', 'where.applicationId.overlaps', 'where.applicationStateId.eq', 'where.applicationStateId.neq', 'where.applicationStateId.gt', 'where.applicationStateId.gte', 'where.applicationStateId.lt', 'where.applicationStateId.lte', 'where.applicationStateId.like', 'where.applicationStateId.ilike', 'where.applicationStateId.in', 'where.applicationStateId.nin', 'where.applicationStateId.contains', 'where.applicationStateId.contained', 'where.applicationStateId.overlaps', 'where.createdAt.eq', 'where.createdAt.neq', 'where.createdAt.gt', 'where.createdAt.gte', 'where.createdAt.lt', 'where.createdAt.lte', 'where.createdAt.like', 'where.createdAt.ilike', 'where.createdAt.in', 'where.createdAt.nin', 'where.createdAt.contains', 'where.createdAt.contained', 'where.createdAt.overlaps', 'where.id.eq', 'where.id.neq', 'where.id.gt', 'where.id.gte', 'where.id.lt', 'where.id.lte', 'where.id.like', 'where.id.ilike', 'where.id.in', 'where.id.nin', 'where.id.contains', 'where.id.contained', 'where.id.overlaps', 'where.imageId.eq', 'where.imageId.neq', 'where.imageId.gt', 'where.imageId.gte', 'where.imageId.lt', 'where.imageId.lte', 'where.imageId.like', 'where.imageId.ilike', 'where.imageId.in', 'where.imageId.nin', 'where.imageId.contains', 'where.imageId.contained', 'where.imageId.overlaps', 'where.status.eq', 'where.status.neq', 'where.status.gt', 'where.status.gte', 'where.status.lt', 'where.status.lte', 'where.status.like', 'where.status.ilike', 'where.status.in', 'where.status.nin', 'where.status.contains', 'where.status.contained', 'where.status.overlaps', 'where.or', 'orderby.applicationId', 'orderby.applicationStateId', 'orderby.createdAt', 'orderby.id', 'orderby.imageId', 'orderby.status']
1607
+ const searchParams = new URLSearchParams()
1608
+ if (request) {
1609
+ queryParameters.forEach((qp) => {
1610
+ const queryValue = request?.[qp]
1611
+ if (queryValue) {
1612
+ if (Array.isArray(queryValue)) {
1613
+ queryValue.forEach((p) => searchParams.append(qp, p))
1614
+ } else {
1615
+ searchParams.append(qp, queryValue.toString())
1616
+ }
1617
+ }
1618
+ delete request?.[qp]
1619
+ })
1620
+ }
1621
+
1622
+ const headers = {
1623
+ ...defaultHeaders
1624
+ }
1625
+
1626
+ const response = await fetch(`${url}/deployments/?${searchParams.toString()}`, {
1627
+ headers,
1628
+ ...defaultFetchParams
1629
+ })
1630
+
1631
+ if (!response.ok) {
1632
+ throw new Error(await response.text())
1633
+ }
1634
+
1635
+ return await response.json()
1636
+ }
1637
+
1638
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getDeployments']} */
1639
+ export const getDeployments = async (request) => {
1640
+ return await _getDeployments(baseUrl, request)
1641
+ }
1642
+ async function _createDeployment (url, request) {
1643
+ const body = request
1644
+ const isFormData = body instanceof FormData
1645
+ const headers = {
1646
+ ...defaultHeaders,
1647
+ ...(isFormData ? {} : defaultJsonType)
1648
+ }
1649
+
1650
+ const response = await fetch(`${url}/deployments/`, {
1651
+ method: 'POST',
1652
+ body: isFormData ? body : JSON.stringify(body),
1653
+ headers,
1654
+ ...defaultFetchParams
1655
+ })
1656
+
1657
+ if (!response.ok) {
1658
+ throw new Error(await response.text())
1659
+ }
1660
+
1661
+ return await response.json()
1662
+ }
1663
+
1664
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['createDeployment']} */
1665
+ export const createDeployment = async (request) => {
1666
+ return await _createDeployment(baseUrl, request)
1667
+ }
1668
+ async function _updateDeployments (url, request) {
1669
+ const queryParameters = ['fields', 'where.applicationId.eq', 'where.applicationId.neq', 'where.applicationId.gt', 'where.applicationId.gte', 'where.applicationId.lt', 'where.applicationId.lte', 'where.applicationId.like', 'where.applicationId.ilike', 'where.applicationId.in', 'where.applicationId.nin', 'where.applicationId.contains', 'where.applicationId.contained', 'where.applicationId.overlaps', 'where.applicationStateId.eq', 'where.applicationStateId.neq', 'where.applicationStateId.gt', 'where.applicationStateId.gte', 'where.applicationStateId.lt', 'where.applicationStateId.lte', 'where.applicationStateId.like', 'where.applicationStateId.ilike', 'where.applicationStateId.in', 'where.applicationStateId.nin', 'where.applicationStateId.contains', 'where.applicationStateId.contained', 'where.applicationStateId.overlaps', 'where.createdAt.eq', 'where.createdAt.neq', 'where.createdAt.gt', 'where.createdAt.gte', 'where.createdAt.lt', 'where.createdAt.lte', 'where.createdAt.like', 'where.createdAt.ilike', 'where.createdAt.in', 'where.createdAt.nin', 'where.createdAt.contains', 'where.createdAt.contained', 'where.createdAt.overlaps', 'where.id.eq', 'where.id.neq', 'where.id.gt', 'where.id.gte', 'where.id.lt', 'where.id.lte', 'where.id.like', 'where.id.ilike', 'where.id.in', 'where.id.nin', 'where.id.contains', 'where.id.contained', 'where.id.overlaps', 'where.imageId.eq', 'where.imageId.neq', 'where.imageId.gt', 'where.imageId.gte', 'where.imageId.lt', 'where.imageId.lte', 'where.imageId.like', 'where.imageId.ilike', 'where.imageId.in', 'where.imageId.nin', 'where.imageId.contains', 'where.imageId.contained', 'where.imageId.overlaps', 'where.status.eq', 'where.status.neq', 'where.status.gt', 'where.status.gte', 'where.status.lt', 'where.status.lte', 'where.status.like', 'where.status.ilike', 'where.status.in', 'where.status.nin', 'where.status.contains', 'where.status.contained', 'where.status.overlaps', 'where.or']
1670
+ const searchParams = new URLSearchParams()
1671
+ if (request) {
1672
+ queryParameters.forEach((qp) => {
1673
+ const queryValue = request?.[qp]
1674
+ if (queryValue) {
1675
+ if (Array.isArray(queryValue)) {
1676
+ queryValue.forEach((p) => searchParams.append(qp, p))
1677
+ } else {
1678
+ searchParams.append(qp, queryValue.toString())
1679
+ }
1680
+ }
1681
+ delete request?.[qp]
1682
+ })
1683
+ }
1684
+
1685
+ const body = request
1686
+ const isFormData = body instanceof FormData
1687
+ const headers = {
1688
+ ...defaultHeaders,
1689
+ ...(isFormData ? {} : defaultJsonType)
1690
+ }
1691
+
1692
+ const response = await fetch(`${url}/deployments/?${searchParams.toString()}`, {
1693
+ method: 'PUT',
1694
+ body: isFormData ? body : JSON.stringify(body),
1695
+ headers,
1696
+ ...defaultFetchParams
1697
+ })
1698
+
1699
+ if (!response.ok) {
1700
+ throw new Error(await response.text())
1701
+ }
1702
+
1703
+ return await response.json()
1704
+ }
1705
+
1706
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['updateDeployments']} */
1707
+ export const updateDeployments = async (request) => {
1708
+ return await _updateDeployments(baseUrl, request)
1709
+ }
1710
+ async function _getDeploymentById (url, request) {
1711
+ const queryParameters = ['fields']
1712
+ const searchParams = new URLSearchParams()
1713
+ if (request) {
1714
+ queryParameters.forEach((qp) => {
1715
+ const queryValue = request?.[qp]
1716
+ if (queryValue) {
1717
+ if (Array.isArray(queryValue)) {
1718
+ queryValue.forEach((p) => searchParams.append(qp, p))
1719
+ } else {
1720
+ searchParams.append(qp, queryValue.toString())
1721
+ }
1722
+ }
1723
+ delete request?.[qp]
1724
+ })
1725
+ }
1726
+
1727
+ const headers = {
1728
+ ...defaultHeaders
1729
+ }
1730
+
1731
+ const response = await fetch(`${url}/deployments/${request['id']}?${searchParams.toString()}`, {
1732
+ headers,
1733
+ ...defaultFetchParams
1734
+ })
1735
+
1736
+ if (!response.ok) {
1737
+ throw new Error(await response.text())
1738
+ }
1739
+
1740
+ return await response.json()
1741
+ }
1742
+
1743
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getDeploymentById']} */
1744
+ export const getDeploymentById = async (request) => {
1745
+ return await _getDeploymentById(baseUrl, request)
1746
+ }
1747
+ async function _updateDeployment (url, request) {
1748
+ const queryParameters = ['fields']
1749
+ const searchParams = new URLSearchParams()
1750
+ if (request) {
1751
+ queryParameters.forEach((qp) => {
1752
+ const queryValue = request?.[qp]
1753
+ if (queryValue) {
1754
+ if (Array.isArray(queryValue)) {
1755
+ queryValue.forEach((p) => searchParams.append(qp, p))
1756
+ } else {
1757
+ searchParams.append(qp, queryValue.toString())
1758
+ }
1759
+ }
1760
+ delete request?.[qp]
1761
+ })
1762
+ }
1763
+
1764
+ const body = request
1765
+ const isFormData = body instanceof FormData
1766
+ const headers = {
1767
+ ...defaultHeaders,
1768
+ ...(isFormData ? {} : defaultJsonType)
1769
+ }
1770
+
1771
+ const response = await fetch(`${url}/deployments/${request['id']}?${searchParams.toString()}`, {
1772
+ method: 'PUT',
1773
+ body: isFormData ? body : JSON.stringify(body),
1774
+ headers,
1775
+ ...defaultFetchParams
1776
+ })
1777
+
1778
+ if (!response.ok) {
1779
+ throw new Error(await response.text())
1780
+ }
1781
+
1782
+ return await response.json()
1783
+ }
1784
+
1785
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['updateDeployment']} */
1786
+ export const updateDeployment = async (request) => {
1787
+ return await _updateDeployment(baseUrl, request)
1788
+ }
1789
+ async function _deleteDeployments (url, request) {
1790
+ const queryParameters = ['fields']
1791
+ const searchParams = new URLSearchParams()
1792
+ if (request) {
1793
+ queryParameters.forEach((qp) => {
1794
+ const queryValue = request?.[qp]
1795
+ if (queryValue) {
1796
+ if (Array.isArray(queryValue)) {
1797
+ queryValue.forEach((p) => searchParams.append(qp, p))
1798
+ } else {
1799
+ searchParams.append(qp, queryValue.toString())
1800
+ }
1801
+ }
1802
+ delete request?.[qp]
1803
+ })
1804
+ }
1805
+
1806
+ const body = request
1807
+ const isFormData = body instanceof FormData
1808
+ const headers = {
1809
+ ...defaultHeaders,
1810
+ ...(isFormData ? {} : defaultJsonType)
1811
+ }
1812
+
1813
+ const response = await fetch(`${url}/deployments/${request['id']}?${searchParams.toString()}`, {
1814
+ method: 'DELETE',
1815
+ body: isFormData ? body : JSON.stringify(body),
1816
+ headers,
1817
+ ...defaultFetchParams
1818
+ })
1819
+
1820
+ if (!response.ok) {
1821
+ throw new Error(await response.text())
1822
+ }
1823
+
1824
+ return await response.json()
1825
+ }
1826
+
1827
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['deleteDeployments']} */
1828
+ export const deleteDeployments = async (request) => {
1829
+ return await _deleteDeployments(baseUrl, request)
1830
+ }
1831
+ async function _getDetectedPodsForDeployment (url, request) {
1832
+ const queryParameters = ['fields']
1833
+ const searchParams = new URLSearchParams()
1834
+ if (request) {
1835
+ queryParameters.forEach((qp) => {
1836
+ const queryValue = request?.[qp]
1837
+ if (queryValue) {
1838
+ if (Array.isArray(queryValue)) {
1839
+ queryValue.forEach((p) => searchParams.append(qp, p))
1840
+ } else {
1841
+ searchParams.append(qp, queryValue.toString())
1842
+ }
1843
+ }
1844
+ delete request?.[qp]
1845
+ })
1846
+ }
1847
+
1848
+ const headers = {
1849
+ ...defaultHeaders
1850
+ }
1851
+
1852
+ const response = await fetch(`${url}/deployments/${request['id']}/detectedPodDeploymentId?${searchParams.toString()}`, {
1853
+ headers,
1854
+ ...defaultFetchParams
1855
+ })
1856
+
1857
+ if (!response.ok) {
1858
+ throw new Error(await response.text())
1859
+ }
1860
+
1861
+ return await response.json()
1862
+ }
1863
+
1864
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getDetectedPodsForDeployment']} */
1865
+ export const getDetectedPodsForDeployment = async (request) => {
1866
+ return await _getDetectedPodsForDeployment(baseUrl, request)
1867
+ }
1868
+ async function _getGenerationsDeploymentsForDeployment (url, request) {
1869
+ const queryParameters = ['fields']
1870
+ const searchParams = new URLSearchParams()
1871
+ if (request) {
1872
+ queryParameters.forEach((qp) => {
1873
+ const queryValue = request?.[qp]
1874
+ if (queryValue) {
1875
+ if (Array.isArray(queryValue)) {
1876
+ queryValue.forEach((p) => searchParams.append(qp, p))
1877
+ } else {
1878
+ searchParams.append(qp, queryValue.toString())
1879
+ }
1880
+ }
1881
+ delete request?.[qp]
1882
+ })
1883
+ }
1884
+
1885
+ const headers = {
1886
+ ...defaultHeaders
1887
+ }
1888
+
1889
+ const response = await fetch(`${url}/deployments/${request['id']}/generationsDeploymentDeploymentId?${searchParams.toString()}`, {
1890
+ headers,
1891
+ ...defaultFetchParams
1892
+ })
1893
+
1894
+ if (!response.ok) {
1895
+ throw new Error(await response.text())
1896
+ }
1897
+
1898
+ return await response.json()
1899
+ }
1900
+
1901
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getGenerationsDeploymentsForDeployment']} */
1902
+ export const getGenerationsDeploymentsForDeployment = async (request) => {
1903
+ return await _getGenerationsDeploymentsForDeployment(baseUrl, request)
1904
+ }
1905
+ async function _getApplicationForDeployment (url, request) {
1906
+ const queryParameters = ['fields']
1907
+ const searchParams = new URLSearchParams()
1908
+ if (request) {
1909
+ queryParameters.forEach((qp) => {
1910
+ const queryValue = request?.[qp]
1911
+ if (queryValue) {
1912
+ if (Array.isArray(queryValue)) {
1913
+ queryValue.forEach((p) => searchParams.append(qp, p))
1914
+ } else {
1915
+ searchParams.append(qp, queryValue.toString())
1916
+ }
1917
+ }
1918
+ delete request?.[qp]
1919
+ })
1920
+ }
1921
+
1922
+ const headers = {
1923
+ ...defaultHeaders
1924
+ }
1925
+
1926
+ const response = await fetch(`${url}/deployments/${request['id']}/application?${searchParams.toString()}`, {
1927
+ headers,
1928
+ ...defaultFetchParams
1929
+ })
1930
+
1931
+ if (!response.ok) {
1932
+ throw new Error(await response.text())
1933
+ }
1934
+
1935
+ return await response.json()
1936
+ }
1937
+
1938
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getApplicationForDeployment']} */
1939
+ export const getApplicationForDeployment = async (request) => {
1940
+ return await _getApplicationForDeployment(baseUrl, request)
1941
+ }
1942
+ async function _getApplicationStateForDeployment (url, request) {
1943
+ const queryParameters = ['fields']
1944
+ const searchParams = new URLSearchParams()
1945
+ if (request) {
1946
+ queryParameters.forEach((qp) => {
1947
+ const queryValue = request?.[qp]
1948
+ if (queryValue) {
1949
+ if (Array.isArray(queryValue)) {
1950
+ queryValue.forEach((p) => searchParams.append(qp, p))
1951
+ } else {
1952
+ searchParams.append(qp, queryValue.toString())
1953
+ }
1954
+ }
1955
+ delete request?.[qp]
1956
+ })
1957
+ }
1958
+
1959
+ const headers = {
1960
+ ...defaultHeaders
1961
+ }
1962
+
1963
+ const response = await fetch(`${url}/deployments/${request['id']}/application_state?${searchParams.toString()}`, {
1964
+ headers,
1965
+ ...defaultFetchParams
1966
+ })
1967
+
1968
+ if (!response.ok) {
1969
+ throw new Error(await response.text())
1970
+ }
1971
+
1972
+ return await response.json()
1973
+ }
1974
+
1975
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getApplicationStateForDeployment']} */
1976
+ export const getApplicationStateForDeployment = async (request) => {
1977
+ return await _getApplicationStateForDeployment(baseUrl, request)
1978
+ }
1979
+ async function _getDetectedPods (url, request) {
1980
+ const queryParameters = ['limit', 'offset', 'totalCount', 'fields', 'where.applicationId.eq', 'where.applicationId.neq', 'where.applicationId.gt', 'where.applicationId.gte', 'where.applicationId.lt', 'where.applicationId.lte', 'where.applicationId.like', 'where.applicationId.ilike', 'where.applicationId.in', 'where.applicationId.nin', 'where.applicationId.contains', 'where.applicationId.contained', 'where.applicationId.overlaps', 'where.createdAt.eq', 'where.createdAt.neq', 'where.createdAt.gt', 'where.createdAt.gte', 'where.createdAt.lt', 'where.createdAt.lte', 'where.createdAt.like', 'where.createdAt.ilike', 'where.createdAt.in', 'where.createdAt.nin', 'where.createdAt.contains', 'where.createdAt.contained', 'where.createdAt.overlaps', 'where.deploymentId.eq', 'where.deploymentId.neq', 'where.deploymentId.gt', 'where.deploymentId.gte', 'where.deploymentId.lt', 'where.deploymentId.lte', 'where.deploymentId.like', 'where.deploymentId.ilike', 'where.deploymentId.in', 'where.deploymentId.nin', 'where.deploymentId.contains', 'where.deploymentId.contained', 'where.deploymentId.overlaps', 'where.id.eq', 'where.id.neq', 'where.id.gt', 'where.id.gte', 'where.id.lt', 'where.id.lte', 'where.id.like', 'where.id.ilike', 'where.id.in', 'where.id.nin', 'where.id.contains', 'where.id.contained', 'where.id.overlaps', 'where.podId.eq', 'where.podId.neq', 'where.podId.gt', 'where.podId.gte', 'where.podId.lt', 'where.podId.lte', 'where.podId.like', 'where.podId.ilike', 'where.podId.in', 'where.podId.nin', 'where.podId.contains', 'where.podId.contained', 'where.podId.overlaps', 'where.status.eq', 'where.status.neq', 'where.status.gt', 'where.status.gte', 'where.status.lt', 'where.status.lte', 'where.status.like', 'where.status.ilike', 'where.status.in', 'where.status.nin', 'where.status.contains', 'where.status.contained', 'where.status.overlaps', 'where.or', 'orderby.applicationId', 'orderby.createdAt', 'orderby.deploymentId', 'orderby.id', 'orderby.podId', 'orderby.status']
1981
+ const searchParams = new URLSearchParams()
1982
+ if (request) {
1983
+ queryParameters.forEach((qp) => {
1984
+ const queryValue = request?.[qp]
1985
+ if (queryValue) {
1986
+ if (Array.isArray(queryValue)) {
1987
+ queryValue.forEach((p) => searchParams.append(qp, p))
1988
+ } else {
1989
+ searchParams.append(qp, queryValue.toString())
1990
+ }
1991
+ }
1992
+ delete request?.[qp]
1993
+ })
1994
+ }
1995
+
1996
+ const headers = {
1997
+ ...defaultHeaders
1998
+ }
1999
+
2000
+ const response = await fetch(`${url}/detectedPods/?${searchParams.toString()}`, {
2001
+ headers,
2002
+ ...defaultFetchParams
2003
+ })
2004
+
2005
+ if (!response.ok) {
2006
+ throw new Error(await response.text())
2007
+ }
2008
+
2009
+ return await response.json()
2010
+ }
2011
+
2012
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getDetectedPods']} */
2013
+ export const getDetectedPods = async (request) => {
2014
+ return await _getDetectedPods(baseUrl, request)
2015
+ }
2016
+ async function _createDetectedPod (url, request) {
2017
+ const body = request
2018
+ const isFormData = body instanceof FormData
2019
+ const headers = {
2020
+ ...defaultHeaders,
2021
+ ...(isFormData ? {} : defaultJsonType)
2022
+ }
2023
+
2024
+ const response = await fetch(`${url}/detectedPods/`, {
2025
+ method: 'POST',
2026
+ body: isFormData ? body : JSON.stringify(body),
2027
+ headers,
2028
+ ...defaultFetchParams
2029
+ })
2030
+
2031
+ if (!response.ok) {
2032
+ throw new Error(await response.text())
2033
+ }
2034
+
2035
+ return await response.json()
2036
+ }
2037
+
2038
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['createDetectedPod']} */
2039
+ export const createDetectedPod = async (request) => {
2040
+ return await _createDetectedPod(baseUrl, request)
2041
+ }
2042
+ async function _updateDetectedPods (url, request) {
2043
+ const queryParameters = ['fields', 'where.applicationId.eq', 'where.applicationId.neq', 'where.applicationId.gt', 'where.applicationId.gte', 'where.applicationId.lt', 'where.applicationId.lte', 'where.applicationId.like', 'where.applicationId.ilike', 'where.applicationId.in', 'where.applicationId.nin', 'where.applicationId.contains', 'where.applicationId.contained', 'where.applicationId.overlaps', 'where.createdAt.eq', 'where.createdAt.neq', 'where.createdAt.gt', 'where.createdAt.gte', 'where.createdAt.lt', 'where.createdAt.lte', 'where.createdAt.like', 'where.createdAt.ilike', 'where.createdAt.in', 'where.createdAt.nin', 'where.createdAt.contains', 'where.createdAt.contained', 'where.createdAt.overlaps', 'where.deploymentId.eq', 'where.deploymentId.neq', 'where.deploymentId.gt', 'where.deploymentId.gte', 'where.deploymentId.lt', 'where.deploymentId.lte', 'where.deploymentId.like', 'where.deploymentId.ilike', 'where.deploymentId.in', 'where.deploymentId.nin', 'where.deploymentId.contains', 'where.deploymentId.contained', 'where.deploymentId.overlaps', 'where.id.eq', 'where.id.neq', 'where.id.gt', 'where.id.gte', 'where.id.lt', 'where.id.lte', 'where.id.like', 'where.id.ilike', 'where.id.in', 'where.id.nin', 'where.id.contains', 'where.id.contained', 'where.id.overlaps', 'where.podId.eq', 'where.podId.neq', 'where.podId.gt', 'where.podId.gte', 'where.podId.lt', 'where.podId.lte', 'where.podId.like', 'where.podId.ilike', 'where.podId.in', 'where.podId.nin', 'where.podId.contains', 'where.podId.contained', 'where.podId.overlaps', 'where.status.eq', 'where.status.neq', 'where.status.gt', 'where.status.gte', 'where.status.lt', 'where.status.lte', 'where.status.like', 'where.status.ilike', 'where.status.in', 'where.status.nin', 'where.status.contains', 'where.status.contained', 'where.status.overlaps', 'where.or']
2044
+ const searchParams = new URLSearchParams()
2045
+ if (request) {
2046
+ queryParameters.forEach((qp) => {
2047
+ const queryValue = request?.[qp]
2048
+ if (queryValue) {
2049
+ if (Array.isArray(queryValue)) {
2050
+ queryValue.forEach((p) => searchParams.append(qp, p))
2051
+ } else {
2052
+ searchParams.append(qp, queryValue.toString())
2053
+ }
2054
+ }
2055
+ delete request?.[qp]
2056
+ })
2057
+ }
2058
+
2059
+ const body = request
2060
+ const isFormData = body instanceof FormData
2061
+ const headers = {
2062
+ ...defaultHeaders,
2063
+ ...(isFormData ? {} : defaultJsonType)
2064
+ }
2065
+
2066
+ const response = await fetch(`${url}/detectedPods/?${searchParams.toString()}`, {
2067
+ method: 'PUT',
2068
+ body: isFormData ? body : JSON.stringify(body),
2069
+ headers,
2070
+ ...defaultFetchParams
2071
+ })
2072
+
2073
+ if (!response.ok) {
2074
+ throw new Error(await response.text())
2075
+ }
2076
+
2077
+ return await response.json()
2078
+ }
2079
+
2080
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['updateDetectedPods']} */
2081
+ export const updateDetectedPods = async (request) => {
2082
+ return await _updateDetectedPods(baseUrl, request)
2083
+ }
2084
+ async function _getDetectedPodById (url, request) {
2085
+ const queryParameters = ['fields']
2086
+ const searchParams = new URLSearchParams()
2087
+ if (request) {
2088
+ queryParameters.forEach((qp) => {
2089
+ const queryValue = request?.[qp]
2090
+ if (queryValue) {
2091
+ if (Array.isArray(queryValue)) {
2092
+ queryValue.forEach((p) => searchParams.append(qp, p))
2093
+ } else {
2094
+ searchParams.append(qp, queryValue.toString())
2095
+ }
2096
+ }
2097
+ delete request?.[qp]
2098
+ })
2099
+ }
2100
+
2101
+ const headers = {
2102
+ ...defaultHeaders
2103
+ }
2104
+
2105
+ const response = await fetch(`${url}/detectedPods/${request['id']}?${searchParams.toString()}`, {
2106
+ headers,
2107
+ ...defaultFetchParams
2108
+ })
2109
+
2110
+ if (!response.ok) {
2111
+ throw new Error(await response.text())
2112
+ }
2113
+
2114
+ return await response.json()
2115
+ }
2116
+
2117
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getDetectedPodById']} */
2118
+ export const getDetectedPodById = async (request) => {
2119
+ return await _getDetectedPodById(baseUrl, request)
2120
+ }
2121
+ async function _updateDetectedPod (url, request) {
2122
+ const queryParameters = ['fields']
2123
+ const searchParams = new URLSearchParams()
2124
+ if (request) {
2125
+ queryParameters.forEach((qp) => {
2126
+ const queryValue = request?.[qp]
2127
+ if (queryValue) {
2128
+ if (Array.isArray(queryValue)) {
2129
+ queryValue.forEach((p) => searchParams.append(qp, p))
2130
+ } else {
2131
+ searchParams.append(qp, queryValue.toString())
2132
+ }
2133
+ }
2134
+ delete request?.[qp]
2135
+ })
2136
+ }
2137
+
2138
+ const body = request
2139
+ const isFormData = body instanceof FormData
2140
+ const headers = {
2141
+ ...defaultHeaders,
2142
+ ...(isFormData ? {} : defaultJsonType)
2143
+ }
2144
+
2145
+ const response = await fetch(`${url}/detectedPods/${request['id']}?${searchParams.toString()}`, {
2146
+ method: 'PUT',
2147
+ body: isFormData ? body : JSON.stringify(body),
2148
+ headers,
2149
+ ...defaultFetchParams
2150
+ })
2151
+
2152
+ if (!response.ok) {
2153
+ throw new Error(await response.text())
2154
+ }
2155
+
2156
+ return await response.json()
2157
+ }
2158
+
2159
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['updateDetectedPod']} */
2160
+ export const updateDetectedPod = async (request) => {
2161
+ return await _updateDetectedPod(baseUrl, request)
2162
+ }
2163
+ async function _deleteDetectedPods (url, request) {
2164
+ const queryParameters = ['fields']
2165
+ const searchParams = new URLSearchParams()
2166
+ if (request) {
2167
+ queryParameters.forEach((qp) => {
2168
+ const queryValue = request?.[qp]
2169
+ if (queryValue) {
2170
+ if (Array.isArray(queryValue)) {
2171
+ queryValue.forEach((p) => searchParams.append(qp, p))
2172
+ } else {
2173
+ searchParams.append(qp, queryValue.toString())
2174
+ }
2175
+ }
2176
+ delete request?.[qp]
2177
+ })
2178
+ }
2179
+
2180
+ const body = request
2181
+ const isFormData = body instanceof FormData
2182
+ const headers = {
2183
+ ...defaultHeaders,
2184
+ ...(isFormData ? {} : defaultJsonType)
2185
+ }
2186
+
2187
+ const response = await fetch(`${url}/detectedPods/${request['id']}?${searchParams.toString()}`, {
2188
+ method: 'DELETE',
2189
+ body: isFormData ? body : JSON.stringify(body),
2190
+ headers,
2191
+ ...defaultFetchParams
2192
+ })
2193
+
2194
+ if (!response.ok) {
2195
+ throw new Error(await response.text())
2196
+ }
2197
+
2198
+ return await response.json()
2199
+ }
2200
+
2201
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['deleteDetectedPods']} */
2202
+ export const deleteDetectedPods = async (request) => {
2203
+ return await _deleteDetectedPods(baseUrl, request)
2204
+ }
2205
+ async function _getApplicationForDetectedPod (url, request) {
2206
+ const queryParameters = ['fields']
2207
+ const searchParams = new URLSearchParams()
2208
+ if (request) {
2209
+ queryParameters.forEach((qp) => {
2210
+ const queryValue = request?.[qp]
2211
+ if (queryValue) {
2212
+ if (Array.isArray(queryValue)) {
2213
+ queryValue.forEach((p) => searchParams.append(qp, p))
2214
+ } else {
2215
+ searchParams.append(qp, queryValue.toString())
2216
+ }
2217
+ }
2218
+ delete request?.[qp]
2219
+ })
2220
+ }
2221
+
2222
+ const headers = {
2223
+ ...defaultHeaders
2224
+ }
2225
+
2226
+ const response = await fetch(`${url}/detectedPods/${request['id']}/application?${searchParams.toString()}`, {
2227
+ headers,
2228
+ ...defaultFetchParams
2229
+ })
2230
+
2231
+ if (!response.ok) {
2232
+ throw new Error(await response.text())
2233
+ }
2234
+
2235
+ return await response.json()
2236
+ }
2237
+
2238
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getApplicationForDetectedPod']} */
2239
+ export const getApplicationForDetectedPod = async (request) => {
2240
+ return await _getApplicationForDetectedPod(baseUrl, request)
2241
+ }
2242
+ async function _getDeploymentForDetectedPod (url, request) {
2243
+ const queryParameters = ['fields']
2244
+ const searchParams = new URLSearchParams()
2245
+ if (request) {
2246
+ queryParameters.forEach((qp) => {
2247
+ const queryValue = request?.[qp]
2248
+ if (queryValue) {
2249
+ if (Array.isArray(queryValue)) {
2250
+ queryValue.forEach((p) => searchParams.append(qp, p))
2251
+ } else {
2252
+ searchParams.append(qp, queryValue.toString())
2253
+ }
2254
+ }
2255
+ delete request?.[qp]
2256
+ })
2257
+ }
2258
+
2259
+ const headers = {
2260
+ ...defaultHeaders
2261
+ }
2262
+
2263
+ const response = await fetch(`${url}/detectedPods/${request['id']}/deployment?${searchParams.toString()}`, {
2264
+ headers,
2265
+ ...defaultFetchParams
2266
+ })
2267
+
2268
+ if (!response.ok) {
2269
+ throw new Error(await response.text())
2270
+ }
2271
+
2272
+ return await response.json()
2273
+ }
2274
+
2275
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getDeploymentForDetectedPod']} */
2276
+ export const getDeploymentForDetectedPod = async (request) => {
2277
+ return await _getDeploymentForDetectedPod(baseUrl, request)
2278
+ }
2279
+ async function _getGenerationsDeployments (url, request) {
2280
+ const queryParameters = ['limit', 'offset', 'totalCount', 'fields', 'where.deploymentId.eq', 'where.deploymentId.neq', 'where.deploymentId.gt', 'where.deploymentId.gte', 'where.deploymentId.lt', 'where.deploymentId.lte', 'where.deploymentId.like', 'where.deploymentId.ilike', 'where.deploymentId.in', 'where.deploymentId.nin', 'where.deploymentId.contains', 'where.deploymentId.contained', 'where.deploymentId.overlaps', 'where.generationId.eq', 'where.generationId.neq', 'where.generationId.gt', 'where.generationId.gte', 'where.generationId.lt', 'where.generationId.lte', 'where.generationId.like', 'where.generationId.ilike', 'where.generationId.in', 'where.generationId.nin', 'where.generationId.contains', 'where.generationId.contained', 'where.generationId.overlaps', 'where.or', 'orderby.deploymentId', 'orderby.generationId']
2281
+ const searchParams = new URLSearchParams()
2282
+ if (request) {
2283
+ queryParameters.forEach((qp) => {
2284
+ const queryValue = request?.[qp]
2285
+ if (queryValue) {
2286
+ if (Array.isArray(queryValue)) {
2287
+ queryValue.forEach((p) => searchParams.append(qp, p))
2288
+ } else {
2289
+ searchParams.append(qp, queryValue.toString())
2290
+ }
2291
+ }
2292
+ delete request?.[qp]
2293
+ })
2294
+ }
2295
+
2296
+ const headers = {
2297
+ ...defaultHeaders
2298
+ }
2299
+
2300
+ const response = await fetch(`${url}/generationsDeployments/?${searchParams.toString()}`, {
2301
+ headers,
2302
+ ...defaultFetchParams
2303
+ })
2304
+
2305
+ if (!response.ok) {
2306
+ throw new Error(await response.text())
2307
+ }
2308
+
2309
+ return await response.json()
2310
+ }
2311
+
2312
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getGenerationsDeployments']} */
2313
+ export const getGenerationsDeployments = async (request) => {
2314
+ return await _getGenerationsDeployments(baseUrl, request)
2315
+ }
2316
+ async function _createGenerationsDeployment (url, request) {
2317
+ const body = request
2318
+ const isFormData = body instanceof FormData
2319
+ const headers = {
2320
+ ...defaultHeaders,
2321
+ ...(isFormData ? {} : defaultJsonType)
2322
+ }
2323
+
2324
+ const response = await fetch(`${url}/generationsDeployments/`, {
2325
+ method: 'POST',
2326
+ body: isFormData ? body : JSON.stringify(body),
2327
+ headers,
2328
+ ...defaultFetchParams
2329
+ })
2330
+
2331
+ if (!response.ok) {
2332
+ throw new Error(await response.text())
2333
+ }
2334
+
2335
+ return await response.json()
2336
+ }
2337
+
2338
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['createGenerationsDeployment']} */
2339
+ export const createGenerationsDeployment = async (request) => {
2340
+ return await _createGenerationsDeployment(baseUrl, request)
2341
+ }
2342
+ async function _updateGenerationsDeployments (url, request) {
2343
+ const queryParameters = ['fields', 'where.deploymentId.eq', 'where.deploymentId.neq', 'where.deploymentId.gt', 'where.deploymentId.gte', 'where.deploymentId.lt', 'where.deploymentId.lte', 'where.deploymentId.like', 'where.deploymentId.ilike', 'where.deploymentId.in', 'where.deploymentId.nin', 'where.deploymentId.contains', 'where.deploymentId.contained', 'where.deploymentId.overlaps', 'where.generationId.eq', 'where.generationId.neq', 'where.generationId.gt', 'where.generationId.gte', 'where.generationId.lt', 'where.generationId.lte', 'where.generationId.like', 'where.generationId.ilike', 'where.generationId.in', 'where.generationId.nin', 'where.generationId.contains', 'where.generationId.contained', 'where.generationId.overlaps', 'where.or']
2344
+ const searchParams = new URLSearchParams()
2345
+ if (request) {
2346
+ queryParameters.forEach((qp) => {
2347
+ const queryValue = request?.[qp]
2348
+ if (queryValue) {
2349
+ if (Array.isArray(queryValue)) {
2350
+ queryValue.forEach((p) => searchParams.append(qp, p))
2351
+ } else {
2352
+ searchParams.append(qp, queryValue.toString())
2353
+ }
2354
+ }
2355
+ delete request?.[qp]
2356
+ })
2357
+ }
2358
+
2359
+ const body = request
2360
+ const isFormData = body instanceof FormData
2361
+ const headers = {
2362
+ ...defaultHeaders,
2363
+ ...(isFormData ? {} : defaultJsonType)
2364
+ }
2365
+
2366
+ const response = await fetch(`${url}/generationsDeployments/?${searchParams.toString()}`, {
2367
+ method: 'PUT',
2368
+ body: isFormData ? body : JSON.stringify(body),
2369
+ headers,
2370
+ ...defaultFetchParams
2371
+ })
2372
+
2373
+ if (!response.ok) {
2374
+ throw new Error(await response.text())
2375
+ }
2376
+
2377
+ return await response.json()
2378
+ }
2379
+
2380
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['updateGenerationsDeployments']} */
2381
+ export const updateGenerationsDeployments = async (request) => {
2382
+ return await _updateGenerationsDeployments(baseUrl, request)
2383
+ }
2384
+ async function _getGenerationsDeploymentByGenerationIdAndDeploymentId (url, request) {
2385
+ const queryParameters = ['fields']
2386
+ const searchParams = new URLSearchParams()
2387
+ if (request) {
2388
+ queryParameters.forEach((qp) => {
2389
+ const queryValue = request?.[qp]
2390
+ if (queryValue) {
2391
+ if (Array.isArray(queryValue)) {
2392
+ queryValue.forEach((p) => searchParams.append(qp, p))
2393
+ } else {
2394
+ searchParams.append(qp, queryValue.toString())
2395
+ }
2396
+ }
2397
+ delete request?.[qp]
2398
+ })
2399
+ }
2400
+
2401
+ const headers = {
2402
+ ...defaultHeaders
2403
+ }
2404
+
2405
+ const response = await fetch(`${url}/generationsDeployments/generation/${request['generationId']}/deployment/${request['deploymentId']}?${searchParams.toString()}`, {
2406
+ headers,
2407
+ ...defaultFetchParams
2408
+ })
2409
+
2410
+ if (!response.ok) {
2411
+ throw new Error(await response.text())
2412
+ }
2413
+
2414
+ return await response.json()
2415
+ }
2416
+
2417
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getGenerationsDeploymentByGenerationIdAndDeploymentId']} */
2418
+ export const getGenerationsDeploymentByGenerationIdAndDeploymentId = async (request) => {
2419
+ return await _getGenerationsDeploymentByGenerationIdAndDeploymentId(baseUrl, request)
2420
+ }
2421
+ async function _postGenerationsDeploymentsGenerationGenerationIdDeploymentDeploymentId (url, request) {
2422
+ const queryParameters = ['fields']
2423
+ const searchParams = new URLSearchParams()
2424
+ if (request) {
2425
+ queryParameters.forEach((qp) => {
2426
+ const queryValue = request?.[qp]
2427
+ if (queryValue) {
2428
+ if (Array.isArray(queryValue)) {
2429
+ queryValue.forEach((p) => searchParams.append(qp, p))
2430
+ } else {
2431
+ searchParams.append(qp, queryValue.toString())
2432
+ }
2433
+ }
2434
+ delete request?.[qp]
2435
+ })
2436
+ }
2437
+
2438
+ const body = request
2439
+ const isFormData = body instanceof FormData
2440
+ const headers = {
2441
+ ...defaultHeaders,
2442
+ ...(isFormData ? {} : defaultJsonType)
2443
+ }
2444
+
2445
+ const response = await fetch(`${url}/generationsDeployments/generation/${request['generationId']}/deployment/${request['deploymentId']}?${searchParams.toString()}`, {
2446
+ method: 'POST',
2447
+ body: isFormData ? body : JSON.stringify(body),
2448
+ headers,
2449
+ ...defaultFetchParams
2450
+ })
2451
+
2452
+ if (!response.ok) {
2453
+ throw new Error(await response.text())
2454
+ }
2455
+
2456
+ return await response.json()
2457
+ }
2458
+
2459
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['postGenerationsDeploymentsGenerationGenerationIdDeploymentDeploymentId']} */
2460
+ export const postGenerationsDeploymentsGenerationGenerationIdDeploymentDeploymentId = async (request) => {
2461
+ return await _postGenerationsDeploymentsGenerationGenerationIdDeploymentDeploymentId(baseUrl, request)
2462
+ }
2463
+ async function _putGenerationsDeploymentsGenerationGenerationIdDeploymentDeploymentId (url, request) {
2464
+ const queryParameters = ['fields']
2465
+ const searchParams = new URLSearchParams()
2466
+ if (request) {
2467
+ queryParameters.forEach((qp) => {
2468
+ const queryValue = request?.[qp]
2469
+ if (queryValue) {
2470
+ if (Array.isArray(queryValue)) {
2471
+ queryValue.forEach((p) => searchParams.append(qp, p))
2472
+ } else {
2473
+ searchParams.append(qp, queryValue.toString())
2474
+ }
2475
+ }
2476
+ delete request?.[qp]
2477
+ })
2478
+ }
2479
+
2480
+ const body = request
2481
+ const isFormData = body instanceof FormData
2482
+ const headers = {
2483
+ ...defaultHeaders,
2484
+ ...(isFormData ? {} : defaultJsonType)
2485
+ }
2486
+
2487
+ const response = await fetch(`${url}/generationsDeployments/generation/${request['generationId']}/deployment/${request['deploymentId']}?${searchParams.toString()}`, {
2488
+ method: 'PUT',
2489
+ body: isFormData ? body : JSON.stringify(body),
2490
+ headers,
2491
+ ...defaultFetchParams
2492
+ })
2493
+
2494
+ if (!response.ok) {
2495
+ throw new Error(await response.text())
2496
+ }
2497
+
2498
+ return await response.json()
2499
+ }
2500
+
2501
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['putGenerationsDeploymentsGenerationGenerationIdDeploymentDeploymentId']} */
2502
+ export const putGenerationsDeploymentsGenerationGenerationIdDeploymentDeploymentId = async (request) => {
2503
+ return await _putGenerationsDeploymentsGenerationGenerationIdDeploymentDeploymentId(baseUrl, request)
2504
+ }
2505
+ async function _deleteGenerationsDeploymentsGenerationGenerationIdDeploymentDeploymentId (url, request) {
2506
+ const queryParameters = ['fields']
2507
+ const searchParams = new URLSearchParams()
2508
+ if (request) {
2509
+ queryParameters.forEach((qp) => {
2510
+ const queryValue = request?.[qp]
2511
+ if (queryValue) {
2512
+ if (Array.isArray(queryValue)) {
2513
+ queryValue.forEach((p) => searchParams.append(qp, p))
2514
+ } else {
2515
+ searchParams.append(qp, queryValue.toString())
2516
+ }
2517
+ }
2518
+ delete request?.[qp]
2519
+ })
2520
+ }
2521
+
2522
+ const body = request
2523
+ const isFormData = body instanceof FormData
2524
+ const headers = {
2525
+ ...defaultHeaders,
2526
+ ...(isFormData ? {} : defaultJsonType)
2527
+ }
2528
+
2529
+ const response = await fetch(`${url}/generationsDeployments/generation/${request['generationId']}/deployment/${request['deploymentId']}?${searchParams.toString()}`, {
2530
+ method: 'DELETE',
2531
+ body: isFormData ? body : JSON.stringify(body),
2532
+ headers,
2533
+ ...defaultFetchParams
2534
+ })
2535
+
2536
+ if (!response.ok) {
2537
+ throw new Error(await response.text())
2538
+ }
2539
+
2540
+ return await response.json()
2541
+ }
2542
+
2543
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['deleteGenerationsDeploymentsGenerationGenerationIdDeploymentDeploymentId']} */
2544
+ export const deleteGenerationsDeploymentsGenerationGenerationIdDeploymentDeploymentId = async (request) => {
2545
+ return await _deleteGenerationsDeploymentsGenerationGenerationIdDeploymentDeploymentId(baseUrl, request)
2546
+ }
2547
+ async function _getGenerationsApplicationsConfigs (url, request) {
2548
+ const queryParameters = ['limit', 'offset', 'totalCount', 'fields', 'where.configId.eq', 'where.configId.neq', 'where.configId.gt', 'where.configId.gte', 'where.configId.lt', 'where.configId.lte', 'where.configId.like', 'where.configId.ilike', 'where.configId.in', 'where.configId.nin', 'where.configId.contains', 'where.configId.contained', 'where.configId.overlaps', 'where.generationId.eq', 'where.generationId.neq', 'where.generationId.gt', 'where.generationId.gte', 'where.generationId.lt', 'where.generationId.lte', 'where.generationId.like', 'where.generationId.ilike', 'where.generationId.in', 'where.generationId.nin', 'where.generationId.contains', 'where.generationId.contained', 'where.generationId.overlaps', 'where.or', 'orderby.configId', 'orderby.generationId']
2549
+ const searchParams = new URLSearchParams()
2550
+ if (request) {
2551
+ queryParameters.forEach((qp) => {
2552
+ const queryValue = request?.[qp]
2553
+ if (queryValue) {
2554
+ if (Array.isArray(queryValue)) {
2555
+ queryValue.forEach((p) => searchParams.append(qp, p))
2556
+ } else {
2557
+ searchParams.append(qp, queryValue.toString())
2558
+ }
2559
+ }
2560
+ delete request?.[qp]
2561
+ })
2562
+ }
2563
+
2564
+ const headers = {
2565
+ ...defaultHeaders
2566
+ }
2567
+
2568
+ const response = await fetch(`${url}/generationsApplicationsConfigs/?${searchParams.toString()}`, {
2569
+ headers,
2570
+ ...defaultFetchParams
2571
+ })
2572
+
2573
+ if (!response.ok) {
2574
+ throw new Error(await response.text())
2575
+ }
2576
+
2577
+ return await response.json()
2578
+ }
2579
+
2580
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getGenerationsApplicationsConfigs']} */
2581
+ export const getGenerationsApplicationsConfigs = async (request) => {
2582
+ return await _getGenerationsApplicationsConfigs(baseUrl, request)
2583
+ }
2584
+ async function _createGenerationsApplicationsConfig (url, request) {
2585
+ const body = request
2586
+ const isFormData = body instanceof FormData
2587
+ const headers = {
2588
+ ...defaultHeaders,
2589
+ ...(isFormData ? {} : defaultJsonType)
2590
+ }
2591
+
2592
+ const response = await fetch(`${url}/generationsApplicationsConfigs/`, {
2593
+ method: 'POST',
2594
+ body: isFormData ? body : JSON.stringify(body),
2595
+ headers,
2596
+ ...defaultFetchParams
2597
+ })
2598
+
2599
+ if (!response.ok) {
2600
+ throw new Error(await response.text())
2601
+ }
2602
+
2603
+ return await response.json()
2604
+ }
2605
+
2606
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['createGenerationsApplicationsConfig']} */
2607
+ export const createGenerationsApplicationsConfig = async (request) => {
2608
+ return await _createGenerationsApplicationsConfig(baseUrl, request)
2609
+ }
2610
+ async function _updateGenerationsApplicationsConfigs (url, request) {
2611
+ const queryParameters = ['fields', 'where.configId.eq', 'where.configId.neq', 'where.configId.gt', 'where.configId.gte', 'where.configId.lt', 'where.configId.lte', 'where.configId.like', 'where.configId.ilike', 'where.configId.in', 'where.configId.nin', 'where.configId.contains', 'where.configId.contained', 'where.configId.overlaps', 'where.generationId.eq', 'where.generationId.neq', 'where.generationId.gt', 'where.generationId.gte', 'where.generationId.lt', 'where.generationId.lte', 'where.generationId.like', 'where.generationId.ilike', 'where.generationId.in', 'where.generationId.nin', 'where.generationId.contains', 'where.generationId.contained', 'where.generationId.overlaps', 'where.or']
2612
+ const searchParams = new URLSearchParams()
2613
+ if (request) {
2614
+ queryParameters.forEach((qp) => {
2615
+ const queryValue = request?.[qp]
2616
+ if (queryValue) {
2617
+ if (Array.isArray(queryValue)) {
2618
+ queryValue.forEach((p) => searchParams.append(qp, p))
2619
+ } else {
2620
+ searchParams.append(qp, queryValue.toString())
2621
+ }
2622
+ }
2623
+ delete request?.[qp]
2624
+ })
2625
+ }
2626
+
2627
+ const body = request
2628
+ const isFormData = body instanceof FormData
2629
+ const headers = {
2630
+ ...defaultHeaders,
2631
+ ...(isFormData ? {} : defaultJsonType)
2632
+ }
2633
+
2634
+ const response = await fetch(`${url}/generationsApplicationsConfigs/?${searchParams.toString()}`, {
2635
+ method: 'PUT',
2636
+ body: isFormData ? body : JSON.stringify(body),
2637
+ headers,
2638
+ ...defaultFetchParams
2639
+ })
2640
+
2641
+ if (!response.ok) {
2642
+ throw new Error(await response.text())
2643
+ }
2644
+
2645
+ return await response.json()
2646
+ }
2647
+
2648
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['updateGenerationsApplicationsConfigs']} */
2649
+ export const updateGenerationsApplicationsConfigs = async (request) => {
2650
+ return await _updateGenerationsApplicationsConfigs(baseUrl, request)
2651
+ }
2652
+ async function _getGenerationsApplicationsConfigByGenerationIdAndConfigId (url, request) {
2653
+ const queryParameters = ['fields']
2654
+ const searchParams = new URLSearchParams()
2655
+ if (request) {
2656
+ queryParameters.forEach((qp) => {
2657
+ const queryValue = request?.[qp]
2658
+ if (queryValue) {
2659
+ if (Array.isArray(queryValue)) {
2660
+ queryValue.forEach((p) => searchParams.append(qp, p))
2661
+ } else {
2662
+ searchParams.append(qp, queryValue.toString())
2663
+ }
2664
+ }
2665
+ delete request?.[qp]
2666
+ })
2667
+ }
2668
+
2669
+ const headers = {
2670
+ ...defaultHeaders
2671
+ }
2672
+
2673
+ const response = await fetch(`${url}/generationsApplicationsConfigs/generation/${request['generationId']}/applicationsConfig/${request['configId']}?${searchParams.toString()}`, {
2674
+ headers,
2675
+ ...defaultFetchParams
2676
+ })
2677
+
2678
+ if (!response.ok) {
2679
+ throw new Error(await response.text())
2680
+ }
2681
+
2682
+ return await response.json()
2683
+ }
2684
+
2685
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getGenerationsApplicationsConfigByGenerationIdAndConfigId']} */
2686
+ export const getGenerationsApplicationsConfigByGenerationIdAndConfigId = async (request) => {
2687
+ return await _getGenerationsApplicationsConfigByGenerationIdAndConfigId(baseUrl, request)
2688
+ }
2689
+ async function _postGenerationsApplicationsConfigsGenerationGenerationIdApplicationsConfigConfigId (url, request) {
2690
+ const queryParameters = ['fields']
2691
+ const searchParams = new URLSearchParams()
2692
+ if (request) {
2693
+ queryParameters.forEach((qp) => {
2694
+ const queryValue = request?.[qp]
2695
+ if (queryValue) {
2696
+ if (Array.isArray(queryValue)) {
2697
+ queryValue.forEach((p) => searchParams.append(qp, p))
2698
+ } else {
2699
+ searchParams.append(qp, queryValue.toString())
2700
+ }
2701
+ }
2702
+ delete request?.[qp]
2703
+ })
2704
+ }
2705
+
2706
+ const body = request
2707
+ const isFormData = body instanceof FormData
2708
+ const headers = {
2709
+ ...defaultHeaders,
2710
+ ...(isFormData ? {} : defaultJsonType)
2711
+ }
2712
+
2713
+ const response = await fetch(`${url}/generationsApplicationsConfigs/generation/${request['generationId']}/applicationsConfig/${request['configId']}?${searchParams.toString()}`, {
2714
+ method: 'POST',
2715
+ body: isFormData ? body : JSON.stringify(body),
2716
+ headers,
2717
+ ...defaultFetchParams
2718
+ })
2719
+
2720
+ if (!response.ok) {
2721
+ throw new Error(await response.text())
2722
+ }
2723
+
2724
+ return await response.json()
2725
+ }
2726
+
2727
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['postGenerationsApplicationsConfigsGenerationGenerationIdApplicationsConfigConfigId']} */
2728
+ export const postGenerationsApplicationsConfigsGenerationGenerationIdApplicationsConfigConfigId = async (request) => {
2729
+ return await _postGenerationsApplicationsConfigsGenerationGenerationIdApplicationsConfigConfigId(baseUrl, request)
2730
+ }
2731
+ async function _putGenerationsApplicationsConfigsGenerationGenerationIdApplicationsConfigConfigId (url, request) {
2732
+ const queryParameters = ['fields']
2733
+ const searchParams = new URLSearchParams()
2734
+ if (request) {
2735
+ queryParameters.forEach((qp) => {
2736
+ const queryValue = request?.[qp]
2737
+ if (queryValue) {
2738
+ if (Array.isArray(queryValue)) {
2739
+ queryValue.forEach((p) => searchParams.append(qp, p))
2740
+ } else {
2741
+ searchParams.append(qp, queryValue.toString())
2742
+ }
2743
+ }
2744
+ delete request?.[qp]
2745
+ })
2746
+ }
2747
+
2748
+ const body = request
2749
+ const isFormData = body instanceof FormData
2750
+ const headers = {
2751
+ ...defaultHeaders,
2752
+ ...(isFormData ? {} : defaultJsonType)
2753
+ }
2754
+
2755
+ const response = await fetch(`${url}/generationsApplicationsConfigs/generation/${request['generationId']}/applicationsConfig/${request['configId']}?${searchParams.toString()}`, {
2756
+ method: 'PUT',
2757
+ body: isFormData ? body : JSON.stringify(body),
2758
+ headers,
2759
+ ...defaultFetchParams
2760
+ })
2761
+
2762
+ if (!response.ok) {
2763
+ throw new Error(await response.text())
2764
+ }
2765
+
2766
+ return await response.json()
2767
+ }
2768
+
2769
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['putGenerationsApplicationsConfigsGenerationGenerationIdApplicationsConfigConfigId']} */
2770
+ export const putGenerationsApplicationsConfigsGenerationGenerationIdApplicationsConfigConfigId = async (request) => {
2771
+ return await _putGenerationsApplicationsConfigsGenerationGenerationIdApplicationsConfigConfigId(baseUrl, request)
2772
+ }
2773
+ async function _deleteGenerationsApplicationsConfigsGenerationGenerationIdApplicationsConfigConfigId (url, request) {
2774
+ const queryParameters = ['fields']
2775
+ const searchParams = new URLSearchParams()
2776
+ if (request) {
2777
+ queryParameters.forEach((qp) => {
2778
+ const queryValue = request?.[qp]
2779
+ if (queryValue) {
2780
+ if (Array.isArray(queryValue)) {
2781
+ queryValue.forEach((p) => searchParams.append(qp, p))
2782
+ } else {
2783
+ searchParams.append(qp, queryValue.toString())
2784
+ }
2785
+ }
2786
+ delete request?.[qp]
2787
+ })
2788
+ }
2789
+
2790
+ const body = request
2791
+ const isFormData = body instanceof FormData
2792
+ const headers = {
2793
+ ...defaultHeaders,
2794
+ ...(isFormData ? {} : defaultJsonType)
2795
+ }
2796
+
2797
+ const response = await fetch(`${url}/generationsApplicationsConfigs/generation/${request['generationId']}/applicationsConfig/${request['configId']}?${searchParams.toString()}`, {
2798
+ method: 'DELETE',
2799
+ body: isFormData ? body : JSON.stringify(body),
2800
+ headers,
2801
+ ...defaultFetchParams
2802
+ })
2803
+
2804
+ if (!response.ok) {
2805
+ throw new Error(await response.text())
2806
+ }
2807
+
2808
+ return await response.json()
2809
+ }
2810
+
2811
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['deleteGenerationsApplicationsConfigsGenerationGenerationIdApplicationsConfigConfigId']} */
2812
+ export const deleteGenerationsApplicationsConfigsGenerationGenerationIdApplicationsConfigConfigId = async (request) => {
2813
+ return await _deleteGenerationsApplicationsConfigsGenerationGenerationIdApplicationsConfigConfigId(baseUrl, request)
2814
+ }
2815
+ async function _getGenerationGraph (url, request) {
2816
+ const queryParameters = ['generationId']
2817
+ const searchParams = new URLSearchParams()
2818
+ if (request) {
2819
+ queryParameters.forEach((qp) => {
2820
+ const queryValue = request?.[qp]
2821
+ if (queryValue) {
2822
+ if (Array.isArray(queryValue)) {
2823
+ queryValue.forEach((p) => searchParams.append(qp, p))
2824
+ } else {
2825
+ searchParams.append(qp, queryValue.toString())
2826
+ }
2827
+ }
2828
+ delete request?.[qp]
2829
+ })
2830
+ }
2831
+
2832
+ const headers = {
2833
+ ...defaultHeaders
2834
+ }
2835
+
2836
+ const response = await fetch(`${url}/graph?${searchParams.toString()}`, {
2837
+ headers,
2838
+ ...defaultFetchParams
2839
+ })
2840
+
2841
+ if (!response.ok) {
2842
+ throw new Error(await response.text())
2843
+ }
2844
+
2845
+ return await response.json()
2846
+ }
2847
+
2848
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['getGenerationGraph']} */
2849
+ export const getGenerationGraph = async (request) => {
2850
+ return await _getGenerationGraph(baseUrl, request)
2851
+ }
2852
+ async function _initApplicationInstance (url, request) {
2853
+ const body = request
2854
+ const isFormData = body instanceof FormData
2855
+ const headers = {
2856
+ ...defaultHeaders,
2857
+ ...(isFormData ? {} : defaultJsonType)
2858
+ }
2859
+
2860
+ const response = await fetch(`${url}/pods/${request['podId']}/instance`, {
2861
+ method: 'POST',
2862
+ body: isFormData ? body : JSON.stringify(body),
2863
+ headers,
2864
+ ...defaultFetchParams
2865
+ })
2866
+
2867
+ if (!response.ok) {
2868
+ throw new Error(await response.text())
2869
+ }
2870
+
2871
+ return await response.json()
2872
+ }
2873
+
2874
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['initApplicationInstance']} */
2875
+ export const initApplicationInstance = async (request) => {
2876
+ return await _initApplicationInstance(baseUrl, request)
2877
+ }
2878
+ async function _saveApplicationInstanceStatus (url, request) {
2879
+ const body = request
2880
+ const isFormData = body instanceof FormData
2881
+ const headers = {
2882
+ ...defaultHeaders,
2883
+ ...(isFormData ? {} : defaultJsonType)
2884
+ }
2885
+
2886
+ const response = await fetch(`${url}/pods/${request['id']}/instance/status`, {
2887
+ method: 'POST',
2888
+ body: isFormData ? body : JSON.stringify(body),
2889
+ headers,
2890
+ ...defaultFetchParams
2891
+ })
2892
+
2893
+ const textResponses = [200]
2894
+ if (textResponses.includes(response.status)) {
2895
+ return {
2896
+ statusCode: response.status,
2897
+ headers: headersToJSON(response.headers),
2898
+ body: await response.text()
2899
+ }
2900
+ }
2901
+ const responseType = response.headers.get('content-type')?.startsWith('application/json') ? 'json' : 'text'
2902
+ return {
2903
+ statusCode: response.status,
2904
+ headers: headersToJSON(response.headers),
2905
+ body: await response[responseType]()
2906
+ }
2907
+ }
2908
+
2909
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['saveApplicationInstanceStatus']} */
2910
+ export const saveApplicationInstanceStatus = async (request) => {
2911
+ return await _saveApplicationInstanceStatus(baseUrl, request)
2912
+ }
2913
+ async function _saveApplicationInstanceState (url, request) {
2914
+ const body = request
2915
+ const isFormData = body instanceof FormData
2916
+ const headers = {
2917
+ ...defaultHeaders,
2918
+ ...(isFormData ? {} : defaultJsonType)
2919
+ }
2920
+
2921
+ const response = await fetch(`${url}/pods/${request['id']}/instance/state`, {
2922
+ method: 'POST',
2923
+ body: isFormData ? body : JSON.stringify(body),
2924
+ headers,
2925
+ ...defaultFetchParams
2926
+ })
2927
+
2928
+ if (!response.ok) {
2929
+ throw new Error(await response.text())
2930
+ }
2931
+
2932
+ return await response.json()
2933
+ }
2934
+
2935
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['saveApplicationInstanceState']} */
2936
+ export const saveApplicationInstanceState = async (request) => {
2937
+ return await _saveApplicationInstanceState(baseUrl, request)
2938
+ }
2939
+ async function _setApplicationResources (url, request) {
2940
+ const body = request
2941
+ const isFormData = body instanceof FormData
2942
+ const headers = {
2943
+ ...defaultHeaders,
2944
+ ...(isFormData ? {} : defaultJsonType)
2945
+ }
2946
+
2947
+ const response = await fetch(`${url}/applications/${request['id']}/resources`, {
2948
+ method: 'POST',
2949
+ body: isFormData ? body : JSON.stringify(body),
2950
+ headers,
2951
+ ...defaultFetchParams
2952
+ })
2953
+
2954
+ if (!response.ok) {
2955
+ throw new Error(await response.text())
2956
+ }
2957
+
2958
+ return await response.json()
2959
+ }
2960
+
2961
+ /** @type {import('./control-plane-types.d.ts').ControlPlane['setApplicationResources']} */
2962
+ export const setApplicationResources = async (request) => {
2963
+ return await _setApplicationResources(baseUrl, request)
2964
+ }
2965
+ export default function build (url, options) {
2966
+ url = sanitizeUrl(url)
2967
+ if (options?.headers) {
2968
+ defaultHeaders = options.headers
2969
+ }
2970
+ return {
2971
+ getGenerations: _getGenerations.bind(url, ...arguments),
2972
+ createGeneration: _createGeneration.bind(url, ...arguments),
2973
+ updateGenerations: _updateGenerations.bind(url, ...arguments),
2974
+ getGenerationById: _getGenerationById.bind(url, ...arguments),
2975
+ updateGeneration: _updateGeneration.bind(url, ...arguments),
2976
+ deleteGenerations: _deleteGenerations.bind(url, ...arguments),
2977
+ getGraphsForGeneration: _getGraphsForGeneration.bind(url, ...arguments),
2978
+ getGenerationsDeploymentsForGeneration: _getGenerationsDeploymentsForGeneration.bind(url, ...arguments),
2979
+ getGenerationsApplicationsConfigsForGeneration: _getGenerationsApplicationsConfigsForGeneration.bind(url, ...arguments),
2980
+ getGraphs: _getGraphs.bind(url, ...arguments),
2981
+ createGraph: _createGraph.bind(url, ...arguments),
2982
+ updateGraphs: _updateGraphs.bind(url, ...arguments),
2983
+ getGraphById: _getGraphById.bind(url, ...arguments),
2984
+ updateGraph: _updateGraph.bind(url, ...arguments),
2985
+ deleteGraphs: _deleteGraphs.bind(url, ...arguments),
2986
+ getGenerationForGraph: _getGenerationForGraph.bind(url, ...arguments),
2987
+ getApplications: _getApplications.bind(url, ...arguments),
2988
+ createApplication: _createApplication.bind(url, ...arguments),
2989
+ updateApplications: _updateApplications.bind(url, ...arguments),
2990
+ getApplicationById: _getApplicationById.bind(url, ...arguments),
2991
+ updateApplication: _updateApplication.bind(url, ...arguments),
2992
+ deleteApplications: _deleteApplications.bind(url, ...arguments),
2993
+ getApplicationsConfigsForApplication: _getApplicationsConfigsForApplication.bind(url, ...arguments),
2994
+ getApplicationStatesForApplication: _getApplicationStatesForApplication.bind(url, ...arguments),
2995
+ getDeploymentsForApplication: _getDeploymentsForApplication.bind(url, ...arguments),
2996
+ getDetectedPodsForApplication: _getDetectedPodsForApplication.bind(url, ...arguments),
2997
+ getApplicationsConfigs: _getApplicationsConfigs.bind(url, ...arguments),
2998
+ createApplicationsConfig: _createApplicationsConfig.bind(url, ...arguments),
2999
+ updateApplicationsConfigs: _updateApplicationsConfigs.bind(url, ...arguments),
3000
+ getApplicationsConfigById: _getApplicationsConfigById.bind(url, ...arguments),
3001
+ updateApplicationsConfig: _updateApplicationsConfig.bind(url, ...arguments),
3002
+ deleteApplicationsConfigs: _deleteApplicationsConfigs.bind(url, ...arguments),
3003
+ getGenerationsApplicationsConfigsForApplicationsConfig: _getGenerationsApplicationsConfigsForApplicationsConfig.bind(url, ...arguments),
3004
+ getApplicationForApplicationsConfig: _getApplicationForApplicationsConfig.bind(url, ...arguments),
3005
+ getApplicationStates: _getApplicationStates.bind(url, ...arguments),
3006
+ createApplicationState: _createApplicationState.bind(url, ...arguments),
3007
+ updateApplicationStates: _updateApplicationStates.bind(url, ...arguments),
3008
+ getApplicationStateById: _getApplicationStateById.bind(url, ...arguments),
3009
+ updateApplicationState: _updateApplicationState.bind(url, ...arguments),
3010
+ deleteApplicationStates: _deleteApplicationStates.bind(url, ...arguments),
3011
+ getDeploymentsForApplicationState: _getDeploymentsForApplicationState.bind(url, ...arguments),
3012
+ getApplicationForApplicationState: _getApplicationForApplicationState.bind(url, ...arguments),
3013
+ getDeployments: _getDeployments.bind(url, ...arguments),
3014
+ createDeployment: _createDeployment.bind(url, ...arguments),
3015
+ updateDeployments: _updateDeployments.bind(url, ...arguments),
3016
+ getDeploymentById: _getDeploymentById.bind(url, ...arguments),
3017
+ updateDeployment: _updateDeployment.bind(url, ...arguments),
3018
+ deleteDeployments: _deleteDeployments.bind(url, ...arguments),
3019
+ getDetectedPodsForDeployment: _getDetectedPodsForDeployment.bind(url, ...arguments),
3020
+ getGenerationsDeploymentsForDeployment: _getGenerationsDeploymentsForDeployment.bind(url, ...arguments),
3021
+ getApplicationForDeployment: _getApplicationForDeployment.bind(url, ...arguments),
3022
+ getApplicationStateForDeployment: _getApplicationStateForDeployment.bind(url, ...arguments),
3023
+ getDetectedPods: _getDetectedPods.bind(url, ...arguments),
3024
+ createDetectedPod: _createDetectedPod.bind(url, ...arguments),
3025
+ updateDetectedPods: _updateDetectedPods.bind(url, ...arguments),
3026
+ getDetectedPodById: _getDetectedPodById.bind(url, ...arguments),
3027
+ updateDetectedPod: _updateDetectedPod.bind(url, ...arguments),
3028
+ deleteDetectedPods: _deleteDetectedPods.bind(url, ...arguments),
3029
+ getApplicationForDetectedPod: _getApplicationForDetectedPod.bind(url, ...arguments),
3030
+ getDeploymentForDetectedPod: _getDeploymentForDetectedPod.bind(url, ...arguments),
3031
+ getGenerationsDeployments: _getGenerationsDeployments.bind(url, ...arguments),
3032
+ createGenerationsDeployment: _createGenerationsDeployment.bind(url, ...arguments),
3033
+ updateGenerationsDeployments: _updateGenerationsDeployments.bind(url, ...arguments),
3034
+ getGenerationsDeploymentByGenerationIdAndDeploymentId: _getGenerationsDeploymentByGenerationIdAndDeploymentId.bind(url, ...arguments),
3035
+ postGenerationsDeploymentsGenerationGenerationIdDeploymentDeploymentId: _postGenerationsDeploymentsGenerationGenerationIdDeploymentDeploymentId.bind(url, ...arguments),
3036
+ putGenerationsDeploymentsGenerationGenerationIdDeploymentDeploymentId: _putGenerationsDeploymentsGenerationGenerationIdDeploymentDeploymentId.bind(url, ...arguments),
3037
+ deleteGenerationsDeploymentsGenerationGenerationIdDeploymentDeploymentId: _deleteGenerationsDeploymentsGenerationGenerationIdDeploymentDeploymentId.bind(url, ...arguments),
3038
+ getGenerationsApplicationsConfigs: _getGenerationsApplicationsConfigs.bind(url, ...arguments),
3039
+ createGenerationsApplicationsConfig: _createGenerationsApplicationsConfig.bind(url, ...arguments),
3040
+ updateGenerationsApplicationsConfigs: _updateGenerationsApplicationsConfigs.bind(url, ...arguments),
3041
+ getGenerationsApplicationsConfigByGenerationIdAndConfigId: _getGenerationsApplicationsConfigByGenerationIdAndConfigId.bind(url, ...arguments),
3042
+ postGenerationsApplicationsConfigsGenerationGenerationIdApplicationsConfigConfigId: _postGenerationsApplicationsConfigsGenerationGenerationIdApplicationsConfigConfigId.bind(url, ...arguments),
3043
+ putGenerationsApplicationsConfigsGenerationGenerationIdApplicationsConfigConfigId: _putGenerationsApplicationsConfigsGenerationGenerationIdApplicationsConfigConfigId.bind(url, ...arguments),
3044
+ deleteGenerationsApplicationsConfigsGenerationGenerationIdApplicationsConfigConfigId: _deleteGenerationsApplicationsConfigsGenerationGenerationIdApplicationsConfigConfigId.bind(url, ...arguments),
3045
+ getGenerationGraph: _getGenerationGraph.bind(url, ...arguments),
3046
+ initApplicationInstance: _initApplicationInstance.bind(url, ...arguments),
3047
+ saveApplicationInstanceStatus: _saveApplicationInstanceStatus.bind(url, ...arguments),
3048
+ saveApplicationInstanceState: _saveApplicationInstanceState.bind(url, ...arguments),
3049
+ setApplicationResources: _setApplicationResources.bind(url, ...arguments)
3050
+ }
3051
+ }