@geowiki/evoland-api-proxy 0.15.0-dev.1
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/LICENSE +201 -0
- package/README.md +40 -0
- package/dist/index.d.mts +1104 -0
- package/dist/index.d.ts +1104 -0
- package/dist/index.js +1587 -0
- package/dist/index.mjs +1538 -0
- package/package.json +39 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,1538 @@
|
|
|
1
|
+
// core/ApiError.ts
|
|
2
|
+
var ApiError = class extends Error {
|
|
3
|
+
url;
|
|
4
|
+
status;
|
|
5
|
+
statusText;
|
|
6
|
+
body;
|
|
7
|
+
request;
|
|
8
|
+
constructor(request2, response, message) {
|
|
9
|
+
super(message);
|
|
10
|
+
this.name = "ApiError";
|
|
11
|
+
this.url = response.url;
|
|
12
|
+
this.status = response.status;
|
|
13
|
+
this.statusText = response.statusText;
|
|
14
|
+
this.body = response.body;
|
|
15
|
+
this.request = request2;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
// core/CancelablePromise.ts
|
|
20
|
+
var CancelError = class extends Error {
|
|
21
|
+
constructor(message) {
|
|
22
|
+
super(message);
|
|
23
|
+
this.name = "CancelError";
|
|
24
|
+
}
|
|
25
|
+
get isCancelled() {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var CancelablePromise = class {
|
|
30
|
+
#isResolved;
|
|
31
|
+
#isRejected;
|
|
32
|
+
#isCancelled;
|
|
33
|
+
#cancelHandlers;
|
|
34
|
+
#promise;
|
|
35
|
+
#resolve;
|
|
36
|
+
#reject;
|
|
37
|
+
constructor(executor) {
|
|
38
|
+
this.#isResolved = false;
|
|
39
|
+
this.#isRejected = false;
|
|
40
|
+
this.#isCancelled = false;
|
|
41
|
+
this.#cancelHandlers = [];
|
|
42
|
+
this.#promise = new Promise((resolve2, reject) => {
|
|
43
|
+
this.#resolve = resolve2;
|
|
44
|
+
this.#reject = reject;
|
|
45
|
+
const onResolve = (value) => {
|
|
46
|
+
var _a;
|
|
47
|
+
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
this.#isResolved = true;
|
|
51
|
+
(_a = this.#resolve) == null ? void 0 : _a.call(this, value);
|
|
52
|
+
};
|
|
53
|
+
const onReject = (reason) => {
|
|
54
|
+
var _a;
|
|
55
|
+
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
this.#isRejected = true;
|
|
59
|
+
(_a = this.#reject) == null ? void 0 : _a.call(this, reason);
|
|
60
|
+
};
|
|
61
|
+
const onCancel = (cancelHandler) => {
|
|
62
|
+
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
this.#cancelHandlers.push(cancelHandler);
|
|
66
|
+
};
|
|
67
|
+
Object.defineProperty(onCancel, "isResolved", {
|
|
68
|
+
get: () => this.#isResolved
|
|
69
|
+
});
|
|
70
|
+
Object.defineProperty(onCancel, "isRejected", {
|
|
71
|
+
get: () => this.#isRejected
|
|
72
|
+
});
|
|
73
|
+
Object.defineProperty(onCancel, "isCancelled", {
|
|
74
|
+
get: () => this.#isCancelled
|
|
75
|
+
});
|
|
76
|
+
return executor(onResolve, onReject, onCancel);
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
get [Symbol.toStringTag]() {
|
|
80
|
+
return "Cancellable Promise";
|
|
81
|
+
}
|
|
82
|
+
then(onFulfilled, onRejected) {
|
|
83
|
+
return this.#promise.then(onFulfilled, onRejected);
|
|
84
|
+
}
|
|
85
|
+
catch(onRejected) {
|
|
86
|
+
return this.#promise.catch(onRejected);
|
|
87
|
+
}
|
|
88
|
+
finally(onFinally) {
|
|
89
|
+
return this.#promise.finally(onFinally);
|
|
90
|
+
}
|
|
91
|
+
cancel() {
|
|
92
|
+
var _a;
|
|
93
|
+
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
this.#isCancelled = true;
|
|
97
|
+
if (this.#cancelHandlers.length) {
|
|
98
|
+
try {
|
|
99
|
+
for (const cancelHandler of this.#cancelHandlers) {
|
|
100
|
+
cancelHandler();
|
|
101
|
+
}
|
|
102
|
+
} catch (error) {
|
|
103
|
+
console.warn("Cancellation threw an error", error);
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
this.#cancelHandlers.length = 0;
|
|
108
|
+
(_a = this.#reject) == null ? void 0 : _a.call(this, new CancelError("Request aborted"));
|
|
109
|
+
}
|
|
110
|
+
get isCancelled() {
|
|
111
|
+
return this.#isCancelled;
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
// core/OpenAPI.ts
|
|
116
|
+
var OpenAPI = {
|
|
117
|
+
BASE: "",
|
|
118
|
+
VERSION: "0.0.0",
|
|
119
|
+
WITH_CREDENTIALS: false,
|
|
120
|
+
CREDENTIALS: "include",
|
|
121
|
+
TOKEN: void 0,
|
|
122
|
+
USERNAME: void 0,
|
|
123
|
+
PASSWORD: void 0,
|
|
124
|
+
HEADERS: void 0,
|
|
125
|
+
ENCODE_PATH: void 0
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
// models/TaskStatus.ts
|
|
129
|
+
var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
|
|
130
|
+
TaskStatus2["ASSIGNED"] = "ASSIGNED";
|
|
131
|
+
TaskStatus2["SKIPPED"] = "SKIPPED";
|
|
132
|
+
TaskStatus2["USER_DISCARDED"] = "USER_DISCARDED";
|
|
133
|
+
TaskStatus2["DISCARDED"] = "DISCARDED";
|
|
134
|
+
TaskStatus2["IN_REVIEW"] = "IN_REVIEW";
|
|
135
|
+
TaskStatus2["SUBMITTED"] = "SUBMITTED";
|
|
136
|
+
TaskStatus2["TO_FIX"] = "TO_FIX";
|
|
137
|
+
TaskStatus2["ACCEPTED"] = "ACCEPTED";
|
|
138
|
+
return TaskStatus2;
|
|
139
|
+
})(TaskStatus || {});
|
|
140
|
+
|
|
141
|
+
// models/TaskType.ts
|
|
142
|
+
var TaskType = /* @__PURE__ */ ((TaskType2) => {
|
|
143
|
+
TaskType2["ANNOTATION"] = "ANNOTATION";
|
|
144
|
+
TaskType2["QUESTIONNAIRE"] = "QUESTIONNAIRE";
|
|
145
|
+
return TaskType2;
|
|
146
|
+
})(TaskType || {});
|
|
147
|
+
|
|
148
|
+
// models/UserRank.ts
|
|
149
|
+
var UserRank = /* @__PURE__ */ ((UserRank2) => {
|
|
150
|
+
UserRank2["MEMBER"] = "MEMBER";
|
|
151
|
+
UserRank2["ADMIN"] = "ADMIN";
|
|
152
|
+
UserRank2["OWNER"] = "OWNER";
|
|
153
|
+
return UserRank2;
|
|
154
|
+
})(UserRank || {});
|
|
155
|
+
|
|
156
|
+
// core/request.ts
|
|
157
|
+
import axios from "axios";
|
|
158
|
+
import FormData from "form-data";
|
|
159
|
+
var isDefined = (value) => {
|
|
160
|
+
return value !== void 0 && value !== null;
|
|
161
|
+
};
|
|
162
|
+
var isString = (value) => {
|
|
163
|
+
return typeof value === "string";
|
|
164
|
+
};
|
|
165
|
+
var isStringWithValue = (value) => {
|
|
166
|
+
return isString(value) && value !== "";
|
|
167
|
+
};
|
|
168
|
+
var isBlob = (value) => {
|
|
169
|
+
return typeof value === "object" && typeof value.type === "string" && typeof value.stream === "function" && typeof value.arrayBuffer === "function" && typeof value.constructor === "function" && typeof value.constructor.name === "string" && /^(Blob|File)$/.test(value.constructor.name) && /^(Blob|File)$/.test(value[Symbol.toStringTag]);
|
|
170
|
+
};
|
|
171
|
+
var isFormData = (value) => {
|
|
172
|
+
return value instanceof FormData;
|
|
173
|
+
};
|
|
174
|
+
var isSuccess = (status) => {
|
|
175
|
+
return status >= 200 && status < 300;
|
|
176
|
+
};
|
|
177
|
+
var base64 = (str) => {
|
|
178
|
+
try {
|
|
179
|
+
return btoa(str);
|
|
180
|
+
} catch (err) {
|
|
181
|
+
return Buffer.from(str).toString("base64");
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
var getQueryString = (params) => {
|
|
185
|
+
const qs = [];
|
|
186
|
+
const append = (key, value) => {
|
|
187
|
+
qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
|
|
188
|
+
};
|
|
189
|
+
const process = (key, value) => {
|
|
190
|
+
if (isDefined(value)) {
|
|
191
|
+
if (Array.isArray(value)) {
|
|
192
|
+
value.forEach((v) => {
|
|
193
|
+
process(key, v);
|
|
194
|
+
});
|
|
195
|
+
} else if (typeof value === "object") {
|
|
196
|
+
Object.entries(value).forEach(([k, v]) => {
|
|
197
|
+
process(`${key}[${k}]`, v);
|
|
198
|
+
});
|
|
199
|
+
} else {
|
|
200
|
+
append(key, value);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
Object.entries(params).forEach(([key, value]) => {
|
|
205
|
+
process(key, value);
|
|
206
|
+
});
|
|
207
|
+
if (qs.length > 0) {
|
|
208
|
+
return `?${qs.join("&")}`;
|
|
209
|
+
}
|
|
210
|
+
return "";
|
|
211
|
+
};
|
|
212
|
+
var getUrl = (config, options) => {
|
|
213
|
+
const encoder = config.ENCODE_PATH || encodeURI;
|
|
214
|
+
const path = options.url.replace("{api-version}", config.VERSION).replace(/{(.*?)}/g, (substring, group) => {
|
|
215
|
+
var _a;
|
|
216
|
+
if ((_a = options.path) == null ? void 0 : _a.hasOwnProperty(group)) {
|
|
217
|
+
return encoder(String(options.path[group]));
|
|
218
|
+
}
|
|
219
|
+
return substring;
|
|
220
|
+
});
|
|
221
|
+
const url = `${config.BASE}${path}`;
|
|
222
|
+
if (options.query) {
|
|
223
|
+
return `${url}${getQueryString(options.query)}`;
|
|
224
|
+
}
|
|
225
|
+
return url;
|
|
226
|
+
};
|
|
227
|
+
var getFormData = (options) => {
|
|
228
|
+
if (options.formData) {
|
|
229
|
+
const formData = new FormData();
|
|
230
|
+
const process = (key, value) => {
|
|
231
|
+
if (isString(value) || isBlob(value)) {
|
|
232
|
+
formData.append(key, value);
|
|
233
|
+
} else {
|
|
234
|
+
formData.append(key, JSON.stringify(value));
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
Object.entries(options.formData).filter(([_, value]) => isDefined(value)).forEach(([key, value]) => {
|
|
238
|
+
if (Array.isArray(value)) {
|
|
239
|
+
value.forEach((v) => process(key, v));
|
|
240
|
+
} else {
|
|
241
|
+
process(key, value);
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
return formData;
|
|
245
|
+
}
|
|
246
|
+
return void 0;
|
|
247
|
+
};
|
|
248
|
+
var resolve = async (options, resolver) => {
|
|
249
|
+
if (typeof resolver === "function") {
|
|
250
|
+
return resolver(options);
|
|
251
|
+
}
|
|
252
|
+
return resolver;
|
|
253
|
+
};
|
|
254
|
+
var getHeaders = async (config, options, formData) => {
|
|
255
|
+
const token = await resolve(options, config.TOKEN);
|
|
256
|
+
const username = await resolve(options, config.USERNAME);
|
|
257
|
+
const password = await resolve(options, config.PASSWORD);
|
|
258
|
+
const additionalHeaders = await resolve(options, config.HEADERS);
|
|
259
|
+
const formHeaders = typeof (formData == null ? void 0 : formData.getHeaders) === "function" && (formData == null ? void 0 : formData.getHeaders()) || {};
|
|
260
|
+
const headers = Object.entries({
|
|
261
|
+
Accept: "application/json",
|
|
262
|
+
...additionalHeaders,
|
|
263
|
+
...options.headers,
|
|
264
|
+
...formHeaders
|
|
265
|
+
}).filter(([_, value]) => isDefined(value)).reduce(
|
|
266
|
+
(headers2, [key, value]) => ({
|
|
267
|
+
...headers2,
|
|
268
|
+
[key]: String(value)
|
|
269
|
+
}),
|
|
270
|
+
{}
|
|
271
|
+
);
|
|
272
|
+
if (isStringWithValue(token)) {
|
|
273
|
+
headers["Authorization"] = `Bearer ${token}`;
|
|
274
|
+
}
|
|
275
|
+
if (isStringWithValue(username) && isStringWithValue(password)) {
|
|
276
|
+
const credentials = base64(`${username}:${password}`);
|
|
277
|
+
headers["Authorization"] = `Basic ${credentials}`;
|
|
278
|
+
}
|
|
279
|
+
if (options.body) {
|
|
280
|
+
if (options.mediaType) {
|
|
281
|
+
headers["Content-Type"] = options.mediaType;
|
|
282
|
+
} else if (isBlob(options.body)) {
|
|
283
|
+
headers["Content-Type"] = options.body.type || "application/octet-stream";
|
|
284
|
+
} else if (isString(options.body)) {
|
|
285
|
+
headers["Content-Type"] = "text/plain";
|
|
286
|
+
} else if (!isFormData(options.body)) {
|
|
287
|
+
headers["Content-Type"] = "application/json";
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
return headers;
|
|
291
|
+
};
|
|
292
|
+
var getRequestBody = (options) => {
|
|
293
|
+
if (options.body) {
|
|
294
|
+
return options.body;
|
|
295
|
+
}
|
|
296
|
+
return void 0;
|
|
297
|
+
};
|
|
298
|
+
var sendRequest = async (config, options, url, body, formData, headers, onCancel, axiosClient) => {
|
|
299
|
+
const source = axios.CancelToken.source();
|
|
300
|
+
const requestConfig = {
|
|
301
|
+
url,
|
|
302
|
+
headers,
|
|
303
|
+
data: body ?? formData,
|
|
304
|
+
method: options.method,
|
|
305
|
+
withCredentials: config.WITH_CREDENTIALS,
|
|
306
|
+
cancelToken: source.token
|
|
307
|
+
};
|
|
308
|
+
onCancel(() => source.cancel("The user aborted a request."));
|
|
309
|
+
try {
|
|
310
|
+
return await axiosClient.request(requestConfig);
|
|
311
|
+
} catch (error) {
|
|
312
|
+
const axiosError = error;
|
|
313
|
+
if (axiosError.response) {
|
|
314
|
+
return axiosError.response;
|
|
315
|
+
}
|
|
316
|
+
throw error;
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
var getResponseHeader = (response, responseHeader) => {
|
|
320
|
+
if (responseHeader) {
|
|
321
|
+
const content = response.headers[responseHeader];
|
|
322
|
+
if (isString(content)) {
|
|
323
|
+
return content;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
return void 0;
|
|
327
|
+
};
|
|
328
|
+
var getResponseBody = (response) => {
|
|
329
|
+
if (response.status !== 204) {
|
|
330
|
+
return response.data;
|
|
331
|
+
}
|
|
332
|
+
return void 0;
|
|
333
|
+
};
|
|
334
|
+
var catchErrorCodes = (options, result) => {
|
|
335
|
+
const errors = {
|
|
336
|
+
400: "Bad Request",
|
|
337
|
+
401: "Unauthorized",
|
|
338
|
+
403: "Forbidden",
|
|
339
|
+
404: "Not Found",
|
|
340
|
+
500: "Internal Server Error",
|
|
341
|
+
502: "Bad Gateway",
|
|
342
|
+
503: "Service Unavailable",
|
|
343
|
+
...options.errors
|
|
344
|
+
};
|
|
345
|
+
const error = errors[result.status];
|
|
346
|
+
if (error) {
|
|
347
|
+
throw new ApiError(options, result, error);
|
|
348
|
+
}
|
|
349
|
+
if (!result.ok) {
|
|
350
|
+
const errorStatus = result.status ?? "unknown";
|
|
351
|
+
const errorStatusText = result.statusText ?? "unknown";
|
|
352
|
+
const errorBody = (() => {
|
|
353
|
+
try {
|
|
354
|
+
return JSON.stringify(result.body, null, 2);
|
|
355
|
+
} catch (e) {
|
|
356
|
+
return void 0;
|
|
357
|
+
}
|
|
358
|
+
})();
|
|
359
|
+
throw new ApiError(
|
|
360
|
+
options,
|
|
361
|
+
result,
|
|
362
|
+
`Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`
|
|
363
|
+
);
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
var request = (config, options, axiosClient = axios) => {
|
|
367
|
+
return new CancelablePromise(async (resolve2, reject, onCancel) => {
|
|
368
|
+
try {
|
|
369
|
+
const url = getUrl(config, options);
|
|
370
|
+
const formData = getFormData(options);
|
|
371
|
+
const body = getRequestBody(options);
|
|
372
|
+
const headers = await getHeaders(config, options, formData);
|
|
373
|
+
if (!onCancel.isCancelled) {
|
|
374
|
+
const response = await sendRequest(
|
|
375
|
+
config,
|
|
376
|
+
options,
|
|
377
|
+
url,
|
|
378
|
+
body,
|
|
379
|
+
formData,
|
|
380
|
+
headers,
|
|
381
|
+
onCancel,
|
|
382
|
+
axiosClient
|
|
383
|
+
);
|
|
384
|
+
const responseBody = getResponseBody(response);
|
|
385
|
+
const responseHeader = getResponseHeader(
|
|
386
|
+
response,
|
|
387
|
+
options.responseHeader
|
|
388
|
+
);
|
|
389
|
+
const result = {
|
|
390
|
+
url,
|
|
391
|
+
ok: isSuccess(response.status),
|
|
392
|
+
status: response.status,
|
|
393
|
+
statusText: response.statusText,
|
|
394
|
+
body: responseHeader ?? responseBody
|
|
395
|
+
};
|
|
396
|
+
catchErrorCodes(options, result);
|
|
397
|
+
resolve2(result.body);
|
|
398
|
+
}
|
|
399
|
+
} catch (error) {
|
|
400
|
+
reject(error);
|
|
401
|
+
}
|
|
402
|
+
});
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
// services/AiService.ts
|
|
406
|
+
var AiService = class {
|
|
407
|
+
/**
|
|
408
|
+
* Performs an automatic annotation of a location based on provided inputs by user.
|
|
409
|
+
* @param requestBody
|
|
410
|
+
* @returns ActiveLearningResponse Successful Response
|
|
411
|
+
* @throws ApiError
|
|
412
|
+
*/
|
|
413
|
+
static performActiveLearningActivelearningPost(requestBody) {
|
|
414
|
+
return request(OpenAPI, {
|
|
415
|
+
method: "POST",
|
|
416
|
+
url: "/activelearning/",
|
|
417
|
+
body: requestBody,
|
|
418
|
+
mediaType: "application/json",
|
|
419
|
+
errors: {
|
|
420
|
+
422: `Validation Error`
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
// services/LocationService.ts
|
|
427
|
+
var LocationService = class {
|
|
428
|
+
/**
|
|
429
|
+
* From a (lon, lat) coordinate and width and height expressed in meters, obtains a UTM tile of the given width and height for the best possible UTM projection. The user gets back the
|
|
430
|
+
* @param lon
|
|
431
|
+
* @param lat
|
|
432
|
+
* @param width
|
|
433
|
+
* @param height
|
|
434
|
+
* @returns PolygonResponse Successful Response
|
|
435
|
+
* @throws ApiError
|
|
436
|
+
*/
|
|
437
|
+
static getPolygonUtmlocationLonLonLatLatWidthWidthHeightHeightGet(lon, lat, width, height) {
|
|
438
|
+
return request(OpenAPI, {
|
|
439
|
+
method: "GET",
|
|
440
|
+
url: "/utmlocation/lon={lon}&lat={lat}&width={width}&height={height}",
|
|
441
|
+
path: {
|
|
442
|
+
"lon": lon,
|
|
443
|
+
"lat": lat,
|
|
444
|
+
"width": width,
|
|
445
|
+
"height": height
|
|
446
|
+
},
|
|
447
|
+
errors: {
|
|
448
|
+
422: `Validation Error`
|
|
449
|
+
}
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* From a location id, a project id and a reference date, gets a task response containing information about the location: the polygon with epsg and UTM bounds aligned in the grid. It also gets the task information for the user on that task if a task exists and is assigned to the current user.
|
|
454
|
+
* @param requestBody
|
|
455
|
+
* @returns TaskResponse Successful Response
|
|
456
|
+
* @throws ApiError
|
|
457
|
+
*/
|
|
458
|
+
static getLocationGetlocationPost(requestBody) {
|
|
459
|
+
return request(OpenAPI, {
|
|
460
|
+
method: "POST",
|
|
461
|
+
url: "/getlocation/",
|
|
462
|
+
body: requestBody,
|
|
463
|
+
mediaType: "application/json",
|
|
464
|
+
errors: {
|
|
465
|
+
422: `Validation Error`
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* Get the composite assets of a specific type from a location. Cannot get submitted annotations.
|
|
471
|
+
* @param requestBody
|
|
472
|
+
* @returns LocationAssetsResponse Successful Response
|
|
473
|
+
* @throws ApiError
|
|
474
|
+
*/
|
|
475
|
+
static getLocationAssetsLocationtypeassetsPost(requestBody) {
|
|
476
|
+
return request(OpenAPI, {
|
|
477
|
+
method: "POST",
|
|
478
|
+
url: "/locationtypeassets/",
|
|
479
|
+
body: requestBody,
|
|
480
|
+
mediaType: "application/json",
|
|
481
|
+
errors: {
|
|
482
|
+
422: `Validation Error`
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Get all the assets for a given location.
|
|
488
|
+
* @param requestBody
|
|
489
|
+
* @returns LocationAssetsResponse Successful Response
|
|
490
|
+
* @throws ApiError
|
|
491
|
+
*/
|
|
492
|
+
static getAllAssetsLocationassetsPost(requestBody) {
|
|
493
|
+
return request(OpenAPI, {
|
|
494
|
+
method: "POST",
|
|
495
|
+
url: "/locationassets/",
|
|
496
|
+
body: requestBody,
|
|
497
|
+
mediaType: "application/json",
|
|
498
|
+
errors: {
|
|
499
|
+
422: `Validation Error`
|
|
500
|
+
}
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Get a summary of the time series informations for a specific location.
|
|
505
|
+
* @param projectId
|
|
506
|
+
* @param locationId
|
|
507
|
+
* @returns TimeseriesInfoResponse Successful Response
|
|
508
|
+
* @throws ApiError
|
|
509
|
+
*/
|
|
510
|
+
static timeseriesInfoTimeseriesassetsProjectIdProjectIdLocationIdLocationIdGet(projectId, locationId) {
|
|
511
|
+
return request(OpenAPI, {
|
|
512
|
+
method: "GET",
|
|
513
|
+
url: "/timeseriesassets/project_id={project_id}&location_id={location_id}",
|
|
514
|
+
path: {
|
|
515
|
+
"project_id": projectId,
|
|
516
|
+
"location_id": locationId
|
|
517
|
+
},
|
|
518
|
+
errors: {
|
|
519
|
+
422: `Validation Error`
|
|
520
|
+
}
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* Creates a location from a given lon/lat/width/height and project id. Only the admin and owner users can add a location to a project.
|
|
525
|
+
* @param requestBody
|
|
526
|
+
* @returns LocationCreatedResponse Successful Response
|
|
527
|
+
* @throws ApiError
|
|
528
|
+
*/
|
|
529
|
+
static createLocationCreatelocationPost(requestBody) {
|
|
530
|
+
return request(OpenAPI, {
|
|
531
|
+
method: "POST",
|
|
532
|
+
url: "/createlocation/",
|
|
533
|
+
body: requestBody,
|
|
534
|
+
mediaType: "application/json",
|
|
535
|
+
errors: {
|
|
536
|
+
422: `Validation Error`
|
|
537
|
+
}
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Process annotation bytes into tiff
|
|
542
|
+
* @param requestBody
|
|
543
|
+
* @returns any Successful Response
|
|
544
|
+
* @throws ApiError
|
|
545
|
+
*/
|
|
546
|
+
static processAnnotationProcessannotationPost(requestBody) {
|
|
547
|
+
return request(OpenAPI, {
|
|
548
|
+
method: "POST",
|
|
549
|
+
url: "/processannotation",
|
|
550
|
+
body: requestBody,
|
|
551
|
+
mediaType: "application/json",
|
|
552
|
+
errors: {
|
|
553
|
+
422: `Validation Error`
|
|
554
|
+
}
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* Process byte data into tiff
|
|
559
|
+
* @param requestBody
|
|
560
|
+
* @returns any Successful Response
|
|
561
|
+
* @throws ApiError
|
|
562
|
+
*/
|
|
563
|
+
static processRasterProcessrasterPost(requestBody) {
|
|
564
|
+
return request(OpenAPI, {
|
|
565
|
+
method: "POST",
|
|
566
|
+
url: "/processraster",
|
|
567
|
+
body: requestBody,
|
|
568
|
+
mediaType: "application/json",
|
|
569
|
+
errors: {
|
|
570
|
+
422: `Validation Error`
|
|
571
|
+
}
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* Accepts a geojson, validates rows, insert in location_task_mapping and returns a json for each row's status
|
|
576
|
+
* @param formData
|
|
577
|
+
* @returns any Successful Response
|
|
578
|
+
* @throws ApiError
|
|
579
|
+
*/
|
|
580
|
+
static uploadLocationTaskUploadlocationtaskPost(formData) {
|
|
581
|
+
return request(OpenAPI, {
|
|
582
|
+
method: "POST",
|
|
583
|
+
url: "/uploadlocationtask/",
|
|
584
|
+
formData,
|
|
585
|
+
mediaType: "multipart/form-data",
|
|
586
|
+
errors: {
|
|
587
|
+
422: `Validation Error`
|
|
588
|
+
}
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* Bulk Upload Locations
|
|
593
|
+
* Accepts a geojson, validates rows and insert in locations table, returns status of inserted and error row
|
|
594
|
+
* @param formData
|
|
595
|
+
* @returns any Successful Response
|
|
596
|
+
* @throws ApiError
|
|
597
|
+
*/
|
|
598
|
+
static bulkUploadLocationsUploadlocationsPost(formData) {
|
|
599
|
+
return request(OpenAPI, {
|
|
600
|
+
method: "POST",
|
|
601
|
+
url: "/uploadlocations/",
|
|
602
|
+
formData,
|
|
603
|
+
mediaType: "multipart/form-data",
|
|
604
|
+
errors: {
|
|
605
|
+
422: `Validation Error`
|
|
606
|
+
}
|
|
607
|
+
});
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* Bulk Upload Review Tasks
|
|
611
|
+
* Upload tasks which has been selected for review
|
|
612
|
+
* @param formData
|
|
613
|
+
* @returns any Successful Response
|
|
614
|
+
* @throws ApiError
|
|
615
|
+
*/
|
|
616
|
+
static bulkUploadReviewTasksUploadreviewtasksPost(formData) {
|
|
617
|
+
return request(OpenAPI, {
|
|
618
|
+
method: "POST",
|
|
619
|
+
url: "/uploadreviewtasks",
|
|
620
|
+
formData,
|
|
621
|
+
mediaType: "multipart/form-data",
|
|
622
|
+
errors: {
|
|
623
|
+
422: `Validation Error`
|
|
624
|
+
}
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
};
|
|
628
|
+
|
|
629
|
+
// services/ProjectService.ts
|
|
630
|
+
var ProjectService = class {
|
|
631
|
+
/**
|
|
632
|
+
* Read Root
|
|
633
|
+
* @returns AboutResponse Successful Response
|
|
634
|
+
* @throws ApiError
|
|
635
|
+
*/
|
|
636
|
+
static readRootGet() {
|
|
637
|
+
return request(OpenAPI, {
|
|
638
|
+
method: "GET",
|
|
639
|
+
url: "/"
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* Get personal information by decoding the user token (specified inside the Authorization header field).
|
|
644
|
+
* @returns any Successful Response
|
|
645
|
+
* @throws ApiError
|
|
646
|
+
*/
|
|
647
|
+
static getUserMeGet() {
|
|
648
|
+
return request(OpenAPI, {
|
|
649
|
+
method: "GET",
|
|
650
|
+
url: "/me/"
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
/**
|
|
654
|
+
* Returns the available layers from the WMS service.
|
|
655
|
+
* @returns LayersResponse Successful Response
|
|
656
|
+
* @throws ApiError
|
|
657
|
+
*/
|
|
658
|
+
static getAvailableLayersAvailablelayersGet() {
|
|
659
|
+
return request(OpenAPI, {
|
|
660
|
+
method: "GET",
|
|
661
|
+
url: "/availablelayers/"
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
/**
|
|
665
|
+
* Return the WC labels codes for a project, with their names and colors.
|
|
666
|
+
* @param projectId
|
|
667
|
+
* @returns LabelsResponse Successful Response
|
|
668
|
+
* @throws ApiError
|
|
669
|
+
*/
|
|
670
|
+
static getLabelsLabelsProjectIdProjectIdGet(projectId) {
|
|
671
|
+
return request(OpenAPI, {
|
|
672
|
+
method: "GET",
|
|
673
|
+
url: "/labels/project_id={project_id}",
|
|
674
|
+
path: {
|
|
675
|
+
"project_id": projectId
|
|
676
|
+
},
|
|
677
|
+
errors: {
|
|
678
|
+
422: `Validation Error`
|
|
679
|
+
}
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
/**
|
|
683
|
+
* Return the combinatory (primary/secondary/tertiary) label codes, with their names and colors.
|
|
684
|
+
* @param projectId
|
|
685
|
+
* @returns LabelsResponse Successful Response
|
|
686
|
+
* @throws ApiError
|
|
687
|
+
*/
|
|
688
|
+
static getCombinationLabelsCombinationlabelsProjectIdProjectIdGet(projectId) {
|
|
689
|
+
return request(OpenAPI, {
|
|
690
|
+
method: "GET",
|
|
691
|
+
url: "/combinationlabels/project_id={project_id}",
|
|
692
|
+
path: {
|
|
693
|
+
"project_id": projectId
|
|
694
|
+
},
|
|
695
|
+
errors: {
|
|
696
|
+
422: `Validation Error`
|
|
697
|
+
}
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
/**
|
|
701
|
+
* Get the project information from a specific project.
|
|
702
|
+
* @param projectId
|
|
703
|
+
* @returns ProjectDetailElement Successful Response
|
|
704
|
+
* @throws ApiError
|
|
705
|
+
*/
|
|
706
|
+
static projectDetailProjectdetailProjectIdProjectIdGet(projectId) {
|
|
707
|
+
return request(OpenAPI, {
|
|
708
|
+
method: "GET",
|
|
709
|
+
url: "/projectdetail/project_id={project_id}",
|
|
710
|
+
path: {
|
|
711
|
+
"project_id": projectId
|
|
712
|
+
},
|
|
713
|
+
errors: {
|
|
714
|
+
422: `Validation Error`
|
|
715
|
+
}
|
|
716
|
+
});
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* Get the project information, user statistics from a specific project.
|
|
720
|
+
* @param projectId
|
|
721
|
+
* @returns UserProjectElement Successful Response
|
|
722
|
+
* @throws ApiError
|
|
723
|
+
*/
|
|
724
|
+
static projectInfoProjectinfoProjectIdProjectIdGet(projectId) {
|
|
725
|
+
return request(OpenAPI, {
|
|
726
|
+
method: "GET",
|
|
727
|
+
url: "/projectinfo/project_id={project_id}",
|
|
728
|
+
path: {
|
|
729
|
+
"project_id": projectId
|
|
730
|
+
},
|
|
731
|
+
errors: {
|
|
732
|
+
422: `Validation Error`
|
|
733
|
+
}
|
|
734
|
+
});
|
|
735
|
+
}
|
|
736
|
+
/**
|
|
737
|
+
* Lists all the project that the user is part of. If the user is an administrator, then lists all the projects currently in the datbase, including the deleted projects.
|
|
738
|
+
* @param startidx
|
|
739
|
+
* @param amount
|
|
740
|
+
* @returns ListProjectResponse Successful Response
|
|
741
|
+
* @throws ApiError
|
|
742
|
+
*/
|
|
743
|
+
static listProjectsListprojectsStartidxStartidxAmountAmountGet(startidx, amount) {
|
|
744
|
+
return request(OpenAPI, {
|
|
745
|
+
method: "GET",
|
|
746
|
+
url: "/listprojects/startidx={startidx}&amount={amount}",
|
|
747
|
+
path: {
|
|
748
|
+
"startidx": startidx,
|
|
749
|
+
"amount": amount
|
|
750
|
+
},
|
|
751
|
+
errors: {
|
|
752
|
+
422: `Validation Error`
|
|
753
|
+
}
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* Creates a project, adding the curent user as owner. Only GeoWiki admins can create a new project.
|
|
758
|
+
* @param requestBody
|
|
759
|
+
* @returns CreateProjectResponse Successful Response
|
|
760
|
+
* @throws ApiError
|
|
761
|
+
*/
|
|
762
|
+
static createProjectCreateprojectPost(requestBody) {
|
|
763
|
+
return request(OpenAPI, {
|
|
764
|
+
method: "POST",
|
|
765
|
+
url: "/createproject/",
|
|
766
|
+
body: requestBody,
|
|
767
|
+
mediaType: "application/json",
|
|
768
|
+
errors: {
|
|
769
|
+
422: `Validation Error`
|
|
770
|
+
}
|
|
771
|
+
});
|
|
772
|
+
}
|
|
773
|
+
/**
|
|
774
|
+
* Get the project result set information for all the location and tasks linked to a project
|
|
775
|
+
* @param projectId
|
|
776
|
+
* @param isGeoJson
|
|
777
|
+
* @returns any Successful Response
|
|
778
|
+
* @throws ApiError
|
|
779
|
+
*/
|
|
780
|
+
static projectResultSetProjectresultsetProjectIdProjectIdIsGeoJsonIsGeoJsonGet(projectId, isGeoJson) {
|
|
781
|
+
return request(OpenAPI, {
|
|
782
|
+
method: "GET",
|
|
783
|
+
url: "/projectresultset/project_id={project_id}&is_geo_json={is_geo_json}",
|
|
784
|
+
path: {
|
|
785
|
+
"project_id": projectId,
|
|
786
|
+
"is_geo_json": isGeoJson
|
|
787
|
+
},
|
|
788
|
+
errors: {
|
|
789
|
+
422: `Validation Error`
|
|
790
|
+
}
|
|
791
|
+
});
|
|
792
|
+
}
|
|
793
|
+
/**
|
|
794
|
+
* Create a new user in the database. Only admins can create a new user.
|
|
795
|
+
* @param requestBody
|
|
796
|
+
* @returns GenericResponse Successful Response
|
|
797
|
+
* @throws ApiError
|
|
798
|
+
*/
|
|
799
|
+
static createUserCreateuserPost(requestBody) {
|
|
800
|
+
return request(OpenAPI, {
|
|
801
|
+
method: "POST",
|
|
802
|
+
url: "/createuser/",
|
|
803
|
+
body: requestBody,
|
|
804
|
+
mediaType: "application/json",
|
|
805
|
+
errors: {
|
|
806
|
+
422: `Validation Error`
|
|
807
|
+
}
|
|
808
|
+
});
|
|
809
|
+
}
|
|
810
|
+
/**
|
|
811
|
+
* Sets the user role in a project. If the user does not exists, then adds it to the project with the target role.
|
|
812
|
+
* @param requestBody
|
|
813
|
+
* @returns GenericResponse Successful Response
|
|
814
|
+
* @throws ApiError
|
|
815
|
+
*/
|
|
816
|
+
static setUserRoleSetuserrolePost(requestBody) {
|
|
817
|
+
return request(OpenAPI, {
|
|
818
|
+
method: "POST",
|
|
819
|
+
url: "/setuserrole/",
|
|
820
|
+
body: requestBody,
|
|
821
|
+
mediaType: "application/json",
|
|
822
|
+
errors: {
|
|
823
|
+
422: `Validation Error`
|
|
824
|
+
}
|
|
825
|
+
});
|
|
826
|
+
}
|
|
827
|
+
/**
|
|
828
|
+
* Sets the user role in a project. If the user does not exists, then adds it to the project with the target role.
|
|
829
|
+
* @param requestBody
|
|
830
|
+
* @returns GenericResponse Successful Response
|
|
831
|
+
* @throws ApiError
|
|
832
|
+
*/
|
|
833
|
+
static setUserDetailSetuserdetailPost(requestBody) {
|
|
834
|
+
return request(OpenAPI, {
|
|
835
|
+
method: "POST",
|
|
836
|
+
url: "/setuserdetail/",
|
|
837
|
+
body: requestBody,
|
|
838
|
+
mediaType: "application/json",
|
|
839
|
+
errors: {
|
|
840
|
+
422: `Validation Error`
|
|
841
|
+
}
|
|
842
|
+
});
|
|
843
|
+
}
|
|
844
|
+
/**
|
|
845
|
+
* Get user role and project
|
|
846
|
+
* @param userId
|
|
847
|
+
* @returns GetUserRoleProjectResponse Successful Response
|
|
848
|
+
* @throws ApiError
|
|
849
|
+
*/
|
|
850
|
+
static getUserRoleProjectGetuserroleprojectUserIdUserIdGet(userId) {
|
|
851
|
+
return request(OpenAPI, {
|
|
852
|
+
method: "GET",
|
|
853
|
+
url: "/getuserroleproject/user_id={user_id}",
|
|
854
|
+
path: {
|
|
855
|
+
"user_id": userId
|
|
856
|
+
},
|
|
857
|
+
errors: {
|
|
858
|
+
422: `Validation Error`
|
|
859
|
+
}
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* Removes an user from a project.
|
|
864
|
+
* @param requestBody
|
|
865
|
+
* @returns GenericResponse Successful Response
|
|
866
|
+
* @throws ApiError
|
|
867
|
+
*/
|
|
868
|
+
static removeUserRemoveuserPost(requestBody) {
|
|
869
|
+
return request(OpenAPI, {
|
|
870
|
+
method: "POST",
|
|
871
|
+
url: "/removeuser/",
|
|
872
|
+
body: requestBody,
|
|
873
|
+
mediaType: "application/json",
|
|
874
|
+
errors: {
|
|
875
|
+
422: `Validation Error`
|
|
876
|
+
}
|
|
877
|
+
});
|
|
878
|
+
}
|
|
879
|
+
/**
|
|
880
|
+
* Returns a set of locations, or a sets of clusters given a bounding box
|
|
881
|
+
* @param requestBody
|
|
882
|
+
* @returns ListLocationsResponse Successful Response
|
|
883
|
+
* @throws ApiError
|
|
884
|
+
*/
|
|
885
|
+
static searchLocationsLocationsPost(requestBody) {
|
|
886
|
+
return request(OpenAPI, {
|
|
887
|
+
method: "POST",
|
|
888
|
+
url: "/locations/",
|
|
889
|
+
body: requestBody,
|
|
890
|
+
mediaType: "application/json",
|
|
891
|
+
errors: {
|
|
892
|
+
422: `Validation Error`
|
|
893
|
+
}
|
|
894
|
+
});
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* Returns a summary of locations,groups
|
|
898
|
+
* @param projectId
|
|
899
|
+
* @returns any Successful Response
|
|
900
|
+
* @throws ApiError
|
|
901
|
+
*/
|
|
902
|
+
static getLocationsSummaryLocationssummaryProjectIdProjectIdGet(projectId) {
|
|
903
|
+
return request(OpenAPI, {
|
|
904
|
+
method: "GET",
|
|
905
|
+
url: "/locationssummary/project_id={project_id}",
|
|
906
|
+
path: {
|
|
907
|
+
"project_id": projectId
|
|
908
|
+
},
|
|
909
|
+
errors: {
|
|
910
|
+
422: `Validation Error`
|
|
911
|
+
}
|
|
912
|
+
});
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* Get the table of tasks of the user if an user is specified.
|
|
916
|
+
* @param locationProjectId
|
|
917
|
+
* @param taskForReview
|
|
918
|
+
* @param id
|
|
919
|
+
* @param orderBy
|
|
920
|
+
* @param search
|
|
921
|
+
* @param status
|
|
922
|
+
* @param statusIn
|
|
923
|
+
* @param dateLte
|
|
924
|
+
* @param dateGte
|
|
925
|
+
* @param pageIdx
|
|
926
|
+
* @param pageSize
|
|
927
|
+
* @param userId
|
|
928
|
+
* @param userUserAlias
|
|
929
|
+
* @param userOrderBy
|
|
930
|
+
* @param locationLocationId
|
|
931
|
+
* @param locationOrderBy
|
|
932
|
+
* @param groupName
|
|
933
|
+
* @param groupOrderBy
|
|
934
|
+
* @returns TaskFilterResponse Successful Response
|
|
935
|
+
* @throws ApiError
|
|
936
|
+
*/
|
|
937
|
+
static getTasksTasksGet(locationProjectId, taskForReview, id, orderBy, search, status, statusIn, dateLte, dateGte, pageIdx, pageSize, userId, userUserAlias, userOrderBy, locationLocationId, locationOrderBy, groupName, groupOrderBy) {
|
|
938
|
+
return request(OpenAPI, {
|
|
939
|
+
method: "GET",
|
|
940
|
+
url: "/tasks",
|
|
941
|
+
query: {
|
|
942
|
+
"task_for_review": taskForReview,
|
|
943
|
+
"id": id,
|
|
944
|
+
"order_by": orderBy,
|
|
945
|
+
"search": search,
|
|
946
|
+
"status": status,
|
|
947
|
+
"status__in": statusIn,
|
|
948
|
+
"date__lte": dateLte,
|
|
949
|
+
"date__gte": dateGte,
|
|
950
|
+
"page_idx": pageIdx,
|
|
951
|
+
"page_size": pageSize,
|
|
952
|
+
"user__id": userId,
|
|
953
|
+
"user__user_alias": userUserAlias,
|
|
954
|
+
"user__order_by": userOrderBy,
|
|
955
|
+
"location__location_id": locationLocationId,
|
|
956
|
+
"location__order_by": locationOrderBy,
|
|
957
|
+
"location__project_id": locationProjectId,
|
|
958
|
+
"group__name": groupName,
|
|
959
|
+
"group__order_by": groupOrderBy
|
|
960
|
+
},
|
|
961
|
+
errors: {
|
|
962
|
+
422: `Validation Error`
|
|
963
|
+
}
|
|
964
|
+
});
|
|
965
|
+
}
|
|
966
|
+
/**
|
|
967
|
+
* Get a random task for the user, based on the same filter available in the GET /tasks call.
|
|
968
|
+
* @param locationProjectId
|
|
969
|
+
* @param taskForReview
|
|
970
|
+
* @param id
|
|
971
|
+
* @param orderBy
|
|
972
|
+
* @param search
|
|
973
|
+
* @param status
|
|
974
|
+
* @param statusIn
|
|
975
|
+
* @param dateLte
|
|
976
|
+
* @param dateGte
|
|
977
|
+
* @param pageIdx
|
|
978
|
+
* @param pageSize
|
|
979
|
+
* @param userId
|
|
980
|
+
* @param userUserAlias
|
|
981
|
+
* @param userOrderBy
|
|
982
|
+
* @param locationLocationId
|
|
983
|
+
* @param locationOrderBy
|
|
984
|
+
* @param groupName
|
|
985
|
+
* @param groupOrderBy
|
|
986
|
+
* @returns TaskResponse Successful Response
|
|
987
|
+
* @throws ApiError
|
|
988
|
+
*/
|
|
989
|
+
static getRandomTaskRandomtaskGet(locationProjectId, taskForReview, id, orderBy, search, status, statusIn, dateLte, dateGte, pageIdx, pageSize, userId, userUserAlias, userOrderBy, locationLocationId, locationOrderBy, groupName, groupOrderBy) {
|
|
990
|
+
return request(OpenAPI, {
|
|
991
|
+
method: "GET",
|
|
992
|
+
url: "/randomtask",
|
|
993
|
+
query: {
|
|
994
|
+
"task_for_review": taskForReview,
|
|
995
|
+
"id": id,
|
|
996
|
+
"order_by": orderBy,
|
|
997
|
+
"search": search,
|
|
998
|
+
"status": status,
|
|
999
|
+
"status__in": statusIn,
|
|
1000
|
+
"date__lte": dateLte,
|
|
1001
|
+
"date__gte": dateGte,
|
|
1002
|
+
"page_idx": pageIdx,
|
|
1003
|
+
"page_size": pageSize,
|
|
1004
|
+
"user__id": userId,
|
|
1005
|
+
"user__user_alias": userUserAlias,
|
|
1006
|
+
"user__order_by": userOrderBy,
|
|
1007
|
+
"location__location_id": locationLocationId,
|
|
1008
|
+
"location__order_by": locationOrderBy,
|
|
1009
|
+
"location__project_id": locationProjectId,
|
|
1010
|
+
"group__name": groupName,
|
|
1011
|
+
"group__order_by": groupOrderBy
|
|
1012
|
+
},
|
|
1013
|
+
errors: {
|
|
1014
|
+
422: `Validation Error`
|
|
1015
|
+
}
|
|
1016
|
+
});
|
|
1017
|
+
}
|
|
1018
|
+
/**
|
|
1019
|
+
* Returns a list of groups available within a project.
|
|
1020
|
+
* @param projectId
|
|
1021
|
+
* @returns ProjectGroupResponse Successful Response
|
|
1022
|
+
* @throws ApiError
|
|
1023
|
+
*/
|
|
1024
|
+
static getProjectGroupsProjectgroupsProjectIdProjectIdGet(projectId) {
|
|
1025
|
+
return request(OpenAPI, {
|
|
1026
|
+
method: "GET",
|
|
1027
|
+
url: "/projectgroups/project_id={project_id}",
|
|
1028
|
+
path: {
|
|
1029
|
+
"project_id": projectId
|
|
1030
|
+
},
|
|
1031
|
+
errors: {
|
|
1032
|
+
422: `Validation Error`
|
|
1033
|
+
}
|
|
1034
|
+
});
|
|
1035
|
+
}
|
|
1036
|
+
/**
|
|
1037
|
+
* Selects an active group for a project.
|
|
1038
|
+
* @param requestBody
|
|
1039
|
+
* @returns GenericResponse Successful Response
|
|
1040
|
+
* @throws ApiError
|
|
1041
|
+
*/
|
|
1042
|
+
static selectProjectGroupProjectselectgroupPost(requestBody) {
|
|
1043
|
+
return request(OpenAPI, {
|
|
1044
|
+
method: "POST",
|
|
1045
|
+
url: "/projectselectgroup/",
|
|
1046
|
+
body: requestBody,
|
|
1047
|
+
mediaType: "application/json",
|
|
1048
|
+
errors: {
|
|
1049
|
+
422: `Validation Error`
|
|
1050
|
+
}
|
|
1051
|
+
});
|
|
1052
|
+
}
|
|
1053
|
+
/**
|
|
1054
|
+
* List all the users within a project.
|
|
1055
|
+
* @param projectId
|
|
1056
|
+
* @returns UserOut Successful Response
|
|
1057
|
+
* @throws ApiError
|
|
1058
|
+
*/
|
|
1059
|
+
static projectAllUsersProjectusersProjectIdProjectIdGet(projectId) {
|
|
1060
|
+
return request(OpenAPI, {
|
|
1061
|
+
method: "GET",
|
|
1062
|
+
url: "/projectusers/project_id={project_id}",
|
|
1063
|
+
path: {
|
|
1064
|
+
"project_id": projectId
|
|
1065
|
+
},
|
|
1066
|
+
errors: {
|
|
1067
|
+
422: `Validation Error`
|
|
1068
|
+
}
|
|
1069
|
+
});
|
|
1070
|
+
}
|
|
1071
|
+
/**
|
|
1072
|
+
* Returns the task information for a specific location. The task returned is the task with the latest update.
|
|
1073
|
+
* @param locationId
|
|
1074
|
+
* @param projectId
|
|
1075
|
+
* @param referenceDate
|
|
1076
|
+
* @returns LocationTaskAnnotationResponse Successful Response
|
|
1077
|
+
* @throws ApiError
|
|
1078
|
+
*/
|
|
1079
|
+
static locationLatestTaskLocationtaskLocationIdLocationIdProjectIdProjectIdReferenceDateReferenceDateGet(locationId, projectId, referenceDate) {
|
|
1080
|
+
return request(OpenAPI, {
|
|
1081
|
+
method: "GET",
|
|
1082
|
+
url: "/locationtask/location_id={location_id}&project_id={project_id}&reference_date={reference_date}",
|
|
1083
|
+
path: {
|
|
1084
|
+
"location_id": locationId,
|
|
1085
|
+
"project_id": projectId,
|
|
1086
|
+
"reference_date": referenceDate
|
|
1087
|
+
},
|
|
1088
|
+
errors: {
|
|
1089
|
+
422: `Validation Error`
|
|
1090
|
+
}
|
|
1091
|
+
});
|
|
1092
|
+
}
|
|
1093
|
+
};
|
|
1094
|
+
|
|
1095
|
+
// services/QuestionService.ts
|
|
1096
|
+
var QuestionService = class {
|
|
1097
|
+
/**
|
|
1098
|
+
* Get Project Questions Answers
|
|
1099
|
+
* get pairs of questions and answers associated with a project
|
|
1100
|
+
* @param projectId
|
|
1101
|
+
* @returns Questionnaire Successful Response
|
|
1102
|
+
* @throws ApiError
|
|
1103
|
+
*/
|
|
1104
|
+
static getProjectQuestionsAnswersQuestionsAnswersProjectIdProjectIdGet(projectId) {
|
|
1105
|
+
return request(OpenAPI, {
|
|
1106
|
+
method: "GET",
|
|
1107
|
+
url: "/questions_answers/project_id={project_id}",
|
|
1108
|
+
path: {
|
|
1109
|
+
"project_id": projectId
|
|
1110
|
+
},
|
|
1111
|
+
errors: {
|
|
1112
|
+
422: `Validation Error`
|
|
1113
|
+
}
|
|
1114
|
+
});
|
|
1115
|
+
}
|
|
1116
|
+
};
|
|
1117
|
+
|
|
1118
|
+
// services/StatisticService.ts
|
|
1119
|
+
var StatisticService = class {
|
|
1120
|
+
/**
|
|
1121
|
+
* Get User Statistics
|
|
1122
|
+
* For each user within a project, get statistics related to the tasks that were updated.
|
|
1123
|
+
* @param projectId
|
|
1124
|
+
* @param endDate
|
|
1125
|
+
* @param startDate
|
|
1126
|
+
* @param isContractualData
|
|
1127
|
+
* @param filterUserId
|
|
1128
|
+
* @returns UserStatisticsResponse Successful Response
|
|
1129
|
+
* @throws ApiError
|
|
1130
|
+
*/
|
|
1131
|
+
static getUserStatisticsUserstatisticsProjectIdProjectIdStartDateStartDateEndDateEndDateFilterUserIdFilterUserIdIsContractualDataIsContractualDataGet(projectId, endDate, startDate, isContractualData, filterUserId) {
|
|
1132
|
+
return request(OpenAPI, {
|
|
1133
|
+
method: "GET",
|
|
1134
|
+
url: "/userstatistics/project_id={project_id}&start_date={start_date}&end_date={end_date}&filter_user_id={filter_user_id}&is_contractual_data={is_contractual_data}",
|
|
1135
|
+
path: {
|
|
1136
|
+
"project_id": projectId,
|
|
1137
|
+
"end_date": endDate,
|
|
1138
|
+
"start_date": startDate,
|
|
1139
|
+
"is_contractual_data": isContractualData,
|
|
1140
|
+
"filter_user_id": filterUserId
|
|
1141
|
+
},
|
|
1142
|
+
errors: {
|
|
1143
|
+
422: `Validation Error`
|
|
1144
|
+
}
|
|
1145
|
+
});
|
|
1146
|
+
}
|
|
1147
|
+
/**
|
|
1148
|
+
* Get User Statistics
|
|
1149
|
+
* For each user within a project, get statistics related to the tasks that were updated.
|
|
1150
|
+
* @param projectId
|
|
1151
|
+
* @param endDate
|
|
1152
|
+
* @param startDate
|
|
1153
|
+
* @param filterUserId
|
|
1154
|
+
* @param isContractualData
|
|
1155
|
+
* @returns UserStatisticsResponse Successful Response
|
|
1156
|
+
* @throws ApiError
|
|
1157
|
+
*/
|
|
1158
|
+
static getUserStatisticsUserstatisticsProjectIdProjectIdStartDateStartDateEndDateEndDateFilterUserIdFilterUserIdGet(projectId, endDate, startDate, filterUserId, isContractualData = false) {
|
|
1159
|
+
return request(OpenAPI, {
|
|
1160
|
+
method: "GET",
|
|
1161
|
+
url: "/userstatistics/project_id={project_id}&start_date={start_date}&end_date={end_date}&filter_user_id={filter_user_id}",
|
|
1162
|
+
path: {
|
|
1163
|
+
"project_id": projectId,
|
|
1164
|
+
"end_date": endDate,
|
|
1165
|
+
"start_date": startDate,
|
|
1166
|
+
"filter_user_id": filterUserId
|
|
1167
|
+
},
|
|
1168
|
+
query: {
|
|
1169
|
+
"is_contractual_data": isContractualData
|
|
1170
|
+
},
|
|
1171
|
+
errors: {
|
|
1172
|
+
422: `Validation Error`
|
|
1173
|
+
}
|
|
1174
|
+
});
|
|
1175
|
+
}
|
|
1176
|
+
/**
|
|
1177
|
+
* Get User Statistics
|
|
1178
|
+
* For each user within a project, get statistics related to the tasks that were updated.
|
|
1179
|
+
* @param projectId
|
|
1180
|
+
* @param endDate
|
|
1181
|
+
* @param startDate
|
|
1182
|
+
* @param isContractualData
|
|
1183
|
+
* @param filterUserId
|
|
1184
|
+
* @returns UserStatisticsResponse Successful Response
|
|
1185
|
+
* @throws ApiError
|
|
1186
|
+
*/
|
|
1187
|
+
static getUserStatisticsUserstatisticsProjectIdProjectIdStartDateStartDateEndDateEndDateGet(projectId, endDate, startDate, isContractualData = false, filterUserId) {
|
|
1188
|
+
return request(OpenAPI, {
|
|
1189
|
+
method: "GET",
|
|
1190
|
+
url: "/userstatistics/project_id={project_id}&start_date={start_date}&end_date={end_date}",
|
|
1191
|
+
path: {
|
|
1192
|
+
"project_id": projectId,
|
|
1193
|
+
"end_date": endDate,
|
|
1194
|
+
"start_date": startDate
|
|
1195
|
+
},
|
|
1196
|
+
query: {
|
|
1197
|
+
"is_contractual_data": isContractualData,
|
|
1198
|
+
"filter_user_id": filterUserId
|
|
1199
|
+
},
|
|
1200
|
+
errors: {
|
|
1201
|
+
422: `Validation Error`
|
|
1202
|
+
}
|
|
1203
|
+
});
|
|
1204
|
+
}
|
|
1205
|
+
};
|
|
1206
|
+
|
|
1207
|
+
// services/TaskService.ts
|
|
1208
|
+
var TaskService = class {
|
|
1209
|
+
/**
|
|
1210
|
+
* Get all the possible task statuses
|
|
1211
|
+
* @returns string Successful Response
|
|
1212
|
+
* @throws ApiError
|
|
1213
|
+
*/
|
|
1214
|
+
static getTaskStatusesTaskstatusesGet() {
|
|
1215
|
+
return request(OpenAPI, {
|
|
1216
|
+
method: "GET",
|
|
1217
|
+
url: "/taskstatuses/"
|
|
1218
|
+
});
|
|
1219
|
+
}
|
|
1220
|
+
/**
|
|
1221
|
+
* Get the task information for a specific task id.
|
|
1222
|
+
* @param taskId
|
|
1223
|
+
* @returns TaskResponse Successful Response
|
|
1224
|
+
* @throws ApiError
|
|
1225
|
+
*/
|
|
1226
|
+
static getTaskGettaskTaskIdTaskIdGet(taskId) {
|
|
1227
|
+
return request(OpenAPI, {
|
|
1228
|
+
method: "GET",
|
|
1229
|
+
url: "/gettask/task_id={task_id}",
|
|
1230
|
+
path: {
|
|
1231
|
+
"task_id": taskId
|
|
1232
|
+
},
|
|
1233
|
+
errors: {
|
|
1234
|
+
422: `Validation Error`
|
|
1235
|
+
}
|
|
1236
|
+
});
|
|
1237
|
+
}
|
|
1238
|
+
/**
|
|
1239
|
+
* Create a task for an user for a specific location, if no task exists for that user on that location. Then returns the created/existing task and location info.
|
|
1240
|
+
* @param requestBody
|
|
1241
|
+
* @returns TaskResponse Successful Response
|
|
1242
|
+
* @throws ApiError
|
|
1243
|
+
*/
|
|
1244
|
+
static createTaskCreatetaskPost(requestBody) {
|
|
1245
|
+
return request(OpenAPI, {
|
|
1246
|
+
method: "POST",
|
|
1247
|
+
url: "/createtask/",
|
|
1248
|
+
body: requestBody,
|
|
1249
|
+
mediaType: "application/json",
|
|
1250
|
+
errors: {
|
|
1251
|
+
422: `Validation Error`
|
|
1252
|
+
}
|
|
1253
|
+
});
|
|
1254
|
+
}
|
|
1255
|
+
/**
|
|
1256
|
+
* Returns a new task for an user on a new location. If the user already has a task in the ASSIGNED state, it will be returned.
|
|
1257
|
+
* @param requestBody
|
|
1258
|
+
* @returns TaskResponse Successful Response
|
|
1259
|
+
* @throws ApiError
|
|
1260
|
+
*/
|
|
1261
|
+
static getNextLocationNexttaskPost(requestBody) {
|
|
1262
|
+
return request(OpenAPI, {
|
|
1263
|
+
method: "POST",
|
|
1264
|
+
url: "/nexttask/",
|
|
1265
|
+
body: requestBody,
|
|
1266
|
+
mediaType: "application/json",
|
|
1267
|
+
errors: {
|
|
1268
|
+
422: `Validation Error`
|
|
1269
|
+
}
|
|
1270
|
+
});
|
|
1271
|
+
}
|
|
1272
|
+
/**
|
|
1273
|
+
* Deletes a specific task from the database and the related events. Submitted annotations are kept in the database for the location. Only admin users can delete tasks.
|
|
1274
|
+
* @param requestBody
|
|
1275
|
+
* @returns GenericResponse Successful Response
|
|
1276
|
+
* @throws ApiError
|
|
1277
|
+
*/
|
|
1278
|
+
static deleteTaskDeletetaskPost(requestBody) {
|
|
1279
|
+
return request(OpenAPI, {
|
|
1280
|
+
method: "POST",
|
|
1281
|
+
url: "/deletetask/",
|
|
1282
|
+
body: requestBody,
|
|
1283
|
+
mediaType: "application/json",
|
|
1284
|
+
errors: {
|
|
1285
|
+
422: `Validation Error`
|
|
1286
|
+
}
|
|
1287
|
+
});
|
|
1288
|
+
}
|
|
1289
|
+
/**
|
|
1290
|
+
* Get the latest task annotation for a specific task id.
|
|
1291
|
+
* @param taskId
|
|
1292
|
+
* @returns TaskAnnotationResponse Successful Response
|
|
1293
|
+
* @throws ApiError
|
|
1294
|
+
*/
|
|
1295
|
+
static getTaskAnnotationAssetTaskannotationTaskIdTaskIdGet(taskId) {
|
|
1296
|
+
return request(OpenAPI, {
|
|
1297
|
+
method: "GET",
|
|
1298
|
+
url: "/taskannotation/task_id={task_id}",
|
|
1299
|
+
path: {
|
|
1300
|
+
"task_id": taskId
|
|
1301
|
+
},
|
|
1302
|
+
errors: {
|
|
1303
|
+
422: `Validation Error`
|
|
1304
|
+
}
|
|
1305
|
+
});
|
|
1306
|
+
}
|
|
1307
|
+
/**
|
|
1308
|
+
* Get all the annotations for a specific task id.
|
|
1309
|
+
* @param taskId
|
|
1310
|
+
* @returns LocationAssetsResponse Successful Response
|
|
1311
|
+
* @throws ApiError
|
|
1312
|
+
*/
|
|
1313
|
+
static getTaskAnnotationAssetsTaskannotationsTaskIdTaskIdGet(taskId) {
|
|
1314
|
+
return request(OpenAPI, {
|
|
1315
|
+
method: "GET",
|
|
1316
|
+
url: "/taskannotations/task_id={task_id}",
|
|
1317
|
+
path: {
|
|
1318
|
+
"task_id": taskId
|
|
1319
|
+
},
|
|
1320
|
+
errors: {
|
|
1321
|
+
422: `Validation Error`
|
|
1322
|
+
}
|
|
1323
|
+
});
|
|
1324
|
+
}
|
|
1325
|
+
/**
|
|
1326
|
+
* Saves an annotation for a task.
|
|
1327
|
+
* @param requestBody
|
|
1328
|
+
* @returns GenericResponse Successful Response
|
|
1329
|
+
* @throws ApiError
|
|
1330
|
+
*/
|
|
1331
|
+
static saveAnnotationSaveannotationPost(requestBody) {
|
|
1332
|
+
return request(OpenAPI, {
|
|
1333
|
+
method: "POST",
|
|
1334
|
+
url: "/saveannotation/",
|
|
1335
|
+
body: requestBody,
|
|
1336
|
+
mediaType: "application/json",
|
|
1337
|
+
errors: {
|
|
1338
|
+
422: `Validation Error`
|
|
1339
|
+
}
|
|
1340
|
+
});
|
|
1341
|
+
}
|
|
1342
|
+
/**
|
|
1343
|
+
* Get the saved annotation for a specific task (if it exists).
|
|
1344
|
+
* @param taskId
|
|
1345
|
+
* @returns GetSavedAnnotationResponse Successful Response
|
|
1346
|
+
* @throws ApiError
|
|
1347
|
+
*/
|
|
1348
|
+
static getSavedAnnotationGetsavedannotationTaskIdTaskIdGet(taskId) {
|
|
1349
|
+
return request(OpenAPI, {
|
|
1350
|
+
method: "GET",
|
|
1351
|
+
url: "/getsavedannotation/task_id={task_id}",
|
|
1352
|
+
path: {
|
|
1353
|
+
"task_id": taskId
|
|
1354
|
+
},
|
|
1355
|
+
errors: {
|
|
1356
|
+
422: `Validation Error`
|
|
1357
|
+
}
|
|
1358
|
+
});
|
|
1359
|
+
}
|
|
1360
|
+
/**
|
|
1361
|
+
* Save Questionnaire
|
|
1362
|
+
* Save questionnaire for a task
|
|
1363
|
+
* @param requestBody
|
|
1364
|
+
* @returns GenericResponse Successful Response
|
|
1365
|
+
* @throws ApiError
|
|
1366
|
+
*/
|
|
1367
|
+
static saveQuestionnaireSavequestionnairePost(requestBody) {
|
|
1368
|
+
return request(OpenAPI, {
|
|
1369
|
+
method: "POST",
|
|
1370
|
+
url: "/savequestionnaire",
|
|
1371
|
+
body: requestBody,
|
|
1372
|
+
mediaType: "application/json",
|
|
1373
|
+
errors: {
|
|
1374
|
+
422: `Validation Error`
|
|
1375
|
+
}
|
|
1376
|
+
});
|
|
1377
|
+
}
|
|
1378
|
+
/**
|
|
1379
|
+
* Get change detection details associated with a task
|
|
1380
|
+
* @param taskId
|
|
1381
|
+
* @returns TaskChangeElement Successful Response
|
|
1382
|
+
* @throws ApiError
|
|
1383
|
+
*/
|
|
1384
|
+
static getTaskChangeDetailTaskchangedetailsPost(taskId) {
|
|
1385
|
+
return request(OpenAPI, {
|
|
1386
|
+
method: "POST",
|
|
1387
|
+
url: "/taskchangedetails/",
|
|
1388
|
+
query: {
|
|
1389
|
+
"task_id": taskId
|
|
1390
|
+
},
|
|
1391
|
+
errors: {
|
|
1392
|
+
422: `Validation Error`
|
|
1393
|
+
}
|
|
1394
|
+
});
|
|
1395
|
+
}
|
|
1396
|
+
/**
|
|
1397
|
+
* Get change detection details associated with a task
|
|
1398
|
+
* @param taskId
|
|
1399
|
+
* @returns TaskGeometryElement Successful Response
|
|
1400
|
+
* @throws ApiError
|
|
1401
|
+
*/
|
|
1402
|
+
static getTaskGeometryDetailTaskgeometryetailsPost(taskId) {
|
|
1403
|
+
return request(OpenAPI, {
|
|
1404
|
+
method: "POST",
|
|
1405
|
+
url: "/taskgeometryetails/",
|
|
1406
|
+
query: {
|
|
1407
|
+
"task_id": taskId
|
|
1408
|
+
},
|
|
1409
|
+
errors: {
|
|
1410
|
+
422: `Validation Error`
|
|
1411
|
+
}
|
|
1412
|
+
});
|
|
1413
|
+
}
|
|
1414
|
+
/**
|
|
1415
|
+
* Updates the status of a task. Depending on the previous status, the role of the user and the target status, required required parameters may vary
|
|
1416
|
+
* @param requestBody
|
|
1417
|
+
* @returns UpdateTaskResponse Successful Response
|
|
1418
|
+
* @throws ApiError
|
|
1419
|
+
*/
|
|
1420
|
+
static updateTaskUpdatetaskPost(requestBody) {
|
|
1421
|
+
return request(OpenAPI, {
|
|
1422
|
+
method: "POST",
|
|
1423
|
+
url: "/updatetask/",
|
|
1424
|
+
body: requestBody,
|
|
1425
|
+
mediaType: "application/json",
|
|
1426
|
+
errors: {
|
|
1427
|
+
422: `Validation Error`
|
|
1428
|
+
}
|
|
1429
|
+
});
|
|
1430
|
+
}
|
|
1431
|
+
/**
|
|
1432
|
+
* Adds a comment from an user on a task.
|
|
1433
|
+
* @param requestBody
|
|
1434
|
+
* @returns GenericResponse Successful Response
|
|
1435
|
+
* @throws ApiError
|
|
1436
|
+
*/
|
|
1437
|
+
static taskCommentTaskcommentPost(requestBody) {
|
|
1438
|
+
return request(OpenAPI, {
|
|
1439
|
+
method: "POST",
|
|
1440
|
+
url: "/taskcomment/",
|
|
1441
|
+
body: requestBody,
|
|
1442
|
+
mediaType: "application/json",
|
|
1443
|
+
errors: {
|
|
1444
|
+
422: `Validation Error`
|
|
1445
|
+
}
|
|
1446
|
+
});
|
|
1447
|
+
}
|
|
1448
|
+
/**
|
|
1449
|
+
* Get the events of a task.
|
|
1450
|
+
* @param taskId
|
|
1451
|
+
* @returns TaskEventOut Successful Response
|
|
1452
|
+
* @throws ApiError
|
|
1453
|
+
*/
|
|
1454
|
+
static getTaskEventsTaskeventsTaskIdTaskIdGet(taskId) {
|
|
1455
|
+
return request(OpenAPI, {
|
|
1456
|
+
method: "GET",
|
|
1457
|
+
url: "/taskevents/task_id={task_id}",
|
|
1458
|
+
path: {
|
|
1459
|
+
"task_id": taskId
|
|
1460
|
+
},
|
|
1461
|
+
errors: {
|
|
1462
|
+
422: `Validation Error`
|
|
1463
|
+
}
|
|
1464
|
+
});
|
|
1465
|
+
}
|
|
1466
|
+
/**
|
|
1467
|
+
* Get the latest comments for every task in the provided list. The response will be a list of comments ordered in the same way as the input list. An empty string is returned if no latest comment was found.
|
|
1468
|
+
* @param requestBody
|
|
1469
|
+
* @returns TaskLatestCommentResponse Successful Response
|
|
1470
|
+
* @throws ApiError
|
|
1471
|
+
*/
|
|
1472
|
+
static taskLatestComomentsTasklatestcommentPost(requestBody) {
|
|
1473
|
+
return request(OpenAPI, {
|
|
1474
|
+
method: "POST",
|
|
1475
|
+
url: "/tasklatestcomment/",
|
|
1476
|
+
body: requestBody,
|
|
1477
|
+
mediaType: "application/json",
|
|
1478
|
+
errors: {
|
|
1479
|
+
422: `Validation Error`
|
|
1480
|
+
}
|
|
1481
|
+
});
|
|
1482
|
+
}
|
|
1483
|
+
/**
|
|
1484
|
+
* Get the reference dates for current task on a location from meta_data.The response model will be a list of string
|
|
1485
|
+
* @param locationId
|
|
1486
|
+
* @param projectId
|
|
1487
|
+
* @param assetType
|
|
1488
|
+
* @returns any Successful Response
|
|
1489
|
+
* @throws ApiError
|
|
1490
|
+
*/
|
|
1491
|
+
static taskReferenceDatesGettaskreferencedatesProjectIdProjectIdLocationIdLocationIdAssetTypeAssetTypeGet(locationId, projectId, assetType) {
|
|
1492
|
+
return request(OpenAPI, {
|
|
1493
|
+
method: "GET",
|
|
1494
|
+
url: "/gettaskreferencedates/project_id={project_id}&location_id={location_id}&asset_type={asset_type}",
|
|
1495
|
+
path: {
|
|
1496
|
+
"location_id": locationId,
|
|
1497
|
+
"project_id": projectId,
|
|
1498
|
+
"asset_type": assetType
|
|
1499
|
+
},
|
|
1500
|
+
errors: {
|
|
1501
|
+
422: `Validation Error`
|
|
1502
|
+
}
|
|
1503
|
+
});
|
|
1504
|
+
}
|
|
1505
|
+
/**
|
|
1506
|
+
* returns a list of user provided answers associated with a task
|
|
1507
|
+
* @param taskId
|
|
1508
|
+
* @returns any[] Successful Response
|
|
1509
|
+
* @throws ApiError
|
|
1510
|
+
*/
|
|
1511
|
+
static getTaskAnswersTaskanswersTaskIdTaskIdGet(taskId) {
|
|
1512
|
+
return request(OpenAPI, {
|
|
1513
|
+
method: "GET",
|
|
1514
|
+
url: "/taskanswers/task_id={task_id}",
|
|
1515
|
+
path: {
|
|
1516
|
+
"task_id": taskId
|
|
1517
|
+
},
|
|
1518
|
+
errors: {
|
|
1519
|
+
422: `Validation Error`
|
|
1520
|
+
}
|
|
1521
|
+
});
|
|
1522
|
+
}
|
|
1523
|
+
};
|
|
1524
|
+
export {
|
|
1525
|
+
AiService,
|
|
1526
|
+
ApiError,
|
|
1527
|
+
CancelError,
|
|
1528
|
+
CancelablePromise,
|
|
1529
|
+
LocationService,
|
|
1530
|
+
OpenAPI,
|
|
1531
|
+
ProjectService,
|
|
1532
|
+
QuestionService,
|
|
1533
|
+
StatisticService,
|
|
1534
|
+
TaskService,
|
|
1535
|
+
TaskStatus,
|
|
1536
|
+
TaskType,
|
|
1537
|
+
UserRank
|
|
1538
|
+
};
|