The platform for continuously improving AI agents.
/* tslint:disable */
/* eslint-disable */
/**
* Overbae API
* Backend API for the Overclaw / Overmind platform.
*
* The version of the OpenAPI document: 2.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
import type { ActivityAsset } from './ActivityAsset';
import {
ActivityAssetFromJSON,
ActivityAssetFromJSONTyped,
ActivityAssetToJSON,
ActivityAssetToJSONTyped,
} from './ActivityAsset';
/**
*
* @export
* @interface Activity
*/
export interface Activity {
/**
*
* @type {string}
* @memberof Activity
*/
id: string;
/**
*
* @type {string}
* @memberof Activity
*/
project: string | null;
/**
*
* @type {string}
* @memberof Activity
*/
kind: string;
/**
*
* @type {string}
* @memberof Activity
*/
actorKind: string;
/**
*
* @type {string}
* @memberof Activity
*/
actorName: string;
/**
*
* @type {string}
* @memberof Activity
*/
action: string;
/**
*
* @type {string}
* @memberof Activity
*/
status: string;
/**
*
* @type {Array<ActivityAsset>}
* @memberof Activity
*/
assets: Array<ActivityAsset>;
/**
*
* @type {string}
* @memberof Activity
*/
taskKind: string;
/**
*
* @type {string}
* @memberof Activity
*/
taskId: string;
/**
*
* @type {string}
* @memberof Activity
*/
sequenceKey: string;
/**
*
* @type {boolean}
* @memberof Activity
*/
seen: boolean;
/**
*
* @type {Date}
* @memberof Activity
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof Activity
*/
updatedAt: Date;
}
/**
* Check if a given object implements the Activity interface.
*/
export function instanceOfActivity(value: object): value is Activity {
if (!('id' in value) || value['id'] === undefined) return false;
if (!('project' in value) || value['project'] === undefined) return false;
if (!('kind' in value) || value['kind'] === undefined) return false;
if (!('actorKind' in value) || value['actorKind'] === undefined) return false;
if (!('actorName' in value) || value['actorName'] === undefined) return false;
if (!('action' in value) || value['action'] === undefined) return false;
if (!('status' in value) || value['status'] === undefined) return false;
if (!('assets' in value) || value['assets'] === undefined) return false;
if (!('taskKind' in value) || value['taskKind'] === undefined) return false;
if (!('taskId' in value) || value['taskId'] === undefined) return false;
if (!('sequenceKey' in value) || value['sequenceKey'] === undefined) return false;
if (!('seen' in value) || value['seen'] === undefined) return false;
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
return true;
}
export function ActivityFromJSON(json: any): Activity {
return ActivityFromJSONTyped(json, false);
}
export function ActivityFromJSONTyped(json: any, ignoreDiscriminator: boolean): Activity {
if (json == null) {
return json;
}
return {
'id': json['id'],
'project': json['project'],
'kind': json['kind'],
'actorKind': json['actor_kind'],
'actorName': json['actor_name'],
'action': json['action'],
'status': json['status'],
'assets': ((json['assets'] as Array<any>).map(ActivityAssetFromJSON)),
'taskKind': json['task_kind'],
'taskId': json['task_id'],
'sequenceKey': json['sequence_key'],
'seen': json['seen'],
'createdAt': (new Date(json['created_at'])),
'updatedAt': (new Date(json['updated_at'])),
};
}
export function ActivityToJSON(json: any): Activity {
return ActivityToJSONTyped(json, false);
}
export function ActivityToJSONTyped(value?: Activity | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'project': value['project'],
'kind': value['kind'],
'actor_kind': value['actorKind'],
'actor_name': value['actorName'],
'action': value['action'],
'status': value['status'],
'assets': ((value['assets'] as Array<any>).map(ActivityAssetToJSON)),
'task_kind': value['taskKind'],
'task_id': value['taskId'],
'sequence_key': value['sequenceKey'],
'seen': value['seen'],
'created_at': value['createdAt'].toISOString(),
'updated_at': value['updatedAt'].toISOString(),
};
}