re-uploading work
This commit is contained in:
220
web/src/api/README.md
Normal file
220
web/src/api/README.md
Normal file
@@ -0,0 +1,220 @@
|
||||
# Generated API Client
|
||||
|
||||
This directory contains auto-generated TypeScript client code for the Attune API, created from the OpenAPI specification.
|
||||
|
||||
> **⚠️ DO NOT EDIT FILES IN THIS DIRECTORY**
|
||||
> All files are auto-generated. Manual changes will be overwritten when the API client is regenerated.
|
||||
|
||||
## Regenerating the Client
|
||||
|
||||
Whenever the backend API changes, regenerate the client:
|
||||
|
||||
```bash
|
||||
npm run generate:api
|
||||
```
|
||||
|
||||
This command:
|
||||
1. Fetches the latest OpenAPI spec from the running API server
|
||||
2. Generates TypeScript types and service classes
|
||||
3. Overwrites all files in `src/api/`
|
||||
|
||||
**Prerequisites:** The API server must be running at `http://localhost:8080`
|
||||
|
||||
## Usage
|
||||
|
||||
### 1. Import and Configure (already done in `src/lib/api-config.ts`)
|
||||
|
||||
```typescript
|
||||
import { OpenAPI } from './api';
|
||||
|
||||
// Set base URL
|
||||
OpenAPI.BASE = 'http://localhost:8080';
|
||||
|
||||
// Configure automatic JWT token injection
|
||||
OpenAPI.TOKEN = async () => {
|
||||
return localStorage.getItem('access_token') || undefined;
|
||||
};
|
||||
```
|
||||
|
||||
### 2. Use Service Classes
|
||||
|
||||
Each API endpoint group has a corresponding service class:
|
||||
|
||||
```typescript
|
||||
import { PacksService, AuthService, ActionsService } from '@/api';
|
||||
|
||||
// Example: Login
|
||||
const response = await AuthService.login({
|
||||
requestBody: {
|
||||
login: 'admin',
|
||||
password: 'password123'
|
||||
}
|
||||
});
|
||||
|
||||
const { access_token, user } = response.data;
|
||||
|
||||
// Example: List packs
|
||||
const packs = await PacksService.listPacks({
|
||||
page: 1,
|
||||
pageSize: 50
|
||||
});
|
||||
|
||||
console.log(packs.data.items);
|
||||
|
||||
// Example: Create an action
|
||||
const action = await ActionsService.createAction({
|
||||
requestBody: {
|
||||
ref: 'slack.post_message',
|
||||
pack: 1,
|
||||
label: 'Post Message to Slack',
|
||||
description: 'Posts a message to a Slack channel',
|
||||
entrypoint: '/actions/slack/post_message.py',
|
||||
param_schema: { /* ... */ }
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### 3. TypeScript Types
|
||||
|
||||
All request/response types are available:
|
||||
|
||||
```typescript
|
||||
import type {
|
||||
PackResponse,
|
||||
CreatePackRequest,
|
||||
PaginatedResponse_PackSummary,
|
||||
ExecutionStatus
|
||||
} from '@/api';
|
||||
|
||||
const createPack = async (data: CreatePackRequest) => {
|
||||
const response = await PacksService.createPack({ requestBody: data });
|
||||
return response.data;
|
||||
};
|
||||
```
|
||||
|
||||
## Available Services
|
||||
|
||||
- **AuthService** - Authentication (login, register, refresh, etc.)
|
||||
- **PacksService** - Pack management
|
||||
- **ActionsService** - Action CRUD operations
|
||||
- **RulesService** - Rule management
|
||||
- **TriggersService** - Trigger management
|
||||
- **SensorsService** - Sensor management
|
||||
- **ExecutionsService** - Execution tracking
|
||||
- **EventsService** - Event monitoring
|
||||
- **InquiriesService** - Human-in-the-loop workflows
|
||||
- **WorkflowsService** - Workflow orchestration
|
||||
- **HealthService** - Health checks
|
||||
|
||||
## Error Handling
|
||||
|
||||
The generated client throws `ApiError` for HTTP errors:
|
||||
|
||||
```typescript
|
||||
import { ApiError } from '@/api';
|
||||
|
||||
try {
|
||||
await PacksService.getPack({ ref: 'nonexistent' });
|
||||
} catch (error) {
|
||||
if (error instanceof ApiError) {
|
||||
console.error(`API Error ${error.status}: ${error.message}`);
|
||||
console.error('Response body:', error.body);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Integration with React Query
|
||||
|
||||
Combine with TanStack Query for optimal data fetching:
|
||||
|
||||
```typescript
|
||||
import { useQuery, useMutation } from '@tanstack/react-query';
|
||||
import { PacksService } from '@/api';
|
||||
|
||||
// Query
|
||||
const { data, isLoading } = useQuery({
|
||||
queryKey: ['packs'],
|
||||
queryFn: () => PacksService.listPacks({ page: 1, pageSize: 50 })
|
||||
});
|
||||
|
||||
// Mutation
|
||||
const { mutate } = useMutation({
|
||||
mutationFn: (data: CreatePackRequest) =>
|
||||
PacksService.createPack({ requestBody: data }),
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['packs'] });
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
## Benefits of Using Generated Client
|
||||
|
||||
✅ **Type Safety** - Full TypeScript types for all API requests/responses
|
||||
✅ **Auto-completion** - IDE support for all API methods and parameters
|
||||
✅ **Schema Validation** - Ensures frontend matches backend API contract
|
||||
✅ **Automatic Updates** - Regenerate when API changes to stay in sync
|
||||
✅ **Reduced Errors** - Catch API mismatches at compile time, not runtime
|
||||
✅ **Documentation** - JSDoc comments from OpenAPI spec included
|
||||
|
||||
## Comparison: Manual vs Generated
|
||||
|
||||
### ❌ Manual Axios Calls (Don't do this)
|
||||
|
||||
```typescript
|
||||
// NO type safety, easy to make mistakes
|
||||
const response = await apiClient.post('/api/v1/packs', {
|
||||
name: 'my-pack', // Wrong field! Should be 'ref'
|
||||
system: false // Wrong field! Should be 'is_standard'
|
||||
});
|
||||
```
|
||||
|
||||
### ✅ Generated Client (Do this)
|
||||
|
||||
```typescript
|
||||
// Compile-time errors if schema doesn't match!
|
||||
const response = await PacksService.createPack({
|
||||
requestBody: {
|
||||
ref: 'my-pack', // ✅ Correct
|
||||
label: 'My Pack', // ✅ Correct
|
||||
is_standard: false // ✅ Correct
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### "Cannot find module '@/api'"
|
||||
|
||||
Add path alias to `tsconfig.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### "openapi-typescript-codegen: command not found"
|
||||
### "command not found: openapi-typescript-codegen"
|
||||
|
||||
This shouldn't happen since the script uses `npx`, but if it does:
|
||||
|
||||
```bash
|
||||
# Ensure dependencies are installed
|
||||
npm install
|
||||
|
||||
# The script already uses npx, but you can run manually:
|
||||
npx openapi-typescript-codegen --input ./openapi.json --output ./src/api --client axios --useOptions
|
||||
```
|
||||
|
||||
### API Server Not Running
|
||||
|
||||
Make sure the API service is running before generating:
|
||||
|
||||
```bash
|
||||
# In the attune/crates/api directory
|
||||
cargo run --bin attune-api
|
||||
```
|
||||
25
web/src/api/core/ApiError.ts
Normal file
25
web/src/api/core/ApiError.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ApiRequestOptions } from './ApiRequestOptions';
|
||||
import type { ApiResult } from './ApiResult';
|
||||
|
||||
export class ApiError extends Error {
|
||||
public readonly url: string;
|
||||
public readonly status: number;
|
||||
public readonly statusText: string;
|
||||
public readonly body: any;
|
||||
public readonly request: ApiRequestOptions;
|
||||
|
||||
constructor(request: ApiRequestOptions, response: ApiResult, message: string) {
|
||||
super(message);
|
||||
|
||||
this.name = 'ApiError';
|
||||
this.url = response.url;
|
||||
this.status = response.status;
|
||||
this.statusText = response.statusText;
|
||||
this.body = response.body;
|
||||
this.request = request;
|
||||
}
|
||||
}
|
||||
17
web/src/api/core/ApiRequestOptions.ts
Normal file
17
web/src/api/core/ApiRequestOptions.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type ApiRequestOptions = {
|
||||
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
|
||||
readonly url: string;
|
||||
readonly path?: Record<string, any>;
|
||||
readonly cookies?: Record<string, any>;
|
||||
readonly headers?: Record<string, any>;
|
||||
readonly query?: Record<string, any>;
|
||||
readonly formData?: Record<string, any>;
|
||||
readonly body?: any;
|
||||
readonly mediaType?: string;
|
||||
readonly responseHeader?: string;
|
||||
readonly errors?: Record<number, string>;
|
||||
};
|
||||
11
web/src/api/core/ApiResult.ts
Normal file
11
web/src/api/core/ApiResult.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type ApiResult = {
|
||||
readonly url: string;
|
||||
readonly ok: boolean;
|
||||
readonly status: number;
|
||||
readonly statusText: string;
|
||||
readonly body: any;
|
||||
};
|
||||
131
web/src/api/core/CancelablePromise.ts
Normal file
131
web/src/api/core/CancelablePromise.ts
Normal file
@@ -0,0 +1,131 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export class CancelError extends Error {
|
||||
|
||||
constructor(message: string) {
|
||||
super(message);
|
||||
this.name = 'CancelError';
|
||||
}
|
||||
|
||||
public get isCancelled(): boolean {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
export interface OnCancel {
|
||||
readonly isResolved: boolean;
|
||||
readonly isRejected: boolean;
|
||||
readonly isCancelled: boolean;
|
||||
|
||||
(cancelHandler: () => void): void;
|
||||
}
|
||||
|
||||
export class CancelablePromise<T> implements Promise<T> {
|
||||
#isResolved: boolean;
|
||||
#isRejected: boolean;
|
||||
#isCancelled: boolean;
|
||||
readonly #cancelHandlers: (() => void)[];
|
||||
readonly #promise: Promise<T>;
|
||||
#resolve?: (value: T | PromiseLike<T>) => void;
|
||||
#reject?: (reason?: any) => void;
|
||||
|
||||
constructor(
|
||||
executor: (
|
||||
resolve: (value: T | PromiseLike<T>) => void,
|
||||
reject: (reason?: any) => void,
|
||||
onCancel: OnCancel
|
||||
) => void
|
||||
) {
|
||||
this.#isResolved = false;
|
||||
this.#isRejected = false;
|
||||
this.#isCancelled = false;
|
||||
this.#cancelHandlers = [];
|
||||
this.#promise = new Promise<T>((resolve, reject) => {
|
||||
this.#resolve = resolve;
|
||||
this.#reject = reject;
|
||||
|
||||
const onResolve = (value: T | PromiseLike<T>): void => {
|
||||
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
||||
return;
|
||||
}
|
||||
this.#isResolved = true;
|
||||
if (this.#resolve) this.#resolve(value);
|
||||
};
|
||||
|
||||
const onReject = (reason?: any): void => {
|
||||
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
||||
return;
|
||||
}
|
||||
this.#isRejected = true;
|
||||
if (this.#reject) this.#reject(reason);
|
||||
};
|
||||
|
||||
const onCancel = (cancelHandler: () => void): void => {
|
||||
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
||||
return;
|
||||
}
|
||||
this.#cancelHandlers.push(cancelHandler);
|
||||
};
|
||||
|
||||
Object.defineProperty(onCancel, 'isResolved', {
|
||||
get: (): boolean => this.#isResolved,
|
||||
});
|
||||
|
||||
Object.defineProperty(onCancel, 'isRejected', {
|
||||
get: (): boolean => this.#isRejected,
|
||||
});
|
||||
|
||||
Object.defineProperty(onCancel, 'isCancelled', {
|
||||
get: (): boolean => this.#isCancelled,
|
||||
});
|
||||
|
||||
return executor(onResolve, onReject, onCancel as OnCancel);
|
||||
});
|
||||
}
|
||||
|
||||
get [Symbol.toStringTag]() {
|
||||
return "Cancellable Promise";
|
||||
}
|
||||
|
||||
public then<TResult1 = T, TResult2 = never>(
|
||||
onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
|
||||
onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null
|
||||
): Promise<TResult1 | TResult2> {
|
||||
return this.#promise.then(onFulfilled, onRejected);
|
||||
}
|
||||
|
||||
public catch<TResult = never>(
|
||||
onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null
|
||||
): Promise<T | TResult> {
|
||||
return this.#promise.catch(onRejected);
|
||||
}
|
||||
|
||||
public finally(onFinally?: (() => void) | null): Promise<T> {
|
||||
return this.#promise.finally(onFinally);
|
||||
}
|
||||
|
||||
public cancel(): void {
|
||||
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
||||
return;
|
||||
}
|
||||
this.#isCancelled = true;
|
||||
if (this.#cancelHandlers.length) {
|
||||
try {
|
||||
for (const cancelHandler of this.#cancelHandlers) {
|
||||
cancelHandler();
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn('Cancellation threw an error', error);
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.#cancelHandlers.length = 0;
|
||||
if (this.#reject) this.#reject(new CancelError('Request aborted'));
|
||||
}
|
||||
|
||||
public get isCancelled(): boolean {
|
||||
return this.#isCancelled;
|
||||
}
|
||||
}
|
||||
32
web/src/api/core/OpenAPI.ts
Normal file
32
web/src/api/core/OpenAPI.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ApiRequestOptions } from './ApiRequestOptions';
|
||||
|
||||
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
||||
type Headers = Record<string, string>;
|
||||
|
||||
export type OpenAPIConfig = {
|
||||
BASE: string;
|
||||
VERSION: string;
|
||||
WITH_CREDENTIALS: boolean;
|
||||
CREDENTIALS: 'include' | 'omit' | 'same-origin';
|
||||
TOKEN?: string | Resolver<string> | undefined;
|
||||
USERNAME?: string | Resolver<string> | undefined;
|
||||
PASSWORD?: string | Resolver<string> | undefined;
|
||||
HEADERS?: Headers | Resolver<Headers> | undefined;
|
||||
ENCODE_PATH?: ((path: string) => string) | undefined;
|
||||
};
|
||||
|
||||
export const OpenAPI: OpenAPIConfig = {
|
||||
BASE: 'http://localhost:8080',
|
||||
VERSION: '0.1.0',
|
||||
WITH_CREDENTIALS: false,
|
||||
CREDENTIALS: 'include',
|
||||
TOKEN: undefined,
|
||||
USERNAME: undefined,
|
||||
PASSWORD: undefined,
|
||||
HEADERS: undefined,
|
||||
ENCODE_PATH: undefined,
|
||||
};
|
||||
323
web/src/api/core/request.ts
Normal file
323
web/src/api/core/request.ts
Normal file
@@ -0,0 +1,323 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import axios from 'axios';
|
||||
import type { AxiosError, AxiosRequestConfig, AxiosResponse, AxiosInstance } from 'axios';
|
||||
import FormData from 'form-data';
|
||||
|
||||
import { ApiError } from './ApiError';
|
||||
import type { ApiRequestOptions } from './ApiRequestOptions';
|
||||
import type { ApiResult } from './ApiResult';
|
||||
import { CancelablePromise } from './CancelablePromise';
|
||||
import type { OnCancel } from './CancelablePromise';
|
||||
import type { OpenAPIConfig } from './OpenAPI';
|
||||
|
||||
export const isDefined = <T>(value: T | null | undefined): value is Exclude<T, null | undefined> => {
|
||||
return value !== undefined && value !== null;
|
||||
};
|
||||
|
||||
export const isString = (value: any): value is string => {
|
||||
return typeof value === 'string';
|
||||
};
|
||||
|
||||
export const isStringWithValue = (value: any): value is string => {
|
||||
return isString(value) && value !== '';
|
||||
};
|
||||
|
||||
export const isBlob = (value: any): value is Blob => {
|
||||
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])
|
||||
);
|
||||
};
|
||||
|
||||
export const isFormData = (value: any): value is FormData => {
|
||||
return value instanceof FormData;
|
||||
};
|
||||
|
||||
export const isSuccess = (status: number): boolean => {
|
||||
return status >= 200 && status < 300;
|
||||
};
|
||||
|
||||
export const base64 = (str: string): string => {
|
||||
try {
|
||||
return btoa(str);
|
||||
} catch (err) {
|
||||
// @ts-ignore
|
||||
return Buffer.from(str).toString('base64');
|
||||
}
|
||||
};
|
||||
|
||||
export const getQueryString = (params: Record<string, any>): string => {
|
||||
const qs: string[] = [];
|
||||
|
||||
const append = (key: string, value: any) => {
|
||||
qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
|
||||
};
|
||||
|
||||
const process = (key: string, value: any) => {
|
||||
if (isDefined(value)) {
|
||||
if (Array.isArray(value)) {
|
||||
value.forEach(v => {
|
||||
process(key, v);
|
||||
});
|
||||
} else if (typeof value === 'object') {
|
||||
Object.entries(value).forEach(([k, v]) => {
|
||||
process(`${key}[${k}]`, v);
|
||||
});
|
||||
} else {
|
||||
append(key, value);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Object.entries(params).forEach(([key, value]) => {
|
||||
process(key, value);
|
||||
});
|
||||
|
||||
if (qs.length > 0) {
|
||||
return `?${qs.join('&')}`;
|
||||
}
|
||||
|
||||
return '';
|
||||
};
|
||||
|
||||
const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => {
|
||||
const encoder = config.ENCODE_PATH || encodeURI;
|
||||
|
||||
const path = options.url
|
||||
.replace('{api-version}', config.VERSION)
|
||||
.replace(/{(.*?)}/g, (substring: string, group: string) => {
|
||||
if (options.path?.hasOwnProperty(group)) {
|
||||
return encoder(String(options.path[group]));
|
||||
}
|
||||
return substring;
|
||||
});
|
||||
|
||||
const url = `${config.BASE}${path}`;
|
||||
if (options.query) {
|
||||
return `${url}${getQueryString(options.query)}`;
|
||||
}
|
||||
return url;
|
||||
};
|
||||
|
||||
export const getFormData = (options: ApiRequestOptions): FormData | undefined => {
|
||||
if (options.formData) {
|
||||
const formData = new FormData();
|
||||
|
||||
const process = (key: string, value: any) => {
|
||||
if (isString(value) || isBlob(value)) {
|
||||
formData.append(key, value);
|
||||
} else {
|
||||
formData.append(key, JSON.stringify(value));
|
||||
}
|
||||
};
|
||||
|
||||
Object.entries(options.formData)
|
||||
.filter(([_, value]) => isDefined(value))
|
||||
.forEach(([key, value]) => {
|
||||
if (Array.isArray(value)) {
|
||||
value.forEach(v => process(key, v));
|
||||
} else {
|
||||
process(key, value);
|
||||
}
|
||||
});
|
||||
|
||||
return formData;
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
||||
|
||||
export const resolve = async <T>(options: ApiRequestOptions, resolver?: T | Resolver<T>): Promise<T | undefined> => {
|
||||
if (typeof resolver === 'function') {
|
||||
return (resolver as Resolver<T>)(options);
|
||||
}
|
||||
return resolver;
|
||||
};
|
||||
|
||||
export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions, formData?: FormData): Promise<Record<string, string>> => {
|
||||
const [token, username, password, additionalHeaders] = await Promise.all([
|
||||
resolve(options, config.TOKEN),
|
||||
resolve(options, config.USERNAME),
|
||||
resolve(options, config.PASSWORD),
|
||||
resolve(options, config.HEADERS),
|
||||
]);
|
||||
|
||||
const formHeaders = typeof formData?.getHeaders === 'function' && formData?.getHeaders() || {}
|
||||
|
||||
const headers = Object.entries({
|
||||
Accept: 'application/json',
|
||||
...additionalHeaders,
|
||||
...options.headers,
|
||||
...formHeaders,
|
||||
})
|
||||
.filter(([_, value]) => isDefined(value))
|
||||
.reduce((headers, [key, value]) => ({
|
||||
...headers,
|
||||
[key]: String(value),
|
||||
}), {} as Record<string, string>);
|
||||
|
||||
if (isStringWithValue(token)) {
|
||||
headers['Authorization'] = `Bearer ${token}`;
|
||||
}
|
||||
|
||||
if (isStringWithValue(username) && isStringWithValue(password)) {
|
||||
const credentials = base64(`${username}:${password}`);
|
||||
headers['Authorization'] = `Basic ${credentials}`;
|
||||
}
|
||||
|
||||
if (options.body !== undefined) {
|
||||
if (options.mediaType) {
|
||||
headers['Content-Type'] = options.mediaType;
|
||||
} else if (isBlob(options.body)) {
|
||||
headers['Content-Type'] = options.body.type || 'application/octet-stream';
|
||||
} else if (isString(options.body)) {
|
||||
headers['Content-Type'] = 'text/plain';
|
||||
} else if (!isFormData(options.body)) {
|
||||
headers['Content-Type'] = 'application/json';
|
||||
}
|
||||
}
|
||||
|
||||
return headers;
|
||||
};
|
||||
|
||||
export const getRequestBody = (options: ApiRequestOptions): any => {
|
||||
if (options.body) {
|
||||
return options.body;
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
export const sendRequest = async <T>(
|
||||
config: OpenAPIConfig,
|
||||
options: ApiRequestOptions,
|
||||
url: string,
|
||||
body: any,
|
||||
formData: FormData | undefined,
|
||||
headers: Record<string, string>,
|
||||
onCancel: OnCancel,
|
||||
axiosClient: AxiosInstance
|
||||
): Promise<AxiosResponse<T>> => {
|
||||
const source = axios.CancelToken.source();
|
||||
|
||||
const requestConfig: AxiosRequestConfig = {
|
||||
url,
|
||||
headers,
|
||||
data: body ?? formData,
|
||||
method: options.method,
|
||||
withCredentials: config.WITH_CREDENTIALS,
|
||||
withXSRFToken: config.CREDENTIALS === 'include' ? config.WITH_CREDENTIALS : false,
|
||||
cancelToken: source.token,
|
||||
};
|
||||
|
||||
onCancel(() => source.cancel('The user aborted a request.'));
|
||||
|
||||
try {
|
||||
return await axiosClient.request(requestConfig);
|
||||
} catch (error) {
|
||||
const axiosError = error as AxiosError<T>;
|
||||
if (axiosError.response) {
|
||||
return axiosError.response;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
export const getResponseHeader = (response: AxiosResponse<any>, responseHeader?: string): string | undefined => {
|
||||
if (responseHeader) {
|
||||
const content = response.headers[responseHeader];
|
||||
if (isString(content)) {
|
||||
return content;
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
export const getResponseBody = (response: AxiosResponse<any>): any => {
|
||||
if (response.status !== 204) {
|
||||
return response.data;
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => {
|
||||
const errors: Record<number, string> = {
|
||||
400: 'Bad Request',
|
||||
401: 'Unauthorized',
|
||||
403: 'Forbidden',
|
||||
404: 'Not Found',
|
||||
500: 'Internal Server Error',
|
||||
502: 'Bad Gateway',
|
||||
503: 'Service Unavailable',
|
||||
...options.errors,
|
||||
}
|
||||
|
||||
const error = errors[result.status];
|
||||
if (error) {
|
||||
throw new ApiError(options, result, error);
|
||||
}
|
||||
|
||||
if (!result.ok) {
|
||||
const errorStatus = result.status ?? 'unknown';
|
||||
const errorStatusText = result.statusText ?? 'unknown';
|
||||
const errorBody = (() => {
|
||||
try {
|
||||
return JSON.stringify(result.body, null, 2);
|
||||
} catch (e) {
|
||||
return undefined;
|
||||
}
|
||||
})();
|
||||
|
||||
throw new ApiError(options, result,
|
||||
`Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Request method
|
||||
* @param config The OpenAPI configuration object
|
||||
* @param options The request options from the service
|
||||
* @param axiosClient The axios client instance to use
|
||||
* @returns CancelablePromise<T>
|
||||
* @throws ApiError
|
||||
*/
|
||||
export const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions, axiosClient: AxiosInstance = axios): CancelablePromise<T> => {
|
||||
return new CancelablePromise(async (resolve, reject, onCancel) => {
|
||||
try {
|
||||
const url = getUrl(config, options);
|
||||
const formData = getFormData(options);
|
||||
const body = getRequestBody(options);
|
||||
const headers = await getHeaders(config, options, formData);
|
||||
|
||||
if (!onCancel.isCancelled) {
|
||||
const response = await sendRequest<T>(config, options, url, body, formData, headers, onCancel, axiosClient);
|
||||
const responseBody = getResponseBody(response);
|
||||
const responseHeader = getResponseHeader(response, options.responseHeader);
|
||||
|
||||
const result: ApiResult = {
|
||||
url,
|
||||
ok: isSuccess(response.status),
|
||||
status: response.status,
|
||||
statusText: response.statusText,
|
||||
body: responseHeader ?? responseBody,
|
||||
};
|
||||
|
||||
catchErrorCodes(options, result);
|
||||
|
||||
resolve(result.body);
|
||||
}
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
}
|
||||
});
|
||||
};
|
||||
124
web/src/api/index.ts
Normal file
124
web/src/api/index.ts
Normal file
@@ -0,0 +1,124 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export { ApiError } from './core/ApiError';
|
||||
export { CancelablePromise, CancelError } from './core/CancelablePromise';
|
||||
export { OpenAPI } from './core/OpenAPI';
|
||||
export type { OpenAPIConfig } from './core/OpenAPI';
|
||||
|
||||
export type { ActionResponse } from './models/ActionResponse';
|
||||
export type { ActionSummary } from './models/ActionSummary';
|
||||
export type { ApiResponse_ActionResponse } from './models/ApiResponse_ActionResponse';
|
||||
export type { ApiResponse_CurrentUserResponse } from './models/ApiResponse_CurrentUserResponse';
|
||||
export type { ApiResponse_EnforcementResponse } from './models/ApiResponse_EnforcementResponse';
|
||||
export type { ApiResponse_EventResponse } from './models/ApiResponse_EventResponse';
|
||||
export type { ApiResponse_ExecutionResponse } from './models/ApiResponse_ExecutionResponse';
|
||||
export type { ApiResponse_InquiryResponse } from './models/ApiResponse_InquiryResponse';
|
||||
export type { ApiResponse_KeyResponse } from './models/ApiResponse_KeyResponse';
|
||||
export type { ApiResponse_PackInstallResponse } from './models/ApiResponse_PackInstallResponse';
|
||||
export type { ApiResponse_PackResponse } from './models/ApiResponse_PackResponse';
|
||||
export type { ApiResponse_QueueStatsResponse } from './models/ApiResponse_QueueStatsResponse';
|
||||
export type { ApiResponse_RuleResponse } from './models/ApiResponse_RuleResponse';
|
||||
export type { ApiResponse_SensorResponse } from './models/ApiResponse_SensorResponse';
|
||||
export type { ApiResponse_String } from './models/ApiResponse_String';
|
||||
export type { ApiResponse_TokenResponse } from './models/ApiResponse_TokenResponse';
|
||||
export type { ApiResponse_TriggerResponse } from './models/ApiResponse_TriggerResponse';
|
||||
export type { ApiResponse_WebhookReceiverResponse } from './models/ApiResponse_WebhookReceiverResponse';
|
||||
export type { ApiResponse_WorkflowResponse } from './models/ApiResponse_WorkflowResponse';
|
||||
export type { ChangePasswordRequest } from './models/ChangePasswordRequest';
|
||||
export type { CreateActionRequest } from './models/CreateActionRequest';
|
||||
export type { CreateInquiryRequest } from './models/CreateInquiryRequest';
|
||||
export type { CreateKeyRequest } from './models/CreateKeyRequest';
|
||||
export type { CreatePackRequest } from './models/CreatePackRequest';
|
||||
export type { CreateRuleRequest } from './models/CreateRuleRequest';
|
||||
export type { CreateSensorRequest } from './models/CreateSensorRequest';
|
||||
export type { CreateTriggerRequest } from './models/CreateTriggerRequest';
|
||||
export type { CreateWorkflowRequest } from './models/CreateWorkflowRequest';
|
||||
export type { CurrentUserResponse } from './models/CurrentUserResponse';
|
||||
export { EnforcementCondition } from './models/EnforcementCondition';
|
||||
export type { EnforcementResponse } from './models/EnforcementResponse';
|
||||
export { EnforcementStatus } from './models/EnforcementStatus';
|
||||
export type { EnforcementSummary } from './models/EnforcementSummary';
|
||||
export type { EventResponse } from './models/EventResponse';
|
||||
export type { EventSummary } from './models/EventSummary';
|
||||
export type { ExecutionResponse } from './models/ExecutionResponse';
|
||||
export { ExecutionStatus } from './models/ExecutionStatus';
|
||||
export type { ExecutionSummary } from './models/ExecutionSummary';
|
||||
export type { HealthResponse } from './models/HealthResponse';
|
||||
export type { i64 } from './models/i64';
|
||||
export type { InquiryRespondRequest } from './models/InquiryRespondRequest';
|
||||
export type { InquiryResponse } from './models/InquiryResponse';
|
||||
export { InquiryStatus } from './models/InquiryStatus';
|
||||
export type { InquirySummary } from './models/InquirySummary';
|
||||
export type { InstallPackRequest } from './models/InstallPackRequest';
|
||||
export type { KeyResponse } from './models/KeyResponse';
|
||||
export type { KeySummary } from './models/KeySummary';
|
||||
export type { LoginRequest } from './models/LoginRequest';
|
||||
export { OwnerType } from './models/OwnerType';
|
||||
export type { PackInstallResponse } from './models/PackInstallResponse';
|
||||
export type { PackResponse } from './models/PackResponse';
|
||||
export type { PackSummary } from './models/PackSummary';
|
||||
export type { PackTestExecution } from './models/PackTestExecution';
|
||||
export type { PackTestResult } from './models/PackTestResult';
|
||||
export type { PackTestSummary } from './models/PackTestSummary';
|
||||
export type { PackWorkflowSyncResponse } from './models/PackWorkflowSyncResponse';
|
||||
export type { PackWorkflowValidationResponse } from './models/PackWorkflowValidationResponse';
|
||||
export type { PaginatedResponse_ActionSummary } from './models/PaginatedResponse_ActionSummary';
|
||||
export type { PaginatedResponse_EnforcementSummary } from './models/PaginatedResponse_EnforcementSummary';
|
||||
export type { PaginatedResponse_EventSummary } from './models/PaginatedResponse_EventSummary';
|
||||
export type { PaginatedResponse_ExecutionSummary } from './models/PaginatedResponse_ExecutionSummary';
|
||||
export type { PaginatedResponse_InquirySummary } from './models/PaginatedResponse_InquirySummary';
|
||||
export type { PaginatedResponse_KeySummary } from './models/PaginatedResponse_KeySummary';
|
||||
export type { PaginatedResponse_PackSummary } from './models/PaginatedResponse_PackSummary';
|
||||
export type { PaginatedResponse_PackTestSummary } from './models/PaginatedResponse_PackTestSummary';
|
||||
export type { PaginatedResponse_RuleSummary } from './models/PaginatedResponse_RuleSummary';
|
||||
export type { PaginatedResponse_SensorSummary } from './models/PaginatedResponse_SensorSummary';
|
||||
export type { PaginatedResponse_TriggerSummary } from './models/PaginatedResponse_TriggerSummary';
|
||||
export type { PaginatedResponse_WorkflowSummary } from './models/PaginatedResponse_WorkflowSummary';
|
||||
export type { PaginationMeta } from './models/PaginationMeta';
|
||||
export type { QueueStatsResponse } from './models/QueueStatsResponse';
|
||||
export type { RefreshTokenRequest } from './models/RefreshTokenRequest';
|
||||
export type { RegisterPackRequest } from './models/RegisterPackRequest';
|
||||
export type { RegisterRequest } from './models/RegisterRequest';
|
||||
export type { RuleResponse } from './models/RuleResponse';
|
||||
export type { RuleSummary } from './models/RuleSummary';
|
||||
export type { SensorResponse } from './models/SensorResponse';
|
||||
export type { SensorSummary } from './models/SensorSummary';
|
||||
export type { SuccessResponse } from './models/SuccessResponse';
|
||||
export type { TestCaseResult } from './models/TestCaseResult';
|
||||
export { TestStatus } from './models/TestStatus';
|
||||
export type { TestSuiteResult } from './models/TestSuiteResult';
|
||||
export type { TokenResponse } from './models/TokenResponse';
|
||||
export type { TriggerResponse } from './models/TriggerResponse';
|
||||
export type { TriggerSummary } from './models/TriggerSummary';
|
||||
export type { UpdateActionRequest } from './models/UpdateActionRequest';
|
||||
export type { UpdateInquiryRequest } from './models/UpdateInquiryRequest';
|
||||
export type { UpdateKeyRequest } from './models/UpdateKeyRequest';
|
||||
export type { UpdatePackRequest } from './models/UpdatePackRequest';
|
||||
export type { UpdateRuleRequest } from './models/UpdateRuleRequest';
|
||||
export type { UpdateSensorRequest } from './models/UpdateSensorRequest';
|
||||
export type { UpdateTriggerRequest } from './models/UpdateTriggerRequest';
|
||||
export type { UpdateWorkflowRequest } from './models/UpdateWorkflowRequest';
|
||||
export type { UserInfo } from './models/UserInfo';
|
||||
export type { Value } from './models/Value';
|
||||
export type { WebhookReceiverRequest } from './models/WebhookReceiverRequest';
|
||||
export type { WebhookReceiverResponse } from './models/WebhookReceiverResponse';
|
||||
export type { WorkflowResponse } from './models/WorkflowResponse';
|
||||
export type { WorkflowSummary } from './models/WorkflowSummary';
|
||||
export type { WorkflowSyncResult } from './models/WorkflowSyncResult';
|
||||
|
||||
export { ActionsService } from './services/ActionsService';
|
||||
export { AuthService } from './services/AuthService';
|
||||
export { EnforcementsService } from './services/EnforcementsService';
|
||||
export { EventsService } from './services/EventsService';
|
||||
export { ExecutionsService } from './services/ExecutionsService';
|
||||
export { HealthService } from './services/HealthService';
|
||||
export { InquiriesService } from './services/InquiriesService';
|
||||
export { PacksService } from './services/PacksService';
|
||||
export { RulesService } from './services/RulesService';
|
||||
export { SecretsService } from './services/SecretsService';
|
||||
export { SensorsService } from './services/SensorsService';
|
||||
export { TriggersService } from './services/TriggersService';
|
||||
export { WebhooksService } from './services/WebhooksService';
|
||||
export { WorkflowsService } from './services/WorkflowsService';
|
||||
62
web/src/api/models/ActionResponse.ts
Normal file
62
web/src/api/models/ActionResponse.ts
Normal file
@@ -0,0 +1,62 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Response DTO for action information
|
||||
*/
|
||||
export type ActionResponse = {
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Action description
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Entry point
|
||||
*/
|
||||
entrypoint: string;
|
||||
/**
|
||||
* Action ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Whether this is an ad-hoc action (not from pack installation)
|
||||
*/
|
||||
is_adhoc: boolean;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Output schema
|
||||
*/
|
||||
out_schema: any | null;
|
||||
/**
|
||||
* Pack ID
|
||||
*/
|
||||
pack: number;
|
||||
/**
|
||||
* Pack reference
|
||||
*/
|
||||
pack_ref: string;
|
||||
/**
|
||||
* Parameter schema
|
||||
*/
|
||||
param_schema: any | null;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Runtime ID
|
||||
*/
|
||||
runtime?: number | null;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
};
|
||||
|
||||
46
web/src/api/models/ActionSummary.ts
Normal file
46
web/src/api/models/ActionSummary.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Simplified action response (for list endpoints)
|
||||
*/
|
||||
export type ActionSummary = {
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Action description
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Entry point
|
||||
*/
|
||||
entrypoint: string;
|
||||
/**
|
||||
* Action ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Pack reference
|
||||
*/
|
||||
pack_ref: string;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Runtime ID
|
||||
*/
|
||||
runtime?: number | null;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
};
|
||||
|
||||
71
web/src/api/models/ApiResponse_ActionResponse.ts
Normal file
71
web/src/api/models/ApiResponse_ActionResponse.ts
Normal file
@@ -0,0 +1,71 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Standard API response wrapper
|
||||
*/
|
||||
export type ApiResponse_ActionResponse = {
|
||||
/**
|
||||
* Response DTO for action information
|
||||
*/
|
||||
data: {
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Action description
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Entry point
|
||||
*/
|
||||
entrypoint: string;
|
||||
/**
|
||||
* Action ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Whether this is an ad-hoc action (not from pack installation)
|
||||
*/
|
||||
is_adhoc: boolean;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Output schema
|
||||
*/
|
||||
out_schema: any | null;
|
||||
/**
|
||||
* Pack ID
|
||||
*/
|
||||
pack: number;
|
||||
/**
|
||||
* Pack reference
|
||||
*/
|
||||
pack_ref: string;
|
||||
/**
|
||||
* Parameter schema
|
||||
*/
|
||||
param_schema: any | null;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Runtime ID
|
||||
*/
|
||||
runtime?: number | null;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
};
|
||||
/**
|
||||
* Optional message
|
||||
*/
|
||||
message?: string | null;
|
||||
};
|
||||
|
||||
31
web/src/api/models/ApiResponse_CurrentUserResponse.ts
Normal file
31
web/src/api/models/ApiResponse_CurrentUserResponse.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Standard API response wrapper
|
||||
*/
|
||||
export type ApiResponse_CurrentUserResponse = {
|
||||
/**
|
||||
* Current user response
|
||||
*/
|
||||
data: {
|
||||
/**
|
||||
* Display name
|
||||
*/
|
||||
display_name?: string | null;
|
||||
/**
|
||||
* Identity ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Identity login
|
||||
*/
|
||||
login: string;
|
||||
};
|
||||
/**
|
||||
* Optional message
|
||||
*/
|
||||
message?: string | null;
|
||||
};
|
||||
|
||||
64
web/src/api/models/ApiResponse_EnforcementResponse.ts
Normal file
64
web/src/api/models/ApiResponse_EnforcementResponse.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { EnforcementCondition } from './EnforcementCondition';
|
||||
import type { EnforcementStatus } from './EnforcementStatus';
|
||||
import type { i64 } from './i64';
|
||||
/**
|
||||
* Standard API response wrapper
|
||||
*/
|
||||
export type ApiResponse_EnforcementResponse = {
|
||||
/**
|
||||
* Full enforcement response with all details
|
||||
*/
|
||||
data: {
|
||||
/**
|
||||
* Enforcement condition
|
||||
*/
|
||||
condition: EnforcementCondition;
|
||||
/**
|
||||
* Enforcement conditions (rule evaluation criteria)
|
||||
*/
|
||||
conditions: Record<string, any>;
|
||||
/**
|
||||
* Enforcement configuration
|
||||
*/
|
||||
config: any | null;
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
event?: (null | i64);
|
||||
/**
|
||||
* Enforcement ID
|
||||
*/
|
||||
id: i64;
|
||||
/**
|
||||
* Enforcement payload
|
||||
*/
|
||||
payload: Record<string, any>;
|
||||
rule?: (null | i64);
|
||||
/**
|
||||
* Rule reference
|
||||
*/
|
||||
rule_ref: string;
|
||||
/**
|
||||
* Enforcement status
|
||||
*/
|
||||
status: EnforcementStatus;
|
||||
/**
|
||||
* Trigger reference
|
||||
*/
|
||||
trigger_ref: string;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
};
|
||||
/**
|
||||
* Optional message
|
||||
*/
|
||||
message?: string | null;
|
||||
};
|
||||
|
||||
55
web/src/api/models/ApiResponse_EventResponse.ts
Normal file
55
web/src/api/models/ApiResponse_EventResponse.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { i64 } from './i64';
|
||||
/**
|
||||
* Standard API response wrapper
|
||||
*/
|
||||
export type ApiResponse_EventResponse = {
|
||||
/**
|
||||
* Full event response with all details
|
||||
*/
|
||||
data: {
|
||||
/**
|
||||
* Event configuration
|
||||
*/
|
||||
config: any | null;
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Event ID
|
||||
*/
|
||||
id: i64;
|
||||
/**
|
||||
* Event payload data
|
||||
*/
|
||||
payload: Record<string, any>;
|
||||
rule?: (null | i64);
|
||||
/**
|
||||
* Rule reference (if event was generated by a specific rule)
|
||||
*/
|
||||
rule_ref?: string | null;
|
||||
source?: (null | i64);
|
||||
/**
|
||||
* Source reference
|
||||
*/
|
||||
source_ref?: string | null;
|
||||
trigger?: (null | i64);
|
||||
/**
|
||||
* Trigger reference
|
||||
*/
|
||||
trigger_ref: string;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
};
|
||||
/**
|
||||
* Optional message
|
||||
*/
|
||||
message?: string | null;
|
||||
};
|
||||
|
||||
64
web/src/api/models/ApiResponse_ExecutionResponse.ts
Normal file
64
web/src/api/models/ApiResponse_ExecutionResponse.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ExecutionStatus } from './ExecutionStatus';
|
||||
/**
|
||||
* Standard API response wrapper
|
||||
*/
|
||||
export type ApiResponse_ExecutionResponse = {
|
||||
/**
|
||||
* Response DTO for execution information
|
||||
*/
|
||||
data: {
|
||||
/**
|
||||
* Action ID (optional, may be null for ad-hoc executions)
|
||||
*/
|
||||
action?: number | null;
|
||||
/**
|
||||
* Action reference
|
||||
*/
|
||||
action_ref: string;
|
||||
/**
|
||||
* Execution configuration/parameters
|
||||
*/
|
||||
config: Record<string, any>;
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Enforcement ID (rule enforcement that triggered this)
|
||||
*/
|
||||
enforcement?: number | null;
|
||||
/**
|
||||
* Executor ID (worker/executor that ran this)
|
||||
*/
|
||||
executor?: number | null;
|
||||
/**
|
||||
* Execution ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Parent execution ID (for nested/child executions)
|
||||
*/
|
||||
parent?: number | null;
|
||||
/**
|
||||
* Execution result/output
|
||||
*/
|
||||
result: Record<string, any>;
|
||||
/**
|
||||
* Execution status
|
||||
*/
|
||||
status: ExecutionStatus;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
};
|
||||
/**
|
||||
* Optional message
|
||||
*/
|
||||
message?: string | null;
|
||||
};
|
||||
|
||||
62
web/src/api/models/ApiResponse_InquiryResponse.ts
Normal file
62
web/src/api/models/ApiResponse_InquiryResponse.ts
Normal file
@@ -0,0 +1,62 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { i64 } from './i64';
|
||||
import type { InquiryStatus } from './InquiryStatus';
|
||||
/**
|
||||
* Standard API response wrapper
|
||||
*/
|
||||
export type ApiResponse_InquiryResponse = {
|
||||
/**
|
||||
* Full inquiry response with all details
|
||||
*/
|
||||
data: {
|
||||
assigned_to?: (null | i64);
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Execution ID this inquiry belongs to
|
||||
*/
|
||||
execution: i64;
|
||||
/**
|
||||
* Inquiry ID
|
||||
*/
|
||||
id: i64;
|
||||
/**
|
||||
* Prompt text displayed to the user
|
||||
*/
|
||||
prompt: string;
|
||||
/**
|
||||
* When the inquiry was responded to
|
||||
*/
|
||||
responded_at?: string | null;
|
||||
/**
|
||||
* Response data provided by the user
|
||||
*/
|
||||
response: any | null;
|
||||
/**
|
||||
* JSON schema for expected response
|
||||
*/
|
||||
response_schema: any | null;
|
||||
/**
|
||||
* Current status of the inquiry
|
||||
*/
|
||||
status: InquiryStatus;
|
||||
/**
|
||||
* When the inquiry expires
|
||||
*/
|
||||
timeout_at?: string | null;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
};
|
||||
/**
|
||||
* Optional message
|
||||
*/
|
||||
message?: string | null;
|
||||
};
|
||||
|
||||
73
web/src/api/models/ApiResponse_KeyResponse.ts
Normal file
73
web/src/api/models/ApiResponse_KeyResponse.ts
Normal file
@@ -0,0 +1,73 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { i64 } from './i64';
|
||||
import type { OwnerType } from './OwnerType';
|
||||
/**
|
||||
* Standard API response wrapper
|
||||
*/
|
||||
export type ApiResponse_KeyResponse = {
|
||||
/**
|
||||
* Full key response with all details (value redacted in list views)
|
||||
*/
|
||||
data: {
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Whether the value is encrypted
|
||||
*/
|
||||
encrypted: boolean;
|
||||
/**
|
||||
* Unique key ID
|
||||
*/
|
||||
id: i64;
|
||||
/**
|
||||
* Human-readable name
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner identifier
|
||||
*/
|
||||
owner?: string | null;
|
||||
owner_action?: (null | i64);
|
||||
/**
|
||||
* Owner action reference
|
||||
*/
|
||||
owner_action_ref?: string | null;
|
||||
owner_identity?: (null | i64);
|
||||
owner_pack?: (null | i64);
|
||||
/**
|
||||
* Owner pack reference
|
||||
*/
|
||||
owner_pack_ref?: string | null;
|
||||
owner_sensor?: (null | i64);
|
||||
/**
|
||||
* Owner sensor reference
|
||||
*/
|
||||
owner_sensor_ref?: string | null;
|
||||
/**
|
||||
* Type of owner
|
||||
*/
|
||||
owner_type: OwnerType;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
/**
|
||||
* The secret value (decrypted if encrypted)
|
||||
*/
|
||||
value: string;
|
||||
};
|
||||
/**
|
||||
* Optional message
|
||||
*/
|
||||
message?: string | null;
|
||||
};
|
||||
|
||||
30
web/src/api/models/ApiResponse_PackInstallResponse.ts
Normal file
30
web/src/api/models/ApiResponse_PackInstallResponse.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { PackResponse } from './PackResponse';
|
||||
import type { PackTestResult } from './PackTestResult';
|
||||
/**
|
||||
* Standard API response wrapper
|
||||
*/
|
||||
export type ApiResponse_PackInstallResponse = {
|
||||
/**
|
||||
* Response for pack install/register operations with test results
|
||||
*/
|
||||
data: {
|
||||
/**
|
||||
* The installed/registered pack
|
||||
*/
|
||||
pack: PackResponse;
|
||||
test_result?: (null | PackTestResult);
|
||||
/**
|
||||
* Whether tests were skipped
|
||||
*/
|
||||
tests_skipped: boolean;
|
||||
};
|
||||
/**
|
||||
* Optional message
|
||||
*/
|
||||
message?: string | null;
|
||||
};
|
||||
|
||||
71
web/src/api/models/ApiResponse_PackResponse.ts
Normal file
71
web/src/api/models/ApiResponse_PackResponse.ts
Normal file
@@ -0,0 +1,71 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Standard API response wrapper
|
||||
*/
|
||||
export type ApiResponse_PackResponse = {
|
||||
/**
|
||||
* Response DTO for pack information
|
||||
*/
|
||||
data: {
|
||||
/**
|
||||
* Configuration schema
|
||||
*/
|
||||
conf_schema: Record<string, any>;
|
||||
/**
|
||||
* Pack configuration
|
||||
*/
|
||||
config: Record<string, any>;
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Pack description
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
* Pack ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Is standard pack
|
||||
*/
|
||||
is_standard: boolean;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Pack metadata
|
||||
*/
|
||||
meta: Record<string, any>;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Runtime dependencies
|
||||
*/
|
||||
runtime_deps: Array<string>;
|
||||
/**
|
||||
* Tags
|
||||
*/
|
||||
tags: Array<string>;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
/**
|
||||
* Pack version
|
||||
*/
|
||||
version: string;
|
||||
};
|
||||
/**
|
||||
* Optional message
|
||||
*/
|
||||
message?: string | null;
|
||||
};
|
||||
|
||||
55
web/src/api/models/ApiResponse_QueueStatsResponse.ts
Normal file
55
web/src/api/models/ApiResponse_QueueStatsResponse.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Standard API response wrapper
|
||||
*/
|
||||
export type ApiResponse_QueueStatsResponse = {
|
||||
/**
|
||||
* Response DTO for queue statistics
|
||||
*/
|
||||
data: {
|
||||
/**
|
||||
* Action ID
|
||||
*/
|
||||
action_id: number;
|
||||
/**
|
||||
* Action reference
|
||||
*/
|
||||
action_ref: string;
|
||||
/**
|
||||
* Number of currently running executions
|
||||
*/
|
||||
active_count: number;
|
||||
/**
|
||||
* Timestamp of last statistics update
|
||||
*/
|
||||
last_updated: string;
|
||||
/**
|
||||
* Maximum concurrent executions allowed
|
||||
*/
|
||||
max_concurrent: number;
|
||||
/**
|
||||
* Timestamp of oldest queued execution (if any)
|
||||
*/
|
||||
oldest_enqueued_at?: string | null;
|
||||
/**
|
||||
* Number of executions waiting in queue
|
||||
*/
|
||||
queue_length: number;
|
||||
/**
|
||||
* Total executions completed since queue creation
|
||||
*/
|
||||
total_completed: number;
|
||||
/**
|
||||
* Total executions enqueued since queue creation
|
||||
*/
|
||||
total_enqueued: number;
|
||||
};
|
||||
/**
|
||||
* Optional message
|
||||
*/
|
||||
message?: string | null;
|
||||
};
|
||||
|
||||
87
web/src/api/models/ApiResponse_RuleResponse.ts
Normal file
87
web/src/api/models/ApiResponse_RuleResponse.ts
Normal file
@@ -0,0 +1,87 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Standard API response wrapper
|
||||
*/
|
||||
export type ApiResponse_RuleResponse = {
|
||||
/**
|
||||
* Response DTO for rule information
|
||||
*/
|
||||
data: {
|
||||
/**
|
||||
* Action ID
|
||||
*/
|
||||
action: number;
|
||||
/**
|
||||
* Parameters to pass to the action when rule is triggered
|
||||
*/
|
||||
action_params: Record<string, any>;
|
||||
/**
|
||||
* Action reference
|
||||
*/
|
||||
action_ref: string;
|
||||
/**
|
||||
* Conditions for rule evaluation
|
||||
*/
|
||||
conditions: Record<string, any>;
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Rule description
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Whether the rule is enabled
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Rule ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Whether this is an ad-hoc rule (not from pack installation)
|
||||
*/
|
||||
is_adhoc: boolean;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Pack ID
|
||||
*/
|
||||
pack: number;
|
||||
/**
|
||||
* Pack reference
|
||||
*/
|
||||
pack_ref: string;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Trigger ID
|
||||
*/
|
||||
trigger: number;
|
||||
/**
|
||||
* Parameters for trigger configuration and event filtering
|
||||
*/
|
||||
trigger_params: Record<string, any>;
|
||||
/**
|
||||
* Trigger reference
|
||||
*/
|
||||
trigger_ref: string;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
};
|
||||
/**
|
||||
* Optional message
|
||||
*/
|
||||
message?: string | null;
|
||||
};
|
||||
|
||||
79
web/src/api/models/ApiResponse_SensorResponse.ts
Normal file
79
web/src/api/models/ApiResponse_SensorResponse.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Standard API response wrapper
|
||||
*/
|
||||
export type ApiResponse_SensorResponse = {
|
||||
/**
|
||||
* Response DTO for sensor information
|
||||
*/
|
||||
data: {
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Sensor description
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Whether the sensor is enabled
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Entry point
|
||||
*/
|
||||
entrypoint: string;
|
||||
/**
|
||||
* Sensor ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Pack ID (optional)
|
||||
*/
|
||||
pack?: number | null;
|
||||
/**
|
||||
* Pack reference (optional)
|
||||
*/
|
||||
pack_ref?: string | null;
|
||||
/**
|
||||
* Parameter schema
|
||||
*/
|
||||
param_schema: any | null;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Runtime ID
|
||||
*/
|
||||
runtime: number;
|
||||
/**
|
||||
* Runtime reference
|
||||
*/
|
||||
runtime_ref: string;
|
||||
/**
|
||||
* Trigger ID
|
||||
*/
|
||||
trigger: number;
|
||||
/**
|
||||
* Trigger reference
|
||||
*/
|
||||
trigger_ref: string;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
};
|
||||
/**
|
||||
* Optional message
|
||||
*/
|
||||
message?: string | null;
|
||||
};
|
||||
|
||||
15
web/src/api/models/ApiResponse_String.ts
Normal file
15
web/src/api/models/ApiResponse_String.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Standard API response wrapper
|
||||
*/
|
||||
export type ApiResponse_String = {
|
||||
data: string;
|
||||
/**
|
||||
* Optional message
|
||||
*/
|
||||
message?: string | null;
|
||||
};
|
||||
|
||||
37
web/src/api/models/ApiResponse_TokenResponse.ts
Normal file
37
web/src/api/models/ApiResponse_TokenResponse.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { UserInfo } from './UserInfo';
|
||||
/**
|
||||
* Standard API response wrapper
|
||||
*/
|
||||
export type ApiResponse_TokenResponse = {
|
||||
/**
|
||||
* Token response
|
||||
*/
|
||||
data: {
|
||||
/**
|
||||
* Access token (JWT)
|
||||
*/
|
||||
access_token: string;
|
||||
/**
|
||||
* Access token expiration in seconds
|
||||
*/
|
||||
expires_in: number;
|
||||
/**
|
||||
* Refresh token
|
||||
*/
|
||||
refresh_token: string;
|
||||
/**
|
||||
* Token type (always "Bearer")
|
||||
*/
|
||||
token_type: string;
|
||||
user?: (null | UserInfo);
|
||||
};
|
||||
/**
|
||||
* Optional message
|
||||
*/
|
||||
message?: string | null;
|
||||
};
|
||||
|
||||
75
web/src/api/models/ApiResponse_TriggerResponse.ts
Normal file
75
web/src/api/models/ApiResponse_TriggerResponse.ts
Normal file
@@ -0,0 +1,75 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Standard API response wrapper
|
||||
*/
|
||||
export type ApiResponse_TriggerResponse = {
|
||||
/**
|
||||
* Response DTO for trigger information
|
||||
*/
|
||||
data: {
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Trigger description
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
* Whether the trigger is enabled
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Trigger ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Whether this is an ad-hoc trigger (not from pack installation)
|
||||
*/
|
||||
is_adhoc: boolean;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Output schema
|
||||
*/
|
||||
out_schema: any | null;
|
||||
/**
|
||||
* Pack ID (optional)
|
||||
*/
|
||||
pack?: number | null;
|
||||
/**
|
||||
* Pack reference (optional)
|
||||
*/
|
||||
pack_ref?: string | null;
|
||||
/**
|
||||
* Parameter schema
|
||||
*/
|
||||
param_schema: any | null;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
/**
|
||||
* Whether webhooks are enabled for this trigger
|
||||
*/
|
||||
webhook_enabled: boolean;
|
||||
/**
|
||||
* Webhook key (only present if webhooks are enabled)
|
||||
*/
|
||||
webhook_key?: string | null;
|
||||
};
|
||||
/**
|
||||
* Optional message
|
||||
*/
|
||||
message?: string | null;
|
||||
};
|
||||
|
||||
35
web/src/api/models/ApiResponse_WebhookReceiverResponse.ts
Normal file
35
web/src/api/models/ApiResponse_WebhookReceiverResponse.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Standard API response wrapper
|
||||
*/
|
||||
export type ApiResponse_WebhookReceiverResponse = {
|
||||
/**
|
||||
* Response from webhook receiver endpoint
|
||||
*/
|
||||
data: {
|
||||
/**
|
||||
* ID of the event created from this webhook
|
||||
*/
|
||||
event_id: number;
|
||||
/**
|
||||
* Success message
|
||||
*/
|
||||
message: string;
|
||||
/**
|
||||
* Timestamp when the webhook was received
|
||||
*/
|
||||
received_at: string;
|
||||
/**
|
||||
* Reference of the trigger that received this webhook
|
||||
*/
|
||||
trigger_ref: string;
|
||||
};
|
||||
/**
|
||||
* Optional message
|
||||
*/
|
||||
message?: string | null;
|
||||
};
|
||||
|
||||
75
web/src/api/models/ApiResponse_WorkflowResponse.ts
Normal file
75
web/src/api/models/ApiResponse_WorkflowResponse.ts
Normal file
@@ -0,0 +1,75 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Standard API response wrapper
|
||||
*/
|
||||
export type ApiResponse_WorkflowResponse = {
|
||||
/**
|
||||
* Response DTO for workflow information
|
||||
*/
|
||||
data: {
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Workflow definition
|
||||
*/
|
||||
definition: Record<string, any>;
|
||||
/**
|
||||
* Workflow description
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
* Whether the workflow is enabled
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Workflow ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Output schema
|
||||
*/
|
||||
out_schema: any | null;
|
||||
/**
|
||||
* Pack ID
|
||||
*/
|
||||
pack: number;
|
||||
/**
|
||||
* Pack reference
|
||||
*/
|
||||
pack_ref: string;
|
||||
/**
|
||||
* Parameter schema
|
||||
*/
|
||||
param_schema: any | null;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Tags
|
||||
*/
|
||||
tags: Array<string>;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
/**
|
||||
* Workflow version
|
||||
*/
|
||||
version: string;
|
||||
};
|
||||
/**
|
||||
* Optional message
|
||||
*/
|
||||
message?: string | null;
|
||||
};
|
||||
|
||||
18
web/src/api/models/ChangePasswordRequest.ts
Normal file
18
web/src/api/models/ChangePasswordRequest.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Change password request
|
||||
*/
|
||||
export type ChangePasswordRequest = {
|
||||
/**
|
||||
* Current password
|
||||
*/
|
||||
current_password: string;
|
||||
/**
|
||||
* New password
|
||||
*/
|
||||
new_password: string;
|
||||
};
|
||||
|
||||
42
web/src/api/models/CreateActionRequest.ts
Normal file
42
web/src/api/models/CreateActionRequest.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Request DTO for creating a new action
|
||||
*/
|
||||
export type CreateActionRequest = {
|
||||
/**
|
||||
* Action description
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Entry point for action execution (e.g., path to script, function name)
|
||||
*/
|
||||
entrypoint: string;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Output schema (JSON Schema) defining expected outputs
|
||||
*/
|
||||
out_schema?: any | null;
|
||||
/**
|
||||
* Pack reference this action belongs to
|
||||
*/
|
||||
pack_ref: string;
|
||||
/**
|
||||
* Parameter schema (JSON Schema) defining expected inputs
|
||||
*/
|
||||
param_schema?: any | null;
|
||||
/**
|
||||
* Unique reference identifier (e.g., "core.http", "aws.ec2.start_instance")
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Optional runtime ID for this action
|
||||
*/
|
||||
runtime?: number | null;
|
||||
};
|
||||
|
||||
28
web/src/api/models/CreateInquiryRequest.ts
Normal file
28
web/src/api/models/CreateInquiryRequest.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { i64 } from './i64';
|
||||
/**
|
||||
* Request to create a new inquiry
|
||||
*/
|
||||
export type CreateInquiryRequest = {
|
||||
assigned_to?: (null | i64);
|
||||
/**
|
||||
* Execution ID this inquiry belongs to
|
||||
*/
|
||||
execution: i64;
|
||||
/**
|
||||
* Prompt text to display to the user
|
||||
*/
|
||||
prompt: string;
|
||||
/**
|
||||
* Optional JSON schema for the expected response format
|
||||
*/
|
||||
response_schema: Record<string, any>;
|
||||
/**
|
||||
* Optional timeout timestamp (when inquiry expires)
|
||||
*/
|
||||
timeout_at?: string | null;
|
||||
};
|
||||
|
||||
52
web/src/api/models/CreateKeyRequest.ts
Normal file
52
web/src/api/models/CreateKeyRequest.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { i64 } from './i64';
|
||||
import type { OwnerType } from './OwnerType';
|
||||
/**
|
||||
* Request to create a new key/secret
|
||||
*/
|
||||
export type CreateKeyRequest = {
|
||||
/**
|
||||
* Whether to encrypt the value (recommended: true)
|
||||
*/
|
||||
encrypted?: boolean;
|
||||
/**
|
||||
* Human-readable name for the key
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Optional owner string identifier
|
||||
*/
|
||||
owner?: string | null;
|
||||
owner_action?: (null | i64);
|
||||
/**
|
||||
* Optional owner action reference
|
||||
*/
|
||||
owner_action_ref?: string | null;
|
||||
owner_identity?: (null | i64);
|
||||
owner_pack?: (null | i64);
|
||||
/**
|
||||
* Optional owner pack reference
|
||||
*/
|
||||
owner_pack_ref?: string | null;
|
||||
owner_sensor?: (null | i64);
|
||||
/**
|
||||
* Optional owner sensor reference
|
||||
*/
|
||||
owner_sensor_ref?: string | null;
|
||||
/**
|
||||
* Type of owner (system, identity, pack, action, sensor)
|
||||
*/
|
||||
owner_type: OwnerType;
|
||||
/**
|
||||
* Unique reference for the key (e.g., "github_token", "aws_secret_key")
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* The secret value to store
|
||||
*/
|
||||
value: string;
|
||||
};
|
||||
|
||||
50
web/src/api/models/CreatePackRequest.ts
Normal file
50
web/src/api/models/CreatePackRequest.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Request DTO for creating a new pack
|
||||
*/
|
||||
export type CreatePackRequest = {
|
||||
/**
|
||||
* Configuration schema (JSON Schema)
|
||||
*/
|
||||
conf_schema?: Record<string, any>;
|
||||
/**
|
||||
* Pack configuration values
|
||||
*/
|
||||
config?: Record<string, any>;
|
||||
/**
|
||||
* Pack description
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
* Whether this is a standard/built-in pack
|
||||
*/
|
||||
is_standard?: boolean;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Pack metadata
|
||||
*/
|
||||
meta?: Record<string, any>;
|
||||
/**
|
||||
* Unique reference identifier (e.g., "core", "aws", "slack")
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Runtime dependencies (refs of required packs)
|
||||
*/
|
||||
runtime_deps?: Array<string>;
|
||||
/**
|
||||
* Tags for categorization
|
||||
*/
|
||||
tags?: Array<string>;
|
||||
/**
|
||||
* Pack version (semver format recommended)
|
||||
*/
|
||||
version: string;
|
||||
};
|
||||
|
||||
50
web/src/api/models/CreateRuleRequest.ts
Normal file
50
web/src/api/models/CreateRuleRequest.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Request DTO for creating a new rule
|
||||
*/
|
||||
export type CreateRuleRequest = {
|
||||
/**
|
||||
* Parameters to pass to the action when rule is triggered
|
||||
*/
|
||||
action_params?: Record<string, any>;
|
||||
/**
|
||||
* Action reference to execute when rule matches
|
||||
*/
|
||||
action_ref: string;
|
||||
/**
|
||||
* Conditions for rule evaluation (JSON Logic or custom format)
|
||||
*/
|
||||
conditions?: Record<string, any>;
|
||||
/**
|
||||
* Rule description
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Whether the rule is enabled
|
||||
*/
|
||||
enabled?: boolean;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Pack reference this rule belongs to
|
||||
*/
|
||||
pack_ref: string;
|
||||
/**
|
||||
* Unique reference identifier (e.g., "mypack.notify_on_error")
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Parameters for trigger configuration and event filtering
|
||||
*/
|
||||
trigger_params?: Record<string, any>;
|
||||
/**
|
||||
* Trigger reference that activates this rule
|
||||
*/
|
||||
trigger_ref: string;
|
||||
};
|
||||
|
||||
50
web/src/api/models/CreateSensorRequest.ts
Normal file
50
web/src/api/models/CreateSensorRequest.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Request DTO for creating a new sensor
|
||||
*/
|
||||
export type CreateSensorRequest = {
|
||||
/**
|
||||
* Configuration values for this sensor instance (conforms to param_schema)
|
||||
*/
|
||||
config?: any | null;
|
||||
/**
|
||||
* Sensor description
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Whether the sensor is enabled
|
||||
*/
|
||||
enabled?: boolean;
|
||||
/**
|
||||
* Entry point for sensor execution (e.g., path to script, function name)
|
||||
*/
|
||||
entrypoint: string;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Pack reference this sensor belongs to
|
||||
*/
|
||||
pack_ref: string;
|
||||
/**
|
||||
* Parameter schema (JSON Schema) for sensor configuration
|
||||
*/
|
||||
param_schema?: any | null;
|
||||
/**
|
||||
* Unique reference identifier (e.g., "mypack.cpu_monitor")
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Runtime reference for this sensor
|
||||
*/
|
||||
runtime_ref: string;
|
||||
/**
|
||||
* Trigger reference this sensor monitors for
|
||||
*/
|
||||
trigger_ref: string;
|
||||
};
|
||||
|
||||
38
web/src/api/models/CreateTriggerRequest.ts
Normal file
38
web/src/api/models/CreateTriggerRequest.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Request DTO for creating a new trigger
|
||||
*/
|
||||
export type CreateTriggerRequest = {
|
||||
/**
|
||||
* Trigger description
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
* Whether the trigger is enabled
|
||||
*/
|
||||
enabled?: boolean;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Output schema (JSON Schema) defining event data structure
|
||||
*/
|
||||
out_schema?: any | null;
|
||||
/**
|
||||
* Optional pack reference this trigger belongs to
|
||||
*/
|
||||
pack_ref?: string | null;
|
||||
/**
|
||||
* Parameter schema (JSON Schema) defining event payload structure
|
||||
*/
|
||||
param_schema?: any | null;
|
||||
/**
|
||||
* Unique reference identifier (e.g., "core.webhook", "system.timer")
|
||||
*/
|
||||
ref: string;
|
||||
};
|
||||
|
||||
50
web/src/api/models/CreateWorkflowRequest.ts
Normal file
50
web/src/api/models/CreateWorkflowRequest.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Request DTO for creating a new workflow
|
||||
*/
|
||||
export type CreateWorkflowRequest = {
|
||||
/**
|
||||
* Workflow definition (complete workflow YAML structure as JSON)
|
||||
*/
|
||||
definition: Record<string, any>;
|
||||
/**
|
||||
* Workflow description
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
* Whether the workflow is enabled
|
||||
*/
|
||||
enabled?: boolean | null;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Output schema (JSON Schema) defining expected outputs
|
||||
*/
|
||||
out_schema: Record<string, any>;
|
||||
/**
|
||||
* Pack reference this workflow belongs to
|
||||
*/
|
||||
pack_ref: string;
|
||||
/**
|
||||
* Parameter schema (JSON Schema) defining expected inputs
|
||||
*/
|
||||
param_schema: Record<string, any>;
|
||||
/**
|
||||
* Unique reference identifier (e.g., "core.notify_on_failure", "slack.incident_workflow")
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Tags for categorization and search
|
||||
*/
|
||||
tags?: any[] | null;
|
||||
/**
|
||||
* Workflow version (semantic versioning recommended)
|
||||
*/
|
||||
version: string;
|
||||
};
|
||||
|
||||
22
web/src/api/models/CurrentUserResponse.ts
Normal file
22
web/src/api/models/CurrentUserResponse.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Current user response
|
||||
*/
|
||||
export type CurrentUserResponse = {
|
||||
/**
|
||||
* Display name
|
||||
*/
|
||||
display_name?: string | null;
|
||||
/**
|
||||
* Identity ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Identity login
|
||||
*/
|
||||
login: string;
|
||||
};
|
||||
|
||||
8
web/src/api/models/EnforcementCondition.ts
Normal file
8
web/src/api/models/EnforcementCondition.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export enum EnforcementCondition {
|
||||
ANY = 'any',
|
||||
ALL = 'all',
|
||||
}
|
||||
55
web/src/api/models/EnforcementResponse.ts
Normal file
55
web/src/api/models/EnforcementResponse.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { EnforcementCondition } from './EnforcementCondition';
|
||||
import type { EnforcementStatus } from './EnforcementStatus';
|
||||
import type { i64 } from './i64';
|
||||
/**
|
||||
* Full enforcement response with all details
|
||||
*/
|
||||
export type EnforcementResponse = {
|
||||
/**
|
||||
* Enforcement condition
|
||||
*/
|
||||
condition: EnforcementCondition;
|
||||
/**
|
||||
* Enforcement conditions (rule evaluation criteria)
|
||||
*/
|
||||
conditions: Record<string, any>;
|
||||
/**
|
||||
* Enforcement configuration
|
||||
*/
|
||||
config: any | null;
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
event?: (null | i64);
|
||||
/**
|
||||
* Enforcement ID
|
||||
*/
|
||||
id: i64;
|
||||
/**
|
||||
* Enforcement payload
|
||||
*/
|
||||
payload: Record<string, any>;
|
||||
rule?: (null | i64);
|
||||
/**
|
||||
* Rule reference
|
||||
*/
|
||||
rule_ref: string;
|
||||
/**
|
||||
* Enforcement status
|
||||
*/
|
||||
status: EnforcementStatus;
|
||||
/**
|
||||
* Trigger reference
|
||||
*/
|
||||
trigger_ref: string;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
};
|
||||
|
||||
9
web/src/api/models/EnforcementStatus.ts
Normal file
9
web/src/api/models/EnforcementStatus.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export enum EnforcementStatus {
|
||||
CREATED = 'created',
|
||||
PROCESSED = 'processed',
|
||||
DISABLED = 'disabled',
|
||||
}
|
||||
39
web/src/api/models/EnforcementSummary.ts
Normal file
39
web/src/api/models/EnforcementSummary.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { EnforcementCondition } from './EnforcementCondition';
|
||||
import type { EnforcementStatus } from './EnforcementStatus';
|
||||
import type { i64 } from './i64';
|
||||
/**
|
||||
* Summary enforcement response for list views
|
||||
*/
|
||||
export type EnforcementSummary = {
|
||||
/**
|
||||
* Enforcement condition
|
||||
*/
|
||||
condition: EnforcementCondition;
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
event?: (null | i64);
|
||||
/**
|
||||
* Enforcement ID
|
||||
*/
|
||||
id: i64;
|
||||
rule?: (null | i64);
|
||||
/**
|
||||
* Rule reference
|
||||
*/
|
||||
rule_ref: string;
|
||||
/**
|
||||
* Enforcement status
|
||||
*/
|
||||
status: EnforcementStatus;
|
||||
/**
|
||||
* Trigger reference
|
||||
*/
|
||||
trigger_ref: string;
|
||||
};
|
||||
|
||||
46
web/src/api/models/EventResponse.ts
Normal file
46
web/src/api/models/EventResponse.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { i64 } from './i64';
|
||||
/**
|
||||
* Full event response with all details
|
||||
*/
|
||||
export type EventResponse = {
|
||||
/**
|
||||
* Event configuration
|
||||
*/
|
||||
config: any | null;
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Event ID
|
||||
*/
|
||||
id: i64;
|
||||
/**
|
||||
* Event payload data
|
||||
*/
|
||||
payload: Record<string, any>;
|
||||
rule?: (null | i64);
|
||||
/**
|
||||
* Rule reference (if event was generated by a specific rule)
|
||||
*/
|
||||
rule_ref?: string | null;
|
||||
source?: (null | i64);
|
||||
/**
|
||||
* Source reference
|
||||
*/
|
||||
source_ref?: string | null;
|
||||
trigger?: (null | i64);
|
||||
/**
|
||||
* Trigger reference
|
||||
*/
|
||||
trigger_ref: string;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
};
|
||||
|
||||
38
web/src/api/models/EventSummary.ts
Normal file
38
web/src/api/models/EventSummary.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { i64 } from './i64';
|
||||
/**
|
||||
* Summary event response for list views
|
||||
*/
|
||||
export type EventSummary = {
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Whether event has payload data
|
||||
*/
|
||||
has_payload: boolean;
|
||||
/**
|
||||
* Event ID
|
||||
*/
|
||||
id: i64;
|
||||
rule?: (null | i64);
|
||||
/**
|
||||
* Rule reference (if event was generated by a specific rule)
|
||||
*/
|
||||
rule_ref?: string | null;
|
||||
source?: (null | i64);
|
||||
/**
|
||||
* Source reference
|
||||
*/
|
||||
source_ref?: string | null;
|
||||
trigger?: (null | i64);
|
||||
/**
|
||||
* Trigger reference
|
||||
*/
|
||||
trigger_ref: string;
|
||||
};
|
||||
|
||||
55
web/src/api/models/ExecutionResponse.ts
Normal file
55
web/src/api/models/ExecutionResponse.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ExecutionStatus } from './ExecutionStatus';
|
||||
/**
|
||||
* Response DTO for execution information
|
||||
*/
|
||||
export type ExecutionResponse = {
|
||||
/**
|
||||
* Action ID (optional, may be null for ad-hoc executions)
|
||||
*/
|
||||
action?: number | null;
|
||||
/**
|
||||
* Action reference
|
||||
*/
|
||||
action_ref: string;
|
||||
/**
|
||||
* Execution configuration/parameters
|
||||
*/
|
||||
config: Record<string, any>;
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Enforcement ID (rule enforcement that triggered this)
|
||||
*/
|
||||
enforcement?: number | null;
|
||||
/**
|
||||
* Executor ID (worker/executor that ran this)
|
||||
*/
|
||||
executor?: number | null;
|
||||
/**
|
||||
* Execution ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Parent execution ID (for nested/child executions)
|
||||
*/
|
||||
parent?: number | null;
|
||||
/**
|
||||
* Execution result/output
|
||||
*/
|
||||
result: Record<string, any>;
|
||||
/**
|
||||
* Execution status
|
||||
*/
|
||||
status: ExecutionStatus;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
};
|
||||
|
||||
16
web/src/api/models/ExecutionStatus.ts
Normal file
16
web/src/api/models/ExecutionStatus.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export enum ExecutionStatus {
|
||||
REQUESTED = 'requested',
|
||||
SCHEDULING = 'scheduling',
|
||||
SCHEDULED = 'scheduled',
|
||||
RUNNING = 'running',
|
||||
COMPLETED = 'completed',
|
||||
FAILED = 'failed',
|
||||
CANCELING = 'canceling',
|
||||
CANCELLED = 'cancelled',
|
||||
TIMEOUT = 'timeout',
|
||||
ABANDONED = 'abandoned',
|
||||
}
|
||||
47
web/src/api/models/ExecutionSummary.ts
Normal file
47
web/src/api/models/ExecutionSummary.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ExecutionStatus } from './ExecutionStatus';
|
||||
/**
|
||||
* Simplified execution response (for list endpoints)
|
||||
*/
|
||||
export type ExecutionSummary = {
|
||||
/**
|
||||
* Action reference
|
||||
*/
|
||||
action_ref: string;
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Enforcement ID
|
||||
*/
|
||||
enforcement?: number | null;
|
||||
/**
|
||||
* Execution ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Parent execution ID
|
||||
*/
|
||||
parent?: number | null;
|
||||
/**
|
||||
* Rule reference (if triggered by a rule)
|
||||
*/
|
||||
rule_ref?: string | null;
|
||||
/**
|
||||
* Execution status
|
||||
*/
|
||||
status: ExecutionStatus;
|
||||
/**
|
||||
* Trigger reference (if triggered by a trigger)
|
||||
*/
|
||||
trigger_ref?: string | null;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
};
|
||||
|
||||
22
web/src/api/models/HealthResponse.ts
Normal file
22
web/src/api/models/HealthResponse.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Health check response
|
||||
*/
|
||||
export type HealthResponse = {
|
||||
/**
|
||||
* Database connectivity status
|
||||
*/
|
||||
database: string;
|
||||
/**
|
||||
* Service status
|
||||
*/
|
||||
status: string;
|
||||
/**
|
||||
* Service version
|
||||
*/
|
||||
version: string;
|
||||
};
|
||||
|
||||
14
web/src/api/models/InquiryRespondRequest.ts
Normal file
14
web/src/api/models/InquiryRespondRequest.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Request to respond to an inquiry (user-facing endpoint)
|
||||
*/
|
||||
export type InquiryRespondRequest = {
|
||||
/**
|
||||
* Response data conforming to the inquiry's response_schema
|
||||
*/
|
||||
response: Record<string, any>;
|
||||
};
|
||||
|
||||
53
web/src/api/models/InquiryResponse.ts
Normal file
53
web/src/api/models/InquiryResponse.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { i64 } from './i64';
|
||||
import type { InquiryStatus } from './InquiryStatus';
|
||||
/**
|
||||
* Full inquiry response with all details
|
||||
*/
|
||||
export type InquiryResponse = {
|
||||
assigned_to?: (null | i64);
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Execution ID this inquiry belongs to
|
||||
*/
|
||||
execution: i64;
|
||||
/**
|
||||
* Inquiry ID
|
||||
*/
|
||||
id: i64;
|
||||
/**
|
||||
* Prompt text displayed to the user
|
||||
*/
|
||||
prompt: string;
|
||||
/**
|
||||
* When the inquiry was responded to
|
||||
*/
|
||||
responded_at?: string | null;
|
||||
/**
|
||||
* Response data provided by the user
|
||||
*/
|
||||
response: any | null;
|
||||
/**
|
||||
* JSON schema for expected response
|
||||
*/
|
||||
response_schema: any | null;
|
||||
/**
|
||||
* Current status of the inquiry
|
||||
*/
|
||||
status: InquiryStatus;
|
||||
/**
|
||||
* When the inquiry expires
|
||||
*/
|
||||
timeout_at?: string | null;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
};
|
||||
|
||||
10
web/src/api/models/InquiryStatus.ts
Normal file
10
web/src/api/models/InquiryStatus.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export enum InquiryStatus {
|
||||
PENDING = 'pending',
|
||||
RESPONDED = 'responded',
|
||||
TIMEOUT = 'timeout',
|
||||
CANCELLED = 'cancelled',
|
||||
}
|
||||
41
web/src/api/models/InquirySummary.ts
Normal file
41
web/src/api/models/InquirySummary.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { i64 } from './i64';
|
||||
import type { InquiryStatus } from './InquiryStatus';
|
||||
/**
|
||||
* Summary inquiry response for list views
|
||||
*/
|
||||
export type InquirySummary = {
|
||||
assigned_to?: (null | i64);
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Execution ID
|
||||
*/
|
||||
execution: i64;
|
||||
/**
|
||||
* Whether a response has been provided
|
||||
*/
|
||||
has_response: boolean;
|
||||
/**
|
||||
* Inquiry ID
|
||||
*/
|
||||
id: i64;
|
||||
/**
|
||||
* Prompt text
|
||||
*/
|
||||
prompt: string;
|
||||
/**
|
||||
* Inquiry status
|
||||
*/
|
||||
status: InquiryStatus;
|
||||
/**
|
||||
* Timeout timestamp
|
||||
*/
|
||||
timeout_at?: string | null;
|
||||
};
|
||||
|
||||
30
web/src/api/models/InstallPackRequest.ts
Normal file
30
web/src/api/models/InstallPackRequest.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Request DTO for installing a pack from remote source
|
||||
*/
|
||||
export type InstallPackRequest = {
|
||||
/**
|
||||
* Force reinstall if pack already exists
|
||||
*/
|
||||
force?: boolean;
|
||||
/**
|
||||
* Git branch, tag, or commit reference
|
||||
*/
|
||||
ref_spec?: string | null;
|
||||
/**
|
||||
* Skip dependency validation (not recommended)
|
||||
*/
|
||||
skip_deps?: boolean;
|
||||
/**
|
||||
* Skip running pack tests during installation
|
||||
*/
|
||||
skip_tests?: boolean;
|
||||
/**
|
||||
* Repository URL or source location
|
||||
*/
|
||||
source: string;
|
||||
};
|
||||
|
||||
64
web/src/api/models/KeyResponse.ts
Normal file
64
web/src/api/models/KeyResponse.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { i64 } from './i64';
|
||||
import type { OwnerType } from './OwnerType';
|
||||
/**
|
||||
* Full key response with all details (value redacted in list views)
|
||||
*/
|
||||
export type KeyResponse = {
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Whether the value is encrypted
|
||||
*/
|
||||
encrypted: boolean;
|
||||
/**
|
||||
* Unique key ID
|
||||
*/
|
||||
id: i64;
|
||||
/**
|
||||
* Human-readable name
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner identifier
|
||||
*/
|
||||
owner?: string | null;
|
||||
owner_action?: (null | i64);
|
||||
/**
|
||||
* Owner action reference
|
||||
*/
|
||||
owner_action_ref?: string | null;
|
||||
owner_identity?: (null | i64);
|
||||
owner_pack?: (null | i64);
|
||||
/**
|
||||
* Owner pack reference
|
||||
*/
|
||||
owner_pack_ref?: string | null;
|
||||
owner_sensor?: (null | i64);
|
||||
/**
|
||||
* Owner sensor reference
|
||||
*/
|
||||
owner_sensor_ref?: string | null;
|
||||
/**
|
||||
* Type of owner
|
||||
*/
|
||||
owner_type: OwnerType;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
/**
|
||||
* The secret value (decrypted if encrypted)
|
||||
*/
|
||||
value: string;
|
||||
};
|
||||
|
||||
40
web/src/api/models/KeySummary.ts
Normal file
40
web/src/api/models/KeySummary.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { i64 } from './i64';
|
||||
import type { OwnerType } from './OwnerType';
|
||||
/**
|
||||
* Summary key response for list views (value redacted)
|
||||
*/
|
||||
export type KeySummary = {
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Whether the value is encrypted
|
||||
*/
|
||||
encrypted: boolean;
|
||||
/**
|
||||
* Unique key ID
|
||||
*/
|
||||
id: i64;
|
||||
/**
|
||||
* Human-readable name
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner identifier
|
||||
*/
|
||||
owner?: string | null;
|
||||
/**
|
||||
* Type of owner
|
||||
*/
|
||||
owner_type: OwnerType;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
};
|
||||
|
||||
18
web/src/api/models/LoginRequest.ts
Normal file
18
web/src/api/models/LoginRequest.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Login request
|
||||
*/
|
||||
export type LoginRequest = {
|
||||
/**
|
||||
* Identity login (username)
|
||||
*/
|
||||
login: string;
|
||||
/**
|
||||
* Password
|
||||
*/
|
||||
password: string;
|
||||
};
|
||||
|
||||
11
web/src/api/models/OwnerType.ts
Normal file
11
web/src/api/models/OwnerType.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export enum OwnerType {
|
||||
SYSTEM = 'system',
|
||||
IDENTITY = 'identity',
|
||||
PACK = 'pack',
|
||||
ACTION = 'action',
|
||||
SENSOR = 'sensor',
|
||||
}
|
||||
21
web/src/api/models/PackInstallResponse.ts
Normal file
21
web/src/api/models/PackInstallResponse.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { PackResponse } from './PackResponse';
|
||||
import type { PackTestResult } from './PackTestResult';
|
||||
/**
|
||||
* Response for pack install/register operations with test results
|
||||
*/
|
||||
export type PackInstallResponse = {
|
||||
/**
|
||||
* The installed/registered pack
|
||||
*/
|
||||
pack: PackResponse;
|
||||
test_result?: (null | PackTestResult);
|
||||
/**
|
||||
* Whether tests were skipped
|
||||
*/
|
||||
tests_skipped: boolean;
|
||||
};
|
||||
|
||||
62
web/src/api/models/PackResponse.ts
Normal file
62
web/src/api/models/PackResponse.ts
Normal file
@@ -0,0 +1,62 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Response DTO for pack information
|
||||
*/
|
||||
export type PackResponse = {
|
||||
/**
|
||||
* Configuration schema
|
||||
*/
|
||||
conf_schema: Record<string, any>;
|
||||
/**
|
||||
* Pack configuration
|
||||
*/
|
||||
config: Record<string, any>;
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Pack description
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
* Pack ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Is standard pack
|
||||
*/
|
||||
is_standard: boolean;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Pack metadata
|
||||
*/
|
||||
meta: Record<string, any>;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Runtime dependencies
|
||||
*/
|
||||
runtime_deps: Array<string>;
|
||||
/**
|
||||
* Tags
|
||||
*/
|
||||
tags: Array<string>;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
/**
|
||||
* Pack version
|
||||
*/
|
||||
version: string;
|
||||
};
|
||||
|
||||
46
web/src/api/models/PackSummary.ts
Normal file
46
web/src/api/models/PackSummary.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Simplified pack response (for list endpoints)
|
||||
*/
|
||||
export type PackSummary = {
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Pack description
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
* Pack ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Is standard pack
|
||||
*/
|
||||
is_standard: boolean;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Tags
|
||||
*/
|
||||
tags: Array<string>;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
/**
|
||||
* Pack version
|
||||
*/
|
||||
version: string;
|
||||
};
|
||||
|
||||
25
web/src/api/models/PackTestExecution.ts
Normal file
25
web/src/api/models/PackTestExecution.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { i64 } from './i64';
|
||||
import type { Value } from './Value';
|
||||
/**
|
||||
* Pack test execution record
|
||||
*/
|
||||
export type PackTestExecution = {
|
||||
created: string;
|
||||
durationMs: number;
|
||||
executionTime: string;
|
||||
failed: number;
|
||||
id: i64;
|
||||
packId: i64;
|
||||
packVersion: string;
|
||||
passRate: number;
|
||||
passed: number;
|
||||
result: Value;
|
||||
skipped: number;
|
||||
totalTests: number;
|
||||
triggerReason: string;
|
||||
};
|
||||
|
||||
22
web/src/api/models/PackTestResult.ts
Normal file
22
web/src/api/models/PackTestResult.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { TestSuiteResult } from './TestSuiteResult';
|
||||
/**
|
||||
* Pack test result structure (not from DB, used for test execution)
|
||||
*/
|
||||
export type PackTestResult = {
|
||||
durationMs: number;
|
||||
executionTime: string;
|
||||
failed: number;
|
||||
packRef: string;
|
||||
packVersion: string;
|
||||
passRate: number;
|
||||
passed: number;
|
||||
skipped: number;
|
||||
status: string;
|
||||
testSuites: Array<TestSuiteResult>;
|
||||
totalTests: number;
|
||||
};
|
||||
|
||||
24
web/src/api/models/PackTestSummary.ts
Normal file
24
web/src/api/models/PackTestSummary.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { i64 } from './i64';
|
||||
/**
|
||||
* Pack test summary view
|
||||
*/
|
||||
export type PackTestSummary = {
|
||||
durationMs: number;
|
||||
failed: number;
|
||||
packId: i64;
|
||||
packLabel: string;
|
||||
packRef: string;
|
||||
packVersion: string;
|
||||
passRate: number;
|
||||
passed: number;
|
||||
skipped: number;
|
||||
testExecutionId: i64;
|
||||
testTime: string;
|
||||
totalTests: number;
|
||||
triggerReason: string;
|
||||
};
|
||||
|
||||
31
web/src/api/models/PackWorkflowSyncResponse.ts
Normal file
31
web/src/api/models/PackWorkflowSyncResponse.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { WorkflowSyncResult } from './WorkflowSyncResult';
|
||||
/**
|
||||
* Response for pack workflow sync operation
|
||||
*/
|
||||
export type PackWorkflowSyncResponse = {
|
||||
/**
|
||||
* Any errors encountered during sync
|
||||
*/
|
||||
errors: Array<string>;
|
||||
/**
|
||||
* Number of workflows loaded from filesystem
|
||||
*/
|
||||
loaded_count: number;
|
||||
/**
|
||||
* Pack reference
|
||||
*/
|
||||
pack_ref: string;
|
||||
/**
|
||||
* Number of workflows registered/updated in database
|
||||
*/
|
||||
registered_count: number;
|
||||
/**
|
||||
* Individual workflow registration results
|
||||
*/
|
||||
workflows: Array<WorkflowSyncResult>;
|
||||
};
|
||||
|
||||
26
web/src/api/models/PackWorkflowValidationResponse.ts
Normal file
26
web/src/api/models/PackWorkflowValidationResponse.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Response for pack workflow validation operation
|
||||
*/
|
||||
export type PackWorkflowValidationResponse = {
|
||||
/**
|
||||
* Number of workflows with errors
|
||||
*/
|
||||
error_count: number;
|
||||
/**
|
||||
* Validation errors by workflow reference
|
||||
*/
|
||||
errors: Record<string, Array<string>>;
|
||||
/**
|
||||
* Pack reference
|
||||
*/
|
||||
pack_ref: string;
|
||||
/**
|
||||
* Number of workflows validated
|
||||
*/
|
||||
validated_count: number;
|
||||
};
|
||||
|
||||
56
web/src/api/models/PaginatedResponse_ActionSummary.ts
Normal file
56
web/src/api/models/PaginatedResponse_ActionSummary.ts
Normal file
@@ -0,0 +1,56 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { PaginationMeta } from './PaginationMeta';
|
||||
/**
|
||||
* Paginated response wrapper
|
||||
*/
|
||||
export type PaginatedResponse_ActionSummary = {
|
||||
/**
|
||||
* The data items
|
||||
*/
|
||||
data: Array<{
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Action description
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Entry point
|
||||
*/
|
||||
entrypoint: string;
|
||||
/**
|
||||
* Action ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Pack reference
|
||||
*/
|
||||
pack_ref: string;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Runtime ID
|
||||
*/
|
||||
runtime?: number | null;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
}>;
|
||||
/**
|
||||
* Pagination metadata
|
||||
*/
|
||||
pagination: PaginationMeta;
|
||||
};
|
||||
|
||||
49
web/src/api/models/PaginatedResponse_EnforcementSummary.ts
Normal file
49
web/src/api/models/PaginatedResponse_EnforcementSummary.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { EnforcementCondition } from './EnforcementCondition';
|
||||
import type { EnforcementStatus } from './EnforcementStatus';
|
||||
import type { i64 } from './i64';
|
||||
import type { PaginationMeta } from './PaginationMeta';
|
||||
/**
|
||||
* Paginated response wrapper
|
||||
*/
|
||||
export type PaginatedResponse_EnforcementSummary = {
|
||||
/**
|
||||
* The data items
|
||||
*/
|
||||
data: Array<{
|
||||
/**
|
||||
* Enforcement condition
|
||||
*/
|
||||
condition: EnforcementCondition;
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
event?: (null | i64);
|
||||
/**
|
||||
* Enforcement ID
|
||||
*/
|
||||
id: i64;
|
||||
rule?: (null | i64);
|
||||
/**
|
||||
* Rule reference
|
||||
*/
|
||||
rule_ref: string;
|
||||
/**
|
||||
* Enforcement status
|
||||
*/
|
||||
status: EnforcementStatus;
|
||||
/**
|
||||
* Trigger reference
|
||||
*/
|
||||
trigger_ref: string;
|
||||
}>;
|
||||
/**
|
||||
* Pagination metadata
|
||||
*/
|
||||
pagination: PaginationMeta;
|
||||
};
|
||||
|
||||
48
web/src/api/models/PaginatedResponse_EventSummary.ts
Normal file
48
web/src/api/models/PaginatedResponse_EventSummary.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { i64 } from './i64';
|
||||
import type { PaginationMeta } from './PaginationMeta';
|
||||
/**
|
||||
* Paginated response wrapper
|
||||
*/
|
||||
export type PaginatedResponse_EventSummary = {
|
||||
/**
|
||||
* The data items
|
||||
*/
|
||||
data: Array<{
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Whether event has payload data
|
||||
*/
|
||||
has_payload: boolean;
|
||||
/**
|
||||
* Event ID
|
||||
*/
|
||||
id: i64;
|
||||
rule?: (null | i64);
|
||||
/**
|
||||
* Rule reference (if event was generated by a specific rule)
|
||||
*/
|
||||
rule_ref?: string | null;
|
||||
source?: (null | i64);
|
||||
/**
|
||||
* Source reference
|
||||
*/
|
||||
source_ref?: string | null;
|
||||
trigger?: (null | i64);
|
||||
/**
|
||||
* Trigger reference
|
||||
*/
|
||||
trigger_ref: string;
|
||||
}>;
|
||||
/**
|
||||
* Pagination metadata
|
||||
*/
|
||||
pagination: PaginationMeta;
|
||||
};
|
||||
|
||||
57
web/src/api/models/PaginatedResponse_ExecutionSummary.ts
Normal file
57
web/src/api/models/PaginatedResponse_ExecutionSummary.ts
Normal file
@@ -0,0 +1,57 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ExecutionStatus } from './ExecutionStatus';
|
||||
import type { PaginationMeta } from './PaginationMeta';
|
||||
/**
|
||||
* Paginated response wrapper
|
||||
*/
|
||||
export type PaginatedResponse_ExecutionSummary = {
|
||||
/**
|
||||
* The data items
|
||||
*/
|
||||
data: Array<{
|
||||
/**
|
||||
* Action reference
|
||||
*/
|
||||
action_ref: string;
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Enforcement ID
|
||||
*/
|
||||
enforcement?: number | null;
|
||||
/**
|
||||
* Execution ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Parent execution ID
|
||||
*/
|
||||
parent?: number | null;
|
||||
/**
|
||||
* Rule reference (if triggered by a rule)
|
||||
*/
|
||||
rule_ref?: string | null;
|
||||
/**
|
||||
* Execution status
|
||||
*/
|
||||
status: ExecutionStatus;
|
||||
/**
|
||||
* Trigger reference (if triggered by a trigger)
|
||||
*/
|
||||
trigger_ref?: string | null;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
}>;
|
||||
/**
|
||||
* Pagination metadata
|
||||
*/
|
||||
pagination: PaginationMeta;
|
||||
};
|
||||
|
||||
51
web/src/api/models/PaginatedResponse_InquirySummary.ts
Normal file
51
web/src/api/models/PaginatedResponse_InquirySummary.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { i64 } from './i64';
|
||||
import type { InquiryStatus } from './InquiryStatus';
|
||||
import type { PaginationMeta } from './PaginationMeta';
|
||||
/**
|
||||
* Paginated response wrapper
|
||||
*/
|
||||
export type PaginatedResponse_InquirySummary = {
|
||||
/**
|
||||
* The data items
|
||||
*/
|
||||
data: Array<{
|
||||
assigned_to?: (null | i64);
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Execution ID
|
||||
*/
|
||||
execution: i64;
|
||||
/**
|
||||
* Whether a response has been provided
|
||||
*/
|
||||
has_response: boolean;
|
||||
/**
|
||||
* Inquiry ID
|
||||
*/
|
||||
id: i64;
|
||||
/**
|
||||
* Prompt text
|
||||
*/
|
||||
prompt: string;
|
||||
/**
|
||||
* Inquiry status
|
||||
*/
|
||||
status: InquiryStatus;
|
||||
/**
|
||||
* Timeout timestamp
|
||||
*/
|
||||
timeout_at?: string | null;
|
||||
}>;
|
||||
/**
|
||||
* Pagination metadata
|
||||
*/
|
||||
pagination: PaginationMeta;
|
||||
};
|
||||
|
||||
50
web/src/api/models/PaginatedResponse_KeySummary.ts
Normal file
50
web/src/api/models/PaginatedResponse_KeySummary.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { i64 } from './i64';
|
||||
import type { OwnerType } from './OwnerType';
|
||||
import type { PaginationMeta } from './PaginationMeta';
|
||||
/**
|
||||
* Paginated response wrapper
|
||||
*/
|
||||
export type PaginatedResponse_KeySummary = {
|
||||
/**
|
||||
* The data items
|
||||
*/
|
||||
data: Array<{
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Whether the value is encrypted
|
||||
*/
|
||||
encrypted: boolean;
|
||||
/**
|
||||
* Unique key ID
|
||||
*/
|
||||
id: i64;
|
||||
/**
|
||||
* Human-readable name
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner identifier
|
||||
*/
|
||||
owner?: string | null;
|
||||
/**
|
||||
* Type of owner
|
||||
*/
|
||||
owner_type: OwnerType;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
}>;
|
||||
/**
|
||||
* Pagination metadata
|
||||
*/
|
||||
pagination: PaginationMeta;
|
||||
};
|
||||
|
||||
56
web/src/api/models/PaginatedResponse_PackSummary.ts
Normal file
56
web/src/api/models/PaginatedResponse_PackSummary.ts
Normal file
@@ -0,0 +1,56 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { PaginationMeta } from './PaginationMeta';
|
||||
/**
|
||||
* Paginated response wrapper
|
||||
*/
|
||||
export type PaginatedResponse_PackSummary = {
|
||||
/**
|
||||
* The data items
|
||||
*/
|
||||
data: Array<{
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Pack description
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
* Pack ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Is standard pack
|
||||
*/
|
||||
is_standard: boolean;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Tags
|
||||
*/
|
||||
tags: Array<string>;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
/**
|
||||
* Pack version
|
||||
*/
|
||||
version: string;
|
||||
}>;
|
||||
/**
|
||||
* Pagination metadata
|
||||
*/
|
||||
pagination: PaginationMeta;
|
||||
};
|
||||
|
||||
34
web/src/api/models/PaginatedResponse_PackTestSummary.ts
Normal file
34
web/src/api/models/PaginatedResponse_PackTestSummary.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { i64 } from './i64';
|
||||
import type { PaginationMeta } from './PaginationMeta';
|
||||
/**
|
||||
* Paginated response wrapper
|
||||
*/
|
||||
export type PaginatedResponse_PackTestSummary = {
|
||||
/**
|
||||
* The data items
|
||||
*/
|
||||
data: Array<{
|
||||
durationMs: number;
|
||||
failed: number;
|
||||
packId: i64;
|
||||
packLabel: string;
|
||||
packRef: string;
|
||||
packVersion: string;
|
||||
passRate: number;
|
||||
passed: number;
|
||||
skipped: number;
|
||||
testExecutionId: i64;
|
||||
testTime: string;
|
||||
totalTests: number;
|
||||
triggerReason: string;
|
||||
}>;
|
||||
/**
|
||||
* Pagination metadata
|
||||
*/
|
||||
pagination: PaginationMeta;
|
||||
};
|
||||
|
||||
68
web/src/api/models/PaginatedResponse_RuleSummary.ts
Normal file
68
web/src/api/models/PaginatedResponse_RuleSummary.ts
Normal file
@@ -0,0 +1,68 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { PaginationMeta } from './PaginationMeta';
|
||||
/**
|
||||
* Paginated response wrapper
|
||||
*/
|
||||
export type PaginatedResponse_RuleSummary = {
|
||||
/**
|
||||
* The data items
|
||||
*/
|
||||
data: Array<{
|
||||
/**
|
||||
* Parameters to pass to the action when rule is triggered
|
||||
*/
|
||||
action_params: Record<string, any>;
|
||||
/**
|
||||
* Action reference
|
||||
*/
|
||||
action_ref: string;
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Rule description
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Whether the rule is enabled
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Rule ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Pack reference
|
||||
*/
|
||||
pack_ref: string;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Parameters for trigger configuration and event filtering
|
||||
*/
|
||||
trigger_params: Record<string, any>;
|
||||
/**
|
||||
* Trigger reference
|
||||
*/
|
||||
trigger_ref: string;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
}>;
|
||||
/**
|
||||
* Pagination metadata
|
||||
*/
|
||||
pagination: PaginationMeta;
|
||||
};
|
||||
|
||||
56
web/src/api/models/PaginatedResponse_SensorSummary.ts
Normal file
56
web/src/api/models/PaginatedResponse_SensorSummary.ts
Normal file
@@ -0,0 +1,56 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { PaginationMeta } from './PaginationMeta';
|
||||
/**
|
||||
* Paginated response wrapper
|
||||
*/
|
||||
export type PaginatedResponse_SensorSummary = {
|
||||
/**
|
||||
* The data items
|
||||
*/
|
||||
data: Array<{
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Sensor description
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Whether the sensor is enabled
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Sensor ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Pack reference (optional)
|
||||
*/
|
||||
pack_ref?: string | null;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Trigger reference
|
||||
*/
|
||||
trigger_ref: string;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
}>;
|
||||
/**
|
||||
* Pagination metadata
|
||||
*/
|
||||
pagination: PaginationMeta;
|
||||
};
|
||||
|
||||
56
web/src/api/models/PaginatedResponse_TriggerSummary.ts
Normal file
56
web/src/api/models/PaginatedResponse_TriggerSummary.ts
Normal file
@@ -0,0 +1,56 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { PaginationMeta } from './PaginationMeta';
|
||||
/**
|
||||
* Paginated response wrapper
|
||||
*/
|
||||
export type PaginatedResponse_TriggerSummary = {
|
||||
/**
|
||||
* The data items
|
||||
*/
|
||||
data: Array<{
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Trigger description
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
* Whether the trigger is enabled
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Trigger ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Pack reference (optional)
|
||||
*/
|
||||
pack_ref?: string | null;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
/**
|
||||
* Whether webhooks are enabled for this trigger
|
||||
*/
|
||||
webhook_enabled: boolean;
|
||||
}>;
|
||||
/**
|
||||
* Pagination metadata
|
||||
*/
|
||||
pagination: PaginationMeta;
|
||||
};
|
||||
|
||||
60
web/src/api/models/PaginatedResponse_WorkflowSummary.ts
Normal file
60
web/src/api/models/PaginatedResponse_WorkflowSummary.ts
Normal file
@@ -0,0 +1,60 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { PaginationMeta } from './PaginationMeta';
|
||||
/**
|
||||
* Paginated response wrapper
|
||||
*/
|
||||
export type PaginatedResponse_WorkflowSummary = {
|
||||
/**
|
||||
* The data items
|
||||
*/
|
||||
data: Array<{
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Workflow description
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
* Whether the workflow is enabled
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Workflow ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Pack reference
|
||||
*/
|
||||
pack_ref: string;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Tags
|
||||
*/
|
||||
tags: Array<string>;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
/**
|
||||
* Workflow version
|
||||
*/
|
||||
version: string;
|
||||
}>;
|
||||
/**
|
||||
* Pagination metadata
|
||||
*/
|
||||
pagination: PaginationMeta;
|
||||
};
|
||||
|
||||
26
web/src/api/models/PaginationMeta.ts
Normal file
26
web/src/api/models/PaginationMeta.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Pagination metadata
|
||||
*/
|
||||
export type PaginationMeta = {
|
||||
/**
|
||||
* Current page number (1-based)
|
||||
*/
|
||||
page: number;
|
||||
/**
|
||||
* Number of items per page
|
||||
*/
|
||||
page_size: number;
|
||||
/**
|
||||
* Total number of items
|
||||
*/
|
||||
total_items: number;
|
||||
/**
|
||||
* Total number of pages
|
||||
*/
|
||||
total_pages: number;
|
||||
};
|
||||
|
||||
46
web/src/api/models/QueueStatsResponse.ts
Normal file
46
web/src/api/models/QueueStatsResponse.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Response DTO for queue statistics
|
||||
*/
|
||||
export type QueueStatsResponse = {
|
||||
/**
|
||||
* Action ID
|
||||
*/
|
||||
action_id: number;
|
||||
/**
|
||||
* Action reference
|
||||
*/
|
||||
action_ref: string;
|
||||
/**
|
||||
* Number of currently running executions
|
||||
*/
|
||||
active_count: number;
|
||||
/**
|
||||
* Timestamp of last statistics update
|
||||
*/
|
||||
last_updated: string;
|
||||
/**
|
||||
* Maximum concurrent executions allowed
|
||||
*/
|
||||
max_concurrent: number;
|
||||
/**
|
||||
* Timestamp of oldest queued execution (if any)
|
||||
*/
|
||||
oldest_enqueued_at?: string | null;
|
||||
/**
|
||||
* Number of executions waiting in queue
|
||||
*/
|
||||
queue_length: number;
|
||||
/**
|
||||
* Total executions completed since queue creation
|
||||
*/
|
||||
total_completed: number;
|
||||
/**
|
||||
* Total executions enqueued since queue creation
|
||||
*/
|
||||
total_enqueued: number;
|
||||
};
|
||||
|
||||
14
web/src/api/models/RefreshTokenRequest.ts
Normal file
14
web/src/api/models/RefreshTokenRequest.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Refresh token request
|
||||
*/
|
||||
export type RefreshTokenRequest = {
|
||||
/**
|
||||
* Refresh token
|
||||
*/
|
||||
refresh_token: string;
|
||||
};
|
||||
|
||||
22
web/src/api/models/RegisterPackRequest.ts
Normal file
22
web/src/api/models/RegisterPackRequest.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Request DTO for registering a pack from local filesystem
|
||||
*/
|
||||
export type RegisterPackRequest = {
|
||||
/**
|
||||
* Force registration even if tests fail
|
||||
*/
|
||||
force?: boolean;
|
||||
/**
|
||||
* Local filesystem path to the pack directory
|
||||
*/
|
||||
path: string;
|
||||
/**
|
||||
* Skip running pack tests during registration
|
||||
*/
|
||||
skip_tests?: boolean;
|
||||
};
|
||||
|
||||
22
web/src/api/models/RegisterRequest.ts
Normal file
22
web/src/api/models/RegisterRequest.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Register request
|
||||
*/
|
||||
export type RegisterRequest = {
|
||||
/**
|
||||
* Display name (optional)
|
||||
*/
|
||||
display_name?: string | null;
|
||||
/**
|
||||
* Identity login (username)
|
||||
*/
|
||||
login: string;
|
||||
/**
|
||||
* Password
|
||||
*/
|
||||
password: string;
|
||||
};
|
||||
|
||||
78
web/src/api/models/RuleResponse.ts
Normal file
78
web/src/api/models/RuleResponse.ts
Normal file
@@ -0,0 +1,78 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Response DTO for rule information
|
||||
*/
|
||||
export type RuleResponse = {
|
||||
/**
|
||||
* Action ID
|
||||
*/
|
||||
action: number;
|
||||
/**
|
||||
* Parameters to pass to the action when rule is triggered
|
||||
*/
|
||||
action_params: Record<string, any>;
|
||||
/**
|
||||
* Action reference
|
||||
*/
|
||||
action_ref: string;
|
||||
/**
|
||||
* Conditions for rule evaluation
|
||||
*/
|
||||
conditions: Record<string, any>;
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Rule description
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Whether the rule is enabled
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Rule ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Whether this is an ad-hoc rule (not from pack installation)
|
||||
*/
|
||||
is_adhoc: boolean;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Pack ID
|
||||
*/
|
||||
pack: number;
|
||||
/**
|
||||
* Pack reference
|
||||
*/
|
||||
pack_ref: string;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Trigger ID
|
||||
*/
|
||||
trigger: number;
|
||||
/**
|
||||
* Parameters for trigger configuration and event filtering
|
||||
*/
|
||||
trigger_params: Record<string, any>;
|
||||
/**
|
||||
* Trigger reference
|
||||
*/
|
||||
trigger_ref: string;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
};
|
||||
|
||||
58
web/src/api/models/RuleSummary.ts
Normal file
58
web/src/api/models/RuleSummary.ts
Normal file
@@ -0,0 +1,58 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Simplified rule response (for list endpoints)
|
||||
*/
|
||||
export type RuleSummary = {
|
||||
/**
|
||||
* Parameters to pass to the action when rule is triggered
|
||||
*/
|
||||
action_params: Record<string, any>;
|
||||
/**
|
||||
* Action reference
|
||||
*/
|
||||
action_ref: string;
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Rule description
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Whether the rule is enabled
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Rule ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Pack reference
|
||||
*/
|
||||
pack_ref: string;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Parameters for trigger configuration and event filtering
|
||||
*/
|
||||
trigger_params: Record<string, any>;
|
||||
/**
|
||||
* Trigger reference
|
||||
*/
|
||||
trigger_ref: string;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
};
|
||||
|
||||
70
web/src/api/models/SensorResponse.ts
Normal file
70
web/src/api/models/SensorResponse.ts
Normal file
@@ -0,0 +1,70 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Response DTO for sensor information
|
||||
*/
|
||||
export type SensorResponse = {
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Sensor description
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Whether the sensor is enabled
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Entry point
|
||||
*/
|
||||
entrypoint: string;
|
||||
/**
|
||||
* Sensor ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Pack ID (optional)
|
||||
*/
|
||||
pack?: number | null;
|
||||
/**
|
||||
* Pack reference (optional)
|
||||
*/
|
||||
pack_ref?: string | null;
|
||||
/**
|
||||
* Parameter schema
|
||||
*/
|
||||
param_schema: any | null;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Runtime ID
|
||||
*/
|
||||
runtime: number;
|
||||
/**
|
||||
* Runtime reference
|
||||
*/
|
||||
runtime_ref: string;
|
||||
/**
|
||||
* Trigger ID
|
||||
*/
|
||||
trigger: number;
|
||||
/**
|
||||
* Trigger reference
|
||||
*/
|
||||
trigger_ref: string;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
};
|
||||
|
||||
46
web/src/api/models/SensorSummary.ts
Normal file
46
web/src/api/models/SensorSummary.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Simplified sensor response (for list endpoints)
|
||||
*/
|
||||
export type SensorSummary = {
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Sensor description
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Whether the sensor is enabled
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Sensor ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Pack reference (optional)
|
||||
*/
|
||||
pack_ref?: string | null;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Trigger reference
|
||||
*/
|
||||
trigger_ref: string;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
};
|
||||
|
||||
18
web/src/api/models/SuccessResponse.ts
Normal file
18
web/src/api/models/SuccessResponse.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Success message response (for operations that don't return data)
|
||||
*/
|
||||
export type SuccessResponse = {
|
||||
/**
|
||||
* Message describing the operation
|
||||
*/
|
||||
message: string;
|
||||
/**
|
||||
* Success indicator
|
||||
*/
|
||||
success: boolean;
|
||||
};
|
||||
|
||||
17
web/src/api/models/TestCaseResult.ts
Normal file
17
web/src/api/models/TestCaseResult.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { TestStatus } from './TestStatus';
|
||||
/**
|
||||
* Individual test case result
|
||||
*/
|
||||
export type TestCaseResult = {
|
||||
durationMs: number;
|
||||
errorMessage?: string | null;
|
||||
name: string;
|
||||
status: TestStatus;
|
||||
stderr?: string | null;
|
||||
stdout?: string | null;
|
||||
};
|
||||
|
||||
13
web/src/api/models/TestStatus.ts
Normal file
13
web/src/api/models/TestStatus.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Test status enum
|
||||
*/
|
||||
export enum TestStatus {
|
||||
PASSED = 'passed',
|
||||
FAILED = 'failed',
|
||||
SKIPPED = 'skipped',
|
||||
ERROR = 'error',
|
||||
}
|
||||
19
web/src/api/models/TestSuiteResult.ts
Normal file
19
web/src/api/models/TestSuiteResult.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { TestCaseResult } from './TestCaseResult';
|
||||
/**
|
||||
* Test suite result (collection of test cases)
|
||||
*/
|
||||
export type TestSuiteResult = {
|
||||
durationMs: number;
|
||||
failed: number;
|
||||
name: string;
|
||||
passed: number;
|
||||
runnerType: string;
|
||||
skipped: number;
|
||||
testCases: Array<TestCaseResult>;
|
||||
total: number;
|
||||
};
|
||||
|
||||
28
web/src/api/models/TokenResponse.ts
Normal file
28
web/src/api/models/TokenResponse.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { UserInfo } from './UserInfo';
|
||||
/**
|
||||
* Token response
|
||||
*/
|
||||
export type TokenResponse = {
|
||||
/**
|
||||
* Access token (JWT)
|
||||
*/
|
||||
access_token: string;
|
||||
/**
|
||||
* Access token expiration in seconds
|
||||
*/
|
||||
expires_in: number;
|
||||
/**
|
||||
* Refresh token
|
||||
*/
|
||||
refresh_token: string;
|
||||
/**
|
||||
* Token type (always "Bearer")
|
||||
*/
|
||||
token_type: string;
|
||||
user?: (null | UserInfo);
|
||||
};
|
||||
|
||||
66
web/src/api/models/TriggerResponse.ts
Normal file
66
web/src/api/models/TriggerResponse.ts
Normal file
@@ -0,0 +1,66 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Response DTO for trigger information
|
||||
*/
|
||||
export type TriggerResponse = {
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Trigger description
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
* Whether the trigger is enabled
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Trigger ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Whether this is an ad-hoc trigger (not from pack installation)
|
||||
*/
|
||||
is_adhoc: boolean;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Output schema
|
||||
*/
|
||||
out_schema: any | null;
|
||||
/**
|
||||
* Pack ID (optional)
|
||||
*/
|
||||
pack?: number | null;
|
||||
/**
|
||||
* Pack reference (optional)
|
||||
*/
|
||||
pack_ref?: string | null;
|
||||
/**
|
||||
* Parameter schema
|
||||
*/
|
||||
param_schema: any | null;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
/**
|
||||
* Whether webhooks are enabled for this trigger
|
||||
*/
|
||||
webhook_enabled: boolean;
|
||||
/**
|
||||
* Webhook key (only present if webhooks are enabled)
|
||||
*/
|
||||
webhook_key?: string | null;
|
||||
};
|
||||
|
||||
46
web/src/api/models/TriggerSummary.ts
Normal file
46
web/src/api/models/TriggerSummary.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Simplified trigger response (for list endpoints)
|
||||
*/
|
||||
export type TriggerSummary = {
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Trigger description
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
* Whether the trigger is enabled
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Trigger ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Pack reference (optional)
|
||||
*/
|
||||
pack_ref?: string | null;
|
||||
/**
|
||||
* Unique reference identifier
|
||||
*/
|
||||
ref: string;
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updated: string;
|
||||
/**
|
||||
* Whether webhooks are enabled for this trigger
|
||||
*/
|
||||
webhook_enabled: boolean;
|
||||
};
|
||||
|
||||
34
web/src/api/models/UpdateActionRequest.ts
Normal file
34
web/src/api/models/UpdateActionRequest.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Request DTO for updating an action
|
||||
*/
|
||||
export type UpdateActionRequest = {
|
||||
/**
|
||||
* Action description
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
* Entry point for action execution
|
||||
*/
|
||||
entrypoint?: string | null;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label?: string | null;
|
||||
/**
|
||||
* Output schema
|
||||
*/
|
||||
out_schema: any | null;
|
||||
/**
|
||||
* Parameter schema
|
||||
*/
|
||||
param_schema: any | null;
|
||||
/**
|
||||
* Runtime ID
|
||||
*/
|
||||
runtime?: number | null;
|
||||
};
|
||||
|
||||
18
web/src/api/models/UpdateInquiryRequest.ts
Normal file
18
web/src/api/models/UpdateInquiryRequest.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { i64 } from './i64';
|
||||
import type { InquiryStatus } from './InquiryStatus';
|
||||
/**
|
||||
* Request to update an inquiry
|
||||
*/
|
||||
export type UpdateInquiryRequest = {
|
||||
assigned_to?: (null | i64);
|
||||
/**
|
||||
* Update the response data
|
||||
*/
|
||||
response: any | null;
|
||||
status?: (null | InquiryStatus);
|
||||
};
|
||||
|
||||
22
web/src/api/models/UpdateKeyRequest.ts
Normal file
22
web/src/api/models/UpdateKeyRequest.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Request to update an existing key/secret
|
||||
*/
|
||||
export type UpdateKeyRequest = {
|
||||
/**
|
||||
* Update encryption status (re-encrypts if changing from false to true)
|
||||
*/
|
||||
encrypted?: boolean | null;
|
||||
/**
|
||||
* Update the human-readable name
|
||||
*/
|
||||
name?: string | null;
|
||||
/**
|
||||
* Update the secret value
|
||||
*/
|
||||
value?: string | null;
|
||||
};
|
||||
|
||||
46
web/src/api/models/UpdatePackRequest.ts
Normal file
46
web/src/api/models/UpdatePackRequest.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Request DTO for updating a pack
|
||||
*/
|
||||
export type UpdatePackRequest = {
|
||||
/**
|
||||
* Configuration schema
|
||||
*/
|
||||
conf_schema: any | null;
|
||||
/**
|
||||
* Pack configuration values
|
||||
*/
|
||||
config: any | null;
|
||||
/**
|
||||
* Pack description
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
* Whether this is a standard pack
|
||||
*/
|
||||
is_standard?: boolean | null;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label?: string | null;
|
||||
/**
|
||||
* Pack metadata
|
||||
*/
|
||||
meta: any | null;
|
||||
/**
|
||||
* Runtime dependencies
|
||||
*/
|
||||
runtime_deps?: any[] | null;
|
||||
/**
|
||||
* Tags for categorization
|
||||
*/
|
||||
tags?: any[] | null;
|
||||
/**
|
||||
* Pack version
|
||||
*/
|
||||
version?: string | null;
|
||||
};
|
||||
|
||||
34
web/src/api/models/UpdateRuleRequest.ts
Normal file
34
web/src/api/models/UpdateRuleRequest.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Request DTO for updating a rule
|
||||
*/
|
||||
export type UpdateRuleRequest = {
|
||||
/**
|
||||
* Parameters to pass to the action when rule is triggered
|
||||
*/
|
||||
action_params: any | null;
|
||||
/**
|
||||
* Conditions for rule evaluation
|
||||
*/
|
||||
conditions: any | null;
|
||||
/**
|
||||
* Rule description
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
* Whether the rule is enabled
|
||||
*/
|
||||
enabled?: boolean | null;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label?: string | null;
|
||||
/**
|
||||
* Parameters for trigger configuration and event filtering
|
||||
*/
|
||||
trigger_params: any | null;
|
||||
};
|
||||
|
||||
30
web/src/api/models/UpdateSensorRequest.ts
Normal file
30
web/src/api/models/UpdateSensorRequest.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Request DTO for updating a sensor
|
||||
*/
|
||||
export type UpdateSensorRequest = {
|
||||
/**
|
||||
* Sensor description
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
* Whether the sensor is enabled
|
||||
*/
|
||||
enabled?: boolean | null;
|
||||
/**
|
||||
* Entry point for sensor execution
|
||||
*/
|
||||
entrypoint?: string | null;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label?: string | null;
|
||||
/**
|
||||
* Parameter schema
|
||||
*/
|
||||
param_schema: any | null;
|
||||
};
|
||||
|
||||
30
web/src/api/models/UpdateTriggerRequest.ts
Normal file
30
web/src/api/models/UpdateTriggerRequest.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Request DTO for updating a trigger
|
||||
*/
|
||||
export type UpdateTriggerRequest = {
|
||||
/**
|
||||
* Trigger description
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
* Whether the trigger is enabled
|
||||
*/
|
||||
enabled?: boolean | null;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label?: string | null;
|
||||
/**
|
||||
* Output schema
|
||||
*/
|
||||
out_schema: any | null;
|
||||
/**
|
||||
* Parameter schema
|
||||
*/
|
||||
param_schema: any | null;
|
||||
};
|
||||
|
||||
42
web/src/api/models/UpdateWorkflowRequest.ts
Normal file
42
web/src/api/models/UpdateWorkflowRequest.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Request DTO for updating a workflow
|
||||
*/
|
||||
export type UpdateWorkflowRequest = {
|
||||
/**
|
||||
* Workflow definition
|
||||
*/
|
||||
definition: any | null;
|
||||
/**
|
||||
* Workflow description
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
* Whether the workflow is enabled
|
||||
*/
|
||||
enabled?: boolean | null;
|
||||
/**
|
||||
* Human-readable label
|
||||
*/
|
||||
label?: string | null;
|
||||
/**
|
||||
* Output schema
|
||||
*/
|
||||
out_schema: any | null;
|
||||
/**
|
||||
* Parameter schema
|
||||
*/
|
||||
param_schema: any | null;
|
||||
/**
|
||||
* Tags
|
||||
*/
|
||||
tags?: any[] | null;
|
||||
/**
|
||||
* Workflow version
|
||||
*/
|
||||
version?: string | null;
|
||||
};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user