revisium 2.0.1 → 2.2.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.
- package/.github/workflows/ci.yml +32 -0
- package/README.md +23 -3
- package/dist/e2e/setup/global-setup.js +2 -3
- package/dist/e2e/setup/global-setup.js.map +1 -1
- package/dist/e2e/setup/global-teardown.js +0 -2
- package/dist/e2e/setup/global-teardown.js.map +1 -1
- package/dist/e2e/utils/constants.d.ts +0 -2
- package/dist/e2e/utils/constants.js +0 -2
- package/dist/e2e/utils/constants.js.map +1 -1
- package/dist/e2e/utils/docker-helper.d.ts +0 -2
- package/dist/e2e/utils/docker-helper.js +0 -13
- package/dist/e2e/utils/docker-helper.js.map +1 -1
- package/dist/package.json +27 -14
- package/dist/src/commands/migration/apply-migrations.command.d.ts +1 -1
- package/dist/src/commands/migration/apply-migrations.command.js +4 -5
- package/dist/src/commands/migration/apply-migrations.command.js.map +1 -1
- package/dist/src/commands/migration/save-migrations.command.d.ts +1 -1
- package/dist/src/commands/migration/save-migrations.command.js +6 -6
- package/dist/src/commands/migration/save-migrations.command.js.map +1 -1
- package/dist/src/commands/rows/save-rows.command.d.ts +1 -1
- package/dist/src/commands/rows/save-rows.command.js +12 -10
- package/dist/src/commands/rows/save-rows.command.js.map +1 -1
- package/dist/src/commands/rows/upload-rows.command.d.ts +1 -1
- package/dist/src/commands/rows/upload-rows.command.js +12 -15
- package/dist/src/commands/rows/upload-rows.command.js.map +1 -1
- package/dist/src/commands/schema/create-migrations.command.js.map +1 -1
- package/dist/src/commands/schema/save-schema.command.d.ts +1 -1
- package/dist/src/commands/schema/save-schema.command.js +7 -7
- package/dist/src/commands/schema/save-schema.command.js.map +1 -1
- package/dist/src/config/meta-schema.d.ts +3 -0
- package/dist/src/config/meta-schema.js +43 -1
- package/dist/src/config/meta-schema.js.map +1 -1
- package/dist/src/services/connection/api-client-adapter.d.ts +2 -4
- package/dist/src/services/connection/api-client-adapter.js +40 -36
- package/dist/src/services/connection/api-client-adapter.js.map +1 -1
- package/dist/src/services/connection/api-client.d.ts +3 -4
- package/dist/src/services/connection/api-client.js +11 -33
- package/dist/src/services/connection/api-client.js.map +1 -1
- package/dist/src/services/connection/connection-factory.service.d.ts +4 -6
- package/dist/src/services/connection/connection-factory.service.js +18 -39
- package/dist/src/services/connection/connection-factory.service.js.map +1 -1
- package/dist/src/services/connection/connection.service.d.ts +2 -73
- package/dist/src/services/connection/connection.service.js +2 -11
- package/dist/src/services/connection/connection.service.js.map +1 -1
- package/dist/src/services/sync/commit-revision.service.js +6 -28
- package/dist/src/services/sync/commit-revision.service.js.map +1 -1
- package/dist/src/services/sync/row-sync.service.d.ts +5 -5
- package/dist/src/services/sync/row-sync.service.js +10 -10
- package/dist/src/services/sync/row-sync.service.js.map +1 -1
- package/dist/src/services/sync/sync-data.service.d.ts +1 -0
- package/dist/src/services/sync/sync-data.service.js +21 -21
- package/dist/src/services/sync/sync-data.service.js.map +1 -1
- package/dist/src/services/sync/sync-schema.service.d.ts +1 -0
- package/dist/src/services/sync/sync-schema.service.js +11 -10
- package/dist/src/services/sync/sync-schema.service.js.map +1 -1
- package/dist/src/services/url/auth-prompt.service.js +1 -1
- package/dist/src/services/url/auth-prompt.service.js.map +1 -1
- package/dist/src/types/migration.types.d.ts +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/docs/authentication.md +3 -3
- package/docs/configuration.md +58 -9
- package/docs/docker-deployment.md +48 -13
- package/docs/migrate-commands.md +35 -10
- package/docs/rows-commands.md +30 -7
- package/docs/schema-commands.md +21 -5
- package/docs/sync-commands.md +44 -12
- package/docs/url-format.md +2 -2
- package/e2e/setup/global-setup.ts +3 -9
- package/e2e/setup/global-teardown.ts +0 -6
- package/e2e/utils/constants.ts +0 -2
- package/e2e/utils/docker-helper.ts +0 -23
- package/package.json +27 -14
- package/src/commands/migration/apply-migrations.command.ts +5 -6
- package/src/commands/migration/save-migrations.command.ts +7 -6
- package/src/commands/rows/save-rows.command.ts +14 -28
- package/src/commands/rows/upload-rows.command.ts +7 -15
- package/src/commands/schema/create-migrations.command.ts +1 -1
- package/src/commands/schema/save-schema.command.ts +9 -14
- package/src/config/meta-schema.ts +47 -0
- package/src/services/connection/__tests__/connection-factory.service.spec.ts +117 -0
- package/src/services/connection/__tests__/connection.service.spec.ts +27 -117
- package/src/services/connection/api-client-adapter.ts +41 -45
- package/src/services/connection/api-client.ts +11 -50
- package/src/services/connection/connection-factory.service.ts +35 -65
- package/src/services/connection/connection.service.ts +3 -14
- package/src/services/sync/__tests__/row-sync.service.spec.ts +3 -6
- package/src/services/sync/commit-revision.service.ts +7 -51
- package/src/services/sync/row-sync.service.ts +4 -18
- package/src/services/sync/sync-data.service.ts +32 -45
- package/src/services/sync/sync-schema.service.ts +14 -22
- package/src/services/url/auth-prompt.service.ts +1 -1
- package/src/types/migration.types.ts +2 -2
- package/dist/src/__generated__/api.d.ts +0 -688
- package/dist/src/__generated__/api.js +0 -698
- package/dist/src/__generated__/api.js.map +0 -1
- package/e2e/docker-compose.e2e.yml +0 -31
- package/src/__generated__/api.ts +0 -2598
|
@@ -1,698 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Api = exports.HttpClient = exports.ContentType = void 0;
|
|
4
|
-
var ContentType;
|
|
5
|
-
(function (ContentType) {
|
|
6
|
-
ContentType["Json"] = "application/json";
|
|
7
|
-
ContentType["JsonApi"] = "application/vnd.api+json";
|
|
8
|
-
ContentType["FormData"] = "multipart/form-data";
|
|
9
|
-
ContentType["UrlEncoded"] = "application/x-www-form-urlencoded";
|
|
10
|
-
ContentType["Text"] = "text/plain";
|
|
11
|
-
})(ContentType || (exports.ContentType = ContentType = {}));
|
|
12
|
-
class HttpClient {
|
|
13
|
-
baseUrl = "";
|
|
14
|
-
securityData = null;
|
|
15
|
-
securityWorker;
|
|
16
|
-
abortControllers = new Map();
|
|
17
|
-
customFetch = (...fetchParams) => fetch(...fetchParams);
|
|
18
|
-
baseApiParams = {
|
|
19
|
-
credentials: "same-origin",
|
|
20
|
-
headers: {},
|
|
21
|
-
redirect: "follow",
|
|
22
|
-
referrerPolicy: "no-referrer",
|
|
23
|
-
};
|
|
24
|
-
constructor(apiConfig = {}) {
|
|
25
|
-
Object.assign(this, apiConfig);
|
|
26
|
-
}
|
|
27
|
-
setSecurityData = (data) => {
|
|
28
|
-
this.securityData = data;
|
|
29
|
-
};
|
|
30
|
-
encodeQueryParam(key, value) {
|
|
31
|
-
const encodedKey = encodeURIComponent(key);
|
|
32
|
-
return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
|
|
33
|
-
}
|
|
34
|
-
addQueryParam(query, key) {
|
|
35
|
-
return this.encodeQueryParam(key, query[key]);
|
|
36
|
-
}
|
|
37
|
-
addArrayQueryParam(query, key) {
|
|
38
|
-
const value = query[key];
|
|
39
|
-
return value.map((v) => this.encodeQueryParam(key, v)).join("&");
|
|
40
|
-
}
|
|
41
|
-
toQueryString(rawQuery) {
|
|
42
|
-
const query = rawQuery || {};
|
|
43
|
-
const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]);
|
|
44
|
-
return keys
|
|
45
|
-
.map((key) => Array.isArray(query[key])
|
|
46
|
-
? this.addArrayQueryParam(query, key)
|
|
47
|
-
: this.addQueryParam(query, key))
|
|
48
|
-
.join("&");
|
|
49
|
-
}
|
|
50
|
-
addQueryParams(rawQuery) {
|
|
51
|
-
const queryString = this.toQueryString(rawQuery);
|
|
52
|
-
return queryString ? `?${queryString}` : "";
|
|
53
|
-
}
|
|
54
|
-
contentFormatters = {
|
|
55
|
-
[ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string")
|
|
56
|
-
? JSON.stringify(input)
|
|
57
|
-
: input,
|
|
58
|
-
[ContentType.JsonApi]: (input) => input !== null && (typeof input === "object" || typeof input === "string")
|
|
59
|
-
? JSON.stringify(input)
|
|
60
|
-
: input,
|
|
61
|
-
[ContentType.Text]: (input) => input !== null && typeof input !== "string"
|
|
62
|
-
? JSON.stringify(input)
|
|
63
|
-
: input,
|
|
64
|
-
[ContentType.FormData]: (input) => Object.keys(input || {}).reduce((formData, key) => {
|
|
65
|
-
const property = input[key];
|
|
66
|
-
formData.append(key, property instanceof Blob
|
|
67
|
-
? property
|
|
68
|
-
: typeof property === "object" && property !== null
|
|
69
|
-
? JSON.stringify(property)
|
|
70
|
-
: `${property}`);
|
|
71
|
-
return formData;
|
|
72
|
-
}, new FormData()),
|
|
73
|
-
[ContentType.UrlEncoded]: (input) => this.toQueryString(input),
|
|
74
|
-
};
|
|
75
|
-
mergeRequestParams(params1, params2) {
|
|
76
|
-
return {
|
|
77
|
-
...this.baseApiParams,
|
|
78
|
-
...params1,
|
|
79
|
-
...(params2 || {}),
|
|
80
|
-
headers: {
|
|
81
|
-
...(this.baseApiParams.headers || {}),
|
|
82
|
-
...(params1.headers || {}),
|
|
83
|
-
...((params2 && params2.headers) || {}),
|
|
84
|
-
},
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
createAbortSignal = (cancelToken) => {
|
|
88
|
-
if (this.abortControllers.has(cancelToken)) {
|
|
89
|
-
const abortController = this.abortControllers.get(cancelToken);
|
|
90
|
-
if (abortController) {
|
|
91
|
-
return abortController.signal;
|
|
92
|
-
}
|
|
93
|
-
return void 0;
|
|
94
|
-
}
|
|
95
|
-
const abortController = new AbortController();
|
|
96
|
-
this.abortControllers.set(cancelToken, abortController);
|
|
97
|
-
return abortController.signal;
|
|
98
|
-
};
|
|
99
|
-
abortRequest = (cancelToken) => {
|
|
100
|
-
const abortController = this.abortControllers.get(cancelToken);
|
|
101
|
-
if (abortController) {
|
|
102
|
-
abortController.abort();
|
|
103
|
-
this.abortControllers.delete(cancelToken);
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
request = async ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }) => {
|
|
107
|
-
const secureParams = ((typeof secure === "boolean" ? secure : this.baseApiParams.secure) &&
|
|
108
|
-
this.securityWorker &&
|
|
109
|
-
(await this.securityWorker(this.securityData))) ||
|
|
110
|
-
{};
|
|
111
|
-
const requestParams = this.mergeRequestParams(params, secureParams);
|
|
112
|
-
const queryString = query && this.toQueryString(query);
|
|
113
|
-
const payloadFormatter = this.contentFormatters[type || ContentType.Json];
|
|
114
|
-
const responseFormat = format || requestParams.format;
|
|
115
|
-
return this.customFetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, {
|
|
116
|
-
...requestParams,
|
|
117
|
-
headers: {
|
|
118
|
-
...(requestParams.headers || {}),
|
|
119
|
-
...(type && type !== ContentType.FormData
|
|
120
|
-
? { "Content-Type": type }
|
|
121
|
-
: {}),
|
|
122
|
-
},
|
|
123
|
-
signal: (cancelToken
|
|
124
|
-
? this.createAbortSignal(cancelToken)
|
|
125
|
-
: requestParams.signal) || null,
|
|
126
|
-
body: typeof body === "undefined" || body === null
|
|
127
|
-
? null
|
|
128
|
-
: payloadFormatter(body),
|
|
129
|
-
}).then(async (response) => {
|
|
130
|
-
const r = response.clone();
|
|
131
|
-
r.data = null;
|
|
132
|
-
r.error = null;
|
|
133
|
-
const data = !responseFormat
|
|
134
|
-
? r
|
|
135
|
-
: await response[responseFormat]()
|
|
136
|
-
.then((data) => {
|
|
137
|
-
if (r.ok) {
|
|
138
|
-
r.data = data;
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
141
|
-
r.error = data;
|
|
142
|
-
}
|
|
143
|
-
return r;
|
|
144
|
-
})
|
|
145
|
-
.catch((e) => {
|
|
146
|
-
r.error = e;
|
|
147
|
-
return r;
|
|
148
|
-
});
|
|
149
|
-
if (cancelToken) {
|
|
150
|
-
this.abortControllers.delete(cancelToken);
|
|
151
|
-
}
|
|
152
|
-
return data;
|
|
153
|
-
});
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
exports.HttpClient = HttpClient;
|
|
157
|
-
class Api extends HttpClient {
|
|
158
|
-
api = {
|
|
159
|
-
login: (data, params = {}) => this.request({
|
|
160
|
-
path: `/api/auth/login`,
|
|
161
|
-
method: "POST",
|
|
162
|
-
body: data,
|
|
163
|
-
secure: true,
|
|
164
|
-
type: ContentType.Json,
|
|
165
|
-
format: "json",
|
|
166
|
-
...params,
|
|
167
|
-
}),
|
|
168
|
-
createUser: (data, params = {}) => this.request({
|
|
169
|
-
path: `/api/auth/user`,
|
|
170
|
-
method: "POST",
|
|
171
|
-
body: data,
|
|
172
|
-
secure: true,
|
|
173
|
-
type: ContentType.Json,
|
|
174
|
-
format: "json",
|
|
175
|
-
...params,
|
|
176
|
-
}),
|
|
177
|
-
updatePassword: (data, params = {}) => this.request({
|
|
178
|
-
path: `/api/auth/password`,
|
|
179
|
-
method: "PUT",
|
|
180
|
-
body: data,
|
|
181
|
-
secure: true,
|
|
182
|
-
type: ContentType.Json,
|
|
183
|
-
format: "json",
|
|
184
|
-
...params,
|
|
185
|
-
}),
|
|
186
|
-
me: (params = {}) => this.request({
|
|
187
|
-
path: `/api/user/me`,
|
|
188
|
-
method: "GET",
|
|
189
|
-
secure: true,
|
|
190
|
-
format: "json",
|
|
191
|
-
...params,
|
|
192
|
-
}),
|
|
193
|
-
projects: ({ organizationId, ...query }, params = {}) => this.request({
|
|
194
|
-
path: `/api/organization/${organizationId}/projects`,
|
|
195
|
-
method: "GET",
|
|
196
|
-
query: query,
|
|
197
|
-
secure: true,
|
|
198
|
-
format: "json",
|
|
199
|
-
...params,
|
|
200
|
-
}),
|
|
201
|
-
createProject: ({ organizationId, ...query }, data, params = {}) => this.request({
|
|
202
|
-
path: `/api/organization/${organizationId}/projects`,
|
|
203
|
-
method: "POST",
|
|
204
|
-
query: query,
|
|
205
|
-
body: data,
|
|
206
|
-
secure: true,
|
|
207
|
-
type: ContentType.Json,
|
|
208
|
-
format: "json",
|
|
209
|
-
...params,
|
|
210
|
-
}),
|
|
211
|
-
usersOrganization: ({ organizationId, ...query }, params = {}) => this.request({
|
|
212
|
-
path: `/api/organization/${organizationId}/users`,
|
|
213
|
-
method: "GET",
|
|
214
|
-
query: query,
|
|
215
|
-
secure: true,
|
|
216
|
-
format: "json",
|
|
217
|
-
...params,
|
|
218
|
-
}),
|
|
219
|
-
addUserToOrganization: (organizationId, data, params = {}) => this.request({
|
|
220
|
-
path: `/api/organization/${organizationId}/users`,
|
|
221
|
-
method: "POST",
|
|
222
|
-
body: data,
|
|
223
|
-
secure: true,
|
|
224
|
-
type: ContentType.Json,
|
|
225
|
-
format: "json",
|
|
226
|
-
...params,
|
|
227
|
-
}),
|
|
228
|
-
removeUserFromOrganization: (organizationId, data, params = {}) => this.request({
|
|
229
|
-
path: `/api/organization/${organizationId}/users`,
|
|
230
|
-
method: "DELETE",
|
|
231
|
-
body: data,
|
|
232
|
-
secure: true,
|
|
233
|
-
type: ContentType.Json,
|
|
234
|
-
format: "json",
|
|
235
|
-
...params,
|
|
236
|
-
}),
|
|
237
|
-
project: (organizationId, projectName, params = {}) => this.request({
|
|
238
|
-
path: `/api/organization/${organizationId}/projects/${projectName}`,
|
|
239
|
-
method: "GET",
|
|
240
|
-
secure: true,
|
|
241
|
-
format: "json",
|
|
242
|
-
...params,
|
|
243
|
-
}),
|
|
244
|
-
deleteProject: (organizationId, projectName, params = {}) => this.request({
|
|
245
|
-
path: `/api/organization/${organizationId}/projects/${projectName}`,
|
|
246
|
-
method: "DELETE",
|
|
247
|
-
secure: true,
|
|
248
|
-
format: "json",
|
|
249
|
-
...params,
|
|
250
|
-
}),
|
|
251
|
-
updateProject: (organizationId, projectName, data, params = {}) => this.request({
|
|
252
|
-
path: `/api/organization/${organizationId}/projects/${projectName}`,
|
|
253
|
-
method: "PUT",
|
|
254
|
-
body: data,
|
|
255
|
-
secure: true,
|
|
256
|
-
type: ContentType.Json,
|
|
257
|
-
format: "json",
|
|
258
|
-
...params,
|
|
259
|
-
}),
|
|
260
|
-
rootBranch: (organizationId, projectName, params = {}) => this.request({
|
|
261
|
-
path: `/api/organization/${organizationId}/projects/${projectName}/root-branch`,
|
|
262
|
-
method: "GET",
|
|
263
|
-
secure: true,
|
|
264
|
-
format: "json",
|
|
265
|
-
...params,
|
|
266
|
-
}),
|
|
267
|
-
branches: ({ organizationId, projectName, ...query }, params = {}) => this.request({
|
|
268
|
-
path: `/api/organization/${organizationId}/projects/${projectName}/branches`,
|
|
269
|
-
method: "GET",
|
|
270
|
-
query: query,
|
|
271
|
-
secure: true,
|
|
272
|
-
format: "json",
|
|
273
|
-
...params,
|
|
274
|
-
}),
|
|
275
|
-
usersProject: ({ organizationId, projectName, ...query }, params = {}) => this.request({
|
|
276
|
-
path: `/api/organization/${organizationId}/projects/${projectName}/users`,
|
|
277
|
-
method: "GET",
|
|
278
|
-
query: query,
|
|
279
|
-
secure: true,
|
|
280
|
-
format: "json",
|
|
281
|
-
...params,
|
|
282
|
-
}),
|
|
283
|
-
addUserToProject: (organizationId, projectName, data, params = {}) => this.request({
|
|
284
|
-
path: `/api/organization/${organizationId}/projects/${projectName}/users`,
|
|
285
|
-
method: "POST",
|
|
286
|
-
body: data,
|
|
287
|
-
secure: true,
|
|
288
|
-
type: ContentType.Json,
|
|
289
|
-
format: "json",
|
|
290
|
-
...params,
|
|
291
|
-
}),
|
|
292
|
-
removeUserFromProject: (organizationId, projectName, userId, params = {}) => this.request({
|
|
293
|
-
path: `/api/organization/${organizationId}/projects/${projectName}/users/${userId}`,
|
|
294
|
-
method: "DELETE",
|
|
295
|
-
secure: true,
|
|
296
|
-
format: "json",
|
|
297
|
-
...params,
|
|
298
|
-
}),
|
|
299
|
-
branch: (organizationId, projectName, branchName, params = {}) => this.request({
|
|
300
|
-
path: `/api/organization/${organizationId}/projects/${projectName}/branches/${branchName}`,
|
|
301
|
-
method: "GET",
|
|
302
|
-
secure: true,
|
|
303
|
-
format: "json",
|
|
304
|
-
...params,
|
|
305
|
-
}),
|
|
306
|
-
branchTouched: (organizationId, projectName, branchName, params = {}) => this.request({
|
|
307
|
-
path: `/api/organization/${organizationId}/projects/${projectName}/branches/${branchName}/touched`,
|
|
308
|
-
method: "GET",
|
|
309
|
-
secure: true,
|
|
310
|
-
format: "json",
|
|
311
|
-
...params,
|
|
312
|
-
}),
|
|
313
|
-
parentBranch: (organizationId, projectName, branchName, params = {}) => this.request({
|
|
314
|
-
path: `/api/organization/${organizationId}/projects/${projectName}/branches/${branchName}/parent-branch`,
|
|
315
|
-
method: "GET",
|
|
316
|
-
secure: true,
|
|
317
|
-
format: "json",
|
|
318
|
-
...params,
|
|
319
|
-
}),
|
|
320
|
-
startRevision: (organizationId, projectName, branchName, params = {}) => this.request({
|
|
321
|
-
path: `/api/organization/${organizationId}/projects/${projectName}/branches/${branchName}/start-revision`,
|
|
322
|
-
method: "GET",
|
|
323
|
-
secure: true,
|
|
324
|
-
format: "json",
|
|
325
|
-
...params,
|
|
326
|
-
}),
|
|
327
|
-
headRevision: (organizationId, projectName, branchName, params = {}) => this.request({
|
|
328
|
-
path: `/api/organization/${organizationId}/projects/${projectName}/branches/${branchName}/head-revision`,
|
|
329
|
-
method: "GET",
|
|
330
|
-
secure: true,
|
|
331
|
-
format: "json",
|
|
332
|
-
...params,
|
|
333
|
-
}),
|
|
334
|
-
draftRevision: (organizationId, projectName, branchName, params = {}) => this.request({
|
|
335
|
-
path: `/api/organization/${organizationId}/projects/${projectName}/branches/${branchName}/draft-revision`,
|
|
336
|
-
method: "GET",
|
|
337
|
-
secure: true,
|
|
338
|
-
format: "json",
|
|
339
|
-
...params,
|
|
340
|
-
}),
|
|
341
|
-
revisions: ({ organizationId, projectName, branchName, ...query }, params = {}) => this.request({
|
|
342
|
-
path: `/api/organization/${organizationId}/projects/${projectName}/branches/${branchName}/revisions`,
|
|
343
|
-
method: "GET",
|
|
344
|
-
query: query,
|
|
345
|
-
secure: true,
|
|
346
|
-
format: "json",
|
|
347
|
-
...params,
|
|
348
|
-
}),
|
|
349
|
-
createRevision: (organizationId, projectName, branchName, data, params = {}) => this.request({
|
|
350
|
-
path: `/api/organization/${organizationId}/projects/${projectName}/branches/${branchName}/create-revision`,
|
|
351
|
-
method: "POST",
|
|
352
|
-
body: data,
|
|
353
|
-
secure: true,
|
|
354
|
-
type: ContentType.Json,
|
|
355
|
-
format: "json",
|
|
356
|
-
...params,
|
|
357
|
-
}),
|
|
358
|
-
revertChanges: (organizationId, projectName, branchName, params = {}) => this.request({
|
|
359
|
-
path: `/api/organization/${organizationId}/projects/${projectName}/branches/${branchName}/revert-changes`,
|
|
360
|
-
method: "POST",
|
|
361
|
-
secure: true,
|
|
362
|
-
format: "json",
|
|
363
|
-
...params,
|
|
364
|
-
}),
|
|
365
|
-
revision: (revisionId, params = {}) => this.request({
|
|
366
|
-
path: `/api/revision/${revisionId}`,
|
|
367
|
-
method: "GET",
|
|
368
|
-
secure: true,
|
|
369
|
-
format: "json",
|
|
370
|
-
...params,
|
|
371
|
-
}),
|
|
372
|
-
parentRevision: (revisionId, params = {}) => this.request({
|
|
373
|
-
path: `/api/revision/${revisionId}/parent-revision`,
|
|
374
|
-
method: "GET",
|
|
375
|
-
secure: true,
|
|
376
|
-
format: "json",
|
|
377
|
-
...params,
|
|
378
|
-
}),
|
|
379
|
-
childRevision: (revisionId, params = {}) => this.request({
|
|
380
|
-
path: `/api/revision/${revisionId}/child-revision`,
|
|
381
|
-
method: "GET",
|
|
382
|
-
secure: true,
|
|
383
|
-
format: "json",
|
|
384
|
-
...params,
|
|
385
|
-
}),
|
|
386
|
-
childBranches: (revisionId, params = {}) => this.request({
|
|
387
|
-
path: `/api/revision/${revisionId}/child-branches`,
|
|
388
|
-
method: "GET",
|
|
389
|
-
secure: true,
|
|
390
|
-
format: "json",
|
|
391
|
-
...params,
|
|
392
|
-
}),
|
|
393
|
-
createBranch: (revisionId, data, params = {}) => this.request({
|
|
394
|
-
path: `/api/revision/${revisionId}/child-branches`,
|
|
395
|
-
method: "POST",
|
|
396
|
-
body: data,
|
|
397
|
-
secure: true,
|
|
398
|
-
type: ContentType.Json,
|
|
399
|
-
format: "json",
|
|
400
|
-
...params,
|
|
401
|
-
}),
|
|
402
|
-
tables: ({ revisionId, ...query }, params = {}) => this.request({
|
|
403
|
-
path: `/api/revision/${revisionId}/tables`,
|
|
404
|
-
method: "GET",
|
|
405
|
-
query: query,
|
|
406
|
-
secure: true,
|
|
407
|
-
format: "json",
|
|
408
|
-
...params,
|
|
409
|
-
}),
|
|
410
|
-
createTable: (revisionId, data, params = {}) => this.request({
|
|
411
|
-
path: `/api/revision/${revisionId}/tables`,
|
|
412
|
-
method: "POST",
|
|
413
|
-
body: data,
|
|
414
|
-
secure: true,
|
|
415
|
-
type: ContentType.Json,
|
|
416
|
-
format: "json",
|
|
417
|
-
...params,
|
|
418
|
-
}),
|
|
419
|
-
endpoints: (revisionId, params = {}) => this.request({
|
|
420
|
-
path: `/api/revision/${revisionId}/endpoints`,
|
|
421
|
-
method: "GET",
|
|
422
|
-
secure: true,
|
|
423
|
-
format: "json",
|
|
424
|
-
...params,
|
|
425
|
-
}),
|
|
426
|
-
createEndpoint: (revisionId, data, params = {}) => this.request({
|
|
427
|
-
path: `/api/revision/${revisionId}/endpoints`,
|
|
428
|
-
method: "POST",
|
|
429
|
-
body: data,
|
|
430
|
-
secure: true,
|
|
431
|
-
type: ContentType.Json,
|
|
432
|
-
format: "json",
|
|
433
|
-
...params,
|
|
434
|
-
}),
|
|
435
|
-
migrations: (revisionId, params = {}) => this.request({
|
|
436
|
-
path: `/api/revision/${revisionId}/migrations`,
|
|
437
|
-
method: "GET",
|
|
438
|
-
secure: true,
|
|
439
|
-
format: "json",
|
|
440
|
-
...params,
|
|
441
|
-
}),
|
|
442
|
-
applyMigrations: (revisionId, data, params = {}) => this.request({
|
|
443
|
-
path: `/api/revision/${revisionId}/apply-migrations`,
|
|
444
|
-
method: "POST",
|
|
445
|
-
body: data,
|
|
446
|
-
secure: true,
|
|
447
|
-
type: ContentType.Json,
|
|
448
|
-
format: "json",
|
|
449
|
-
...params,
|
|
450
|
-
}),
|
|
451
|
-
table: (revisionId, tableId, params = {}) => this.request({
|
|
452
|
-
path: `/api/revision/${revisionId}/tables/${tableId}`,
|
|
453
|
-
method: "GET",
|
|
454
|
-
secure: true,
|
|
455
|
-
format: "json",
|
|
456
|
-
...params,
|
|
457
|
-
}),
|
|
458
|
-
deleteTable: (revisionId, tableId, params = {}) => this.request({
|
|
459
|
-
path: `/api/revision/${revisionId}/tables/${tableId}`,
|
|
460
|
-
method: "DELETE",
|
|
461
|
-
secure: true,
|
|
462
|
-
format: "json",
|
|
463
|
-
...params,
|
|
464
|
-
}),
|
|
465
|
-
updateTable: (revisionId, tableId, data, params = {}) => this.request({
|
|
466
|
-
path: `/api/revision/${revisionId}/tables/${tableId}`,
|
|
467
|
-
method: "PATCH",
|
|
468
|
-
body: data,
|
|
469
|
-
secure: true,
|
|
470
|
-
type: ContentType.Json,
|
|
471
|
-
format: "json",
|
|
472
|
-
...params,
|
|
473
|
-
}),
|
|
474
|
-
tableCountRows: (revisionId, tableId, params = {}) => this.request({
|
|
475
|
-
path: `/api/revision/${revisionId}/tables/${tableId}/count-rows`,
|
|
476
|
-
method: "GET",
|
|
477
|
-
secure: true,
|
|
478
|
-
format: "json",
|
|
479
|
-
...params,
|
|
480
|
-
}),
|
|
481
|
-
rows: (revisionId, tableId, data, params = {}) => this.request({
|
|
482
|
-
path: `/api/revision/${revisionId}/tables/${tableId}/rows`,
|
|
483
|
-
method: "POST",
|
|
484
|
-
body: data,
|
|
485
|
-
secure: true,
|
|
486
|
-
type: ContentType.Json,
|
|
487
|
-
format: "json",
|
|
488
|
-
...params,
|
|
489
|
-
}),
|
|
490
|
-
deleteRows: (revisionId, tableId, data, params = {}) => this.request({
|
|
491
|
-
path: `/api/revision/${revisionId}/tables/${tableId}/rows`,
|
|
492
|
-
method: "DELETE",
|
|
493
|
-
body: data,
|
|
494
|
-
secure: true,
|
|
495
|
-
type: ContentType.Json,
|
|
496
|
-
format: "json",
|
|
497
|
-
...params,
|
|
498
|
-
}),
|
|
499
|
-
createRow: (revisionId, tableId, data, params = {}) => this.request({
|
|
500
|
-
path: `/api/revision/${revisionId}/tables/${tableId}/create-row`,
|
|
501
|
-
method: "POST",
|
|
502
|
-
body: data,
|
|
503
|
-
secure: true,
|
|
504
|
-
type: ContentType.Json,
|
|
505
|
-
format: "json",
|
|
506
|
-
...params,
|
|
507
|
-
}),
|
|
508
|
-
createRows: (revisionId, tableId, data, params = {}) => this.request({
|
|
509
|
-
path: `/api/revision/${revisionId}/tables/${tableId}/create-rows`,
|
|
510
|
-
method: "POST",
|
|
511
|
-
body: data,
|
|
512
|
-
secure: true,
|
|
513
|
-
type: ContentType.Json,
|
|
514
|
-
format: "json",
|
|
515
|
-
...params,
|
|
516
|
-
}),
|
|
517
|
-
updateRows: (revisionId, tableId, data, params = {}) => this.request({
|
|
518
|
-
path: `/api/revision/${revisionId}/tables/${tableId}/update-rows`,
|
|
519
|
-
method: "PUT",
|
|
520
|
-
body: data,
|
|
521
|
-
secure: true,
|
|
522
|
-
type: ContentType.Json,
|
|
523
|
-
format: "json",
|
|
524
|
-
...params,
|
|
525
|
-
}),
|
|
526
|
-
patchRows: (revisionId, tableId, data, params = {}) => this.request({
|
|
527
|
-
path: `/api/revision/${revisionId}/tables/${tableId}/patch-rows`,
|
|
528
|
-
method: "PATCH",
|
|
529
|
-
body: data,
|
|
530
|
-
secure: true,
|
|
531
|
-
type: ContentType.Json,
|
|
532
|
-
format: "json",
|
|
533
|
-
...params,
|
|
534
|
-
}),
|
|
535
|
-
tableSchema: (revisionId, tableId, params = {}) => this.request({
|
|
536
|
-
path: `/api/revision/${revisionId}/tables/${tableId}/schema`,
|
|
537
|
-
method: "GET",
|
|
538
|
-
secure: true,
|
|
539
|
-
format: "json",
|
|
540
|
-
...params,
|
|
541
|
-
}),
|
|
542
|
-
tableCountForeignKeysBy: (revisionId, tableId, params = {}) => this.request({
|
|
543
|
-
path: `/api/revision/${revisionId}/tables/${tableId}/count-foreign-keys-by`,
|
|
544
|
-
method: "GET",
|
|
545
|
-
secure: true,
|
|
546
|
-
format: "json",
|
|
547
|
-
...params,
|
|
548
|
-
}),
|
|
549
|
-
tableForeignKeysBy: ({ revisionId, tableId, ...query }, params = {}) => this.request({
|
|
550
|
-
path: `/api/revision/${revisionId}/tables/${tableId}/foreign-keys-by`,
|
|
551
|
-
method: "GET",
|
|
552
|
-
query: query,
|
|
553
|
-
secure: true,
|
|
554
|
-
format: "json",
|
|
555
|
-
...params,
|
|
556
|
-
}),
|
|
557
|
-
tableCountForeignKeysTo: (revisionId, tableId, params = {}) => this.request({
|
|
558
|
-
path: `/api/revision/${revisionId}/tables/${tableId}/count-foreign-keys-to`,
|
|
559
|
-
method: "GET",
|
|
560
|
-
secure: true,
|
|
561
|
-
format: "json",
|
|
562
|
-
...params,
|
|
563
|
-
}),
|
|
564
|
-
tableForeignKeysTo: ({ revisionId, tableId, ...query }, params = {}) => this.request({
|
|
565
|
-
path: `/api/revision/${revisionId}/tables/${tableId}/foreign-keys-to`,
|
|
566
|
-
method: "GET",
|
|
567
|
-
query: query,
|
|
568
|
-
secure: true,
|
|
569
|
-
format: "json",
|
|
570
|
-
...params,
|
|
571
|
-
}),
|
|
572
|
-
renameTable: (revisionId, tableId, data, params = {}) => this.request({
|
|
573
|
-
path: `/api/revision/${revisionId}/tables/${tableId}/rename`,
|
|
574
|
-
method: "PATCH",
|
|
575
|
-
body: data,
|
|
576
|
-
secure: true,
|
|
577
|
-
type: ContentType.Json,
|
|
578
|
-
format: "json",
|
|
579
|
-
...params,
|
|
580
|
-
}),
|
|
581
|
-
row: (revisionId, tableId, rowId, params = {}) => this.request({
|
|
582
|
-
path: `/api/revision/${revisionId}/tables/${tableId}/rows/${rowId}`,
|
|
583
|
-
method: "GET",
|
|
584
|
-
secure: true,
|
|
585
|
-
format: "json",
|
|
586
|
-
...params,
|
|
587
|
-
}),
|
|
588
|
-
deleteRow: (revisionId, tableId, rowId, params = {}) => this.request({
|
|
589
|
-
path: `/api/revision/${revisionId}/tables/${tableId}/rows/${rowId}`,
|
|
590
|
-
method: "DELETE",
|
|
591
|
-
secure: true,
|
|
592
|
-
format: "json",
|
|
593
|
-
...params,
|
|
594
|
-
}),
|
|
595
|
-
updateRow: (revisionId, tableId, rowId, data, params = {}) => this.request({
|
|
596
|
-
path: `/api/revision/${revisionId}/tables/${tableId}/rows/${rowId}`,
|
|
597
|
-
method: "PUT",
|
|
598
|
-
body: data,
|
|
599
|
-
secure: true,
|
|
600
|
-
type: ContentType.Json,
|
|
601
|
-
format: "json",
|
|
602
|
-
...params,
|
|
603
|
-
}),
|
|
604
|
-
patchRow: (revisionId, tableId, rowId, data, params = {}) => this.request({
|
|
605
|
-
path: `/api/revision/${revisionId}/tables/${tableId}/rows/${rowId}`,
|
|
606
|
-
method: "PATCH",
|
|
607
|
-
body: data,
|
|
608
|
-
secure: true,
|
|
609
|
-
type: ContentType.Json,
|
|
610
|
-
format: "json",
|
|
611
|
-
...params,
|
|
612
|
-
}),
|
|
613
|
-
rowCountForeignKeysBy: (revisionId, tableId, rowId, params = {}) => this.request({
|
|
614
|
-
path: `/api/revision/${revisionId}/tables/${tableId}/rows/${rowId}/count-foreign-keys-by`,
|
|
615
|
-
method: "GET",
|
|
616
|
-
secure: true,
|
|
617
|
-
format: "json",
|
|
618
|
-
...params,
|
|
619
|
-
}),
|
|
620
|
-
rowForeignKeysBy: ({ revisionId, tableId, rowId, ...query }, params = {}) => this.request({
|
|
621
|
-
path: `/api/revision/${revisionId}/tables/${tableId}/rows/${rowId}/foreign-keys-by`,
|
|
622
|
-
method: "GET",
|
|
623
|
-
query: query,
|
|
624
|
-
secure: true,
|
|
625
|
-
format: "json",
|
|
626
|
-
...params,
|
|
627
|
-
}),
|
|
628
|
-
rowCountForeignKeysTo: (revisionId, tableId, rowId, params = {}) => this.request({
|
|
629
|
-
path: `/api/revision/${revisionId}/tables/${tableId}/rows/${rowId}/count-foreign-keys-to`,
|
|
630
|
-
method: "GET",
|
|
631
|
-
secure: true,
|
|
632
|
-
format: "json",
|
|
633
|
-
...params,
|
|
634
|
-
}),
|
|
635
|
-
rowForeignKeysTo: ({ revisionId, tableId, rowId, ...query }, params = {}) => this.request({
|
|
636
|
-
path: `/api/revision/${revisionId}/tables/${tableId}/rows/${rowId}/foreign-keys-to`,
|
|
637
|
-
method: "GET",
|
|
638
|
-
query: query,
|
|
639
|
-
secure: true,
|
|
640
|
-
format: "json",
|
|
641
|
-
...params,
|
|
642
|
-
}),
|
|
643
|
-
renameRow: (revisionId, tableId, rowId, data, params = {}) => this.request({
|
|
644
|
-
path: `/api/revision/${revisionId}/tables/${tableId}/rows/${rowId}/rename`,
|
|
645
|
-
method: "PATCH",
|
|
646
|
-
body: data,
|
|
647
|
-
secure: true,
|
|
648
|
-
type: ContentType.Json,
|
|
649
|
-
format: "json",
|
|
650
|
-
...params,
|
|
651
|
-
}),
|
|
652
|
-
uploadFile: (revisionId, tableId, rowId, fileId, data, params = {}) => this.request({
|
|
653
|
-
path: `/api/revision/${revisionId}/tables/${tableId}/rows/${rowId}/upload/${fileId}`,
|
|
654
|
-
method: "POST",
|
|
655
|
-
body: data,
|
|
656
|
-
secure: true,
|
|
657
|
-
type: ContentType.FormData,
|
|
658
|
-
format: "json",
|
|
659
|
-
...params,
|
|
660
|
-
}),
|
|
661
|
-
endpointRelatives: (endpointId, params = {}) => this.request({
|
|
662
|
-
path: `/api/endpoints/${endpointId}/relatives`,
|
|
663
|
-
method: "GET",
|
|
664
|
-
secure: true,
|
|
665
|
-
format: "json",
|
|
666
|
-
...params,
|
|
667
|
-
}),
|
|
668
|
-
deleteEndpoint: (endpointId, params = {}) => this.request({
|
|
669
|
-
path: `/api/endpoints/${endpointId}`,
|
|
670
|
-
method: "DELETE",
|
|
671
|
-
secure: true,
|
|
672
|
-
format: "json",
|
|
673
|
-
...params,
|
|
674
|
-
}),
|
|
675
|
-
getConfiguration: (params = {}) => this.request({
|
|
676
|
-
path: `/api/configuration`,
|
|
677
|
-
method: "GET",
|
|
678
|
-
format: "json",
|
|
679
|
-
...params,
|
|
680
|
-
}),
|
|
681
|
-
};
|
|
682
|
-
health = {
|
|
683
|
-
readiness: (params = {}) => this.request({
|
|
684
|
-
path: `/health/readiness`,
|
|
685
|
-
method: "GET",
|
|
686
|
-
format: "json",
|
|
687
|
-
...params,
|
|
688
|
-
}),
|
|
689
|
-
liveness: (params = {}) => this.request({
|
|
690
|
-
path: `/health/liveness`,
|
|
691
|
-
method: "GET",
|
|
692
|
-
format: "json",
|
|
693
|
-
...params,
|
|
694
|
-
}),
|
|
695
|
-
};
|
|
696
|
-
}
|
|
697
|
-
exports.Api = Api;
|
|
698
|
-
//# sourceMappingURL=api.js.map
|