moonlogs-ts
Version:
OpenAPI client for moonlogs
494 lines (493 loc) • 11.2 kB
JavaScript
export class DefaultService {
httpRequest;
constructor(httpRequest) {
this.httpRequest = httpRequest;
}
/**
* @returns any
* @throws ApiError
*/
getSchemas() {
return this.httpRequest.request({
method: 'GET',
url: '/api/schemas',
});
}
/**
* @returns any
* @throws ApiError
*/
createSchema({ requestBody, }) {
return this.httpRequest.request({
method: 'POST',
url: '/api/schemas',
body: requestBody,
mediaType: 'application/json',
});
}
/**
* @returns any
* @throws ApiError
*/
getSchemaById({ id, }) {
return this.httpRequest.request({
method: 'GET',
url: '/api/schemas/{id}',
path: {
'id': id,
},
});
}
/**
* @returns any
* @throws ApiError
*/
updateSchemaById({ id, requestBody, }) {
return this.httpRequest.request({
method: 'PUT',
url: '/api/schemas/{id}',
path: {
'id': id,
},
body: requestBody,
mediaType: 'application/json',
});
}
/**
* @returns any
* @throws ApiError
*/
deleteSchemaById({ id, }) {
return this.httpRequest.request({
method: 'DELETE',
url: '/api/schemas/{id}',
path: {
'id': id,
},
});
}
/**
* @returns any
* @throws ApiError
*/
createLog({ requestBody, }) {
return this.httpRequest.request({
method: 'POST',
url: '/api/logs',
body: requestBody,
mediaType: 'application/json',
});
}
/**
* @returns any
* @throws ApiError
*/
getLog({ page, limit, }) {
return this.httpRequest.request({
method: 'GET',
url: '/api/logs',
query: {
'page': page,
'limit': limit,
},
});
}
/**
* @returns any
* @throws ApiError
*/
getLogById({ id, }) {
return this.httpRequest.request({
method: 'GET',
url: '/api/logs/{id}',
path: {
'id': id,
},
});
}
/**
* @returns any
* @throws ApiError
*/
getLogsBySchemaAndHash({ schemaName, hash, }) {
return this.httpRequest.request({
method: 'GET',
url: '/api/logs/group/{schema_name}/{hash}',
path: {
'schema_name': schemaName,
'hash': hash,
},
});
}
/**
* @returns any
* @throws ApiError
*/
searchLogs({ page, limit, from, to, requestBody, }) {
return this.httpRequest.request({
method: 'POST',
url: '/api/logs/search',
query: {
'page': page,
'limit': limit,
'from': from,
'to': to,
},
body: requestBody,
mediaType: 'application/json',
});
}
/**
* @returns any
* @throws ApiError
*/
getUsers() {
return this.httpRequest.request({
method: 'GET',
url: '/api/users',
});
}
/**
* @returns any
* @throws ApiError
*/
createUser({ requestBody, }) {
return this.httpRequest.request({
method: 'POST',
url: '/api/users',
body: requestBody,
mediaType: 'application/json',
});
}
/**
* @returns any
* @throws ApiError
*/
getUserById({ id, }) {
return this.httpRequest.request({
method: 'GET',
url: '/api/users/{id}',
path: {
'id': id,
},
});
}
/**
* @returns any
* @throws ApiError
*/
deleteUserById({ id, }) {
return this.httpRequest.request({
method: 'DELETE',
url: '/api/users/{id}',
path: {
'id': id,
},
});
}
/**
* @returns any
* @throws ApiError
*/
updateUserById({ id, requestBody, }) {
return this.httpRequest.request({
method: 'PUT',
url: '/api/users/{id}',
path: {
'id': id,
},
body: requestBody,
mediaType: 'application/json',
});
}
/**
* @returns any
* @throws ApiError
*/
getSession() {
return this.httpRequest.request({
method: 'GET',
url: '/api/session',
});
}
/**
* @returns any
* @throws ApiError
*/
createSession({ requestBody, }) {
return this.httpRequest.request({
method: 'POST',
url: '/api/session',
body: requestBody,
mediaType: 'application/json',
});
}
/**
* @returns UserResponse
* @throws ApiError
*/
registerAdmin({ requestBody, }) {
return this.httpRequest.request({
method: 'POST',
url: '/api/setup/register_admin',
body: requestBody,
mediaType: 'application/json',
});
}
/**
* @returns any
* @throws ApiError
*/
getTokens() {
return this.httpRequest.request({
method: 'GET',
url: '/api/api_tokens',
});
}
/**
* @returns any
* @throws ApiError
*/
createToken({ requestBody, }) {
return this.httpRequest.request({
method: 'POST',
url: '/api/api_tokens',
body: requestBody,
mediaType: 'application/json',
});
}
/**
* @returns any
* @throws ApiError
*/
getTokenById({ id, }) {
return this.httpRequest.request({
method: 'GET',
url: '/api/api_tokens/{id}',
path: {
'id': id,
},
});
}
/**
* @returns any
* @throws ApiError
*/
updateTokenById({ id, requestBody, }) {
return this.httpRequest.request({
method: 'PUT',
url: '/api/api_tokens/{id}',
path: {
'id': id,
},
body: requestBody,
mediaType: 'application/json',
});
}
/**
* @returns any
* @throws ApiError
*/
deleteTokenById({ id, }) {
return this.httpRequest.request({
method: 'DELETE',
url: '/api/api_tokens/{id}',
path: {
'id': id,
},
});
}
/**
* @returns any
* @throws ApiError
*/
getTags() {
return this.httpRequest.request({
method: 'GET',
url: '/api/tags',
});
}
/**
* @returns any
* @throws ApiError
*/
createTag({ requestBody, }) {
return this.httpRequest.request({
method: 'POST',
url: '/api/tags',
body: requestBody,
mediaType: 'application/json',
});
}
/**
* @returns any
* @throws ApiError
*/
getTagById({ id, }) {
return this.httpRequest.request({
method: 'GET',
url: '/api/tags/{id}',
path: {
'id': id,
},
});
}
/**
* @returns any
* @throws ApiError
*/
updateTagById({ id, requestBody, }) {
return this.httpRequest.request({
method: 'PUT',
url: '/api/tags/{id}',
path: {
'id': id,
},
body: requestBody,
mediaType: 'application/json',
});
}
/**
* @returns any
* @throws ApiError
*/
deleteTagById({ id, }) {
return this.httpRequest.request({
method: 'DELETE',
url: '/api/tags/{id}',
path: {
'id': id,
},
});
}
/**
* @returns any
* @throws ApiError
*/
createLogAsync({ requestBody, }) {
return this.httpRequest.request({
method: 'POST',
url: '/api/logs/async',
body: requestBody,
mediaType: 'application/json',
});
}
/**
* @returns any
* @throws ApiError
*/
getLogRequestById({ id, }) {
return this.httpRequest.request({
method: 'GET',
url: '/api/logs/{id}/request',
path: {
'id': id,
},
});
}
/**
* @returns any
* @throws ApiError
*/
getLogResponseById({ id, }) {
return this.httpRequest.request({
method: 'GET',
url: '/api/logs/{id}/response',
path: {
'id': id,
},
});
}
/**
* @returns any
* @throws ApiError
*/
exposeRecordById({ id, }) {
return this.httpRequest.request({
method: 'PUT',
url: '/api/logs/{id}/expose',
path: {
'id': id,
},
});
}
/**
* @returns any
* @throws ApiError
*/
coverRecordById({ id, }) {
return this.httpRequest.request({
method: 'PUT',
url: '/api/logs/{id}/cover',
path: {
'id': id,
},
});
}
/**
* @returns any
* @throws ApiError
*/
getActions() {
return this.httpRequest.request({
method: 'GET',
url: '/api/actions',
});
}
/**
* @returns any
* @throws ApiError
*/
createAction({ requestBody, }) {
return this.httpRequest.request({
method: 'POST',
url: '/api/actions',
body: requestBody,
mediaType: 'application/json',
});
}
/**
* @returns any
* @throws ApiError
*/
getActionById() {
return this.httpRequest.request({
method: 'GET',
url: '/api/actions/{id}',
});
}
/**
* @returns any
* @throws ApiError
*/
deleteActionById() {
return this.httpRequest.request({
method: 'DELETE',
url: '/api/actions/{id}',
});
}
/**
* @returns any
* @throws ApiError
*/
updateActionById({ requestBody, }) {
return this.httpRequest.request({
method: 'PUT',
url: '/api/actions/{id}',
body: requestBody,
mediaType: 'application/json',
});
}
/**
* @returns any
* @throws ApiError
*/
searchIncidents({ requestBody, }) {
return this.httpRequest.request({
method: 'POST',
url: '/api/incidents/search',
body: requestBody,
mediaType: 'application/json',
});
}
}