hud-ai
Version:
Hud.ai API Client
35 lines (34 loc) • 1.39 kB
TypeScript
/// <reference types="bluebird" />
import * as Promise from 'bluebird';
import { HudAiCreateAttributes, HudAiListAttributes, HudAiUpdateAttributes, Resource } from '../utils/Resource';
import { RequestManager } from '../RequestManager';
import { UserSource } from '../entities';
export interface UserSourceListAttributes extends HudAiListAttributes {
userId?: string;
sourceId?: string;
}
export interface UserSourceCreateAttributes extends HudAiCreateAttributes {
userId?: string;
sourceId: string;
reliabilityScore: number;
}
export interface UserSourceUpdateAttributes extends HudAiUpdateAttributes {
userId?: string;
sourceId: string;
reliabilityScore: number;
}
export interface UserSourceDestroyAttributes {
userId?: string;
sourceId: string;
}
export declare class UserSourceResource extends Resource<UserSource, UserSourceListAttributes, UserSourceCreateAttributes, UserSourceUpdateAttributes> {
constructor(requestManager: RequestManager);
list(listArgs: UserSourceListAttributes): Promise<{
count: number;
rows: UserSource[];
}>;
create(createArgs: UserSourceCreateAttributes): Promise<UserSource>;
update(createArgs: UserSourceUpdateAttributes): Promise<UserSource>;
del(destroyArgs: UserSourceDestroyAttributes): Promise<void>;
destroy(destroyArgs: UserSourceDestroyAttributes): Promise<void>;
}