@revisium/endpoint 0.11.0-alpha.3 → 0.11.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/endpoint-microservice/core-api/generated/api.d.ts +83 -68
- package/dist/endpoint-microservice/core-api/generated/api.js +489 -466
- package/dist/endpoint-microservice/core-api/generated/api.js.map +1 -1
- package/dist/endpoint-microservice/core-api/internal-core-api.service.js +1 -1
- package/dist/endpoint-microservice/core-api/internal-core-api.service.js.map +1 -1
- package/dist/endpoint-microservice/core-api/utils/transformFromPrismaToRowModel.js +2 -0
- package/dist/endpoint-microservice/core-api/utils/transformFromPrismaToRowModel.js.map +1 -1
- package/dist/endpoint-microservice/graphql/graphql-schema-converter/graphql-schema.converter.js +1 -1
- package/dist/endpoint-microservice/graphql/graphql-schema-converter/graphql-schema.converter.js.map +1 -1
- package/dist/endpoint-microservice/graphql/queries/handlers/get-graphql-schema.handler.js +1 -1
- package/dist/endpoint-microservice/graphql/queries/handlers/get-graphql-schema.handler.js.map +1 -1
- package/dist/endpoint-microservice/restapi/queries/handlers/get-open-api-schema.handler.js +5 -4
- package/dist/endpoint-microservice/restapi/queries/handlers/get-open-api-schema.handler.js.map +1 -1
- package/dist/endpoint-microservice/restapi/restapi-endpoint.service.js +7 -7
- package/dist/endpoint-microservice/restapi/restapi-endpoint.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -2
@@ -10,27 +10,31 @@ var ContentType;
|
|
10
10
|
})(ContentType || (exports.ContentType = ContentType = {}));
|
11
11
|
class HttpClient {
|
12
12
|
constructor(apiConfig = {}) {
|
13
|
-
this.baseUrl =
|
13
|
+
this.baseUrl = "";
|
14
14
|
this.securityData = null;
|
15
15
|
this.abortControllers = new Map();
|
16
16
|
this.customFetch = (...fetchParams) => fetch(...fetchParams);
|
17
17
|
this.baseApiParams = {
|
18
|
-
credentials:
|
18
|
+
credentials: "same-origin",
|
19
19
|
headers: {},
|
20
|
-
redirect:
|
21
|
-
referrerPolicy:
|
20
|
+
redirect: "follow",
|
21
|
+
referrerPolicy: "no-referrer",
|
22
22
|
};
|
23
23
|
this.setSecurityData = (data) => {
|
24
24
|
this.securityData = data;
|
25
25
|
};
|
26
26
|
this.contentFormatters = {
|
27
|
-
[ContentType.Json]: (input) => input !== null && (typeof input ===
|
28
|
-
|
27
|
+
[ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string")
|
28
|
+
? JSON.stringify(input)
|
29
|
+
: input,
|
30
|
+
[ContentType.Text]: (input) => input !== null && typeof input !== "string"
|
31
|
+
? JSON.stringify(input)
|
32
|
+
: input,
|
29
33
|
[ContentType.FormData]: (input) => Object.keys(input || {}).reduce((formData, key) => {
|
30
34
|
const property = input[key];
|
31
35
|
formData.append(key, property instanceof Blob
|
32
36
|
? property
|
33
|
-
: typeof property ===
|
37
|
+
: typeof property === "object" && property !== null
|
34
38
|
? JSON.stringify(property)
|
35
39
|
: `${property}`);
|
36
40
|
return formData;
|
@@ -57,7 +61,7 @@ class HttpClient {
|
|
57
61
|
}
|
58
62
|
};
|
59
63
|
this.request = async ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }) => {
|
60
|
-
const secureParams = ((typeof secure ===
|
64
|
+
const secureParams = ((typeof secure === "boolean" ? secure : this.baseApiParams.secure) &&
|
61
65
|
this.securityWorker &&
|
62
66
|
(await this.securityWorker(this.securityData))) ||
|
63
67
|
{};
|
@@ -65,14 +69,20 @@ class HttpClient {
|
|
65
69
|
const queryString = query && this.toQueryString(query);
|
66
70
|
const payloadFormatter = this.contentFormatters[type || ContentType.Json];
|
67
71
|
const responseFormat = format || requestParams.format;
|
68
|
-
return this.customFetch(`${baseUrl || this.baseUrl ||
|
72
|
+
return this.customFetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, {
|
69
73
|
...requestParams,
|
70
74
|
headers: {
|
71
75
|
...(requestParams.headers || {}),
|
72
|
-
...(type && type !== ContentType.FormData
|
76
|
+
...(type && type !== ContentType.FormData
|
77
|
+
? { "Content-Type": type }
|
78
|
+
: {}),
|
73
79
|
},
|
74
|
-
signal: (cancelToken
|
75
|
-
|
80
|
+
signal: (cancelToken
|
81
|
+
? this.createAbortSignal(cancelToken)
|
82
|
+
: requestParams.signal) || null,
|
83
|
+
body: typeof body === "undefined" || body === null
|
84
|
+
? null
|
85
|
+
: payloadFormatter(body),
|
76
86
|
}).then(async (response) => {
|
77
87
|
const r = response.clone();
|
78
88
|
r.data = null;
|
@@ -103,25 +113,27 @@ class HttpClient {
|
|
103
113
|
}
|
104
114
|
encodeQueryParam(key, value) {
|
105
115
|
const encodedKey = encodeURIComponent(key);
|
106
|
-
return `${encodedKey}=${encodeURIComponent(typeof value ===
|
116
|
+
return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
|
107
117
|
}
|
108
118
|
addQueryParam(query, key) {
|
109
119
|
return this.encodeQueryParam(key, query[key]);
|
110
120
|
}
|
111
121
|
addArrayQueryParam(query, key) {
|
112
122
|
const value = query[key];
|
113
|
-
return value.map((v) => this.encodeQueryParam(key, v)).join(
|
123
|
+
return value.map((v) => this.encodeQueryParam(key, v)).join("&");
|
114
124
|
}
|
115
125
|
toQueryString(rawQuery) {
|
116
126
|
const query = rawQuery || {};
|
117
|
-
const keys = Object.keys(query).filter((key) =>
|
127
|
+
const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]);
|
118
128
|
return keys
|
119
|
-
.map((key) =>
|
120
|
-
.
|
129
|
+
.map((key) => Array.isArray(query[key])
|
130
|
+
? this.addArrayQueryParam(query, key)
|
131
|
+
: this.addQueryParam(query, key))
|
132
|
+
.join("&");
|
121
133
|
}
|
122
134
|
addQueryParams(rawQuery) {
|
123
135
|
const queryString = this.toQueryString(rawQuery);
|
124
|
-
return queryString ? `?${queryString}` :
|
136
|
+
return queryString ? `?${queryString}` : "";
|
125
137
|
}
|
126
138
|
mergeRequestParams(params1, params2) {
|
127
139
|
return {
|
@@ -140,461 +152,472 @@ exports.HttpClient = HttpClient;
|
|
140
152
|
class Api extends HttpClient {
|
141
153
|
constructor() {
|
142
154
|
super(...arguments);
|
143
|
-
this.
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
155
|
+
this.api = {
|
156
|
+
login: (data, params = {}) => this.request({
|
157
|
+
path: `/api/auth/login`,
|
158
|
+
method: "POST",
|
159
|
+
body: data,
|
160
|
+
secure: true,
|
161
|
+
type: ContentType.Json,
|
162
|
+
format: "json",
|
163
|
+
...params,
|
164
|
+
}),
|
165
|
+
createUser: (data, params = {}) => this.request({
|
166
|
+
path: `/api/auth/user`,
|
167
|
+
method: "POST",
|
168
|
+
body: data,
|
169
|
+
secure: true,
|
170
|
+
type: ContentType.Json,
|
171
|
+
format: "json",
|
172
|
+
...params,
|
173
|
+
}),
|
174
|
+
updatePassword: (data, params = {}) => this.request({
|
175
|
+
path: `/api/auth/password`,
|
176
|
+
method: "PUT",
|
177
|
+
body: data,
|
178
|
+
secure: true,
|
179
|
+
type: ContentType.Json,
|
180
|
+
format: "json",
|
181
|
+
...params,
|
182
|
+
}),
|
183
|
+
me: (params = {}) => this.request({
|
184
|
+
path: `/api/user/me`,
|
185
|
+
method: "GET",
|
186
|
+
secure: true,
|
187
|
+
format: "json",
|
188
|
+
...params,
|
189
|
+
}),
|
190
|
+
projects: ({ organizationId, ...query }, params = {}) => this.request({
|
191
|
+
path: `/api/organization/${organizationId}/projects`,
|
192
|
+
method: "GET",
|
193
|
+
query: query,
|
194
|
+
secure: true,
|
195
|
+
format: "json",
|
196
|
+
...params,
|
197
|
+
}),
|
198
|
+
createProject: ({ organizationId, ...query }, data, params = {}) => this.request({
|
199
|
+
path: `/api/organization/${organizationId}/projects`,
|
200
|
+
method: "POST",
|
201
|
+
query: query,
|
202
|
+
body: data,
|
203
|
+
secure: true,
|
204
|
+
type: ContentType.Json,
|
205
|
+
format: "json",
|
206
|
+
...params,
|
207
|
+
}),
|
208
|
+
usersOrganization: ({ organizationId, ...query }, params = {}) => this.request({
|
209
|
+
path: `/api/organization/${organizationId}/users`,
|
210
|
+
method: "GET",
|
211
|
+
query: query,
|
212
|
+
secure: true,
|
213
|
+
format: "json",
|
214
|
+
...params,
|
215
|
+
}),
|
216
|
+
addUserToOrganization: (organizationId, data, params = {}) => this.request({
|
217
|
+
path: `/api/organization/${organizationId}/users`,
|
218
|
+
method: "POST",
|
219
|
+
body: data,
|
220
|
+
secure: true,
|
221
|
+
type: ContentType.Json,
|
222
|
+
format: "json",
|
223
|
+
...params,
|
224
|
+
}),
|
225
|
+
removeUserFromOrganization: (organizationId, data, params = {}) => this.request({
|
226
|
+
path: `/api/organization/${organizationId}/users`,
|
227
|
+
method: "DELETE",
|
228
|
+
body: data,
|
229
|
+
secure: true,
|
230
|
+
type: ContentType.Json,
|
231
|
+
format: "json",
|
232
|
+
...params,
|
233
|
+
}),
|
234
|
+
project: (organizationId, projectName, params = {}) => this.request({
|
235
|
+
path: `/api/organization/${organizationId}/projects/${projectName}`,
|
236
|
+
method: "GET",
|
237
|
+
secure: true,
|
238
|
+
format: "json",
|
239
|
+
...params,
|
240
|
+
}),
|
241
|
+
deleteProject: (organizationId, projectName, params = {}) => this.request({
|
242
|
+
path: `/api/organization/${organizationId}/projects/${projectName}`,
|
243
|
+
method: "DELETE",
|
244
|
+
secure: true,
|
245
|
+
format: "json",
|
246
|
+
...params,
|
247
|
+
}),
|
248
|
+
updateProject: (organizationId, projectName, data, params = {}) => this.request({
|
249
|
+
path: `/api/organization/${organizationId}/projects/${projectName}`,
|
250
|
+
method: "PUT",
|
251
|
+
body: data,
|
252
|
+
secure: true,
|
253
|
+
type: ContentType.Json,
|
254
|
+
format: "json",
|
255
|
+
...params,
|
256
|
+
}),
|
257
|
+
rootBranch: (organizationId, projectName, params = {}) => this.request({
|
258
|
+
path: `/api/organization/${organizationId}/projects/${projectName}/root-branch`,
|
259
|
+
method: "GET",
|
260
|
+
secure: true,
|
261
|
+
format: "json",
|
262
|
+
...params,
|
263
|
+
}),
|
264
|
+
branches: ({ organizationId, projectName, ...query }, params = {}) => this.request({
|
265
|
+
path: `/api/organization/${organizationId}/projects/${projectName}/branches`,
|
266
|
+
method: "GET",
|
267
|
+
query: query,
|
268
|
+
secure: true,
|
269
|
+
format: "json",
|
270
|
+
...params,
|
271
|
+
}),
|
272
|
+
usersProject: ({ organizationId, projectName, ...query }, params = {}) => this.request({
|
273
|
+
path: `/api/organization/${organizationId}/projects/${projectName}/users`,
|
274
|
+
method: "GET",
|
275
|
+
query: query,
|
276
|
+
secure: true,
|
277
|
+
format: "json",
|
278
|
+
...params,
|
279
|
+
}),
|
280
|
+
addUserToProject: (organizationId, projectName, data, params = {}) => this.request({
|
281
|
+
path: `/api/organization/${organizationId}/projects/${projectName}/users`,
|
282
|
+
method: "POST",
|
283
|
+
body: data,
|
284
|
+
secure: true,
|
285
|
+
type: ContentType.Json,
|
286
|
+
format: "json",
|
287
|
+
...params,
|
288
|
+
}),
|
289
|
+
removeUserFromProject: (organizationId, projectName, userId, params = {}) => this.request({
|
290
|
+
path: `/api/organization/${organizationId}/projects/${projectName}/users/${userId}`,
|
291
|
+
method: "DELETE",
|
292
|
+
secure: true,
|
293
|
+
format: "json",
|
294
|
+
...params,
|
295
|
+
}),
|
296
|
+
branch: (organizationId, projectName, branchName, params = {}) => this.request({
|
297
|
+
path: `/api/organization/${organizationId}/projects/${projectName}/branches/${branchName}`,
|
298
|
+
method: "GET",
|
299
|
+
secure: true,
|
300
|
+
format: "json",
|
301
|
+
...params,
|
302
|
+
}),
|
303
|
+
branchTouched: (organizationId, projectName, branchName, params = {}) => this.request({
|
304
|
+
path: `/api/organization/${organizationId}/projects/${projectName}/branches/${branchName}/touched`,
|
305
|
+
method: "GET",
|
306
|
+
secure: true,
|
307
|
+
format: "json",
|
308
|
+
...params,
|
309
|
+
}),
|
310
|
+
parentBranch: (organizationId, projectName, branchName, params = {}) => this.request({
|
311
|
+
path: `/api/organization/${organizationId}/projects/${projectName}/branches/${branchName}/parent-branch`,
|
312
|
+
method: "GET",
|
313
|
+
secure: true,
|
314
|
+
format: "json",
|
315
|
+
...params,
|
316
|
+
}),
|
317
|
+
startRevision: (organizationId, projectName, branchName, params = {}) => this.request({
|
318
|
+
path: `/api/organization/${organizationId}/projects/${projectName}/branches/${branchName}/start-revision`,
|
319
|
+
method: "GET",
|
320
|
+
secure: true,
|
321
|
+
format: "json",
|
322
|
+
...params,
|
323
|
+
}),
|
324
|
+
headRevision: (organizationId, projectName, branchName, params = {}) => this.request({
|
325
|
+
path: `/api/organization/${organizationId}/projects/${projectName}/branches/${branchName}/head-revision`,
|
326
|
+
method: "GET",
|
327
|
+
secure: true,
|
328
|
+
format: "json",
|
329
|
+
...params,
|
330
|
+
}),
|
331
|
+
draftRevision: (organizationId, projectName, branchName, params = {}) => this.request({
|
332
|
+
path: `/api/organization/${organizationId}/projects/${projectName}/branches/${branchName}/draft-revision`,
|
333
|
+
method: "GET",
|
334
|
+
secure: true,
|
335
|
+
format: "json",
|
336
|
+
...params,
|
337
|
+
}),
|
338
|
+
revisions: ({ organizationId, projectName, branchName, ...query }, params = {}) => this.request({
|
339
|
+
path: `/api/organization/${organizationId}/projects/${projectName}/branches/${branchName}/revisions`,
|
340
|
+
method: "GET",
|
341
|
+
query: query,
|
342
|
+
secure: true,
|
343
|
+
format: "json",
|
344
|
+
...params,
|
345
|
+
}),
|
346
|
+
createRevision: (organizationId, projectName, branchName, data, params = {}) => this.request({
|
347
|
+
path: `/api/organization/${organizationId}/projects/${projectName}/branches/${branchName}/create-revision`,
|
348
|
+
method: "POST",
|
349
|
+
body: data,
|
350
|
+
secure: true,
|
351
|
+
type: ContentType.Json,
|
352
|
+
format: "json",
|
353
|
+
...params,
|
354
|
+
}),
|
355
|
+
revertChanges: (organizationId, projectName, branchName, params = {}) => this.request({
|
356
|
+
path: `/api/organization/${organizationId}/projects/${projectName}/branches/${branchName}/revert-changes`,
|
357
|
+
method: "POST",
|
358
|
+
secure: true,
|
359
|
+
format: "json",
|
360
|
+
...params,
|
361
|
+
}),
|
362
|
+
revision: (revisionId, params = {}) => this.request({
|
363
|
+
path: `/api/revision/${revisionId}`,
|
364
|
+
method: "GET",
|
365
|
+
secure: true,
|
366
|
+
format: "json",
|
367
|
+
...params,
|
368
|
+
}),
|
369
|
+
parentRevision: (revisionId, params = {}) => this.request({
|
370
|
+
path: `/api/revision/${revisionId}/parent-revision`,
|
371
|
+
method: "GET",
|
372
|
+
secure: true,
|
373
|
+
format: "json",
|
374
|
+
...params,
|
375
|
+
}),
|
376
|
+
childRevision: (revisionId, params = {}) => this.request({
|
377
|
+
path: `/api/revision/${revisionId}/child-revision`,
|
378
|
+
method: "GET",
|
379
|
+
secure: true,
|
380
|
+
format: "json",
|
381
|
+
...params,
|
382
|
+
}),
|
383
|
+
childBranches: (revisionId, params = {}) => this.request({
|
384
|
+
path: `/api/revision/${revisionId}/child-branches`,
|
385
|
+
method: "GET",
|
386
|
+
secure: true,
|
387
|
+
format: "json",
|
388
|
+
...params,
|
389
|
+
}),
|
390
|
+
createBranch: (revisionId, data, params = {}) => this.request({
|
391
|
+
path: `/api/revision/${revisionId}/child-branches`,
|
392
|
+
method: "POST",
|
393
|
+
body: data,
|
394
|
+
secure: true,
|
395
|
+
type: ContentType.Json,
|
396
|
+
format: "json",
|
397
|
+
...params,
|
398
|
+
}),
|
399
|
+
tables: ({ revisionId, ...query }, params = {}) => this.request({
|
400
|
+
path: `/api/revision/${revisionId}/tables`,
|
401
|
+
method: "GET",
|
402
|
+
query: query,
|
403
|
+
secure: true,
|
404
|
+
format: "json",
|
405
|
+
...params,
|
406
|
+
}),
|
407
|
+
createTable: (revisionId, data, params = {}) => this.request({
|
408
|
+
path: `/api/revision/${revisionId}/tables`,
|
409
|
+
method: "POST",
|
410
|
+
body: data,
|
411
|
+
secure: true,
|
412
|
+
type: ContentType.Json,
|
413
|
+
format: "json",
|
414
|
+
...params,
|
415
|
+
}),
|
416
|
+
endpoints: (revisionId, params = {}) => this.request({
|
417
|
+
path: `/api/revision/${revisionId}/endpoints`,
|
418
|
+
method: "GET",
|
419
|
+
secure: true,
|
420
|
+
format: "json",
|
421
|
+
...params,
|
422
|
+
}),
|
423
|
+
createEndpoint: (revisionId, data, params = {}) => this.request({
|
424
|
+
path: `/api/revision/${revisionId}/endpoints`,
|
425
|
+
method: "POST",
|
426
|
+
body: data,
|
427
|
+
secure: true,
|
428
|
+
type: ContentType.Json,
|
429
|
+
format: "json",
|
430
|
+
...params,
|
431
|
+
}),
|
432
|
+
table: (revisionId, tableId, params = {}) => this.request({
|
433
|
+
path: `/api/revision/${revisionId}/tables/${tableId}`,
|
434
|
+
method: "GET",
|
435
|
+
secure: true,
|
436
|
+
format: "json",
|
437
|
+
...params,
|
438
|
+
}),
|
439
|
+
deleteTable: (revisionId, tableId, params = {}) => this.request({
|
440
|
+
path: `/api/revision/${revisionId}/tables/${tableId}`,
|
441
|
+
method: "DELETE",
|
442
|
+
secure: true,
|
443
|
+
format: "json",
|
444
|
+
...params,
|
445
|
+
}),
|
446
|
+
updateTable: (revisionId, tableId, data, params = {}) => this.request({
|
447
|
+
path: `/api/revision/${revisionId}/tables/${tableId}`,
|
448
|
+
method: "PATCH",
|
449
|
+
body: data,
|
450
|
+
secure: true,
|
451
|
+
type: ContentType.Json,
|
452
|
+
format: "json",
|
453
|
+
...params,
|
454
|
+
}),
|
455
|
+
tableCountRows: (revisionId, tableId, params = {}) => this.request({
|
456
|
+
path: `/api/revision/${revisionId}/tables/${tableId}/count-rows`,
|
457
|
+
method: "GET",
|
458
|
+
secure: true,
|
459
|
+
format: "json",
|
460
|
+
...params,
|
461
|
+
}),
|
462
|
+
rows: ({ revisionId, tableId, ...query }, params = {}) => this.request({
|
463
|
+
path: `/api/revision/${revisionId}/tables/${tableId}/rows`,
|
464
|
+
method: "GET",
|
465
|
+
query: query,
|
466
|
+
secure: true,
|
467
|
+
format: "json",
|
468
|
+
...params,
|
469
|
+
}),
|
470
|
+
createRow: (revisionId, tableId, data, params = {}) => this.request({
|
471
|
+
path: `/api/revision/${revisionId}/tables/${tableId}/rows`,
|
472
|
+
method: "POST",
|
473
|
+
body: data,
|
474
|
+
secure: true,
|
475
|
+
type: ContentType.Json,
|
476
|
+
format: "json",
|
477
|
+
...params,
|
478
|
+
}),
|
479
|
+
tableSchema: (revisionId, tableId, params = {}) => this.request({
|
480
|
+
path: `/api/revision/${revisionId}/tables/${tableId}/schema`,
|
481
|
+
method: "GET",
|
482
|
+
secure: true,
|
483
|
+
format: "json",
|
484
|
+
...params,
|
485
|
+
}),
|
486
|
+
tableCountForeignKeysBy: (revisionId, tableId, params = {}) => this.request({
|
487
|
+
path: `/api/revision/${revisionId}/tables/${tableId}/count-foreign-keys-by`,
|
488
|
+
method: "GET",
|
489
|
+
secure: true,
|
490
|
+
format: "json",
|
491
|
+
...params,
|
492
|
+
}),
|
493
|
+
tableForeignKeysBy: ({ revisionId, tableId, ...query }, params = {}) => this.request({
|
494
|
+
path: `/api/revision/${revisionId}/tables/${tableId}/foreign-keys-by`,
|
495
|
+
method: "GET",
|
496
|
+
query: query,
|
497
|
+
secure: true,
|
498
|
+
format: "json",
|
499
|
+
...params,
|
500
|
+
}),
|
501
|
+
tableCountForeignKeysTo: (revisionId, tableId, params = {}) => this.request({
|
502
|
+
path: `/api/revision/${revisionId}/tables/${tableId}/count-foreign-keys-to`,
|
503
|
+
method: "GET",
|
504
|
+
secure: true,
|
505
|
+
format: "json",
|
506
|
+
...params,
|
507
|
+
}),
|
508
|
+
tableForeignKeysTo: ({ revisionId, tableId, ...query }, params = {}) => this.request({
|
509
|
+
path: `/api/revision/${revisionId}/tables/${tableId}/foreign-keys-to`,
|
510
|
+
method: "GET",
|
511
|
+
query: query,
|
512
|
+
secure: true,
|
513
|
+
format: "json",
|
514
|
+
...params,
|
515
|
+
}),
|
516
|
+
renameTable: (revisionId, tableId, data, params = {}) => this.request({
|
517
|
+
path: `/api/revision/${revisionId}/tables/${tableId}/rename`,
|
518
|
+
method: "PATCH",
|
519
|
+
body: data,
|
520
|
+
secure: true,
|
521
|
+
type: ContentType.Json,
|
522
|
+
format: "json",
|
523
|
+
...params,
|
524
|
+
}),
|
525
|
+
row: (revisionId, tableId, rowId, params = {}) => this.request({
|
526
|
+
path: `/api/revision/${revisionId}/tables/${tableId}/rows/${rowId}`,
|
527
|
+
method: "GET",
|
528
|
+
secure: true,
|
529
|
+
format: "json",
|
530
|
+
...params,
|
531
|
+
}),
|
532
|
+
deleteRow: (revisionId, tableId, rowId, params = {}) => this.request({
|
533
|
+
path: `/api/revision/${revisionId}/tables/${tableId}/rows/${rowId}`,
|
534
|
+
method: "DELETE",
|
535
|
+
secure: true,
|
536
|
+
format: "json",
|
537
|
+
...params,
|
538
|
+
}),
|
539
|
+
updateRow: (revisionId, tableId, rowId, data, params = {}) => this.request({
|
540
|
+
path: `/api/revision/${revisionId}/tables/${tableId}/rows/${rowId}`,
|
541
|
+
method: "PUT",
|
542
|
+
body: data,
|
543
|
+
secure: true,
|
544
|
+
type: ContentType.Json,
|
545
|
+
format: "json",
|
546
|
+
...params,
|
547
|
+
}),
|
548
|
+
rowCountForeignKeysBy: (revisionId, tableId, rowId, params = {}) => this.request({
|
549
|
+
path: `/api/revision/${revisionId}/tables/${tableId}/rows/${rowId}/count-foreign-keys-by`,
|
550
|
+
method: "GET",
|
551
|
+
secure: true,
|
552
|
+
format: "json",
|
553
|
+
...params,
|
554
|
+
}),
|
555
|
+
rowForeignKeysBy: ({ revisionId, tableId, rowId, ...query }, params = {}) => this.request({
|
556
|
+
path: `/api/revision/${revisionId}/tables/${tableId}/rows/${rowId}/foreign-keys-by`,
|
557
|
+
method: "GET",
|
558
|
+
query: query,
|
559
|
+
secure: true,
|
560
|
+
format: "json",
|
561
|
+
...params,
|
562
|
+
}),
|
563
|
+
rowCountForeignKeysTo: (revisionId, tableId, rowId, params = {}) => this.request({
|
564
|
+
path: `/api/revision/${revisionId}/tables/${tableId}/rows/${rowId}/count-foreign-keys-to`,
|
565
|
+
method: "GET",
|
566
|
+
secure: true,
|
567
|
+
format: "json",
|
568
|
+
...params,
|
569
|
+
}),
|
570
|
+
rowForeignKeysTo: ({ revisionId, tableId, rowId, ...query }, params = {}) => this.request({
|
571
|
+
path: `/api/revision/${revisionId}/tables/${tableId}/rows/${rowId}/foreign-keys-to`,
|
572
|
+
method: "GET",
|
573
|
+
query: query,
|
574
|
+
secure: true,
|
575
|
+
format: "json",
|
576
|
+
...params,
|
577
|
+
}),
|
578
|
+
renameRow: (revisionId, tableId, rowId, data, params = {}) => this.request({
|
579
|
+
path: `/api/revision/${revisionId}/tables/${tableId}/rows/${rowId}/rename`,
|
580
|
+
method: "PATCH",
|
581
|
+
body: data,
|
582
|
+
secure: true,
|
583
|
+
type: ContentType.Json,
|
584
|
+
format: "json",
|
585
|
+
...params,
|
586
|
+
}),
|
587
|
+
uploadFile: (revisionId, tableId, rowId, fileId, data, params = {}) => this.request({
|
588
|
+
path: `/api/revision/${revisionId}/tables/${tableId}/rows/${rowId}/upload/${fileId}`,
|
589
|
+
method: "POST",
|
590
|
+
body: data,
|
591
|
+
secure: true,
|
592
|
+
type: ContentType.FormData,
|
593
|
+
format: "json",
|
594
|
+
...params,
|
595
|
+
}),
|
596
|
+
deleteEndpoint: (endpointId, params = {}) => this.request({
|
597
|
+
path: `/api/endpoints/${endpointId}`,
|
598
|
+
method: "DELETE",
|
599
|
+
secure: true,
|
600
|
+
format: "json",
|
601
|
+
...params,
|
602
|
+
}),
|
603
|
+
getConfiguration: (params = {}) => this.request({
|
604
|
+
path: `/api/configuration`,
|
605
|
+
method: "GET",
|
606
|
+
format: "json",
|
607
|
+
...params,
|
608
|
+
}),
|
609
|
+
};
|
587
610
|
this.health = {
|
588
611
|
liveness: (params = {}) => this.request({
|
589
612
|
path: `/health/liveness`,
|
590
|
-
method:
|
591
|
-
format:
|
613
|
+
method: "GET",
|
614
|
+
format: "json",
|
592
615
|
...params,
|
593
616
|
}),
|
594
617
|
readiness: (params = {}) => this.request({
|
595
618
|
path: `/health/readiness`,
|
596
|
-
method:
|
597
|
-
format:
|
619
|
+
method: "GET",
|
620
|
+
format: "json",
|
598
621
|
...params,
|
599
622
|
}),
|
600
623
|
};
|